//
// sub_100508DB8 from 0x100508db8 to 0x100508e40 (136 bytes)
//
// 3 xrefs:
// > ??> @ 0x100827a38
// > ??> @ 0x100827c60
// > ??> @ 0x10082a518
//
// 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_100508DB8(__int64 a1, __int64 a2, float a3)
{
__int64 result; // x0
__int64 v7; // [xsp+8h] [xbp-28h] BYREF
if ( (~LODWORD(a3) & 0x7F800000) == 0 )
return 29;
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 288LL))(a1, 4294967294LL, &v7);
if ( !(_DWORD)result )
{
result = sub_10050B570(v7, a2, a3);
if ( !(_DWORD)result )
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 520LL))(a1);
}
return result;
}