//
// sub_B9BD50 from 0xb9bd50 to 0xb9be34 (228 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_B9BD50(_QWORD *a1, __int64 a2, __int64 a3)
{
unsigned int v4; // w20
int v7; // w0
if ( !a1 )
return 1;
v4 = 1;
if ( *a1 != 764702 )
return v4;
if ( !a2 )
return 2;
v4 = 2;
if ( *(_DWORD *)(a2 + 36448) != -1059136595 )
return v4;
v4 = 7;
if ( *(_QWORD *)(a2 + 96) )
return v4;
v4 = sub_B9BBC0((__int64)a1, a2);
if ( v4 )
return v4;
sub_B87CF8(a2, 0);
if ( *(_DWORD *)(a2 + 24) != 14 )
*(_DWORD *)(a2 + 24) = 14;
v7 = *(_DWORD *)(a2 + 484);
*(_QWORD *)(a2 + 16) = a3;
*(_DWORD *)(a2 + 484) = v7 | 1;
return 0;
}