//
// FMOD::System::setSoftwareFormat from 0x1800b1970 to 0x1800b1aeb (379 bytes)
//
// 5 xrefs:
// > FMOD_System_SetSoftwareFormat @ 0x1800c6f49
// > ??> @ 0x180187b28
// > ??> @ 0x180187b5c
// > ??> @ 0x180194348
// > ??> @ 0x1801fcbe8
//
// 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:53:57 +0000
//
__int64 __fastcall FMOD::System::setSoftwareFormat(__int64 a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
int v6; // r15d
unsigned int v8; // esi
int v9; // ebx
int v10; // ebx
int v11; // ebx
int v12; // eax
__int64 v14; // [rsp+30h] [rbp-158h] BYREF
__int64 v15; // [rsp+38h] [rbp-150h] BYREF
_BYTE v16[256]; // [rsp+40h] [rbp-148h] BYREF
v6 = a1;
v14 = 0;
v8 = FMOD::SystemI::validate(a1, &v15, &v14);
if ( (v8 || (v8 = sub_1800E78E0(v15, a2, a3, a4)) != 0) && *((char *)off_1801AED20 + 16) < 0 )
{
v9 = sub_1800F2EC0(v16, 256, a2);
v10 = sub_1800F2F70(&v16[v9]) + v9;
v11 = sub_1800F2EC0(&v16[v10], (unsigned int)(256 - v10), a3) + v10;
v12 = sub_1800F2F70(&v16[v11]);
sub_1800F2EC0(&v16[v12 + v11], (unsigned int)(256 - (v12 + v11)), a4);
sub_1800B20E0(v8, 1, v6, (unsigned int)"System::setSoftwareFormat", (__int64)v16);
}
if ( v14 )
sub_180102320(v14);
return v8;
}