//
// sub_85A4FC from 0x85a4fc to 0x85a5cc (208 bytes)
//
// 1 xrefs:
// > ??> @ 0xac113c
//
// 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
//
int __fastcall sub_85A4FC(int a1, _DWORD *a2, int a3)
{
int v3; // r12
int result; // r0
int v5; // r3
v3 = a2[28];
if ( (v3 & 4) == 0 || (result = a2[30] & 0x11) != 0 )
{
if ( !a3 )
{
if ( (v3 & 8) == 0 || (a2[31] & 0x40) != 0 )
return (v3 & 2) == 0 || (a2[29] & 0xA8) != 0;
return 0;
}
if ( (v3 & 2) == 0 || (result = a2[29] & 4) != 0 )
{
if ( (v3 & 1) != 0 )
return (a2[28] & 0x10) != 0;
if ( (a2[28] & 0x2040) == 0x2040 )
return 3;
if ( (v3 & 2) != 0 )
return 4;
if ( (v3 & 8) == 0 )
return 0;
v5 = a2[31];
if ( (v5 & 7) == 0 )
return 0;
result = a2[31] & 4;
if ( (v5 & 4) != 0 )
return 5;
}
}
return result;
}