//
// sub_180097D40 from 0x180097d40 to 0x180097e39 (249 bytes)
//
// 4 xrefs:
// > FMOD::DSP::getParameterFloat @ 0x1800a2cab
// > ??> @ 0x1801856f8
// > ??> @ 0x180185708
// > ??> @ 0x1801faa40
//
// 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_180097D40(__int64 a1, int a2, _DWORD *a3, __int64 a4, unsigned int a5)
{
__int64 v5; // r11
__int64 v9; // r10
__int64 result; // rax
__int64 v11; // rcx
char *v12; // rbx
int v13; // [rsp+20h] [rbp-48h] BYREF
char v14; // [rsp+28h] [rbp-40h] BYREF
v5 = a2;
v13 = 0;
if ( (int)v5 < 0 )
return 31;
v9 = *(_QWORD *)(a1 + 232);
if ( !v9 || (int)v5 >= *(_DWORD *)(v9 + 96) )
return 31;
if ( !*(_QWORD *)(v9 + 144) )
return 68;
if ( **(_DWORD **)(*(_QWORD *)(v9 + 104) + 8 * v5) )
return 31;
v11 = a1 + 176;
*(_QWORD *)(a1 + 176) = a1;
v14 = 0;
if ( a4 || !*(_DWORD *)(a1 + 256) )
v12 = &v14;
else
v12 = nullptr;
result = (*(__int64 (__fastcall **)(__int64, _QWORD, int *, char *))(v9 + 144))(v11, (unsigned int)v5, &v13, v12);
if ( !(_DWORD)result )
{
if ( a3 )
*a3 = v13;
if ( a4 )
sub_1800B7D20(a4, v12, a5);
return 0;
}
return result;
}