135 lines
4.3 KiB
C
135 lines
4.3 KiB
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x1401aaa90 FUN_1401aaa90
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
|
|
|
void FUN_1401aaa90(longlong param_1)
|
|
|
|
{
|
|
int *piVar1;
|
|
longlong *plVar2;
|
|
undefined *puVar3;
|
|
char cVar4;
|
|
undefined8 uVar5;
|
|
undefined *puVar6;
|
|
bool bVar7;
|
|
undefined1 auStack_1d8 [32];
|
|
undefined1 local_1b8;
|
|
undefined1 local_1b7 [7];
|
|
undefined8 local_1b0;
|
|
undefined *local_1a8;
|
|
undefined8 local_1a0;
|
|
undefined1 local_198;
|
|
undefined8 local_190;
|
|
undefined1 local_188;
|
|
undefined8 local_180;
|
|
undefined1 local_178 [312];
|
|
int *local_40;
|
|
ulonglong local_28;
|
|
|
|
local_180 = 0xfffffffffffffffe;
|
|
local_28 = DAT_1403463c0 ^ (ulonglong)auStack_1d8;
|
|
FUN_1401c5a10(&local_1b8);
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
|
|
(**(code **)(**(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758) + 0x58))();
|
|
}
|
|
uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
|
|
FUN_1401c25a0(local_178,uVar5);
|
|
cVar4 = *(char *)(param_1 + 0x140);
|
|
while (cVar4 == '\0') {
|
|
local_1b0 = 0;
|
|
uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
|
|
local_1a0 = uVar5;
|
|
FUN_14016db50(uVar5);
|
|
local_198 = 1;
|
|
if (DAT_14034c86f != '\0') {
|
|
(**(code **)(**(longlong **)(param_1 + 0x148) + 200))
|
|
(*(longlong **)(param_1 + 0x148),L"Proud::CNetThreads_S::UserWorkerThread_Main");
|
|
}
|
|
cVar4 = FUN_1401c2790(param_1 + 0x160,local_40,&local_1b0);
|
|
FUN_14016dbe0(uVar5);
|
|
local_198 = 0;
|
|
if (cVar4 == '\x01') {
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
|
|
plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
|
|
(**(code **)(*plVar2 + 0x78))(plVar2,local_1b7);
|
|
}
|
|
piVar1 = local_40;
|
|
if (*local_40 == 1) {
|
|
FUN_1401a4750(param_1,local_40,local_1b0);
|
|
}
|
|
else if (*local_40 == 2) {
|
|
FUN_1401aa1d0(param_1,local_40,local_1b0);
|
|
}
|
|
else {
|
|
FUN_14018df10(*(undefined8 *)(param_1 + 0x148),local_40 + 0x14);
|
|
FUN_1401c2880(param_1 + 0x160,piVar1[0xc],0);
|
|
}
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
|
|
plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
|
|
(**(code **)(*plVar2 + 0x80))(plVar2,local_1b7);
|
|
}
|
|
}
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
|
|
LOCK();
|
|
bVar7 = *(int *)(param_1 + 0x240) == 0;
|
|
if (bVar7) {
|
|
*(int *)(param_1 + 0x240) = 1;
|
|
}
|
|
UNLOCK();
|
|
if (bVar7) {
|
|
LOCK();
|
|
bVar7 = *(int *)(param_1 + 0x200) == 1;
|
|
if (bVar7) {
|
|
*(int *)(param_1 + 0x200) = 0;
|
|
}
|
|
UNLOCK();
|
|
if (bVar7) {
|
|
cVar4 = '\x01';
|
|
plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
|
|
(**(code **)(*plVar2 + 0x88))
|
|
(plVar2,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x260));
|
|
}
|
|
LOCK();
|
|
*(undefined4 *)(param_1 + 0x240) = 0;
|
|
UNLOCK();
|
|
}
|
|
}
|
|
if (cVar4 == '\0') {
|
|
FUN_1401c2700(param_1 + 0x160);
|
|
}
|
|
cVar4 = *(char *)(param_1 + 0x140);
|
|
}
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
|
|
(**(code **)(**(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758) + 0x60))();
|
|
}
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
|
|
FUN_14016d8c0();
|
|
local_1a8 = PTR_DAT_1403440a0;
|
|
FUN_14004c020(&local_1a8,&DAT_140282f80,L"Proud::CNetThreads_S::UserWorkerThread_Main");
|
|
puVar3 = local_1a8;
|
|
puVar6 = local_1a8;
|
|
if (local_1a8 == (undefined *)0x0) {
|
|
puVar6 = PTR_DAT_1403440a0;
|
|
}
|
|
FUN_1401adb30(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar6);
|
|
if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403440a0)) &&
|
|
(puVar3 + -8 != (undefined *)0x0)) {
|
|
uVar5 = FUN_14016d8c0();
|
|
local_190 = uVar5;
|
|
FUN_14016db50(uVar5);
|
|
local_188 = 1;
|
|
piVar1 = (int *)(puVar3 + -4);
|
|
*piVar1 = *piVar1 + -1;
|
|
if (*piVar1 == 0) {
|
|
FUN_14016d970(puVar3 + -8);
|
|
}
|
|
FUN_14016dbe0(uVar5);
|
|
}
|
|
}
|
|
FUN_1401c25e0(local_178);
|
|
FUN_1401c5a40(&local_1b8);
|
|
return;
|
|
}
|
|
|