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

47 lines
1.5 KiB
C

/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
* Ghidra 12.1.2 decompiler output for 0x14000aa90 FUN_14000aa90
* Pseudocode, not original source. */
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
bool FUN_14000aa90(byte param_1,wchar_t *param_2,undefined8 param_3,undefined8 param_4)
{
undefined8 uVar1;
bool bVar2;
undefined8 local_res18;
undefined8 local_res20;
undefined1 auStack_658 [32];
wchar_t local_638;
undefined1 local_636 [510];
wchar_t local_438;
undefined1 local_436 [510];
wchar_t local_238;
undefined1 local_236 [526];
ulonglong local_28;
local_28 = DAT_1401ac5a0 ^ (ulonglong)auStack_658;
local_res18 = param_3;
local_res20 = param_4;
EnterCriticalSection((LPCRITICAL_SECTION)&DAT_1401bcfc8);
local_438 = L'\0';
memset(local_436,0,0x1fe);
vswprintf_s(&local_438,0x100,param_2,(va_list)&local_res18);
local_238 = L'\0';
memset(local_236,0,0x206);
local_638 = L'\0';
memset(local_636,0,0x1fe);
uVar1 = FUN_140009fd0(&local_638,&local_238,(longlong)&local_438,1);
bVar2 = (int)uVar1 != 0;
if (bVar2) {
FUN_14000a4c0((longlong)&local_238,(longlong)&local_638);
OutputDebugStringW(&local_638);
FUN_14000a750(param_1,(longlong)&local_638);
LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1401bcfc8);
}
else {
LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1401bcfc8);
}
return bVar2;
}