/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469 * Ghidra 12.1.2 decompiler output for 0x1400bec90 FUN_1400bec90 * Pseudocode, not original source. */ ulonglong FUN_1400bec90(longlong param_1,uint *param_2,void *param_3) { LPCRITICAL_SECTION lpCriticalSection; longlong *_Dst; ulonglong uVar1; ulonglong uVar2; int iVar3; undefined1 *puVar4; if (((param_1 == 0) || (param_2 == (uint *)0x0)) || (param_3 == (void *)0x0)) { return 0x10; } lpCriticalSection = (LPCRITICAL_SECTION)((longlong)param_3 + 0x1030); EnterCriticalSection(lpCriticalSection); if (*param_2 < 0x400) { LeaveCriticalSection(lpCriticalSection); *param_2 = 0x400; return 6; } _Dst = malloc(0x70); if (_Dst == (longlong *)0x0) { LeaveCriticalSection(lpCriticalSection); uVar1 = 0xd; } else { iVar3 = 0; do { memcpy(_Dst,param_3,0x70); puVar4 = (undefined1 *)(iVar3 + param_1); uVar2 = FUN_1400cb7d0(_Dst,puVar4); uVar1 = uVar2 & 0xffffffff; if ((int)uVar2 != 0) goto LAB_1400bedb2; uVar2 = FUN_1400cb6a0(_Dst); uVar1 = uVar2 & 0xffffffff; if ((int)uVar2 != 0) goto LAB_1400bedb2; uVar2 = FUN_1400cb6f0(_Dst,puVar4,0x20); uVar1 = uVar2 & 0xffffffff; if ((int)uVar2 != 0) goto LAB_1400bedb2; uVar2 = FUN_1400cb7d0(_Dst,puVar4); uVar1 = uVar2 & 0xffffffff; if ((int)uVar2 != 0) goto LAB_1400bedb2; iVar3 = iVar3 + 0x20; param_3 = (void *)((longlong)param_3 + 0x70); } while (iVar3 < 0x400); *param_2 = 0x400; LAB_1400bedb2: free(_Dst); LeaveCriticalSection(lpCriticalSection); } return uVar1; }