//
// sub_100125C10 from 0x100125c10 to 0x100125c7c (108 bytes)
//
// 3 xrefs:
// > sub_100125AA8 @ 0x100125b38
// > sub_10022F24C @ 0x10022f2dc
// > sub_10041245C @ 0x1004124e4
//
// 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_100125C10(__int64 a1, __int64 a2)
{
_QWORD *v3; // x1
__int64 *v4; // x9
_QWORD *v5; // x2
v3 = (_QWORD *)(a1 + 8);
v4 = *(__int64 **)(a1 + 8);
if ( v4 )
{
do
{
while ( 1 )
{
v3 = v4;
if ( *(_DWORD *)(a2 + 28) >= *((_DWORD *)v4 + 7) )
break;
v4 = (__int64 *)*v4;
v5 = v3;
if ( !*v3 )
goto LABEL_8;
}
v4 = (__int64 *)v4[1];
}
while ( v4 );
v5 = v3 + 1;
}
else
{
v5 = (_QWORD *)(a1 + 8);
}
LABEL_8:
sub_10000A0F0((__int64 **)a1, (__int64)v3, v5, (_QWORD *)a2);
return a2;
}