//
// sub_10054F964 from 0x10054f964 to 0x10054f9e8 (132 bytes)
//
// 4 xrefs:
// > sub_10056DB30 @ 0x10056ddac
// > sub_10057B5C4 @ 0x10057b5d8
// > ??> @ 0x10082d948
// > ??> @ 0x10082d9c8
//
// 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_10054F964(__int64 a1, _BYTE *a2)
{
__int64 result; // x0
__int64 v5; // x8
*(_BYTE *)(a1 + 737) = 0;
result = sub_10057C0B0();
if ( !(_DWORD)result )
{
if ( *(_DWORD *)(a1 + 1592) == 1 )
{
return 0;
}
else if ( (*(_BYTE *)(*(_QWORD *)(a1 + 808) + 124LL) & 1) != 0 )
{
v5 = sub_100587124(a1, 0, a2);
result = 0;
if ( (_DWORD)v5 )
{
*(_BYTE *)(a1 + 737) = 1;
return v5;
}
}
else
{
*a2 = 1;
return 0;
}
}
return result;
}