//
// sub_100508EC8 from 0x100508ec8 to 0x100508f40 (120 bytes)
//
// 3 xrefs:
// > ??> @ 0x100827a48
// > ??> @ 0x100827c70
// > ??> @ 0x10082a528
//
// 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_100508EC8(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // x0
__int64 v7; // [xsp+8h] [xbp-28h] BYREF
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 288LL))(a1, 4294967294LL, &v7);
if ( !(_DWORD)result )
{
if ( !v7 )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 520LL))(a1);
result = sub_10050B704(v7, a2, a3, 1);
if ( !(_DWORD)result )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 520LL))(a1);
}
return result;
}