124 lines
3.5 KiB
C
124 lines
3.5 KiB
C
/* MessageServer_Release_x64.exe sha256 7911b15c4379625eaa12ff227708aa3a033bc6ac2cf6b34283136e3a62df25f1
|
|
* Ghidra 12.1.2 decompiler output for 0x140006f20 FUN_140006f20
|
|
* Pseudocode, not original source. */
|
|
|
|
void FUN_140006f20(longlong param_1,undefined4 param_2,short *param_3,longlong param_4)
|
|
|
|
{
|
|
short *psVar1;
|
|
int *piVar2;
|
|
LPVOID pvVar3;
|
|
int iVar4;
|
|
int iVar5;
|
|
int *piVar6;
|
|
longlong lVar7;
|
|
short *psVar8;
|
|
longlong *plVar9;
|
|
int iVar10;
|
|
undefined ***pppuVar11;
|
|
LPVOID pvVar12;
|
|
ulonglong uVar13;
|
|
undefined *puVar14;
|
|
int iVar15;
|
|
short *local_res8;
|
|
undefined4 local_res10;
|
|
undefined **local_40;
|
|
longlong *local_38;
|
|
LPVOID local_30;
|
|
ulonglong local_28;
|
|
undefined8 local_20;
|
|
|
|
local_40 = Proud::CFastArray<Proud::HostID,0>::vftable;
|
|
local_38 = (longlong *)0x0;
|
|
local_30 = (LPVOID)0x0;
|
|
local_28 = 0;
|
|
local_20 = 0;
|
|
lVar7 = param_1 + -0x28;
|
|
pppuVar11 = &local_40;
|
|
psVar8 = param_3;
|
|
local_res10 = param_2;
|
|
FUN_140007480(lVar7,(longlong)pppuVar11,param_3,param_4);
|
|
FUN_14006cb70(lVar7,pppuVar11,psVar8,param_4);
|
|
local_res8 = (short *)PTR_DAT_1401ac010;
|
|
iVar4 = FUN_14006c9f0(param_3);
|
|
iVar15 = 0;
|
|
iVar10 = iVar15;
|
|
if ((local_res8 != (short *)0x0) && (local_res8 != (short *)PTR_DAT_1401ac010)) {
|
|
iVar10 = *(int *)(local_res8 + -4);
|
|
}
|
|
iVar5 = iVar4;
|
|
if (((iVar4 <= iVar10) && (iVar5 = iVar15, local_res8 != (short *)0x0)) &&
|
|
(local_res8 != (short *)PTR_DAT_1401ac010)) {
|
|
iVar5 = *(int *)(local_res8 + -4);
|
|
}
|
|
iVar10 = 1;
|
|
if (1 < iVar5) {
|
|
iVar10 = iVar5;
|
|
}
|
|
iVar5 = iVar15;
|
|
if ((local_res8 != (short *)0x0) && (local_res8 != (short *)PTR_DAT_1401ac010)) {
|
|
iVar5 = *(int *)(local_res8 + -4);
|
|
}
|
|
if (iVar5 < iVar10) {
|
|
FUN_140002d60((longlong *)&local_res8,iVar10);
|
|
}
|
|
FUN_140002e40((longlong *)&local_res8);
|
|
psVar8 = local_res8;
|
|
if (local_res8 == (short *)0x0) {
|
|
psVar8 = (short *)PTR_DAT_1401ac010;
|
|
}
|
|
FUN_14006ca20(psVar8,param_3,iVar4);
|
|
psVar8 = local_res8;
|
|
if (local_res8 == (short *)0x0) {
|
|
psVar8 = (short *)PTR_DAT_1401ac010;
|
|
}
|
|
iVar4 = FUN_14006c9f0(psVar8);
|
|
pvVar3 = local_30;
|
|
iVar10 = 0;
|
|
if (0 < iVar4) {
|
|
iVar10 = iVar4;
|
|
}
|
|
if ((local_res8 != (short *)0x0) && (local_res8 != (short *)PTR_DAT_1401ac010)) {
|
|
iVar15 = *(int *)(local_res8 + -4);
|
|
}
|
|
if ((iVar15 <= iVar10) && (iVar10 = 0, local_res8 != (short *)0x0)) {
|
|
if (local_res8 == (short *)PTR_DAT_1401ac010) goto LAB_14000706e;
|
|
iVar10 = *(int *)(local_res8 + -4);
|
|
}
|
|
if (((local_res8 != (short *)PTR_DAT_1401ac010) && (local_res8 != (short *)0x0)) &&
|
|
((int *)(local_res8 + -4) != (int *)0x0)) {
|
|
*(int *)(local_res8 + -4) = iVar10;
|
|
local_res8[iVar10] = 0;
|
|
}
|
|
LAB_14000706e:
|
|
uVar13 = local_28 & 0xffffffff;
|
|
pvVar12 = local_30;
|
|
if ((int)local_28 == 0) {
|
|
pvVar12 = (LPVOID)0x0;
|
|
}
|
|
plVar9 = (longlong *)(param_1 + 0x38);
|
|
puVar14 = &DAT_1401ac5d0;
|
|
(**(code **)(*plVar9 + 0x98))();
|
|
psVar8 = local_res8;
|
|
if (((local_res8 != (short *)0x0) && (local_res8 != (short *)PTR_DAT_1401ac010)) &&
|
|
(psVar1 = local_res8 + -4, psVar1 != (short *)0x0)) {
|
|
piVar6 = (int *)FUN_14006cb70(plVar9,pvVar12,uVar13,puVar14);
|
|
FUN_14006b350(piVar6);
|
|
piVar2 = (int *)(psVar8 + -2);
|
|
*piVar2 = *piVar2 + -1;
|
|
if (*piVar2 == 0) {
|
|
FUN_14006cc60(psVar1);
|
|
}
|
|
FUN_14006b3e0((longlong)piVar6);
|
|
}
|
|
if (pvVar3 != (LPVOID)0x0) {
|
|
if (local_38 == (longlong *)0x0) {
|
|
FUN_14006cc60(pvVar3);
|
|
}
|
|
else {
|
|
(**(code **)(*local_38 + 0x18))(local_38,pvVar3);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|