server-re/decomp/AgentManager_Release_x64/full/functions/0x14003e170.c
2026-10-15 09:58:24 -04:00

44 lines
1.1 KiB
C

/* AgentManager_Release_x64.exe sha256 8fd8ca91725858651a7839d34257b10c2970ac16c97e60c523b8b0c983fcb186
* Ghidra 12.1.2 decompiler output for 0x14003e170 FUN_14003e170
* Pseudocode, not original source. */
undefined8
FUN_14003e170(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)
{
HANDLE pvVar1;
ulonglong uVar2;
bool bVar3;
undefined4 local_res8 [8];
undefined8 uVar4;
uVar4 = 0xfffffffffffffffe;
LOCK();
bVar3 = DAT_140176080 == 0;
if (bVar3) {
DAT_140176080 = 1;
}
UNLOCK();
if (bVar3) {
local_res8[0] = 2;
if ((DAT_140176068 & 1) == 0) {
DAT_140176068 = DAT_140176068 | 1;
FUN_14003df70((undefined8 *)&DAT_140176000,param_2,param_3,param_4);
}
uVar2 = (ulonglong)DAT_140176068;
if (DAT_140176008 != (code *)0x0) {
if ((DAT_140176068 & 1) == 0) {
DAT_140176068 = DAT_140176068 | 1;
FUN_14003df70((undefined8 *)&DAT_140176000,param_2,param_3,param_4);
}
pvVar1 = GetProcessHeap();
uVar2 = (*DAT_140176008)(pvVar1,0,local_res8,4,uVar4);
}
uVar4 = CONCAT71((int7)(uVar2 >> 8),1);
}
else {
uVar4 = 1;
}
return uVar4;
}