//
// sub_1800E4500 from 0x1800e4500 to 0x1800e459b (155 bytes)
//
// 5 xrefs:
// > FMOD::System::getNumDrivers @ 0x1800adfc0
// > sub_1800FB2A0 @ 0x1800fb452
// > sub_1800FB2A0 @ 0x1800fb4d9
// > sub_1800FB9B0 @ 0x1800fb9d7
// > ??> @ 0x1801ffbd0
//
// 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_1800E4500(__int64 a1, _DWORD *a2)
{
__int64 result; // rax
__int64 v5; // rax
__int64 (__fastcall *v6)(__int64, _DWORD *); // r8
__int64 v7; // rcx
if ( !a2 )
return 31;
if ( *(_BYTE *)(a1 + 8)
|| (result = sub_1800FBAE0(a1, *(unsigned int *)(a1 + 1656), *(unsigned int *)(a1 + 1660)), !(_DWORD)result) )
{
result = sub_1800FB2A0(a1, 0);
if ( !(_DWORD)result )
{
v5 = *(_QWORD *)(a1 + 1648);
v6 = *(__int64 (__fastcall **)(__int64, _DWORD *))(v5 + 824);
if ( v6 )
{
v7 = v5 + 8;
if ( !v5 )
v7 = 0;
return v6(v7, a2);
}
else
{
*a2 = 0;
return 0;
}
}
}
else
{
*a2 = 0;
}
return result;
}