//
// sub_BA8D34 from 0xba8d34 to 0xba8de0 (172 bytes)
//
// 2 xrefs:
// > ??> @ 0x111cc20
// > ??> @ 0x111cca0
//
// 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_BA8D34(__int64 a1, char a2)
{
__int64 v3; // x19
__int64 v4; // x0
v3 = a1 + 1560;
if ( !a2 )
{
v4 = *(_QWORD *)(a1 + 1648);
if ( v4 )
{
if ( *(_BYTE *)(v4 + 967) && !(unsigned int)sub_BAA4B0(v3, "%s", "QUIT") )
{
*(_DWORD *)(v3 + 112) = 12;
while ( !(unsigned int)sub_BAA0F4(v3, 1) && *(_DWORD *)(v3 + 112) )
;
}
}
}
sub_BAAAC8(v3);
sub_BAE6E8(a1, *(unsigned int *)(v3 + 148));
off_1231008(*(void **)(v3 + 120));
*(_QWORD *)(v3 + 120) = 0;
return 0;
}