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
120
decomp/DBCServer_Release_x64/full/functions/0x1401bcb60.c
Normal file
120
decomp/DBCServer_Release_x64/full/functions/0x1401bcb60.c
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
||||
* Ghidra 12.1.2 decompiler output for 0x1401bcb60 FUN_1401bcb60
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
/* WARNING: Function: __chkstk replaced with injection: alloca_probe */
|
||||
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
||||
|
||||
int FUN_1401bcb60(short *param_1,undefined2 *param_2,undefined4 *param_3,uint param_4,
|
||||
undefined4 param_5)
|
||||
|
||||
{
|
||||
short sVar1;
|
||||
undefined1 *_Memory;
|
||||
undefined1 *_Memory_00;
|
||||
int iVar2;
|
||||
int iVar3;
|
||||
undefined1 *puVar4;
|
||||
undefined1 *puVar5;
|
||||
ulonglong uVar6;
|
||||
uint uVar7;
|
||||
short *psVar8;
|
||||
undefined1 auStack_1218 [32];
|
||||
undefined4 local_11f8;
|
||||
uint local_11e8;
|
||||
undefined4 local_11e4;
|
||||
undefined1 *local_11e0;
|
||||
undefined1 *local_11d8;
|
||||
undefined4 *local_11d0;
|
||||
undefined8 local_11c8;
|
||||
undefined1 *local_11b8;
|
||||
undefined1 local_11b0 [264];
|
||||
undefined1 local_10a8 [2096];
|
||||
undefined1 local_878 [2096];
|
||||
ulonglong local_48;
|
||||
undefined8 uStack_40;
|
||||
|
||||
uStack_40 = 0x1401bcb76;
|
||||
local_11c8 = 0xfffffffffffffffe;
|
||||
local_48 = DAT_1403463c0 ^ (ulonglong)auStack_1218;
|
||||
iVar3 = 0;
|
||||
local_11e8 = param_4;
|
||||
local_11d0 = param_3;
|
||||
if (param_1 == (short *)0x0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14004dc60(0x80004005);
|
||||
}
|
||||
if (param_2 == (undefined2 *)0x0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14004dc60(0x80004005);
|
||||
}
|
||||
uVar6 = 0xffffffffffffffff;
|
||||
psVar8 = param_1;
|
||||
do {
|
||||
if (uVar6 == 0) break;
|
||||
uVar6 = uVar6 - 1;
|
||||
sVar1 = *psVar8;
|
||||
psVar8 = psVar8 + 1;
|
||||
} while (sVar1 != 0);
|
||||
local_11e0 = (undefined1 *)(~uVar6 - 1);
|
||||
if ((int)local_11e0 == 0) {
|
||||
if (param_3 != (undefined4 *)0x0) {
|
||||
*param_3 = 1;
|
||||
}
|
||||
*param_2 = 0;
|
||||
iVar3 = 1;
|
||||
}
|
||||
else {
|
||||
iVar2 = FUN_1401bc220(param_1,(ulonglong)local_11e0 & 0xffffffff,0,0);
|
||||
if (iVar2 != 0) {
|
||||
uVar7 = iVar2 + 1;
|
||||
local_11d8 = (undefined1 *)0x0;
|
||||
puVar4 = local_10a8;
|
||||
if ((int)uVar7 < 1) {
|
||||
free((void *)0x0);
|
||||
iVar3 = 0;
|
||||
}
|
||||
else if ((uVar7 < 0x825) ||
|
||||
(puVar4 = malloc((longlong)(int)uVar7), local_11d8 = puVar4,
|
||||
puVar4 != (undefined1 *)0x0)) {
|
||||
_Memory_00 = local_11d8;
|
||||
iVar3 = FUN_1401bc220(param_1,(ulonglong)local_11e0 & 0xffffffff,puVar4,uVar7);
|
||||
puVar4[iVar3] = 0;
|
||||
puVar5 = local_878;
|
||||
local_11e0 = (undefined1 *)0x0;
|
||||
if ((local_11e8 < 0x825) ||
|
||||
(puVar5 = malloc((ulonglong)local_11e8), local_11e0 = puVar5, puVar5 != (undefined1 *)0x0
|
||||
)) {
|
||||
_Memory = local_11e0;
|
||||
local_11e4 = 0;
|
||||
local_11f8 = param_5;
|
||||
iVar3 = FUN_1401bc440(puVar4,puVar5,&local_11e4,local_11e8);
|
||||
if (iVar3 != 0) {
|
||||
local_11b8 = local_11b0;
|
||||
FUN_14015b060(&local_11b8,puVar5,3);
|
||||
FUN_14016eca0(param_2,local_11e8,local_11b8,local_11e4);
|
||||
if (local_11b8 != local_11b0) {
|
||||
free(local_11b8);
|
||||
}
|
||||
}
|
||||
if (param_3 != (undefined4 *)0x0) {
|
||||
*param_3 = local_11e4;
|
||||
}
|
||||
free(_Memory);
|
||||
free(_Memory_00);
|
||||
}
|
||||
else {
|
||||
free((void *)0x0);
|
||||
free(_Memory_00);
|
||||
iVar3 = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
free((void *)0x0);
|
||||
iVar3 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return iVar3;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue