123 lines
3.6 KiB
C
123 lines
3.6 KiB
C
/* DBCServer_Release_x64.exe sha256 d9e4fccdf3482e50247686d4452c0b13c75a53efc4bd7320668eece8d1ce828c
|
|
* Ghidra 12.1.2 decompiler output for 0x14016cac0 FUN_14016cac0
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
|
|
|
void FUN_14016cac0(longlong param_1)
|
|
|
|
{
|
|
undefined1 uVar1;
|
|
int iVar2;
|
|
longlong lVar3;
|
|
undefined8 uVar4;
|
|
int iVar5;
|
|
undefined8 *puVar6;
|
|
undefined8 *puVar7;
|
|
ulonglong uVar8;
|
|
longlong lVar9;
|
|
ulonglong uVar10;
|
|
undefined8 *_Dst;
|
|
undefined1 auStack_128 [32];
|
|
undefined1 local_108 [80];
|
|
undefined1 local_b8 [12];
|
|
undefined8 local_ac [12];
|
|
uint local_48;
|
|
ulonglong local_28;
|
|
|
|
local_28 = DAT_1403463c0 ^ (ulonglong)auStack_128;
|
|
FUN_14019a780(local_b8);
|
|
uVar10 = (ulonglong)(int)local_48;
|
|
if (local_48 == 0) {
|
|
return;
|
|
}
|
|
lVar9 = 0;
|
|
*(undefined4 *)(param_1 + 4) = 0;
|
|
lVar3 = *(longlong *)(param_1 + 8);
|
|
if (lVar3 == 0) {
|
|
if (*(longlong *)(param_1 + 0x10) == 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14016d1e0();
|
|
}
|
|
LAB_14016cb2d:
|
|
if ((int)local_48 < 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14016d6b0();
|
|
}
|
|
if (*(longlong *)(param_1 + 0x10) == 0) {
|
|
FUN_14016d300(local_108,PTR_u_ArrayWithExternalBuffer_is_unini_1403440d0);
|
|
/* WARNING: Subroutine does not return */
|
|
_CxxThrowException(local_108,(ThrowInfo *)&DAT_1403417f8);
|
|
}
|
|
iVar2 = *(int *)(param_1 + 0x18);
|
|
iVar5 = iVar2 + local_48;
|
|
if ((iVar5 < 0) || (*(int *)(param_1 + 0x1c) < iVar5)) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14016d6b0();
|
|
}
|
|
*(int *)(param_1 + 0x18) = iVar5;
|
|
_Dst = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar2);
|
|
if (uVar10 < 0x21) {
|
|
puVar6 = local_ac;
|
|
uVar8 = (ulonglong)(local_48 & 7);
|
|
for (uVar10 = uVar10 >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
|
|
uVar4 = *puVar6;
|
|
puVar6 = puVar6 + 1;
|
|
*_Dst = uVar4;
|
|
_Dst = _Dst + 1;
|
|
}
|
|
if (uVar8 != 0) {
|
|
puVar7 = puVar6;
|
|
do {
|
|
uVar1 = *(undefined1 *)puVar7;
|
|
puVar7 = (undefined8 *)((longlong)puVar7 + 1);
|
|
uVar8 = uVar8 - 1;
|
|
*(undefined1 *)((longlong)_Dst + (-1 - (longlong)puVar6) + (longlong)puVar7) = uVar1;
|
|
} while (uVar8 != 0);
|
|
}
|
|
goto LAB_14016cc7f;
|
|
}
|
|
}
|
|
else {
|
|
if (*(longlong *)(param_1 + 0x10) != 0) goto LAB_14016cb2d;
|
|
if (lVar3 == 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14016d1e0();
|
|
}
|
|
if ((int)local_48 < 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14016d6b0();
|
|
}
|
|
iVar2 = *(int *)(lVar3 + 0x18);
|
|
FUN_14004f0e0(lVar3,iVar2 + local_48);
|
|
if (*(int *)(lVar3 + 0x18) != 0) {
|
|
lVar9 = *(longlong *)(lVar3 + 0x10);
|
|
}
|
|
_Dst = (undefined8 *)(lVar9 + iVar2);
|
|
if (uVar10 < 0x21) {
|
|
puVar6 = local_ac;
|
|
uVar8 = (ulonglong)(local_48 & 7);
|
|
for (uVar10 = uVar10 >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
|
|
uVar4 = *puVar6;
|
|
puVar6 = puVar6 + 1;
|
|
*_Dst = uVar4;
|
|
_Dst = _Dst + 1;
|
|
}
|
|
if (uVar8 != 0) {
|
|
puVar7 = puVar6;
|
|
do {
|
|
uVar1 = *(undefined1 *)puVar7;
|
|
puVar7 = (undefined8 *)((longlong)puVar7 + 1);
|
|
uVar8 = uVar8 - 1;
|
|
*(undefined1 *)((longlong)_Dst + (-1 - (longlong)puVar6) + (longlong)puVar7) = uVar1;
|
|
} while (uVar8 != 0);
|
|
}
|
|
goto LAB_14016cc7f;
|
|
}
|
|
}
|
|
memcpy(_Dst,local_ac,uVar10);
|
|
LAB_14016cc7f:
|
|
FUN_14004f270(param_1);
|
|
return;
|
|
}
|
|
|