//
// FMOD_System_Create from 0x100578934 to 0x100578a98 (356 bytes)
//
// 2 xrefs:
// > FMODAudioEngine::setupAudioEngine @ 0x1001b4efc
// > j_FMOD_System_Create @ 0x10055d394
//
// This function is hookable on this platform (idp: arm, 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 11:08:23 +0000
//
__int64 __fastcall FMOD_System_Create(_QWORD *a1, int a2)
{
__int64 result; // x0
__int64 v4; // x0
__int64 v5; // x19
unsigned int v6; // w20
__int64 v7; // x9
if ( (unsigned int)(a2 - 131840) < 0xFFFFFF00 )
return 20;
if ( !a1 )
return 31;
v4 = sub_1005D7660(
*((_QWORD *)off_1009DA5E8 + 54),
74080,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod.cpp",
145,
0);
if ( v4 )
{
v5 = v4;
*a1 = sub_1005F622C();
if ( *((_QWORD *)off_1009DA5E8 + 46) )
{
if ( *((_QWORD *)off_1009DA5E8 + 47) )
{
if ( *((_QWORD *)off_1009DA5E8 + 48) )
{
if ( *((_QWORD *)off_1009DA5E8 + 49) )
{
if ( *((_QWORD *)off_1009DA5E8 + 50) )
{
if ( *((_QWORD *)off_1009DA5E8 + 51) )
{
if ( *((_QWORD *)off_1009DA5E8 + 52) )
{
if ( *((_QWORD *)off_1009DA5E8 + 53) )
{
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
v5,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod.cpp",
163,
1);
return 38;
}
v6 = 7;
}
else
{
v6 = 6;
}
}
else
{
v6 = 5;
}
}
else
{
v6 = 4;
}
}
else
{
v6 = 3;
}
}
else
{
v6 = 2;
}
}
else
{
v6 = 1;
}
}
else
{
v6 = 0;
}
result = sub_1005D714C();
if ( !(_DWORD)result )
{
v7 = 8LL * v6;
*(_QWORD *)((char *)off_1009DA5E8 + v7 + 368) = v5;
*(_DWORD *)(*(_QWORD *)((char *)off_1009DA5E8 + v7 + 368) + 69816LL) = v6;
}
}
else
{
*a1 = 0;
return 38;
}
return result;
}