//
// sub_1004D4A88 from 0x1004d4a88 to 0x1004d4b84 (252 bytes)
//
// 1 xrefs:
// > FMOD::System::createGeometry @ 0x1004cd910
//
// 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_1004D4A88(__int64 a1, int a2, int a3, __int64 *a4)
{
__int64 result; // x0
void *v9; // x0
__int64 v10; // x9
_QWORD *v11; // x10
__int64 v12; // x11
result = 31;
if ( a3 >= 1 && a2 >= 1 )
{
if ( a4 )
{
result = sub_1004AE548(a1 + 73144, a1);
if ( !(_DWORD)result )
{
v9 = sub_1004B11FC(
*((__int64 **)off_1008524C8 + 54),
320,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_systemi.cpp",
5691,
0,
0);
*a4 = (__int64)v9;
if ( v9 )
{
sub_1004AEC18((__int64)v9, a1 + 73144);
result = sub_1004AEEBC(*a4, a2, a3);
if ( !(_DWORD)result )
{
v10 = *(_QWORD *)(a1 + 73136);
if ( v10 )
{
v11 = (_QWORD *)*a4;
v12 = *(_QWORD *)(v10 + 8);
*v11 = v10;
v11[1] = v12;
*(_QWORD *)(v10 + 8) = v11;
*(_QWORD *)v11[1] = v11;
}
*(_QWORD *)(a1 + 73136) = *a4;
return 0;
}
}
else
{
return 38;
}
}
}
}
return result;
}