// // MusicDownloadManager::encodeCustomSFX from 0x575818 to 0x575a52 (570 bytes) // // 3 xrefs: // > LevelEditorLayer::updateCustomSFXMappings @ 0x46feb6 // > MusicDownloadManager::exportCustomSFXToFile @ 0x575a9c // > MusicDownloadManager::encodeDataTo @ 0x575d5e // // 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:41 +0000 // int *__fastcall MusicDownloadManager::encodeCustomSFX(int *a1, MusicDownloadManager *a2, _DWORD *a3) { int v5; // r3 int v6; // r3 int v7; // r6 int v8; // r5 int v9; // r3 int v10; // r2 int *v11; // r5 int v12; // r3 char *v13; // r1 size_t v14; // r2 int v15; // r2 size_t v16; // r0 char *v17; // r1 size_t v18; // r2 char *v19; // r1 size_t v20; // r2 int v21; // r0 int v22; // r1 int v23; // r2 int v24; // r2 int v25; // r3 int v26; // r3 int *v27; // r0 int v29; // [sp+0h] [bp-9Ch] int *v30; // [sp+18h] [bp-84h] BYREF int v31; // [sp+1Ch] [bp-80h] BYREF int v32; // [sp+20h] [bp-7Ch] int v33; // [sp+24h] [bp-78h] BYREF size_t v34; // [sp+28h] [bp-74h] char *v35; // [sp+2Ch] [bp-70h] int v36; // [sp+30h] [bp-6Ch] BYREF size_t v37; // [sp+34h] [bp-68h] char *v38; // [sp+38h] [bp-64h] int v39[3]; // [sp+3Ch] [bp-60h] BYREF int v40; // [sp+48h] [bp-54h] BYREF size_t v41; // [sp+4Ch] [bp-50h] char *v42; // [sp+50h] [bp-4Ch] char v43[64]; // [sp+54h] [bp-48h] BYREF if ( *((_DWORD *)a2 + 133) ) { v31 = 0; v32 = 0; v30 = &v31; if ( !sub_575664(a2, a3, (int)&v30) && !v32 ) { *a1 = 0; a1[1] = 0; a1[2] = 0; std::string::__init(a1, &unk_B6B226, 0); LABEL_6: std::__tree::~__tree((int)&v30); return a1; } v5 = *((_DWORD *)a2 + 133); v33 = 0; v34 = 0; v35 = nullptr; v36 = 0; v37 = 0; v38 = nullptr; if ( !v5 ) { LABEL_27: sub_993BD0(v43, "1|%i|", *((_DWORD *)a2 + 134)); v40 = 0; v41 = 0; v42 = nullptr; v16 = strlen(v43); std::string::__init(&v40, v43, v16); if ( (v33 & 1) != 0 ) { v17 = v35; v18 = v34; } else { v18 = (int)(unsigned __int8)v33 >> 1; v17 = (char *)&v33 + 1; } std::string::append(&v40, v17, v18); std::string::append(&v40, "|"); if ( (v36 & 1) != 0 ) { v19 = v38; v20 = v37; } else { v20 = (int)(unsigned __int8)v36 >> 1; v19 = (char *)&v36 + 1; } std::string::append(&v40, v19, v20); v21 = v40; v22 = v41; v23 = (int)v42; v40 = 0; v41 = 0; v42 = nullptr; *a1 = v21; a1[1] = v22; a1[2] = v23; std::string::~string((int)&v40); std::string::~string((int)&v36); std::string::~string((int)&v33); goto LABEL_6; } v6 = *(_DWORD *)(v5 + 52); if ( v6 ) v7 = *(_DWORD *)(v6 + 272); else v7 = 0; while ( 1 ) { if ( !v6 ) goto LABEL_27; v8 = *(_DWORD *)(v6 + 260); if ( *(_DWORD *)(v8 + 72) != 1 && (!v32 || std::__tree::__count_unique(&v30, (_DWORD *)(v8 + 72))) ) break; LABEL_23: if ( v7 ) v15 = *(_DWORD *)(v7 + 272); else v15 = 0; v6 = v7; v7 = v15; } std::string::basic_string(v39, v8 + 76); LevelTools::base64EncodeString(&v40, v39); std::string::~string((int)v39); if ( *(_BYTE *)(v8 + 68) ) { v24 = *(_DWORD *)(v8 + 72); v25 = *(_DWORD *)(v8 + 56); v11 = &v33; sub_993BD0(v43, "%i,%i,", v24, v25); if ( (v33 & 1) != 0 ) v26 = v34; else v26 = (int)(unsigned __int8)v33 >> 1; if ( !v26 ) goto LABEL_20; v27 = &v33; } else { v29 = *(_DWORD *)(v8 + 52); v9 = *(_DWORD *)(v8 + 56); v10 = *(_DWORD *)(v8 + 72); v11 = &v36; sub_993BD0(v43, "%i,%i,%i,", v10, v9, v29); if ( (v36 & 1) != 0 ) v12 = v37; else v12 = (int)(unsigned __int8)v36 >> 1; if ( !v12 ) goto LABEL_20; v27 = &v36; } std::string::append(v27, ";"); LABEL_20: std::string::append(v11, v43); if ( (v40 & 1) != 0 ) { v13 = v42; v14 = v41; } else { v14 = (int)(unsigned __int8)v40 >> 1; v13 = (char *)&v40 + 1; } std::string::append(v11, v13, v14); std::string::~string((int)&v40); goto LABEL_23; } *a1 = 0; a1[1] = 0; a1[2] = 0; std::string::__init(a1, &unk_B6B226, 0); return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source