//
// FMODAudioEngine::setup from 0x3ec3f4 to 0x3ec596 (418 bytes)
//
// 1 xrefs:
// > LoadingLayer::init @ 0x3fb590
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:09 +0000
//
unsigned int __fastcall FMODAudioEngine::setup(FMODAudioEngine *this)
{
cocos2d::CCArray *v2; // r11
int v3; // r0
int v4; // r0
cocos2d::CCArray *v5; // r11
unsigned int i; // r5
unsigned int result; // r0
cocos2d::CCString *v8; // r0
const char *CString; // r0
const char *v10; // r7
size_t v11; // r0
int *v12; // r7
cocos2d::CCObject *v13; // [sp+14h] [bp-68h]
int v14; // [sp+18h] [bp-64h]
int v15; // [sp+1Ch] [bp-60h]
int v16; // [sp+20h] [bp-5Ch]
int v17[3]; // [sp+2Ch] [bp-50h] BYREF
int v18[3]; // [sp+38h] [bp-44h] BYREF
int v19[3]; // [sp+44h] [bp-38h] BYREF
int v20[3]; // [sp+50h] [bp-2Ch] BYREF
int v21[3]; // [sp+5Ch] [bp-20h] BYREF
int v22; // [sp+68h] [bp-14h] BYREF
int v23; // [sp+6Ch] [bp-10h]
int v24; // [sp+70h] [bp-Ch]
FMODAudioEngine::setupAudioEngine(this);
*((_DWORD *)this + 82) = 1065353216;
*((_DWORD *)this + 81) = 1065353216;
memset(v17, 0, sizeof(v17));
std::string::__init(v17, "achievement_01.ogg", 0x12u);
v2 = (cocos2d::CCArray *)cocos2d::CCString::create(v17);
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "playSound_01.ogg", 0x10u);
v13 = (cocos2d::CCObject *)cocos2d::CCString::create(v18);
memset(v19, 0, sizeof(v19));
std::string::__init(v19, "quitSound_01.ogg", 0x10u);
v14 = cocos2d::CCString::create(v19);
memset(v20, 0, sizeof(v20));
std::string::__init(v20, "explode_11.ogg", 0xEu);
v15 = cocos2d::CCString::create(v20);
memset(v21, 0, sizeof(v21));
std::string::__init(v21, "endStart_02.ogg", 0xFu);
v3 = cocos2d::CCString::create(v21);
v22 = 0;
v23 = 0;
v24 = 0;
v16 = v3;
std::string::__init(&v22, "highscoreGet02.ogg", 0x12u);
v4 = cocos2d::CCString::create(&v22);
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v2, v13, v14, v15, v16, v4, 0);
std::string::~string((int)&v22);
std::string::~string((int)v21);
std::string::~string((int)v20);
std::string::~string((int)v19);
std::string::~string((int)v18);
std::string::~string((int)v17);
for ( i = 0; ; ++i )
{
result = cocos2d::CCArray::count(v5);
if ( i >= result )
break;
v8 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, i);
CString = (const char *)cocos2d::CCString::getCString(v8);
v22 = 0;
v23 = 0;
v24 = 0;
v10 = CString;
v11 = strlen(CString);
std::string::__init(&v22, v10, v11);
v12 = FMODAudioEngine::preloadEffect((int)this, (int)&v22);
std::string::~string((int)&v22);
if ( v12 )
*((_BYTE *)v12 + 28) = 1;
}
return result;
}