50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469
|
|
* Ghidra 12.1.2 decompiler output for 0x1400d67a8 FUN_1400d67a8
|
|
* Pseudocode, not original source. */
|
|
|
|
undefined8 FUN_1400d67a8(longlong param_1,byte *param_2,uint param_3)
|
|
|
|
{
|
|
int *piVar1;
|
|
ulonglong _Size;
|
|
uint uVar2;
|
|
undefined8 uVar3;
|
|
|
|
_Size = (ulonglong)param_3;
|
|
if ((param_1 == 0) || (piVar1 = *(int **)(param_1 + 0x28), piVar1 == (int *)0x0)) {
|
|
return 0xfffffffe;
|
|
}
|
|
if (piVar1[2] == 0) {
|
|
if (*piVar1 != 10) goto LAB_1400d6822;
|
|
}
|
|
else if (*piVar1 != 10) {
|
|
return 0xfffffffe;
|
|
}
|
|
uVar2 = FUN_1400d978c(0,(byte *)0x0,0);
|
|
uVar2 = FUN_1400d978c(uVar2,param_2,param_3);
|
|
if (uVar2 != piVar1[6]) {
|
|
return 0xfffffffd;
|
|
}
|
|
LAB_1400d6822:
|
|
uVar3 = FUN_1400d50c8(param_1,*(int *)(param_1 + 0x18));
|
|
if ((int)uVar3 == 0) {
|
|
if ((uint)piVar1[0xb] < param_3) {
|
|
memcpy(*(void **)(piVar1 + 0xe),param_2 + (_Size - (uint)piVar1[0xb]),
|
|
(ulonglong)(uint)piVar1[0xb]);
|
|
piVar1[0xc] = piVar1[0xb];
|
|
}
|
|
else {
|
|
memcpy((void *)((longlong)*(void **)(piVar1 + 0xe) + ((uint)piVar1[0xb] - _Size)),param_2,
|
|
_Size);
|
|
piVar1[0xc] = param_3;
|
|
}
|
|
piVar1[3] = 1;
|
|
uVar3 = 0;
|
|
}
|
|
else {
|
|
*piVar1 = 0x1c;
|
|
uVar3 = 0xfffffffc;
|
|
}
|
|
return uVar3;
|
|
}
|
|
|