/* AgentManager_Release_x64.exe sha256 8fd8ca91725858651a7839d34257b10c2970ac16c97e60c523b8b0c983fcb186 * Ghidra 12.1.2 decompiler output for 0x14005f760 FUN_14005f760 * Pseudocode, not original source. */ void FUN_14005f760(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4) { int *piVar1; short *psVar2; longlong *plVar3; int *piVar4; short **ppsVar5; wchar_t *pwVar6; short *psVar7; short *local_res8; longlong *local_res10; undefined *local_res18 [2]; local_res10 = param_2; FUN_14003e7c0(param_1,param_2,param_3,param_4); local_res8 = (short *)PTR_DAT_14016f010; pwVar6 = (wchar_t *)0x0; if (*param_2 != 0) { pwVar6 = *(wchar_t **)(*param_2 + 0x38); } plVar3 = FUN_140071d40((int *)pwVar6,(longlong *)local_res18,param_3,param_4); psVar7 = (short *)*plVar3; if ((short *)*plVar3 == (short *)0x0) { psVar7 = (short *)PTR_DAT_14016f010; } pwVar6 = L"WARNING: %s"; ppsVar5 = &local_res8; FUN_140029b80((longlong *)ppsVar5,L"WARNING: %s",psVar7,param_4); if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_14016f010)) && (local_res18[0] + -8 != (undefined *)0x0)) { piVar4 = (int *)FUN_14003e7c0(ppsVar5,pwVar6,psVar7,param_4); FUN_14003d040(piVar4); piVar1 = (int *)(local_res18[0] + -4); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { FUN_14003e8b0(local_res18[0] + -8); } FUN_14003d0d0((longlong)piVar4); } psVar2 = local_res8; plVar3 = *(longlong **)(param_1 + 0x17f0); if (plVar3 != (longlong *)0x0) { psVar7 = local_res8; if (local_res8 == (short *)0x0) { psVar7 = (short *)PTR_DAT_14016f010; } pwVar6 = (wchar_t *)0x0; FUN_1400843d0((longlong)plVar3,0,psVar7,param_4); } if (*(longlong *)(param_1 + 0x758) != 0) { pwVar6 = (wchar_t *)0x0; if (*param_2 != 0) { pwVar6 = *(wchar_t **)(*param_2 + 0x38); } plVar3 = *(longlong **)(param_1 + 0x758); (**(code **)(*plVar3 + 0x10))(); } if (((psVar2 != (short *)0x0) && (psVar2 != (short *)PTR_DAT_14016f010)) && (psVar2 + -4 != (short *)0x0)) { piVar4 = (int *)FUN_14003e7c0(plVar3,pwVar6,psVar7,param_4); FUN_14003d040(piVar4); piVar1 = (int *)(psVar2 + -2); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { FUN_14003e8b0(psVar2 + -4); } FUN_14003d0d0((longlong)piVar4); } FUN_140038280(param_2,pwVar6,psVar7,param_4); return; }