//
// sub_100616E24 from 0x100616e24 to 0x100616f3c (280 bytes)
//
// 2 xrefs:
// > sub_1006169A0 @ 0x1006169e0
// > sub_1006169A0 @ 0x100616ab0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100616E24(unsigned int *a1, __int64 a2)
{
__int64 v3; // x8
const void *v4; // x20
int v5; // w21
__int64 v6; // x22
int *v7; // x0
_BYTE __s2[20]; // [xsp+34h] [xbp-4Ch] BYREF
if ( !*(_DWORD *)a2 )
return sub_1005FF014(a1, *(_QWORD *)(a2 + 8));
v3 = *(_QWORD *)(a2 + 8);
if ( *(_DWORD *)v3 != 20 )
return 0;
v4 = *(const void **)(v3 + 8);
if ( (int)sub_1005DEA4C(a1) < 1 )
return 0;
v5 = 0;
while ( 1 )
{
v6 = sub_1005DEA60((__int64)a1, v5);
v7 = (int *)sub_1005E8F04();
sub_10060418C(v6, v7, (__int64)__s2, nullptr);
if ( !memcmp(v4, __s2, 0x14u) )
break;
if ( ++v5 >= (int)sub_1005DEA4C(a1) )
return 0;
}
return v6;
}