server-re/decomp/DBCServer_Release_x64/full/functions/0x14013e360.c

57 lines
1.5 KiB
C

/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
* Ghidra 12.1.2 decompiler output for 0x14013e360 FUN_14013e360
* Pseudocode, not original source. */
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
int FUN_14013e360(longlong param_1,undefined4 param_2,wchar_t *param_3)
{
longlong lVar1;
int iVar2;
undefined1 auStack_78 [32];
undefined2 local_58;
undefined2 local_56;
undefined4 local_54;
undefined4 local_50;
undefined2 local_4c;
wchar_t local_4a [12];
ulonglong local_32;
ulonglong local_28;
local_28 = DAT_1403463c0 ^ (ulonglong)auStack_78;
local_4a[0] = L'\0';
local_4a[1] = L'\0';
local_4a[2] = L'\0';
local_4a[3] = L'\0';
local_4a[4] = L'\0';
local_4a[5] = L'\0';
local_4a[6] = L'\0';
local_4a[7] = L'\0';
local_4a[8] = L'\0';
local_4a[9] = L'\0';
local_4a[10] = L'\0';
local_4a[0xb] = L'\0';
local_32 = 0;
local_56 = 0x4f6;
local_58 = 0x2e;
local_4c = 0;
local_54 = 0;
local_50 = param_2;
wcsncpy(local_4a,param_3,0xf);
local_32 = local_32 & 0xffffffffffff;
lVar1 = **(longlong **)(param_1 + 200);
if (lVar1 == 0) {
iVar2 = 0;
}
else {
EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
iVar2 = FUN_1400a7630(*(undefined8 *)(lVar1 + 0x18),&local_58);
if (iVar2 != 0) {
ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
}
LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
}
return iVar2;
}