server-re/decomp/MessageServer_Release_x64/full/functions/0x14011b8a0.c

41 lines
1.3 KiB
C

/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
* Ghidra 12.1.2 decompiler output for 0x14011b8a0 FUN_14011b8a0
* Pseudocode, not original source. */
void FUN_14011b8a0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)
{
errno_t eVar1;
undefined *puVar2;
EnterCriticalSection(DAT_1401bd028);
if ((DAT_1401bd4f0 & 1) == 0) {
DAT_1401bd4f0 = DAT_1401bd4f0 | 1;
FUN_140119f80();
atexit((_func_5014 *)&LAB_14012f3e0);
}
if (DAT_1401bd240 != 200) {
if ((DAT_1401bd4f0 & 1) == 0) {
DAT_1401bd4f0 = DAT_1401bd4f0 | 1;
FUN_140119f80();
atexit((_func_5014 *)&LAB_14012f3e0);
}
if (DAT_1401bd240 != 1000) goto LAB_14011b93a;
}
_wsetlocale(0,L"korean");
LAB_14011b93a:
setlocale(0,(char *)0x0);
printf("Locale is: %s\n");
puVar2 = &DAT_140159598;
eVar1 = fopen_s((FILE **)(param_1 + 0xb8),"MsgServer.log","w");
if (eVar1 != 0) {
*(undefined8 *)(param_1 + 0xb8) = 0;
FUN_14011b730(param_1,L"MBLOG open error",puVar2,param_4);
}
FUN_14011b2e0(DAT_1401ba9e8,"MBLOG %s writting\n","MsgServer.log",param_4);
/* WARNING: Could not recover jumptable at 0x00014011b9b9. Too many branches */
/* WARNING: Treating indirect jump as call */
LeaveCriticalSection(DAT_1401bd028);
return;
}