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
86
decomp/DBCServer_Release_x64/full/functions/0x1401e4520.c
Normal file
86
decomp/DBCServer_Release_x64/full/functions/0x1401e4520.c
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
||||
* Ghidra 12.1.2 decompiler output for 0x1401e4520 FUN_1401e4520
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
||||
|
||||
uint FUN_1401e4520(void *param_1,uint param_2,longlong param_3)
|
||||
|
||||
{
|
||||
int iVar1;
|
||||
char *pcVar2;
|
||||
ulonglong uVar3;
|
||||
char *pcVar4;
|
||||
ulonglong _Size;
|
||||
undefined1 auStack_78 [32];
|
||||
undefined1 local_58 [16];
|
||||
ulonglong local_48;
|
||||
|
||||
local_48 = DAT_1403463c0 ^ (ulonglong)auStack_78;
|
||||
_Size = (ulonglong)param_2;
|
||||
if ((param_1 == (void *)0x0) || (param_3 == 0)) {
|
||||
param_2 = 0x10;
|
||||
}
|
||||
else {
|
||||
EnterCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
|
||||
*(int *)(param_3 + 0x1020) = *(int *)(param_3 + 0x1020) + 1;
|
||||
if (((*(int *)(param_3 + 0x1020) == 10) || (0x3f < *(uint *)(param_3 + 0x101c))) &&
|
||||
(iVar1 = FUN_1401e4110(param_3), iVar1 != 0)) {
|
||||
LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
|
||||
param_2 = 0;
|
||||
}
|
||||
else {
|
||||
if (0xf < param_2) {
|
||||
uVar3 = (ulonglong)(param_2 >> 4);
|
||||
do {
|
||||
FUN_140203120(param_3 + 0x1008,param_1,param_3 + 0xe00);
|
||||
param_1 = (void *)((longlong)param_1 + 0x10);
|
||||
_Size = (ulonglong)((int)_Size - 0x10);
|
||||
pcVar2 = (char *)(param_3 + 0x1008);
|
||||
do {
|
||||
*pcVar2 = *pcVar2 + '\x01';
|
||||
if (*pcVar2 != '\0') break;
|
||||
pcVar2 = pcVar2 + 1;
|
||||
} while ((longlong)pcVar2 - (param_3 + 0x1008) < 0x10);
|
||||
uVar3 = uVar3 - 1;
|
||||
} while (uVar3 != 0);
|
||||
}
|
||||
if ((int)_Size != 0) {
|
||||
pcVar2 = (char *)(param_3 + 0x1008);
|
||||
FUN_140203120(pcVar2,local_58,param_3 + 0xe00);
|
||||
memcpy(param_1,local_58,_Size);
|
||||
pcVar4 = pcVar2;
|
||||
do {
|
||||
*pcVar4 = *pcVar4 + '\x01';
|
||||
if (*pcVar4 != '\0') break;
|
||||
pcVar4 = pcVar4 + 1;
|
||||
} while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
|
||||
}
|
||||
pcVar2 = (char *)(param_3 + 0x1008);
|
||||
FUN_140203120(pcVar2,param_3 + 0xfe8,param_3 + 0xe00);
|
||||
pcVar4 = pcVar2;
|
||||
do {
|
||||
*pcVar4 = *pcVar4 + '\x01';
|
||||
if (*pcVar4 != '\0') break;
|
||||
pcVar4 = pcVar4 + 1;
|
||||
} while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
|
||||
FUN_140203120(pcVar2,param_3 + 0xff8,param_3 + 0xe00);
|
||||
pcVar4 = pcVar2;
|
||||
do {
|
||||
*pcVar4 = *pcVar4 + '\x01';
|
||||
if (*pcVar4 != '\0') break;
|
||||
pcVar4 = pcVar4 + 1;
|
||||
} while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
|
||||
iVar1 = FUN_140202980(param_3 + 0xfe8,0x20,0,param_3 + 0xe00);
|
||||
if (iVar1 == 0) {
|
||||
LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
|
||||
}
|
||||
else {
|
||||
LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
|
||||
param_2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return param_2;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue