//
// sub_100124A30 from 0x100124a30 to 0x100124a90 (96 bytes)
//
// 4 xrefs:
// > sub_100124414 @ 0x1001244b4
// > sub_100124B7C @ 0x100124ba8
// > sub_100126320 @ 0x1001263bc
// > sub_1001264A8 @ 0x1001264e4
//
// 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
//
_QWORD *__fastcall sub_100124A30(__int64 a1, _QWORD *a2, int *a3)
{
_QWORD *v3; // x0
__int64 *v4; // x11
__int64 *v5; // t1
int v6; // w9
int v7; // w8
_QWORD *v8; // x8
v5 = *(__int64 **)(a1 + 8);
v3 = (_QWORD *)(a1 + 8);
v4 = v5;
if ( v5 )
{
v6 = *a3;
do
{
while ( 1 )
{
v3 = v4;
v7 = *((_DWORD *)v4 + 8);
if ( v6 >= v7 && (v7 < v6 || a3[1] >= *((_DWORD *)v4 + 9)) )
break;
v4 = (__int64 *)*v4;
v8 = v3;
if ( !*v3 )
goto LABEL_11;
}
v4 = (__int64 *)v4[1];
}
while ( v4 );
v8 = v3 + 1;
}
else
{
v8 = v3;
}
LABEL_11:
*a2 = v3;
return v8;
}