/* AgentManager_Release_x64.exe sha256 8fd8ca91725858651a7839d34257b10c2970ac16c97e60c523b8b0c983fcb186 * Ghidra 12.1.2 decompiler output for 0x1400b8b10 FUN_1400b8b10 * Pseudocode, not original source. */ int FUN_1400b8b10(void *param_1) { int iVar1; longlong *plVar2; int iVar3; int iVar4; if (param_1 == (void *)0x0) { return 0x10; } EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14017d440); iVar4 = 0; iVar3 = 0; do { iVar1 = memcmp(&DAT_140179540 + (longlong)iVar3 * 10,param_1,0x50); if (iVar1 == 0) { LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14017d440); return iVar3; } iVar3 = iVar3 + 1; } while (iVar3 < 0x20); plVar2 = &DAT_140179540; do { if (*plVar2 == 0) { memcpy(&DAT_140179540 + (longlong)iVar4 * 10,param_1,0x50); LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14017d440); return iVar4; } plVar2 = plVar2 + 10; iVar4 = iVar4 + 1; } while ((longlong)plVar2 < 0x140179f40); LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14017d440); return -1; }