//
// sub_1800E78E0 from 0x1800e78e0 to 0x1800e7969 (137 bytes)
//
// 2 xrefs:
// > FMOD::System::setSoftwareFormat @ 0x1800b19d3
// > ??> @ 0x1801fff24
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:18 +0000
//
__int64 __fastcall sub_1800E78E0(__int64 a1, int a2, int a3, int a4)
{
if ( *(_BYTE *)(a1 + 8) )
return 27;
if ( a2 && (unsigned int)(a2 - 8000) > 0x2CEC0 || a3 >= 9 || a3 == 1 && !a4 )
return 31;
if ( a4 > 32 )
return 64;
if ( a2 )
*(_DWORD *)(a1 + 1744) = a2;
*(_DWORD *)(a1 + 70452) = a3;
if ( a3 != 1 )
a4 = sub_180096E30(a3);
*(_DWORD *)(a1 + 1748) = a4;
return 0;
}