//
// sub_6B7B8 from 0x6b7b8 to 0x6b868 (176 bytes)
//
// 1 xrefs:
// > FMOD::System::setSoftwareFormat @ 0xdb2ec
//
// 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_6B7B8(__int64 a1, int a2, signed int a3, int a4)
{
__int64 result; // x0
if ( *(_BYTE *)(a1 + 8) )
return 27;
result = 31;
if ( a3 <= 8 && (a2 == 0 || (unsigned int)(a2 - 8000) <= 0x2CEC0) )
{
if ( a3 != 1 || a4 )
{
if ( a4 <= 32 )
{
if ( a2 )
*(_DWORD *)(a1 + 1744) = a2;
*(_DWORD *)(a1 + 70460) = a3;
if ( a3 != 1 )
a4 = sub_65A10(a3);
*(_DWORD *)(a1 + 1748) = a4;
return 0;
}
else
{
return 64;
}
}
else
{
return 31;
}
}
return result;
}