//
// sub_18003B500 from 0x18003b500 to 0x18003b5f8 (248 bytes)
//
// 2 xrefs:
// > sub_18003B680 @ 0x18003b6a6
// > ??> @ 0x1801f7d64
//
// 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_18003B500(__int64 a1)
{
__int64 v1; // rdx
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rcx
__int64 result; // rax
int v7; // [rsp+20h] [rbp-18h]
v1 = *(_QWORD *)(a1 + 616);
if ( v1 && v1 != a1 + 576 )
{
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
v1,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_codec_wav.cpp",
440,
1);
*(_QWORD *)(a1 + 616) = 0;
}
v3 = *(_QWORD *)(a1 + 560);
if ( v3 )
{
LOBYTE(v7) = 1;
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
v3,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_codec_wav.cpp",
445,
v7);
*(_QWORD *)(a1 + 560) = 0;
}
v4 = *(_QWORD *)(a1 + 544);
*(_DWORD *)(a1 + 568) = 0;
if ( v4 )
{
LOBYTE(v7) = 1;
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
v4,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_codec_wav.cpp",
451,
v7);
*(_QWORD *)(a1 + 544) = 0;
}
v5 = *(_QWORD *)(a1 + 432);
*(_DWORD *)(a1 + 536) = 0;
if ( v5 )
{
result = sub_1800C1280();
if ( (_DWORD)result )
return result;
*(_QWORD *)(a1 + 432) = 0;
}
return 0;
}