53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469
|
|
* Ghidra 12.1.2 decompiler output for 0x1400cc280 FUN_1400cc280
|
|
* Pseudocode, not original source. */
|
|
|
|
ulonglong FUN_1400cc280(longlong param_1,int param_2,undefined8 param_3,uint param_4)
|
|
|
|
{
|
|
int iVar1;
|
|
uint uVar2;
|
|
ulonglong uVar3;
|
|
byte *_Memory;
|
|
bool bVar4;
|
|
int local_res8 [2];
|
|
|
|
if (param_1 == 0) {
|
|
return 0x10;
|
|
}
|
|
bVar4 = param_2 < 0;
|
|
if (bVar4) {
|
|
param_2 = -param_2;
|
|
}
|
|
if (0x1fe < param_2 - 2U) {
|
|
return 0x17;
|
|
}
|
|
uVar3 = FUN_1400c6ac0(param_4);
|
|
if ((int)uVar3 == 0) {
|
|
_Memory = calloc(1,(longlong)param_2);
|
|
if (_Memory == (byte *)0x0) {
|
|
uVar3 = 0xd;
|
|
}
|
|
else {
|
|
do {
|
|
iVar1 = (**(code **)(&DAT_14015f498 + (longlong)(int)param_4 * 0x50))
|
|
(_Memory,param_2,param_3);
|
|
if (iVar1 != param_2) {
|
|
free(_Memory);
|
|
return 9;
|
|
}
|
|
*_Memory = *_Memory | 0xc0;
|
|
_Memory[(longlong)param_2 - 1] = _Memory[(longlong)param_2 - 1] | bVar4 * '\x02' | 1U;
|
|
uVar2 = (*DAT_140163340)(param_1,_Memory,param_2);
|
|
if ((uVar2 != 0) || (uVar2 = (*DAT_1401633e8)(param_1,local_res8), uVar2 != 0)) {
|
|
free(_Memory);
|
|
return (ulonglong)uVar2;
|
|
}
|
|
} while (local_res8[0] == 0);
|
|
free(_Memory);
|
|
uVar3 = 0;
|
|
}
|
|
}
|
|
return uVar3;
|
|
}
|
|
|