//
// sub_1800DDFA0 from 0x1800ddfa0 to 0x1800de03f (159 bytes)
//
// 4 xrefs:
// > FMOD::SoundGroup::setMaxAudibleBehavior @ 0x1800aafee
// > ??> @ 0x18018ce10
// > ??> @ 0x18018ce44
// > ??> @ 0x1801ff6a8
//
// 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_1800DDFA0(__int64 a1, unsigned int a2)
{
int v4; // edi
_QWORD *v5; // r14
_QWORD *v6; // rcx
_QWORD *v7; // rbx
_DWORD *v8; // rcx
if ( a2 > 2 )
return 31;
if ( *(_DWORD *)(a1 + 108) == 1 && a2 != 1 )
{
v4 = 0;
v5 = (_QWORD *)(a1 + 64);
v6 = *(_QWORD **)(a1 + 64);
if ( v6 != v5 )
{
do
{
v7 = (_QWORD *)*v6;
++v4;
v8 = (_DWORD *)v6[2];
v8[134] = 1065353216;
v8[135] = 1065353216;
if ( v4 > *(_DWORD *)(a1 + 104) )
(*(void (__fastcall **)(_DWORD *))(*(_QWORD *)v8 + 8LL))(v8);
v6 = v7;
}
while ( v7 != v5 );
}
}
*(_DWORD *)(a1 + 108) = a2;
return 0;
}