decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
334
decomp/DBCServer_Release_x64/full/functions/0x1401ab350.c
Normal file
334
decomp/DBCServer_Release_x64/full/functions/0x1401ab350.c
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
||||
* Ghidra 12.1.2 decompiler output for 0x1401ab350 FUN_1401ab350
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
undefined8 FUN_1401ab350(longlong param_1,int *param_2,undefined8 param_3,longlong param_4)
|
||||
|
||||
{
|
||||
char cVar1;
|
||||
undefined1 uVar2;
|
||||
int iVar3;
|
||||
int iVar4;
|
||||
int iVar5;
|
||||
int *piVar6;
|
||||
undefined8 uVar7;
|
||||
undefined **ppuVar8;
|
||||
longlong lVar9;
|
||||
int *piVar10;
|
||||
ulonglong local_res10 [2];
|
||||
longlong local_res20;
|
||||
int *local_c8;
|
||||
int local_c0;
|
||||
uint local_bc;
|
||||
undefined **local_b8;
|
||||
int local_b0 [2];
|
||||
longlong local_a8;
|
||||
undefined8 local_a0;
|
||||
undefined8 local_98;
|
||||
int local_90;
|
||||
undefined **local_88;
|
||||
int local_80;
|
||||
undefined2 local_7c;
|
||||
undefined1 local_78;
|
||||
undefined **local_68;
|
||||
int local_60;
|
||||
undefined2 local_5c;
|
||||
undefined **local_58;
|
||||
int local_50;
|
||||
undefined2 local_4c;
|
||||
undefined **local_48;
|
||||
int local_40;
|
||||
undefined2 local_3c;
|
||||
undefined **local_38;
|
||||
int local_30;
|
||||
undefined2 local_2c;
|
||||
undefined8 local_28;
|
||||
|
||||
local_28 = 0xfffffffffffffffe;
|
||||
local_c0 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
|
||||
local_res20 = param_4;
|
||||
cVar1 = FUN_14016bba0(param_2,&local_bc);
|
||||
if (cVar1 == '\0') goto switchD_1401ab3d7_caseD_3;
|
||||
local_res10[0] = local_res10[0] & 0xffffffffffffff00;
|
||||
switch(local_bc) {
|
||||
case 1:
|
||||
FUN_1401aaf60(param_1,param_2,0,param_3,local_res20 != 0);
|
||||
default:
|
||||
switchD_1401ab3d7_caseD_3:
|
||||
FUN_14016b040(param_2,local_c0);
|
||||
return 0;
|
||||
case 2:
|
||||
FUN_1401ab180(param_1,param_2,0,param_3,local_res20 != 0);
|
||||
goto switchD_1401ab3d7_caseD_3;
|
||||
case 5:
|
||||
FUN_1401a9ab0(param_1,param_2,param_3);
|
||||
break;
|
||||
case 7:
|
||||
FUN_1401a8110(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0xc:
|
||||
local_58 = Proud::AddrPort::vftable;
|
||||
local_50 = param_2[0xe];
|
||||
local_4c = (undefined2)param_2[0xf];
|
||||
cVar1 = FUN_14016f870(&local_58);
|
||||
if (cVar1 == '\0') {
|
||||
FUN_140193740(*(undefined8 *)(param_1 + 0x148),param_3,
|
||||
"receivedInfo.GetRemoteAddr().IsUnicastEndpoint()",2);
|
||||
}
|
||||
local_48 = Proud::AddrPort::vftable;
|
||||
local_40 = param_2[0xe];
|
||||
local_3c = (undefined2)param_2[0xf];
|
||||
FUN_1401a5a50(param_1,param_2,&local_48);
|
||||
break;
|
||||
case 0xe:
|
||||
FUN_1401a50f0(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x10:
|
||||
local_38 = Proud::AddrPort::vftable;
|
||||
local_30 = param_2[0xe];
|
||||
local_2c = (undefined2)param_2[0xf];
|
||||
cVar1 = FUN_14016f870(&local_38);
|
||||
if (cVar1 == '\0') {
|
||||
FUN_140193740(*(undefined8 *)(param_1 + 0x148),param_3,
|
||||
"receivedInfo.GetRemoteAddr().IsUnicastEndpoint()",2);
|
||||
}
|
||||
local_68 = Proud::AddrPort::vftable;
|
||||
local_60 = param_2[0xe];
|
||||
local_5c = (undefined2)param_2[0xf];
|
||||
FUN_1401a5df0(param_1,param_2,&local_68);
|
||||
break;
|
||||
case 0x12:
|
||||
FUN_1401a5570(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x14:
|
||||
FUN_1401a61e0(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x15:
|
||||
FUN_1401a6a40(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x16:
|
||||
FUN_1401a71b0(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x1a:
|
||||
FUN_1401a7580(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x1b:
|
||||
FUN_1401a3b00(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x24:
|
||||
case 0x25:
|
||||
FUN_14016b440(&local_b8);
|
||||
local_88 = Proud::AddrPort::vftable;
|
||||
local_78 = 0;
|
||||
local_90 = 0;
|
||||
local_80 = DAT_140344450;
|
||||
local_7c = DAT_140344454;
|
||||
cVar1 = FUN_1401a0e20(*(undefined8 *)(param_1 + 0x148),local_bc,param_2);
|
||||
if (cVar1 != '\0') {
|
||||
local_78 = (undefined1)param_2[0x10];
|
||||
local_80 = param_2[0xe];
|
||||
local_7c = (undefined2)param_2[0xf];
|
||||
local_90 = param_2[10];
|
||||
uVar2 = FUN_1401ab350(param_1,&local_b8,param_3);
|
||||
local_res10[0] = CONCAT71(local_res10[0]._1_7_,uVar2);
|
||||
}
|
||||
local_c8 = local_b0;
|
||||
FUN_14016d0e0(local_b0);
|
||||
if ((local_a8 != 0) && (local_a0._4_4_ < 0)) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d6b0();
|
||||
}
|
||||
goto LAB_1401ab6e5;
|
||||
case 0x26:
|
||||
FUN_14016b440(&local_b8);
|
||||
local_88 = Proud::AddrPort::vftable;
|
||||
local_78 = 0;
|
||||
local_90 = 0;
|
||||
local_80 = DAT_140344450;
|
||||
local_7c = DAT_140344454;
|
||||
cVar1 = FUN_14019f250(*(undefined8 *)(param_1 + 0x148),param_2,&local_b8);
|
||||
if (cVar1 != '\0') {
|
||||
local_78 = (undefined1)param_2[0x10];
|
||||
local_80 = param_2[0xe];
|
||||
local_7c = (undefined2)param_2[0xf];
|
||||
local_90 = param_2[10];
|
||||
uVar2 = FUN_1401ab350(param_1,&local_b8,param_3);
|
||||
local_res10[0] = CONCAT71(local_res10[0]._1_7_,uVar2);
|
||||
}
|
||||
local_c8 = local_b0;
|
||||
FUN_14016d0e0(local_b0);
|
||||
if ((local_a8 != 0) && (local_a0._4_4_ < 0)) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d6b0();
|
||||
}
|
||||
LAB_1401ab6e5:
|
||||
if ((char)local_res10[0] != '\x01') {
|
||||
if ((char)local_res10[0] != '\0') {
|
||||
return 1;
|
||||
}
|
||||
goto switchD_1401ab3d7_caseD_3;
|
||||
}
|
||||
break;
|
||||
case 0x27:
|
||||
FUN_1401a7a50(param_1,param_2,param_3);
|
||||
break;
|
||||
case 0x28:
|
||||
FUN_1401a3b90(param_1,param_2,param_3);
|
||||
}
|
||||
if (*(longlong *)(param_2 + 2) == 0) {
|
||||
if (*(longlong *)(param_2 + 4) == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d1e0();
|
||||
}
|
||||
iVar5 = param_2[6];
|
||||
}
|
||||
else {
|
||||
iVar5 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
|
||||
}
|
||||
if (iVar5 == (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3) {
|
||||
return 1;
|
||||
}
|
||||
if (local_bc == 0x24) {
|
||||
return 1;
|
||||
}
|
||||
if (local_bc == 0x25) {
|
||||
return 1;
|
||||
}
|
||||
FUN_14016d8c0();
|
||||
local_c8 = (int *)PTR_DAT_1403440a0;
|
||||
local_c0 = FUN_14016d740(L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ProudNetLayer");
|
||||
iVar5 = 0;
|
||||
if ((local_c8 != (int *)0x0) && (iVar5 = 0, local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar5 = local_c8[-2];
|
||||
}
|
||||
iVar4 = local_c0;
|
||||
if (((local_c0 <= iVar5) && (iVar4 = 0, local_c8 != (int *)0x0)) &&
|
||||
(local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar4 = local_c8[-2];
|
||||
}
|
||||
iVar5 = 1;
|
||||
if (1 < iVar4) {
|
||||
iVar5 = iVar4;
|
||||
}
|
||||
iVar3 = 0;
|
||||
iVar4 = iVar3;
|
||||
if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar4 = local_c8[-2];
|
||||
}
|
||||
if (iVar4 < iVar5) {
|
||||
if (local_c8 == (int *)0x0) {
|
||||
local_c8 = (int *)PTR_DAT_1403440a0;
|
||||
}
|
||||
if (iVar5 < 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d6b0();
|
||||
}
|
||||
if (iVar5 == 0) {
|
||||
FUN_14004eb70(&local_c8);
|
||||
}
|
||||
else {
|
||||
if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar3 = local_c8[-2];
|
||||
}
|
||||
if (iVar5 != iVar3) {
|
||||
piVar6 = (int *)FUN_14016d940((longlong)iVar5 * 2 + 10);
|
||||
iVar3 = 0;
|
||||
iVar4 = 0;
|
||||
if (piVar6 != (int *)0x0) {
|
||||
*piVar6 = 0;
|
||||
piVar6[1] = 1;
|
||||
}
|
||||
*piVar6 = iVar5;
|
||||
if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar4 = local_c8[-2];
|
||||
}
|
||||
piVar10 = (int *)PTR_DAT_1403440a0;
|
||||
if (iVar5 < iVar4) {
|
||||
LAB_1401ab862:
|
||||
iVar3 = iVar5;
|
||||
if (local_c8 != (int *)0x0) {
|
||||
piVar10 = local_c8;
|
||||
}
|
||||
}
|
||||
else if (local_c8 != (int *)0x0) {
|
||||
iVar5 = iVar3;
|
||||
if (local_c8 != (int *)PTR_DAT_1403440a0) {
|
||||
iVar5 = local_c8[-2];
|
||||
}
|
||||
goto LAB_1401ab862;
|
||||
}
|
||||
FUN_14016d770(piVar6 + 2,piVar10,iVar3);
|
||||
FUN_14004eb70(&local_c8);
|
||||
local_c8 = piVar6 + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
FUN_14004e850(&local_c8);
|
||||
piVar6 = local_c8;
|
||||
if (local_c8 == (int *)0x0) {
|
||||
piVar6 = (int *)PTR_DAT_1403440a0;
|
||||
}
|
||||
FUN_14016d770(piVar6,L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ProudNetLayer",
|
||||
local_c0);
|
||||
piVar6 = local_c8;
|
||||
if (local_c8 == (int *)0x0) {
|
||||
piVar6 = (int *)PTR_DAT_1403440a0;
|
||||
}
|
||||
iVar4 = FUN_14016d740(piVar6);
|
||||
iVar5 = 0;
|
||||
if (0 < iVar4) {
|
||||
iVar5 = iVar4;
|
||||
}
|
||||
iVar4 = 0;
|
||||
if ((local_c8 != (int *)0x0) && (iVar4 = 0, local_c8 != (int *)PTR_DAT_1403440a0)) {
|
||||
iVar4 = local_c8[-2];
|
||||
}
|
||||
if ((iVar4 <= iVar5) && (iVar5 = 0, local_c8 != (int *)0x0)) {
|
||||
if (local_c8 == (int *)PTR_DAT_1403440a0) goto LAB_1401ab917;
|
||||
iVar5 = local_c8[-2];
|
||||
}
|
||||
if (((local_c8 != (int *)PTR_DAT_1403440a0) && (local_c8 != (int *)0x0)) &&
|
||||
(local_c8 + -2 != (int *)0x0)) {
|
||||
local_c8[-2] = iVar5;
|
||||
*(undefined2 *)((longlong)local_c8 + (longlong)iVar5 * 2) = 0;
|
||||
}
|
||||
LAB_1401ab917:
|
||||
iVar5 = FUN_14016afd0(param_2);
|
||||
local_res10[0] = FUN_14016b000(param_2);
|
||||
local_b8 = Proud::CFastArray<unsigned_char,1>::vftable;
|
||||
local_b0[0] = 0;
|
||||
local_b0[1] = 0;
|
||||
local_a8 = 0;
|
||||
local_a0 = 0;
|
||||
local_98 = 0;
|
||||
if (-1 < iVar5) {
|
||||
FUN_14004f0e0(&local_b8,iVar5);
|
||||
lVar9 = local_a8;
|
||||
if ((int)local_a0 == 0) {
|
||||
lVar9 = 0;
|
||||
}
|
||||
FUN_14004f1a0(lVar9,local_res10[0],(longlong)iVar5);
|
||||
local_b8 = Proud::ByteArray::vftable;
|
||||
uVar7 = FUN_140198f80(local_res10,0x1f,param_2[10],&local_c8,&local_b8);
|
||||
(**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))(*(longlong **)(param_1 + 0x148),uVar7);
|
||||
FUN_14019a9e0(&local_b8);
|
||||
piVar6 = local_c8;
|
||||
if (((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403440a0)) &&
|
||||
(piVar10 = local_c8 + -2, piVar10 != (int *)0x0)) {
|
||||
ppuVar8 = (undefined **)FUN_14016d8c0();
|
||||
local_68 = ppuVar8;
|
||||
FUN_14016db50(ppuVar8);
|
||||
local_60 = CONCAT31(local_60._1_3_,1);
|
||||
piVar6 = piVar6 + -1;
|
||||
*piVar6 = *piVar6 + -1;
|
||||
if (*piVar6 == 0) {
|
||||
FUN_14016d970(piVar10);
|
||||
}
|
||||
FUN_14016dbe0(ppuVar8);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d6b0();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue