//
// sub_538A0 from 0x538a0 to 0x53990 (240 bytes)
//
// 1 xrefs:
// > ??> @ 0x10c288
//
// 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_538A0(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v5; // x9
int v6; // w9
result = ((__int64 (*)(void))loc_525D0)();
if ( !(_DWORD)result )
{
v5 = *(_QWORD *)(a1 + 40);
if ( v5
&& ((*(_BYTE *)(a1 + 56) & 1) != 0 || !*(_DWORD *)(a1 + 84)
? (v6 = *(_DWORD *)(v5 + 68))
: (v6 = *(_DWORD *)(a1 + 92) + *(_DWORD *)(a1 + 88)),
(unsigned int)(v6 - 1) < HIDWORD(a2)) )
{
return 32;
}
else
{
if ( a2 )
{
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 24) + 72LL) & 0x40000) != 0 )
*(_DWORD *)(a1 + 60) |= 0x20000u;
}
return sub_C98D8();
}
}
return result;
}