//
// sub_10022F3B4 from 0x10022f3b4 to 0x10022f440 (140 bytes)
//
// 1 xrefs:
// > sub_10022F24C @ 0x10022f34c
//
// 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_10022F3B4(__int64 a1, __int64 *a2)
{
_QWORD *v4; // x20
__int64 v5; // x8
_QWORD *v6; // x1
__int64 *v7; // x9
_QWORD *v8; // x2
v4 = operator new(0x28u);
v5 = *a2;
*(_QWORD *)((char *)v4 + 28) = *a2;
v6 = (_QWORD *)(a1 + 8);
v7 = *(__int64 **)(a1 + 8);
if ( v7 )
{
do
{
while ( 1 )
{
v6 = v7;
if ( *((_DWORD *)v7 + 7) <= (int)v5 )
break;
v7 = (__int64 *)*v7;
v8 = v6;
if ( !*v6 )
goto LABEL_8;
}
v7 = (__int64 *)v7[1];
}
while ( v7 );
v8 = v6 + 1;
}
else
{
v8 = (_QWORD *)(a1 + 8);
}
LABEL_8:
sub_10000A0F0((__int64 **)a1, (__int64)v6, v8, v4);
return v4;
}