134 lines
4.1 KiB
C
134 lines
4.1 KiB
C
/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
|
|
* Ghidra 12.1.2 decompiler output for 0x1400bddd0 FUN_1400bddd0
|
|
* Pseudocode, not original source. */
|
|
|
|
/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */
|
|
|
|
void FUN_1400bddd0(longlong param_1,longlong param_2,SIZE_T param_3,undefined8 param_4)
|
|
|
|
{
|
|
undefined1 uVar1;
|
|
int iVar2;
|
|
longlong lVar3;
|
|
undefined8 uVar4;
|
|
int iVar5;
|
|
undefined1 *puVar6;
|
|
undefined8 *puVar7;
|
|
ulonglong uVar8;
|
|
undefined8 *_Src;
|
|
longlong lVar9;
|
|
SIZE_T _Size;
|
|
ulonglong uVar10;
|
|
undefined8 *_Dst;
|
|
undefined1 auStack_128 [32];
|
|
exception local_108 [80];
|
|
undefined1 local_b8 [12];
|
|
undefined8 local_ac [12];
|
|
uint local_48;
|
|
ulonglong local_28;
|
|
|
|
local_28 = DAT_1401ac5a0 ^ (ulonglong)auStack_128;
|
|
puVar6 = local_b8;
|
|
FUN_1400f6450((longlong)puVar6,param_2);
|
|
_Size = (SIZE_T)(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_1400d1900(puVar6,param_2,param_3,param_4);
|
|
}
|
|
LAB_1400bde3d:
|
|
if ((int)local_48 < 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14006be00();
|
|
}
|
|
if (*(longlong *)(param_1 + 0x10) == 0) {
|
|
FUN_14006ba50(local_108,(wchar_t *)PTR_u_ArrayWithExternalBuffer_is_unini_1401ad9a0,param_3,
|
|
param_4);
|
|
/* WARNING: Subroutine does not return */
|
|
_CxxThrowException(local_108,(ThrowInfo *)&DAT_1401a93e8);
|
|
}
|
|
iVar2 = *(int *)(param_1 + 0x18);
|
|
iVar5 = iVar2 + local_48;
|
|
if ((iVar5 < 0) || (*(int *)(param_1 + 0x1c) < iVar5)) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14006be00();
|
|
}
|
|
*(int *)(param_1 + 0x18) = iVar5;
|
|
_Dst = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar2);
|
|
if (_Size < 0x21) {
|
|
puVar7 = local_ac;
|
|
uVar8 = (ulonglong)(local_48 & 7);
|
|
for (uVar10 = _Size >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
|
|
uVar4 = *puVar7;
|
|
puVar7 = puVar7 + 1;
|
|
*_Dst = uVar4;
|
|
_Dst = _Dst + 1;
|
|
}
|
|
_Size = 0;
|
|
_Src = (undefined8 *)0x0;
|
|
if (uVar8 != 0) {
|
|
_Dst = (undefined8 *)((longlong)_Dst - (longlong)puVar7);
|
|
do {
|
|
uVar1 = *(undefined1 *)puVar7;
|
|
puVar7 = (undefined8 *)((longlong)puVar7 + 1);
|
|
uVar8 = uVar8 - 1;
|
|
*(undefined1 *)((longlong)_Dst + -1 + (longlong)puVar7) = uVar1;
|
|
} while (uVar8 != 0);
|
|
_Src = (undefined8 *)0x0;
|
|
}
|
|
goto LAB_1400bdf8f;
|
|
}
|
|
}
|
|
else {
|
|
if (*(longlong *)(param_1 + 0x10) != 0) goto LAB_1400bde3d;
|
|
if (lVar3 == 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_1400d1900(puVar6,param_2,param_3,param_4);
|
|
}
|
|
if ((int)local_48 < 0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_14006be00();
|
|
}
|
|
iVar2 = *(int *)(lVar3 + 0x18);
|
|
FUN_1400146f0(lVar3,iVar2 + local_48,param_3);
|
|
if (*(int *)(lVar3 + 0x18) != 0) {
|
|
lVar9 = *(longlong *)(lVar3 + 0x10);
|
|
}
|
|
_Dst = (undefined8 *)(lVar9 + iVar2);
|
|
if (_Size < 0x21) {
|
|
puVar7 = local_ac;
|
|
uVar8 = (ulonglong)(local_48 & 7);
|
|
for (uVar10 = _Size >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
|
|
uVar4 = *puVar7;
|
|
puVar7 = puVar7 + 1;
|
|
*_Dst = uVar4;
|
|
_Dst = _Dst + 1;
|
|
}
|
|
_Src = (undefined8 *)0x0;
|
|
_Size = 0;
|
|
if (uVar8 != 0) {
|
|
_Dst = (undefined8 *)((longlong)_Dst - (longlong)puVar7);
|
|
do {
|
|
uVar1 = *(undefined1 *)puVar7;
|
|
puVar7 = (undefined8 *)((longlong)puVar7 + 1);
|
|
uVar8 = uVar8 - 1;
|
|
*(undefined1 *)((longlong)_Dst + -1 + (longlong)puVar7) = uVar1;
|
|
} while (uVar8 != 0);
|
|
_Src = (undefined8 *)0x0;
|
|
}
|
|
goto LAB_1400bdf8f;
|
|
}
|
|
}
|
|
_Src = local_ac;
|
|
memcpy(_Dst,_Src,_Size);
|
|
LAB_1400bdf8f:
|
|
FUN_140014820(param_1,_Src,_Size,_Dst);
|
|
return;
|
|
}
|
|
|