//
// sub_1005FF014 from 0x1005ff014 to 0x1005ff0f0 (220 bytes)
//
// 1 xrefs:
// > sub_100616E24 @ 0x100616f00
//
// 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_1005FF014(unsigned int *a1, __int64 a2)
{
int v4; // w21
__int64 v5; // x0
__int64 v6; // x22
__int64 v7; // x23
size_t v8; // x2
int v9; // w8
if ( (int)sub_1005DEA4C(a1) < 1 )
return 0;
v4 = 0;
while ( 1 )
{
if ( (v5 = sub_1005DEA60((__int64)a1, v4), v6 = v5, v7 = *(_QWORD *)(*(_QWORD *)v5 + 40LL), *(_QWORD *)(v7 + 24))
&& !*(_DWORD *)(v7 + 8)
|| (sub_1005F3824(*(_QWORD *)(*(_QWORD *)v5 + 40LL), 0) & 0x80000000) == 0 )
{
if ( *(_QWORD *)(a2 + 24) && !*(_DWORD *)(a2 + 8) || (sub_1005F3824(a2, 0) & 0x80000000) == 0 )
{
v8 = *(int *)(v7 + 32);
v9 = *(_DWORD *)(a2 + 32);
if ( !((_DWORD)v8 == v9 ? memcmp(*(const void **)(v7 + 24), *(const void **)(a2 + 24), v8) : (_DWORD)v8 - v9) )
break;
}
}
if ( ++v4 >= (int)sub_1005DEA4C(a1) )
return 0;
}
return v6;
}