//
// sub_100125C7C from 0x100125c7c to 0x100125d18 (156 bytes)
//
// 1 xrefs:
// > sub_100125AA8 @ 0x100125ba8
//
// 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
//
char *__fastcall sub_100125C7C(__int64 a1, __int64 a2)
{
char *v4; // x0
char *v5; // x20
__int128 v6; // q1
_QWORD *v7; // x1
__int64 *v8; // x9
_QWORD *v9; // x2
v4 = (char *)operator new(0x40u);
v5 = v4;
v6 = *(_OWORD *)(a2 + 16);
*(_OWORD *)(v4 + 28) = *(_OWORD *)a2;
*(_OWORD *)(v4 + 44) = v6;
*((_DWORD *)v4 + 15) = *(_DWORD *)(a2 + 32);
v7 = (_QWORD *)(a1 + 8);
v8 = *(__int64 **)(a1 + 8);
if ( v8 )
{
do
{
while ( 1 )
{
v7 = v8;
if ( *((_DWORD *)v4 + 7) >= *((_DWORD *)v8 + 7) )
break;
v8 = (__int64 *)*v8;
v9 = v7;
if ( !*v7 )
goto LABEL_8;
}
v8 = (__int64 *)v8[1];
}
while ( v8 );
v9 = v7 + 1;
}
else
{
v9 = (_QWORD *)(a1 + 8);
}
LABEL_8:
sub_10000A0F0((__int64 **)a1, (__int64)v7, v9, v4);
return v5;
}