//
// sub_100614938 from 0x100614938 to 0x1006149fc (196 bytes)
//
// 1 xrefs:
// > sub_1006140EC @ 0x1006143e8
//
// 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_100614938(unsigned int *a1, unsigned int a2)
{
char **v3; // x20
__int64 result; // x0
int v5; // w21
__int64 v6; // x22
v3 = sub_10058AB9C(a2);
result = 0;
if ( a1 && v3 )
{
if ( (int)sub_1005DEA4C(a1) <= 0 )
{
return 0;
}
else
{
v5 = 0;
while ( 1 )
{
v6 = sub_1005DEA60((__int64)a1, v5);
if ( !(unsigned int)sub_10058C008(*(_QWORD *)v6, (__int64)v3) )
break;
if ( ++v5 >= (int)sub_1005DEA4C(a1) )
return 0;
}
if ( *(_DWORD *)(v6 + 8) )
{
return 0;
}
else if ( (unsigned int)sub_1005DEA4C(*(unsigned int **)(v6 + 16)) )
{
return sub_1005DEA60(*(_QWORD *)(v6 + 16), 0);
}
else
{
return 0;
}
}
}
return result;
}