//
// sub_1800F5A00 from 0x1800f5a00 to 0x1800f5bc4 (452 bytes)
//
// 6 xrefs:
// > ??> @ 0x18018ec04
// > ??> @ 0x18018ec14
// > ??> @ 0x18018ec30
// > ??> @ 0x18018ec40
// > ??> @ 0x1801b00f0
// > ??> @ 0x1802008b4
//
// 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_1800F5A00(__int64 a1)
{
__int64 v2; // rsi
int v3; // ebx
__int64 v4; // rbp
_DWORD *v5; // rdi
__int64 v6; // rsi
__int64 v7; // rcx
float v8; // xmm1_4
__int64 v9; // rdi
float v10; // xmm0_4
int v12; // [rsp+90h] [rbp+8h] BYREF
v2 = *((_QWORD *)off_1801AED20 + *(int *)(a1 + 48) + 44);
v3 = 0;
v4 = sub_1800F6380();
v5 = sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
64,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_dsp_convolutionreverb.cpp",
588,
0,
0,
1);
if ( !v5 )
return 38;
*(_QWORD *)v5 = off_18016E188;
v5[4] = 0;
*((_BYTE *)v5 + 20) = 1;
*((_QWORD *)v5 + 3) = 2;
*((_QWORD *)v5 + 4) = 1065353216;
*((_QWORD *)v5 + 5) = 1065353216;
*((_QWORD *)v5 + 6) = 0;
*((_QWORD *)v5 + 7) = 0;
*((_QWORD *)v5 + 1) = v2;
sub_1800E4020(v2, &v12, nullptr);
v5[4] = v12;
*(_QWORD *)(a1 + 8) = v5;
if ( *(int *)(v4 + 96) > 0 )
{
v6 = 0;
do
{
v7 = *(_QWORD *)(v6 + *(_QWORD *)(v4 + 104));
if ( *(_DWORD *)v7 )
{
if ( *(_DWORD *)v7 == 2 )
{
if ( v3 != 3 )
return 31;
*(_BYTE *)(*(_QWORD *)(a1 + 8) + 20LL) = *(_DWORD *)(v7 + 48) != 0;
}
}
else
{
v8 = *(float *)(v7 + 56);
v9 = *(_QWORD *)(a1 + 8);
if ( v3 == 1 )
{
if ( v8 > -80.0 )
v10 = powf(10.0, v8 * 0.050000001);
else
v10 = 0.0;
*(float *)(v9 + 40) = v10;
}
else
{
if ( v3 != 2 )
return 31;
if ( v8 > -80.0 )
*(float *)(v9 + 44) = powf(10.0, v8 * 0.050000001);
else
*(_DWORD *)(v9 + 44) = 0;
}
}
++v3;
v6 += 8;
}
while ( v3 < *(_DWORD *)(v4 + 96) );
}
return 0;
}