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
78
decomp/DBCServer_Release_x64/full/functions/0x1401f40a0.c
Normal file
78
decomp/DBCServer_Release_x64/full/functions/0x1401f40a0.c
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
||||
* Ghidra 12.1.2 decompiler output for 0x1401f40a0 FUN_1401f40a0
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
void FUN_1401f40a0(longlong param_1,int param_2)
|
||||
|
||||
{
|
||||
int iVar1;
|
||||
longlong *plVar2;
|
||||
longlong lVar3;
|
||||
int iVar4;
|
||||
undefined8 uVar5;
|
||||
undefined1 *puVar6;
|
||||
undefined1 *puVar7;
|
||||
int iVar8;
|
||||
longlong lVar9;
|
||||
undefined1 local_58 [80];
|
||||
|
||||
if (param_2 < 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14016d6b0();
|
||||
}
|
||||
if (param_2 != *(int *)(param_1 + 0x18)) {
|
||||
if (*(int *)(param_1 + 0x1c) < param_2) {
|
||||
iVar4 = FUN_1401f3e20();
|
||||
plVar2 = *(longlong **)(param_1 + 8);
|
||||
lVar9 = (longlong)iVar4;
|
||||
if (*(int *)(param_1 + 0x1c) == 0) {
|
||||
if (plVar2 == (longlong *)0x0) {
|
||||
uVar5 = FUN_14016d940(lVar9);
|
||||
*(undefined8 *)(param_1 + 0x10) = uVar5;
|
||||
}
|
||||
else {
|
||||
uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9);
|
||||
*(undefined8 *)(param_1 + 0x10) = uVar5;
|
||||
}
|
||||
}
|
||||
else {
|
||||
lVar3 = *(longlong *)(param_1 + 0x10);
|
||||
if (plVar2 == (longlong *)0x0) {
|
||||
puVar6 = (undefined1 *)FUN_14016d940(lVar9);
|
||||
}
|
||||
else {
|
||||
puVar6 = (undefined1 *)(**(code **)(*plVar2 + 8))();
|
||||
}
|
||||
iVar1 = *(int *)(param_1 + 0x18);
|
||||
iVar8 = 0;
|
||||
if (0 < iVar1) {
|
||||
puVar7 = puVar6;
|
||||
do {
|
||||
if (puVar7 != (undefined1 *)0x0) {
|
||||
*puVar7 = puVar7[lVar3 - (longlong)puVar6];
|
||||
}
|
||||
iVar8 = iVar8 + 1;
|
||||
puVar7 = puVar7 + 1;
|
||||
} while (iVar8 < iVar1);
|
||||
}
|
||||
if (puVar6 == (undefined1 *)0x0) {
|
||||
FUN_14016d300(local_58,L"Memory allocation failure!");
|
||||
/* WARNING: Subroutine does not return */
|
||||
_CxxThrowException(local_58,(ThrowInfo *)&DAT_1403417f8);
|
||||
}
|
||||
plVar2 = *(longlong **)(param_1 + 8);
|
||||
if (plVar2 == (longlong *)0x0) {
|
||||
FUN_14016d970(lVar3);
|
||||
}
|
||||
else {
|
||||
(**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
|
||||
}
|
||||
*(undefined1 **)(param_1 + 0x10) = puVar6;
|
||||
}
|
||||
*(int *)(param_1 + 0x1c) = iVar4;
|
||||
}
|
||||
*(int *)(param_1 + 0x18) = param_2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue