//
// sub_1004BB58C from 0x1004bb58c to 0x1004bb61c (144 bytes)
//
// 0 xrefs:
//
// 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_1004BB58C(_QWORD *a1, int a2)
{
_QWORD *v2; // x9
__int64 v3; // x10
__int64 *v5; // x9
__int64 *v6; // x9
v2 = a1 + 40;
while ( 1 )
{
v2 = (_QWORD *)*v2;
if ( v2 == a1 + 40 )
break;
v3 = v2[2];
if ( *(_DWORD *)(v3 + 20) == a2 )
return *(_QWORD *)(v3 + 112);
}
v5 = a1 + 80;
while ( 1 )
{
v5 = (__int64 *)*v5;
if ( v5 == a1 + 80 )
break;
if ( *((_DWORD *)v5 + 48) == a2 )
return v5[34];
}
v6 = a1 + 47;
while ( 1 )
{
v6 = (__int64 *)*v6;
if ( v6 == a1 + 47 )
break;
if ( *((_DWORD *)v6 + 36) == a2 )
return v6[32];
}
return 0;
}