//
// sub_54EB8 from 0x54eb8 to 0x54ee4 (44 bytes)
//
// 2 xrefs:
// > sub_54E84 @ 0x54ea2
// > sub_62B54 @ 0x6368c
//
// 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_54EB8(_DWORD *a1, int a2)
{
int result; // r0
if ( !a2 || (*(_BYTE *)(a2 + 62) & 0x10) != 0 )
return 0;
if ( *a1 )
return 28;
result = sub_64EC0(a2, 13);
if ( !result )
{
*a1 = a2;
return 0;
}
return result;
}