//
// sub_BA787C from 0xba787c to 0xba78ec (112 bytes)
//
// 2 xrefs:
// > ??> @ 0x111cac8
// > ??> @ 0x111cb78
//
// 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_BA787C(__int64 a1, bool *a2)
{
__int64 v3; // x19
__int64 result; // x0
v3 = a1 + 1560;
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 1024) + 124LL) & 1) == 0 || *(_BYTE *)(a1 + 1676) )
goto LABEL_3;
result = sub_BB9FA4(a1, *(unsigned __int8 *)(a1 + 1676), a1 + 1676);
if ( !(_DWORD)result )
{
if ( !*(_BYTE *)(v3 + 116) )
return 0;
LABEL_3:
result = sub_BAA0F4(v3, 0);
*a2 = *(_DWORD *)(v3 + 112) == 0;
if ( (_DWORD)result )
return result;
return 0;
}
return result;
}