//
// sub_85B9C from 0x85b9c to 0x85bec (80 bytes)
//
// 2 xrefs:
// > ??> @ 0x85b9a
// > sub_8539E @ 0x8539e
//
// 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_85B9C(int a1)
{
unsigned __int16 *v1; // r5
int v2; // r0
bool v3; // zf
int result; // r0
v1 = *(unsigned __int16 **)(a1 + 380);
if ( !v1 )
return 39;
v2 = *v1;
v3 = v2 == 1;
if ( v2 != 1 )
v3 = v2 == 3;
if ( !v3 && (v2 != 65534 || memcmp(v1 + 12, &unk_409E4, 0x10u) && memcmp(v1 + 12, &unk_409F4, 0x10u)) )
return 39;
result = 0;
if ( v1[7] == 8 )
return 39;
return result;
}