server-re/decomp/Agent_Release_x64/full/functions/0x1400deb60.c
2026-10-14 16:45:19 -04:00

41 lines
1.3 KiB
C

/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469
* Ghidra 12.1.2 decompiler output for 0x1400deb60 FUN_1400deb60
* Pseudocode, not original source. */
void FUN_1400deb60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)
{
errno_t eVar1;
undefined *puVar2;
EnterCriticalSection(DAT_140162d80);
if ((DAT_140163198 & 1) == 0) {
DAT_140163198 = DAT_140163198 | 1;
FUN_1400dd560();
atexit((_func_5014 *)&LAB_1400f13b0);
}
if (DAT_140163190 != 200) {
if ((DAT_140163198 & 1) == 0) {
DAT_140163198 = DAT_140163198 | 1;
FUN_1400dd560();
atexit((_func_5014 *)&LAB_1400f13b0);
}
if (DAT_140163190 != 1000) goto LAB_1400debfa;
}
_wsetlocale(0,L"korean");
LAB_1400debfa:
setlocale(0,(char *)0x0);
printf("Locale is: %s\n");
puVar2 = &DAT_14011d670;
eVar1 = fopen_s((FILE **)(param_1 + 0xb8),"Log\\Agent.log","w");
if (eVar1 != 0) {
*(undefined8 *)(param_1 + 0xb8) = 0;
FUN_1400de9f0(param_1,L"MBLOG open error",puVar2,param_4);
}
FUN_1400de550(DAT_1401626e8,"MBLOG %s writting\n","Log\\Agent.log",param_4);
/* WARNING: Could not recover jumptable at 0x0001400dec79. Too many branches */
/* WARNING: Treating indirect jump as call */
LeaveCriticalSection(DAT_140162d80);
return;
}