//
// sub_BA8B94 from 0xba8b94 to 0xba8c40 (172 bytes)
//
// 2 xrefs:
// > ??> @ 0x111cbc8
// > ??> @ 0x111cc48
//
// 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_BA8B94(__int64 a1)
{
int v2; // w0
__int64 v3; // x19
char **v4; // x2
__int64 (__fastcall *v5)(__int64); // x3
__int64 result; // x0
void *v7; // x0
v2 = *(unsigned __int8 *)(a1 + 958);
*(_BYTE *)(a1 + 952) = 0;
v3 = *(_QWORD *)a1;
if ( !v2 || *(_BYTE *)(v3 + 1554) )
{
v7 = off_1231020(0x28u, 1u);
*(_QWORD *)(v3 + 536) = v7;
if ( v7 )
{
result = 0;
++*(_QWORD *)(v3 + 36032);
}
else
{
return 27;
}
}
else
{
v4 = &off_121C8C8;
if ( *(char ***)(a1 + 1024) != &off_111CBC0 )
v4 = &off_121C948;
v5 = (__int64 (__fastcall *)(__int64))v4[1];
*(_QWORD *)(a1 + 1024) = v4;
return v5(a1);
}
return result;
}