// // sub_575E04 from 0x575e04 to 0x576136 (818 bytes) // // 2 xrefs: // > MusicDownloadManager::importCustomSFXSetup @ 0x576496 // > MusicDownloadManager::importCustomSFXMappings @ 0x576a6c // // 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:52:42 +0000 // int __fastcall sub_575E04(cocos2d::CCDictionary **a1, int *a2, unsigned __int8 *a3, int *a4, int *a5) { int v7; // r10 int v8; // r2 int v9; // r3 int v10; // r5 unsigned int v11; // r1 SFXInfoObject *CustomSFXFolder; // r9 int v13; // r11 int v14; // r5 char *v15; // r8 char *v16; // r4 _BOOL4 v17; // r10 int CustomSFXObject; // r0 int v19; // r2 int v20; // r3 int v21; // r5 size_t v22; // r2 int v23; // r1 int v24; // r3 char *v25; // r0 unsigned __int8 *v26; // r1 char *v27; // r0 unsigned __int8 *v28; // r2 int v29; // t1 _DWORD *v30; // r0 int *v31; // r2 int v32; // r3 _DWORD *v33; // r0 int v34; // r5 int v35; // r1 int v36; // r0 int v37; // r3 int v38; // r3 int v39; // r1 SFXInfoObject *CustomSFXPlacement; // r5 int *v41; // r0 _DWORD *v42; // r0 int v44; // [sp+Ch] [bp-80h] const char *v47; // [sp+20h] [bp-6Ch] int v48; // [sp+24h] [bp-68h] int *v49; // [sp+30h] [bp-5Ch] BYREF _DWORD v50[2]; // [sp+34h] [bp-58h] BYREF _DWORD *v51; // [sp+3Ch] [bp-50h] BYREF _DWORD v52[2]; // [sp+40h] [bp-4Ch] BYREF char *v53; // [sp+48h] [bp-44h] BYREF char *v54; // [sp+4Ch] [bp-40h] int v55; // [sp+50h] [bp-3Ch] int v56; // [sp+54h] [bp-38h] BYREF int v57; // [sp+58h] [bp-34h] int v58; // [sp+5Ch] [bp-30h] int v59[3]; // [sp+60h] [bp-2Ch] BYREF int v60[3]; // [sp+6Ch] [bp-20h] BYREF int v61[3]; // [sp+78h] [bp-14h] BYREF v7 = 0; MusicDownloadManager::getCustomSFXRoot(a1); v49 = v50; v51 = v52; v8 = *a2; v9 = a2[1]; v50[0] = 0; v50[1] = 0; v52[0] = 0; v10 = -1431655765 * ((v9 - v8) >> 3); v52[1] = 0; while ( v7 != v10 ) { std::__tree::__emplace_unique_key_args( (int)&v56, (int)&v51, (int *)(*a2 + 24 * v7), (_DWORD *)(*a2 + 24 * v7)); ++v7; } v53 = nullptr; v54 = nullptr; v55 = 0; v11 = -1431655765 * ((a2[1] - *a2) >> 3); if ( v11 ) { std::vector::allocate(&v53, v11); sub_572F50((int)&v53, *a2, a2[1]); } CustomSFXFolder = nullptr; v44 = 1; LABEL_18: if ( v53 != v54 ) { v56 = 0; v57 = 0; v58 = 0; v13 = 0; v48 = -1431655765 * ((v54 - v53) >> 3); while ( 1 ) { if ( v13 == v48 ) { v14 = v44; if ( -1431655765 * ((v57 - v56) >> 3) == -1431655765 * ((v54 - v53) >> 3) ) v14 = 0; v44 = v14; std::vector::assign((int)&v53, v56, v57); std::__vector_base::~__vector_base((void **)&v56); goto LABEL_18; } v15 = v53; v16 = &v53[24 * v13]; v17 = *((_DWORD *)v16 + 2) <= 0; if ( *(int *)v16 > 1 ) { CustomSFXObject = MusicDownloadManager::getCustomSFXObject((MusicDownloadManager *)a1, *(_DWORD *)v16); if ( CustomSFXObject ) { if ( v17 ) { if ( *(_BYTE *)(CustomSFXObject + 68) ) { v19 = *(unsigned __int8 *)(CustomSFXObject + 76); v20 = (unsigned __int8)v16[12]; v21 = v19 & 1; v22 = (v19 & 1) != 0 ? *(_DWORD *)(CustomSFXObject + 80) : v19 >> 1; v23 = v20 & 1; v24 = (v20 & 1) != 0 ? *((_DWORD *)v16 + 4) : v20 >> 1; if ( v22 == v24 ) { if ( v21 ) v25 = *(char **)(CustomSFXObject + 84); else v25 = (char *)(CustomSFXObject + 77); if ( v23 ) v26 = *((unsigned __int8 **)v16 + 5); else v26 = (unsigned __int8 *)(v16 + 13); if ( !v21 ) { v27 = v25 - 1; v28 = &v26[v22]; while ( v26 != v28 ) { v29 = (unsigned __int8)*++v27; if ( v29 != *v26 ) goto LABEL_48; ++v26; } LABEL_47: v30 = std::map::operator[](&v49, (int *)v16); v31 = a5; *v30 = *(_DWORD *)&v15[24 * v13]; v32 = *a5 + 1; LABEL_67: *v31 = v32; goto LABEL_13; } if ( !std::char_traits::compare(v25, v26, v22) ) goto LABEL_47; } } } else if ( !*(_BYTE *)(CustomSFXObject + 68) && *(_DWORD *)(CustomSFXObject + 52) == *((_DWORD *)v16 + 2) ) { goto LABEL_47; } } } LABEL_48: v33 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::find( (int)&v49, (_DWORD *)v16 + 1); if ( v33 != v50 ) break; if ( !v44 || !std::__tree::__count_unique(&v51, (_DWORD *)v16 + 1) ) { v35 = *((_DWORD *)v16 + 1); if ( v35 <= 1 ) goto LABEL_55; v36 = MusicDownloadManager::getCustomSFXObject((MusicDownloadManager *)a1, v35); if ( !v36 || !*(_BYTE *)(v36 + 68) ) goto LABEL_55; v34 = *((_DWORD *)v16 + 1); LABEL_54: if ( v34 <= 0 ) { LABEL_55: v37 = *a3; if ( (v37 & 1) != 0 ) v38 = *((_DWORD *)a3 + 1); else v38 = v37 >> 1; if ( v38 ) { if ( !CustomSFXFolder ) { std::string::basic_string(v59, (int)a3); CustomSFXFolder = MusicDownloadManager::createCustomSFXFolder(a1, (unsigned __int8 *)v59, 1, 0); std::string::~string((int)v59); } v34 = *((_DWORD *)CustomSFXFolder + 18); } else { v34 = 1; } } v39 = (int)(v16 + 12); if ( v17 ) { std::string::basic_string(v60, v39); CustomSFXPlacement = MusicDownloadManager::createCustomSFXFolder( a1, (unsigned __int8 *)v60, v34, *(_DWORD *)&v15[24 * v13]); v41 = v60; } else { v47 = *((const char **)v16 + 2); std::string::basic_string(v61, v39); CustomSFXPlacement = MusicDownloadManager::createCustomSFXPlacement( a1, v47, v34, (unsigned __int8 *)v61, *(_DWORD *)&v15[24 * v13]); v41 = v61; } std::string::~string((int)v41); v42 = std::map::operator[](&v49, (int *)v16); v31 = a4; *v42 = *((_DWORD *)CustomSFXPlacement + 18); v32 = *a4 + 1; goto LABEL_67; } if ( v57 == v58 ) { std::vector::__push_back_slow_path(&v56, (int)v16); } else { if ( v57 ) CustomSFXImportEntry::CustomSFXImportEntry(v57, (int)v16); v57 += 24; } LABEL_13: ++v13; } v34 = v33[5]; goto LABEL_54; } std::__vector_base::~__vector_base((void **)&v53); std::__tree::~__tree((int)&v51); return std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::~__tree((int)&v49); }
GD Web Decomp Icon

GD Web Decomp

Raw Source