//
// sub_6B868 from 0x6b868 to 0x6b8f0 (136 bytes)
//
// 4 xrefs:
// > sub_6B8F0 @ 0x6b930
// > sub_764FC @ 0x76630
// > sub_7691C @ 0x76940
// > FMOD::System::getNumDrivers @ 0xdaf1c
//
// 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_6B868(__int64 a1, _DWORD *a2)
{
__int64 result; // x0
__int64 v5; // x8
__int64 (__fastcall *v6)(__int64, _DWORD *); // x2
__int64 v7; // x0
if ( !a2 )
return 31;
if ( !*(_BYTE *)(a1 + 8) )
{
result = sub_7676C(a1, *(unsigned int *)(a1 + 1656), *(unsigned int *)(a1 + 1660));
if ( (_DWORD)result )
goto LABEL_13;
}
result = sub_764FC(a1, 0);
if ( (_DWORD)result )
return result;
v5 = *(_QWORD *)(a1 + 1648);
v6 = *(__int64 (__fastcall **)(__int64, _DWORD *))(v5 + 824);
if ( !v6 )
{
result = 0;
LABEL_13:
*a2 = 0;
return result;
}
if ( v5 )
v7 = v5 + 8;
else
v7 = 0;
return v6(v7, a2);
}