//
// sub_B09A8 from 0xb09a8 to 0xb0ac8 (288 bytes)
//
// 1 xrefs:
// > sub_563C0 @ 0x56400
//
// 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_B09A8(__int64 a1, unsigned __int64 a2)
{
unsigned __int64 v4; // x8
_QWORD *v5; // x11
unsigned int v6; // w21
__int64 v8; // [xsp+0h] [xbp-40h] BYREF
sub_B0EE0(&v8);
v4 = (a2 >> 20) - 64;
if ( !(a2 >> 26) )
v4 = 0;
v5 = (_QWORD *)(a1 + 576);
do
v5 = (_QWORD *)*v5;
while ( v5 != (_QWORD *)(a1 + 576) && v5[3] >> 20 < v4 );
v6 = sub_B0810(a1, v4 << 20, 0xFFFFFFFFFFF00000LL, 0);
if ( !v6 )
{
v6 = sub_B06E8();
if ( !v6 )
v6 = sub_B06E8();
}
sub_B0F24();
return v6;
}