//
// sub_54A54 from 0x54a54 to 0x54ad8 (132 bytes)
//
// 1 xrefs:
// > ??> @ 0x10c3e0
//
// 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_54A54(__int64 a1, _DWORD *a2, char a3)
{
__int64 result; // x0
int v6; // w8
int v7; // [xsp+8h] [xbp-8h] BYREF
if ( !a2 || !*(_QWORD *)(a1 + 40) )
return 31;
if ( (a3 & 2) != 0 )
{
v6 = *(_DWORD *)(a1 + 76);
result = 0;
LABEL_8:
*a2 = v6;
return result;
}
if ( (a3 & 0x10) == 0 )
return sub_67040();
result = *(_QWORD *)(a1 + 192);
if ( !result )
{
v6 = *(_DWORD *)(a1 + 72);
goto LABEL_8;
}
result = (*(__int64 (__fastcall **)(__int64, int *))(*(_QWORD *)result + 136LL))(result, &v7);
if ( !(_DWORD)result )
{
v6 = v7;
goto LABEL_8;
}
return result;
}