//
// sub_B76FB0 from 0xb76fb0 to 0xb77070 (192 bytes)
//
// 4 xrefs:
// > sub_B9C364 @ 0xb9cc98
// > sub_BAABB8 @ 0xbaabcc
// > ??> @ 0x121c368
// > ??> @ 0x121c3e8
//
// 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_B76FB0(__int64 a1, _BYTE *a2)
{
__int64 result; // x0
unsigned int v5; // w20
sub_B99314(a1, 0);
result = sub_BACAE0(a1, 0);
if ( !(_DWORD)result )
{
if ( *(_DWORD *)(a1 + 384) == 2 )
{
if ( !*(_BYTE *)(a1 + 985) )
return result;
if ( *(_DWORD *)(a1 + 1808) != 1 )
goto LABEL_4;
}
else if ( *(_DWORD *)(a1 + 1808) != 1 )
{
LABEL_4:
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 1032) + 124LL) & 1) != 0 )
{
v5 = sub_BB9FA4(a1, 0, a2);
result = 0;
if ( v5 )
{
sub_B99314(a1, 1);
return v5;
}
}
else
{
result = 0;
*a2 = 1;
}
return result;
}
return 0;
}
return result;
}