179 lines
6.7 KiB
C
179 lines
6.7 KiB
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x1401eca30 FUN_1401eca30
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Removing unreachable block (ram,0x0001401ecb5a) */
|
|
/* WARNING: Removing unreachable block (ram,0x0001401ecb6d) */
|
|
/* WARNING: Removing unreachable block (ram,0x0001401ecb87) */
|
|
/* WARNING: Removing unreachable block (ram,0x0001401ecb8f) */
|
|
/* WARNING: Removing unreachable block (ram,0x0001401ecb96) */
|
|
|
|
void FUN_1401eca30(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)
|
|
|
|
{
|
|
int *piVar1;
|
|
char cVar2;
|
|
undefined8 uVar3;
|
|
longlong lVar4;
|
|
undefined8 uVar5;
|
|
undefined *puVar6;
|
|
undefined *puVar7;
|
|
undefined4 uVar8;
|
|
double dVar9;
|
|
undefined8 local_res8;
|
|
undefined *local_res10;
|
|
undefined *local_res18;
|
|
|
|
uVar3 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))
|
|
(*(longlong **)(param_1 + 0x108),param_2,param_3,param_4,0xfffffffffffffffe);
|
|
FUN_14016db50(uVar3);
|
|
*(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0xb0) != 0) {
|
|
FUN_1401c6940();
|
|
}
|
|
puVar7 = (undefined *)0x0;
|
|
uVar8 = 1;
|
|
if (*(int *)(param_1 + 0x40) == 1) {
|
|
(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
|
|
lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108));
|
|
if (lVar4 != 0) {
|
|
lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108));
|
|
puVar6 = puVar7;
|
|
if (*(undefined8 **)(lVar4 + 0x100) != (undefined8 *)0x0) {
|
|
puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x100);
|
|
}
|
|
FUN_14019c630(puVar6);
|
|
}
|
|
lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670);
|
|
while (lVar4 != 0) {
|
|
puVar6 = puVar7;
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670) != 0) {
|
|
puVar6 = *(undefined **)(*(longlong *)(param_1 + 0x108) + 0x1660);
|
|
}
|
|
if (puVar6 == (undefined *)0x0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14004dc60(0x80004005);
|
|
}
|
|
local_res8 = 0;
|
|
if (*(longlong *)(puVar6 + 8) != 0) {
|
|
*(longlong *)(*(longlong *)(puVar6 + 8) + 8) =
|
|
*(longlong *)(*(longlong *)(puVar6 + 8) + 8) + 1;
|
|
local_res8 = *(undefined8 *)(puVar6 + 8);
|
|
}
|
|
FUN_1401d8b90(*(undefined8 *)(param_1 + 0x108),&local_res8);
|
|
lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670);
|
|
}
|
|
FUN_1401d86d0(*(undefined8 *)(param_1 + 0x108));
|
|
FUN_1401d8820(*(undefined8 *)(param_1 + 0x108));
|
|
lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108));
|
|
if (lVar4 != 0) {
|
|
lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108));
|
|
puVar6 = puVar7;
|
|
if (*(undefined8 **)(lVar4 + 0x128) != (undefined8 *)0x0) {
|
|
puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x128);
|
|
}
|
|
FUN_14019c630(puVar6);
|
|
}
|
|
}
|
|
FUN_1401d7690(*(undefined8 *)(param_1 + 0x108));
|
|
if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1718) == 0) {
|
|
lVar4 = FUN_1401c71d0();
|
|
if (lVar4 != 0) {
|
|
lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108));
|
|
if ((*(longlong **)(lVar4 + 0x100) != (longlong *)0x0) &&
|
|
(**(longlong **)(lVar4 + 0x100) != 0)) {
|
|
lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108));
|
|
puVar6 = puVar7;
|
|
if (*(undefined8 **)(lVar4 + 0x100) != (undefined8 *)0x0) {
|
|
puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x100);
|
|
}
|
|
cVar2 = FUN_14019c8d0(puVar6);
|
|
if (((cVar2 == '\0') ||
|
|
(lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108)),
|
|
*(char *)(lVar4 + 0x80) != '\0')) ||
|
|
(lVar4 = FUN_1401c71d0(*(undefined8 *)(param_1 + 0x108)), *(char *)(lVar4 + 0xc0) != '\0'
|
|
)) {
|
|
uVar8 = 2;
|
|
goto LAB_1401ecd63;
|
|
}
|
|
}
|
|
}
|
|
lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108));
|
|
if (lVar4 != 0) {
|
|
lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108));
|
|
if ((*(longlong **)(lVar4 + 0x128) != (longlong *)0x0) &&
|
|
(**(longlong **)(lVar4 + 0x128) != 0)) {
|
|
lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108));
|
|
puVar6 = puVar7;
|
|
if (*(undefined8 **)(lVar4 + 0x128) != (undefined8 *)0x0) {
|
|
puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x128);
|
|
}
|
|
cVar2 = FUN_14019c8d0(puVar6);
|
|
if (((cVar2 == '\0') ||
|
|
(lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108)),
|
|
*(char *)(lVar4 + 0x80) != '\0')) ||
|
|
(lVar4 = FUN_1401c71f0(*(undefined8 *)(param_1 + 0x108)), *(char *)(lVar4 + 0xc0) != '\0'
|
|
)) {
|
|
uVar8 = 3;
|
|
goto LAB_1401ecd63;
|
|
}
|
|
}
|
|
}
|
|
cVar2 = FUN_1401a1f70(*(longlong *)(param_1 + 0x108) + 0x1620);
|
|
if (cVar2 == '\0') {
|
|
FUN_1401a1e70(*(longlong *)(param_1 + 0x108) + 0x1620);
|
|
}
|
|
FUN_1401dd3e0(*(undefined8 *)(param_1 + 0x108),0);
|
|
if (*(int *)(param_1 + 0x100) < 5) {
|
|
*(undefined4 *)(param_1 + 0x40) = 0;
|
|
*(undefined4 *)(param_1 + 0x100) = 5;
|
|
uVar5 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
|
|
*(undefined8 *)(param_1 + 0x80) = uVar5;
|
|
*(undefined1 *)(param_1 + 0xc0) = 0;
|
|
}
|
|
}
|
|
else {
|
|
LAB_1401ecd63:
|
|
dVar9 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
|
|
if ((5.0 < dVar9 - *(double *)(param_1 + 0x80)) && (*(char *)(param_1 + 0xc0) == '\0')) {
|
|
FUN_14016d8c0();
|
|
local_res18 = PTR_DAT_1403440a0;
|
|
FUN_14004c020(&local_res18,
|
|
L"Too long time elapsed since disconnecting mode! unsafeDisconnectReason=%d",
|
|
uVar8);
|
|
FUN_14016d8c0();
|
|
puVar6 = local_res18;
|
|
local_res10 = PTR_DAT_1403440a0;
|
|
if (PTR_DAT_1403440a0 == (undefined *)0x0) {
|
|
local_res10 = puVar7;
|
|
}
|
|
if (local_res18 != PTR_DAT_1403440a0) {
|
|
uVar5 = FUN_14016d8c0();
|
|
FUN_14016db50(uVar5);
|
|
FUN_14004eb70(&local_res10);
|
|
local_res10 = puVar6;
|
|
if (((puVar6 != PTR_DAT_1403440a0) && (puVar6 != (undefined *)0x0)) &&
|
|
(puVar6 != (undefined *)0x8)) {
|
|
*(int *)(puVar6 + -4) = *(int *)(puVar6 + -4) + 1;
|
|
}
|
|
FUN_14016dbe0(uVar5);
|
|
}
|
|
FUN_1401be230(&local_res10);
|
|
*(undefined1 *)(param_1 + 0xc0) = 1;
|
|
if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403440a0)) &&
|
|
(puVar6 + -8 != (undefined *)0x0)) {
|
|
uVar5 = FUN_14016d8c0();
|
|
FUN_14016db50(uVar5);
|
|
piVar1 = (int *)(puVar6 + -4);
|
|
*piVar1 = *piVar1 + -1;
|
|
if (*piVar1 == 0) {
|
|
FUN_14016d970(puVar6 + -8);
|
|
}
|
|
FUN_14016dbe0(uVar5);
|
|
}
|
|
}
|
|
}
|
|
FUN_14016dbe0(uVar3);
|
|
return;
|
|
}
|
|
|