//
// FMOD::Sound::setDefaults from 0x1800a9930 to 0x1800a9aa4 (372 bytes)
//
// 5 xrefs:
// > FMOD_Sound_SetDefaults @ 0x1800c6799
// > ??> @ 0x180186de0
// > ??> @ 0x180186e18
// > ??> @ 0x180194348
// > ??> @ 0x1801fbd6c
//
// 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:55 +0000
//
__int64 __fastcall FMOD::Sound::setDefaults(__int64 a1, __int64 a2, unsigned int a3)
{
int v4; // r14d
__int64 v5; // rdx
unsigned int v6; // esi
int v7; // ebx
int v8; // eax
_DWORD *v10; // [rsp+30h] [rbp-158h] BYREF
__int64 v11; // [rsp+38h] [rbp-150h] BYREF
_BYTE v12[256]; // [rsp+40h] [rbp-148h] BYREF
v11 = 0;
v4 = a1;
v6 = sub_1800E1460(a1, &v10, &v11);
if ( !v6 )
{
if ( !v10[68] || v10[68] == 7 )
{
v6 = (*(__int64 (__fastcall **)(_DWORD *, __int64, _QWORD))(*(_QWORD *)v10 + 56LL))(v10, v5, a3);
if ( !v6 )
goto LABEL_8;
}
else
{
v6 = 46;
}
}
if ( *((char *)off_1801AED20 + 16) < 0 )
{
v7 = sub_1800F2F20(v12, 256);
v8 = sub_1800F2F70(&v12[v7]);
sub_1800F2EC0(&v12[v8 + v7], (unsigned int)(256 - (v8 + v7)), a3);
sub_1800B20E0(v6, 5, v4, (unsigned int)"Sound::setDefaults", (__int64)v12);
}
LABEL_8:
if ( v11 )
sub_180102300(v11, 12);
return v6;
}