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
124
decomp/DBCServer_Release_x64/full/functions/0x1401addc0.c
Normal file
124
decomp/DBCServer_Release_x64/full/functions/0x1401addc0.c
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
||||
* Ghidra 12.1.2 decompiler output for 0x1401addc0 FUN_1401addc0
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
void FUN_1401addc0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)
|
||||
|
||||
{
|
||||
undefined8 uVar1;
|
||||
longlong *plVar2;
|
||||
void *pvVar3;
|
||||
undefined4 *puVar4;
|
||||
undefined8 *puVar5;
|
||||
longlong lVar6;
|
||||
undefined8 *puVar7;
|
||||
undefined8 local_res18;
|
||||
undefined8 local_res20;
|
||||
longlong *local_b8;
|
||||
undefined1 local_80 [80];
|
||||
|
||||
local_res18 = param_3;
|
||||
local_res20 = param_4;
|
||||
FUN_14016db50();
|
||||
if (*(char *)(param_1 + 0x50) != '\0') {
|
||||
FUN_14016d300(local_80,L"LogFile Creation Failed");
|
||||
/* WARNING: Subroutine does not return */
|
||||
_CxxThrowException(local_80,(ThrowInfo *)&DAT_1403417f8);
|
||||
}
|
||||
pvVar3 = operator_new(0x20);
|
||||
if (pvVar3 == (void *)0x0) {
|
||||
pvVar3 = (void *)0x0;
|
||||
}
|
||||
else {
|
||||
FUN_14016d8c0();
|
||||
*(undefined **)((longlong)pvVar3 + 8) = PTR_DAT_1403440a0;
|
||||
}
|
||||
if (pvVar3 == (void *)0x0) {
|
||||
local_b8 = (longlong *)0x0;
|
||||
}
|
||||
else {
|
||||
local_b8 = (longlong *)FUN_14016d940(0x10);
|
||||
local_b8[1] = 1;
|
||||
*local_b8 = (longlong)pvVar3;
|
||||
}
|
||||
if (local_b8 == (longlong *)0x0) {
|
||||
puVar4 = (undefined4 *)0x0;
|
||||
}
|
||||
else {
|
||||
puVar4 = (undefined4 *)*local_b8;
|
||||
}
|
||||
*puVar4 = 2;
|
||||
if (local_b8 == (longlong *)0x0) {
|
||||
lVar6 = 0;
|
||||
}
|
||||
else {
|
||||
lVar6 = *local_b8;
|
||||
}
|
||||
FUN_14004bf90(lVar6 + 8,param_2,&local_res18);
|
||||
if (local_b8 == (longlong *)0x0) {
|
||||
lVar6 = 0;
|
||||
}
|
||||
else {
|
||||
lVar6 = *local_b8;
|
||||
}
|
||||
FUN_1401ad3c0(lVar6 + 8,&DAT_1402b0a94,&DAT_1402a4aa0);
|
||||
if (local_b8 == (longlong *)0x0) {
|
||||
lVar6 = 0;
|
||||
}
|
||||
else {
|
||||
lVar6 = *local_b8;
|
||||
}
|
||||
FUN_14004ea20(lVar6 + 8,&DAT_1402837f8);
|
||||
uVar1 = *(undefined8 *)(param_1 + 0x98);
|
||||
plVar2 = *(longlong **)(param_1 + 0x88);
|
||||
if (plVar2 == (longlong *)0x0) {
|
||||
puVar5 = (undefined8 *)FUN_14016d940(0x18);
|
||||
}
|
||||
else {
|
||||
puVar5 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x18);
|
||||
}
|
||||
if ((puVar5 != (undefined8 *)0x0) && (puVar5[2] = 0, local_b8 != (longlong *)0x0)) {
|
||||
local_b8[1] = local_b8[1] + 1;
|
||||
puVar7 = (undefined8 *)0x0;
|
||||
if ((puVar5[2] != 0) &&
|
||||
(*(longlong *)(puVar5[2] + 8) = *(longlong *)(puVar5[2] + 8) + -1,
|
||||
*(longlong *)(puVar5[2] + 8) == 0)) {
|
||||
puVar7 = (undefined8 *)puVar5[2];
|
||||
}
|
||||
puVar5[2] = local_b8;
|
||||
if (puVar7 != (undefined8 *)0x0) {
|
||||
pvVar3 = (void *)*puVar7;
|
||||
if (pvVar3 != (void *)0x0) {
|
||||
FUN_14004eb70((longlong)pvVar3 + 8);
|
||||
operator_delete(pvVar3);
|
||||
}
|
||||
FUN_14016d970(puVar7);
|
||||
}
|
||||
}
|
||||
puVar5[1] = uVar1;
|
||||
*puVar5 = 0;
|
||||
*(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + 1;
|
||||
if (*(undefined8 **)(param_1 + 0x98) == (undefined8 *)0x0) {
|
||||
*(undefined8 **)(param_1 + 0x90) = puVar5;
|
||||
}
|
||||
else {
|
||||
**(undefined8 **)(param_1 + 0x98) = puVar5;
|
||||
}
|
||||
*(undefined8 **)(param_1 + 0x98) = puVar5;
|
||||
FUN_1401c5db0(param_1 + 0x10,1);
|
||||
if (local_b8 != (longlong *)0x0) {
|
||||
plVar2 = local_b8 + 1;
|
||||
*plVar2 = *plVar2 + -1;
|
||||
if (*plVar2 == 0) {
|
||||
pvVar3 = (void *)*local_b8;
|
||||
if (pvVar3 != (void *)0x0) {
|
||||
FUN_14004eb70((longlong)pvVar3 + 8);
|
||||
operator_delete(pvVar3);
|
||||
}
|
||||
FUN_14016d970(local_b8);
|
||||
}
|
||||
}
|
||||
FUN_14016dbe0(param_1 + 0x18);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue