99 lines
3.4 KiB
C
99 lines
3.4 KiB
C
/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469
|
|
* Ghidra 12.1.2 decompiler output for 0x14000e1e0 FUN_14000e1e0
|
|
* Pseudocode, not original source. */
|
|
|
|
undefined8
|
|
FUN_14000e1e0(longlong param_1,undefined8 param_2,ulonglong param_3,uint *param_4,int *param_5)
|
|
|
|
{
|
|
undefined4 *puVar1;
|
|
int iVar2;
|
|
undefined8 uVar3;
|
|
undefined4 extraout_var;
|
|
uint *puVar4;
|
|
char *pcVar5;
|
|
longlong lVar6;
|
|
uint *puVar7;
|
|
bool bVar8;
|
|
uint local_res20 [2];
|
|
undefined4 local_a8 [40];
|
|
|
|
lVar6 = DAT_140162d68;
|
|
puVar7 = DAT_140162d60;
|
|
local_res20[0] = *param_4;
|
|
if (local_res20[0] == 4) {
|
|
uVar3 = FUN_14000a080(param_1,param_2,param_3,param_4);
|
|
return CONCAT71((int7)((ulonglong)uVar3 >> 8),1);
|
|
}
|
|
iVar2 = *param_5;
|
|
if (*(int *)(DAT_140162d68 + 0x154) == iVar2) {
|
|
if (local_res20[0] == 7) {
|
|
bVar8 = *(char *)(DAT_140162d68 + 0x171) == '\0';
|
|
pcVar5 = "Auto Revive On !!!\n";
|
|
*(bool *)(DAT_140162d68 + 0x171) = bVar8;
|
|
if (!bVar8) {
|
|
pcVar5 = "Auto Revive Off !!!\n";
|
|
}
|
|
iVar2 = printf(pcVar5);
|
|
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),1);
|
|
}
|
|
}
|
|
else {
|
|
if (*(longlong *)(DAT_140162d60 + 0x16) != 0) {
|
|
for (param_5 = *(int **)(*(longlong *)(DAT_140162d60 + 0xe) +
|
|
((ulonglong)(longlong)iVar2 % *(ulonglong *)(DAT_140162d60 + 0x10)) *
|
|
8); param_5 != (int *)0x0; param_5 = *(int **)param_5) {
|
|
if (iVar2 == param_5[2]) {
|
|
if (param_5 != (int *)0x0) goto LAB_14000e299;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
param_5 = (int *)0x0;
|
|
LAB_14000e299:
|
|
if (((param_5 != (int *)0x0) &&
|
|
(puVar1 = *(undefined4 **)(param_5 + 4), puVar1 != (undefined4 *)0x0)) &&
|
|
(local_res20[0] < 0xe)) {
|
|
param_5 = (int *)(longlong)(int)local_res20[0];
|
|
switch(local_res20[0]) {
|
|
case 0:
|
|
puVar4 = FUN_14000b8e0(puVar1,local_a8);
|
|
uVar3 = FUN_140008ea0(DAT_140162d78,puVar4,lVar6,puVar7);
|
|
return CONCAT71((int7)((ulonglong)uVar3 >> 8),1);
|
|
default:
|
|
uVar3 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x48) + 0x50) + 0x40))
|
|
(*(longlong *)(param_1 + 0x48) + 0x50,puVar1[0x28],&DAT_1401555d0,
|
|
local_res20);
|
|
return CONCAT71((int7)((ulonglong)uVar3 >> 8),1);
|
|
case 3:
|
|
FUN_140010960(L"REQ_SERVER_KILL",
|
|
IMAGE_DOS_HEADER_140000000.e_magic +
|
|
(&switchD_14000e2d6::switchdataD_14000e3d4)[(int)local_res20[0]],DAT_140162d68
|
|
,DAT_140162d60);
|
|
case 1:
|
|
uVar3 = FUN_140009720(puVar1[0x29]);
|
|
return CONCAT71((int7)((ulonglong)uVar3 >> 8),1);
|
|
case 4:
|
|
case 8:
|
|
case 9:
|
|
case 10:
|
|
case 0xc:
|
|
break;
|
|
case 0xb:
|
|
bVar8 = *(char *)(DAT_140162d68 + 0x171) == '\0';
|
|
pcVar5 = "Auto Revive On !!!\n";
|
|
*(bool *)(DAT_140162d68 + 0x171) = bVar8;
|
|
if (!bVar8) {
|
|
pcVar5 = "Auto Revive Off !!!\n";
|
|
}
|
|
printf(pcVar5);
|
|
param_5 = (int *)FUN_140006940(*(longlong *)(param_1 + 0x48),0xb,lVar6,(longlong)puVar7);
|
|
if (*(longlong *)(DAT_1401626f8 + 0xa8) != 0) {
|
|
param_5 = (int *)FUN_140008a40(*(longlong *)(DAT_1401626f8 + 0xa8));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return CONCAT71((int7)((ulonglong)param_5 >> 8),1);
|
|
}
|
|
|