//
// GameLevelManager::createAndGetEditorSoundConfigs from 0x4c393c to 0x4c3a32 (246 bytes)
//
// 1 xrefs:
// > GameLevelManager::onGetEditorSoundsCompleted @ 0x4d1d0e
//
// 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:50:26 +0000
//
cocos2d::CCArray *__fastcall GameLevelManager::createAndGetEditorSoundConfigs(cocos2d::CCArray *a1, int a2)
{
cocos2d::CCArray *v3; // r0
bool v4; // nf
cocos2d::CCArray *v5; // r8
size_t v6; // r0
cocos2d::CCArray *v7; // r10
unsigned int i; // r7
cocos2d::CCString *v9; // r0
const char *CString; // r0
const char *v11; // r11
size_t v12; // r0
int v13; // r3
GJEditorSoundConfig *v14; // r0
cocos2d::CCDictionary *v15; // r1
cocos2d::CCObject *v16; // r11
int v18; // [sp+4h] [bp-20h] BYREF
int v19; // [sp+8h] [bp-1Ch]
int v20; // [sp+Ch] [bp-18h]
int v21[3]; // [sp+10h] [bp-14h] BYREF
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v4 = (*(_BYTE *)a2 & 1) != 0;
if ( (*(_BYTE *)a2 & 1) == 0 )
++a2;
v21[0] = 0;
if ( v4 )
a2 = *(_DWORD *)(a2 + 8);
v21[1] = 0;
v21[2] = 0;
v5 = v3;
v6 = strlen((const char *)a2);
std::string::__init(v21, (const void *)a2, v6);
v7 = sub_4C1A88(v21, "|");
std::string::~string((int)v21);
for ( i = 0; i < cocos2d::CCArray::count(v7); ++i )
{
v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, i);
CString = (const char *)cocos2d::CCString::getCString(v9);
v18 = 0;
v19 = 0;
v20 = 0;
v11 = CString;
v12 = strlen(CString);
std::string::__init(&v18, v11, v12);
if ( (v18 & 1) != 0 )
v13 = v19;
else
v13 = (int)(unsigned __int8)v18 >> 1;
if ( v13 )
{
std::string::basic_string(v21, (int)&v18);
v14 = (GJEditorSoundConfig *)GameLevelManager::responseToDict((cocos2d::CCDictionary *)v21, 0);
v16 = (cocos2d::CCObject *)GJEditorSoundConfig::create(v14, v15);
std::string::~string((int)v21);
if ( v16 )
cocos2d::CCArray::addObject(v5, v16);
}
std::string::~string((int)&v18);
}
return v5;
}