//
// sub_B99C20 from 0xb99c20 to 0xb99cb0 (144 bytes)
//
// 2 xrefs:
// > sub_B71B40 @ 0xb71b70
// > sub_B71B40 @ 0xb71ba8
//
// 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_B99C20(__int64 result)
{
int v1; // w1
__int64 v2; // x22
__int64 v3; // x20
int i; // w23
_QWORD *v5; // x21
_QWORD *v6; // x3
_QWORD *v7; // x19
if ( result )
{
v1 = *(_DWORD *)(result + 32);
if ( v1 > 0 )
{
v2 = 0;
v3 = result;
for ( i = 0; i < v1; ++i )
{
result = *(_QWORD *)v3;
v5 = *(_QWORD **)(*(_QWORD *)v3 + v2);
v6 = (_QWORD *)*v5;
if ( *v5 )
{
do
{
v7 = (_QWORD *)v6[2];
result = sub_B994E4((__int64)v5, v6, v3);
v6 = v7;
--*(_QWORD *)(v3 + 40);
}
while ( v7 );
v1 = *(_DWORD *)(v3 + 32);
}
v2 += 8;
}
}
}
return result;
}