add agent manager release decomp
This commit is contained in:
parent
31ff800b2a
commit
fac6117145
7019 changed files with 254032 additions and 5 deletions
293
decomp/AgentManager_Release_x64/full/functions/0x1400c3510.c
Normal file
293
decomp/AgentManager_Release_x64/full/functions/0x1400c3510.c
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
/* AgentManager_Release_x64.exe sha256 8fd8ca91725858651a7839d34257b10c2970ac16c97e60c523b8b0c983fcb186
|
||||
* Ghidra 12.1.2 decompiler output for 0x1400c3510 FUN_1400c3510
|
||||
* Pseudocode, not original source. */
|
||||
|
||||
void FUN_1400c3510(undefined ***param_1,uint *param_2,uint *param_3,undefined8 param_4)
|
||||
|
||||
{
|
||||
undefined **ppuVar1;
|
||||
uint uVar2;
|
||||
uint uVar3;
|
||||
longlong *plVar4;
|
||||
uint *puVar5;
|
||||
IMAGE_DOS_HEADER *pIVar6;
|
||||
undefined ***pppuVar7;
|
||||
ulonglong *puVar8;
|
||||
undefined **ppuVar9;
|
||||
ulonglong **ppuVar10;
|
||||
uint uVar11;
|
||||
uint uVar12;
|
||||
int iVar13;
|
||||
ulonglong uVar14;
|
||||
undefined ***pppuVar15;
|
||||
IMAGE_DOS_HEADER *pIVar16;
|
||||
ulonglong uVar17;
|
||||
ulonglong uVar18;
|
||||
uint local_res8 [2];
|
||||
IMAGE_DOS_HEADER *local_res10;
|
||||
undefined **local_res18;
|
||||
ulonglong *local_res20;
|
||||
undefined1 local_c8 [40];
|
||||
undefined **local_a0;
|
||||
uint local_98;
|
||||
word local_94;
|
||||
undefined **local_90;
|
||||
byte local_88 [32];
|
||||
undefined ***local_68;
|
||||
byte local_60;
|
||||
longlong local_58;
|
||||
byte local_50 [16];
|
||||
|
||||
local_50[0] = 0xfe;
|
||||
local_50[1] = 0xff;
|
||||
local_50[2] = 0xff;
|
||||
local_50[3] = 0xff;
|
||||
local_50[4] = 0xff;
|
||||
local_50[5] = 0xff;
|
||||
local_50[6] = 0xff;
|
||||
local_50[7] = 0xff;
|
||||
local_res10 = (IMAGE_DOS_HEADER *)param_2;
|
||||
(**(code **)(param_1[0x21][0xf] + 0x10))();
|
||||
local_a0 = Proud::AddrPort::vftable;
|
||||
local_98 = param_3[0xe];
|
||||
local_94 = (word)param_3[0xf];
|
||||
pppuVar15 = &local_a0;
|
||||
ppuVar10 = &local_res20;
|
||||
plVar4 = FUN_1400a5f70((longlong)param_1[0x21],ppuVar10,(longlong)pppuVar15);
|
||||
puVar8 = (ulonglong *)*plVar4;
|
||||
uVar14 = 0;
|
||||
uVar18 = uVar14;
|
||||
if (puVar8 != (ulonglong *)0x0) {
|
||||
uVar18 = *puVar8;
|
||||
}
|
||||
if (local_res20 != (ulonglong *)0x0) {
|
||||
local_res20[1] = local_res20[1] - 1;
|
||||
puVar8 = (ulonglong *)local_res20[1];
|
||||
if ((ulonglong *)local_res20[1] == (ulonglong *)0x0) {
|
||||
if ((undefined8 *)*local_res20 != (undefined8 *)0x0) {
|
||||
ppuVar10 = (ulonglong **)0x1;
|
||||
(*(code *)**(undefined8 **)*local_res20)();
|
||||
}
|
||||
FUN_14003e8b0(local_res20);
|
||||
puVar8 = local_res20;
|
||||
}
|
||||
}
|
||||
if ((uVar18 == 0) || (*(char *)(uVar18 + 0x650) != '\0')) {
|
||||
if (*(longlong *)(param_3 + 2) == 0) {
|
||||
if (*(longlong *)(param_3 + 4) == 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14008a420(puVar8,ppuVar10,pppuVar15,param_4);
|
||||
}
|
||||
uVar2 = param_3[6];
|
||||
}
|
||||
else {
|
||||
uVar2 = *(uint *)(*(longlong *)(param_3 + 2) + 0x18);
|
||||
}
|
||||
FUN_140075170(param_3,(ulonglong)(uVar2 - ((int)(*param_3 + ((int)*param_3 >> 0x1f & 7U)) >> 3))
|
||||
,pppuVar15,param_4);
|
||||
return;
|
||||
}
|
||||
local_c8._8_2_ = 0;
|
||||
local_c8._10_2_ = 0;
|
||||
local_c8._12_2_ = 0;
|
||||
local_c8._14_2_ = 0;
|
||||
local_c8._16_8_ = 0;
|
||||
local_c8._24_2_ = 0;
|
||||
local_c8._26_2_ = 0;
|
||||
local_c8._28_2_ = 0;
|
||||
local_c8._30_2_ = 0;
|
||||
local_c8._0_8_ = Proud::CReceivedMessageList::vftable;
|
||||
local_c8._32_2_ = 1000;
|
||||
local_c8._34_2_ = 0;
|
||||
local_c8._36_2_ = 1;
|
||||
local_c8._38_2_ = 0;
|
||||
pppuVar7 = (undefined ***)(uVar18 + 0x638);
|
||||
pppuVar15 = (undefined ***)local_res8;
|
||||
pIVar16 = (IMAGE_DOS_HEADER *)local_c8;
|
||||
pIVar6 = (IMAGE_DOS_HEADER *)param_3;
|
||||
FUN_1400d4350((longlong *)pppuVar7,param_3,(ulonglong)pIVar16,(undefined4 *)pppuVar15);
|
||||
if (local_res8[0] == 0) goto LAB_1400c3872;
|
||||
FUN_14003e7c0(pppuVar7,pIVar6,pIVar16,pppuVar15);
|
||||
local_res18 = (undefined **)PTR_DAT_14016f010;
|
||||
uVar2 = FUN_14003e620(L"Stream Extract Error at Reliable UDP");
|
||||
uVar12 = 0;
|
||||
uVar17 = uVar14;
|
||||
if ((local_res18 != (undefined **)0x0) &&
|
||||
(uVar17 = 0, local_res18 != (undefined **)PTR_DAT_14016f010)) {
|
||||
uVar17 = (ulonglong)*(uint *)(local_res18 + -1);
|
||||
}
|
||||
uVar3 = uVar2;
|
||||
if ((((int)uVar2 <= (int)uVar17) && (uVar3 = uVar12, local_res18 != (undefined **)0x0)) &&
|
||||
(local_res18 != (undefined **)PTR_DAT_14016f010)) {
|
||||
uVar3 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
uVar11 = 1;
|
||||
if (1 < (int)uVar3) {
|
||||
uVar11 = uVar3;
|
||||
}
|
||||
uVar3 = uVar12;
|
||||
if ((local_res18 != (undefined **)0x0) && (local_res18 != (undefined **)PTR_DAT_14016f010)) {
|
||||
uVar3 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
if ((int)uVar3 < (int)uVar11) {
|
||||
if (local_res18 == (undefined **)0x0) {
|
||||
local_res18 = (undefined **)PTR_DAT_14016f010;
|
||||
}
|
||||
if ((int)uVar11 < 0) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14003dec0();
|
||||
}
|
||||
if (uVar11 == 0) {
|
||||
FUN_140002190((longlong *)&local_res18,PTR_DAT_14016f010,uVar17,pppuVar15);
|
||||
}
|
||||
else {
|
||||
uVar3 = uVar12;
|
||||
if ((local_res18 != (undefined **)0x0) && (local_res18 != (undefined **)PTR_DAT_14016f010)) {
|
||||
uVar3 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
if (uVar11 != uVar3) {
|
||||
puVar5 = (uint *)FUN_14003e840((longlong)(int)uVar11 * 2 + 10);
|
||||
if (puVar5 != (uint *)0x0) {
|
||||
*puVar5 = 0;
|
||||
puVar5[1] = 1;
|
||||
}
|
||||
*puVar5 = uVar11;
|
||||
uVar3 = uVar12;
|
||||
if ((local_res18 != (undefined **)0x0) && (local_res18 != (undefined **)PTR_DAT_14016f010))
|
||||
{
|
||||
uVar3 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
ppuVar9 = (undefined **)PTR_DAT_14016f010;
|
||||
if ((int)uVar11 < (int)uVar3) {
|
||||
LAB_1400c371b:
|
||||
if (local_res18 != (undefined **)0x0) {
|
||||
ppuVar9 = local_res18;
|
||||
}
|
||||
}
|
||||
else {
|
||||
uVar11 = uVar12;
|
||||
if (local_res18 != (undefined **)0x0) {
|
||||
if (local_res18 != (undefined **)PTR_DAT_14016f010) {
|
||||
uVar11 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
goto LAB_1400c371b;
|
||||
}
|
||||
}
|
||||
uVar17 = (ulonglong)uVar11;
|
||||
FUN_14003e650(puVar5 + 2,ppuVar9,uVar11);
|
||||
FUN_140002190((longlong *)&local_res18,ppuVar9,uVar17,pppuVar15);
|
||||
local_res18 = (undefined **)(puVar5 + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
FUN_140001df0((longlong *)&local_res18);
|
||||
ppuVar9 = local_res18;
|
||||
if (local_res18 == (undefined **)0x0) {
|
||||
ppuVar9 = (undefined **)PTR_DAT_14016f010;
|
||||
}
|
||||
FUN_14003e650(ppuVar9,L"Stream Extract Error at Reliable UDP",uVar2);
|
||||
ppuVar9 = local_res18;
|
||||
if (local_res18 == (undefined **)0x0) {
|
||||
ppuVar9 = (undefined **)PTR_DAT_14016f010;
|
||||
}
|
||||
uVar3 = FUN_14003e620((short *)ppuVar9);
|
||||
uVar2 = 0;
|
||||
if (0 < (int)uVar3) {
|
||||
uVar2 = uVar3;
|
||||
}
|
||||
uVar3 = uVar12;
|
||||
if ((local_res18 != (undefined **)0x0) && (local_res18 != (undefined **)PTR_DAT_14016f010)) {
|
||||
uVar3 = *(uint *)(local_res18 + -1);
|
||||
}
|
||||
if (((int)uVar2 < (int)uVar3) || (uVar2 = uVar12, local_res18 == (undefined **)0x0)) {
|
||||
LAB_1400c37ae:
|
||||
if (((local_res18 != (undefined **)PTR_DAT_14016f010) && (local_res18 != (undefined **)0x0)) &&
|
||||
(local_res18 + -1 != (undefined **)0x0)) {
|
||||
*(uint *)(local_res18 + -1) = uVar2;
|
||||
*(undefined2 *)((longlong)local_res18 + (longlong)(int)uVar2 * 2) = 0;
|
||||
}
|
||||
}
|
||||
else if (local_res18 != (undefined **)PTR_DAT_14016f010) {
|
||||
uVar2 = *(uint *)(local_res18 + -1);
|
||||
goto LAB_1400c37ae;
|
||||
}
|
||||
local_88[0] = 0;
|
||||
local_88[1] = 0;
|
||||
local_88[2] = 0;
|
||||
local_88[3] = 0;
|
||||
local_88[4] = 0;
|
||||
local_88[5] = 0;
|
||||
local_88[6] = 0;
|
||||
local_88[7] = 0;
|
||||
local_88[8] = 0;
|
||||
local_88[9] = 0;
|
||||
local_88[10] = 0;
|
||||
local_88[0xb] = 0;
|
||||
local_88[0xc] = 0;
|
||||
local_88[0xd] = 0;
|
||||
local_88[0xe] = 0;
|
||||
local_88[0xf] = 0;
|
||||
local_88[0x10] = 0;
|
||||
local_88[0x11] = 0;
|
||||
local_88[0x12] = 0;
|
||||
local_88[0x13] = 0;
|
||||
local_88[0x14] = 0;
|
||||
local_88[0x15] = 0;
|
||||
local_88[0x16] = 0;
|
||||
local_88[0x17] = 0;
|
||||
local_88[0x18] = 0;
|
||||
local_88[0x19] = 0;
|
||||
local_88[0x1a] = 0;
|
||||
local_88[0x1b] = 0;
|
||||
local_88[0x1c] = 0;
|
||||
local_88[0x1d] = 0;
|
||||
local_88[0x1e] = 0;
|
||||
local_88[0x1f] = 0;
|
||||
local_90 = Proud::ByteArray::vftable;
|
||||
pppuVar15 = &local_res18;
|
||||
pIVar6 = (IMAGE_DOS_HEADER *)
|
||||
FUN_140071c20(&local_58,(ulonglong)local_res8[0],(ulonglong)*(uint *)(uVar18 + 0x56c),
|
||||
(longlong *)pppuVar15,(longlong)&local_90);
|
||||
pIVar16 = (IMAGE_DOS_HEADER *)*param_1[0x21];
|
||||
(**(code **)(pIVar16 + 1))();
|
||||
pppuVar7 = &local_90;
|
||||
FUN_140049e40(pppuVar7);
|
||||
ppuVar9 = local_res18;
|
||||
param_2 = (uint *)local_res10;
|
||||
if (((local_res18 != (undefined **)0x0) && (local_res18 != (undefined **)PTR_DAT_14016f010)) &&
|
||||
(ppuVar1 = local_res18 + -1, ppuVar1 != (undefined **)0x0)) {
|
||||
pppuVar7 = (undefined ***)FUN_14003e7c0(pppuVar7,pIVar6,pIVar16,pppuVar15);
|
||||
local_68 = pppuVar7;
|
||||
FUN_14003d040((int *)pppuVar7);
|
||||
local_60 = 1;
|
||||
puVar5 = (uint *)((longlong)ppuVar9 + -4);
|
||||
*puVar5 = *puVar5 - 1;
|
||||
if (*puVar5 == 0) {
|
||||
FUN_14003e8b0(ppuVar1);
|
||||
}
|
||||
FUN_14003d0d0((longlong)pppuVar7);
|
||||
param_2 = (uint *)local_res10;
|
||||
}
|
||||
LAB_1400c3872:
|
||||
while( true ) {
|
||||
iVar13 = (int)uVar14;
|
||||
if (iVar13 == local_c8._24_4_) {
|
||||
FUN_14007e8f0((undefined8 *)local_c8);
|
||||
return;
|
||||
}
|
||||
if ((iVar13 < 0) || ((int)local_c8._24_4_ <= iVar13)) break;
|
||||
pIVar16 = (IMAGE_DOS_HEADER *)(local_c8._16_8_ + (longlong)iVar13 * 0x48);
|
||||
pIVar16->e_program[0] = (byte)param_3[0x10];
|
||||
pppuVar7 = param_1;
|
||||
pIVar6 = (IMAGE_DOS_HEADER *)param_2;
|
||||
FUN_1400c6270((IMAGE_DOS_HEADER *)param_1,(IMAGE_DOS_HEADER *)param_2,pIVar16,pppuVar15);
|
||||
if ((int)local_c8._24_4_ <= iVar13) {
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14003def0(pppuVar7,pIVar6,pIVar16,pppuVar15);
|
||||
}
|
||||
uVar14 = (ulonglong)(iVar13 + 1);
|
||||
}
|
||||
/* WARNING: Subroutine does not return */
|
||||
FUN_14003def0(pppuVar7,pIVar6,pIVar16,pppuVar15);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue