//
// FMOD::System::createSound from 0x1004cba8c to 0x1004cbc10 (388 bytes)
//
// 3 xrefs:
// > FMODAudioEngine::preloadEffect @ 0x100138738
// > FMODAudioEngine::preloadEffectAsync @ 0x10013bf70
// > sub_100452CE4 @ 0x100452ce8
//
// 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
//
// local variable allocation has failed, the output may be wrong!
FMOD_RESULT __fastcall FMOD::System::createSound(
FMOD::System *a1,
const char *a2,
unsigned int a3,
FMOD_CREATESOUNDEXINFO *a4,
FMOD::Sound **a5)
{
__int64 v7; // x23
int v10; // w3
int v11; // w4
int v12; // w5
int v13; // w6
int v14; // w7
__int64 v15; // x20
int v16; // w0
int v17; // w3
int v18; // w4
int v19; // w5
int v20; // w6
int v21; // w7
__int64 v22; // x27
int v23; // w3
int v24; // w4
int v25; // w5
int v26; // w6
int v27; // w7
int v28; // w23
int v29; // w3
int v30; // w4
int v31; // w5
int v32; // w6
int v33; // w7
int v34; // w23
int v35; // w3
int v36; // w4
int v37; // w5
int v38; // w6
int v39; // w7
int v40; // w22
int v41; // w3
int v42; // w4
int v43; // w5
int v44; // w6
int v45; // w7
int v46; // w0
int v47; // w3
int v48; // w4
int v49; // w5
int v50; // w6
int v51; // w7
__int64 v53; // [xsp+0h] [xbp-160h] BYREF
_WORD v54[128]; // [xsp+8h] [xbp-158h] BYREF
v7 = *(_QWORD *)&a3;
v15 = sub_1004CE440(a1, &v53, 0);
if ( (_DWORD)v15 || (v15 = sub_1004D298C(v53, a2, v7, a4, a5), (_DWORD)v15) )
{
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
v16 = sub_100435EB4(v54, 0x100u, a2, v10, v11, v12, v13, v14);
v22 = v16
+ (__int64)(int)sub_100435EB4(
(_WORD *)((char *)v54 + v16),
(unsigned int)(256 - v16),
", ",
v17,
v18,
v19,
v20,
v21);
v28 = v22 + sub_100435D28((_BYTE *)v54 + v22, (unsigned int)(256 - v22), v7, v23, v24, v25, v26, v27);
v34 = v28 + sub_100435EB4((_WORD *)((char *)v54 + v28), (unsigned int)(256 - v28), ", ", v29, v30, v31, v32, v33);
v40 = v34 + sub_100436324((int)v54 + v34, (unsigned int)(256 - v34), (char)a4, v35, v36, v37, v38, v39);
v46 = sub_100435EB4((_WORD *)((char *)v54 + v40), (unsigned int)(256 - v40), ", ", v41, v42, v43, v44, v45);
sub_100436324((int)v54 + v40 + v46, (unsigned int)(256 - (v40 + v46)), (char)a5, v47, v48, v49, v50, v51);
sub_10048489C(v15, 1, (__int64)a1, (__int64)"System::createSound", (__int64)v54);
}
}
return (unsigned int)v15;
}