{"type": "func", "start": 7854544, "end": 7854690, "name": "EditorSFXManager::downloadAllMissing", "pseudocode": "// \n// EditorSFXManager::downloadAllMissing from 0x77d9d0 to 0x77da62 (146 bytes)\n// \n// 1 xrefs:\n// > EditorSoundsSettingsPopup::onDownloadAll @ 0x78bc8a\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:59:25 +0000\n// \n\nchar **__fastcall EditorSFXManager::downloadAllMissing(EditorSFXManager *this)\n{\n  MusicDownloadManager *v1; // r0\n  char *v2; // r8\n  unsigned int *v3; // r6\n  const char *v4; // r9\n  unsigned int v5; // t1\n  MusicDownloadManager *v6; // r0\n  MusicDownloadManager *v7; // r0\n  int v8; // r3\n  int v9; // r0\n  int v11; // r0\n  char *v12[3]; // [sp+4h] [bp+0h] BYREF\n  _BYTE v13[4]; // [sp+10h] [bp+Ch] BYREF\n  int v14; // [sp+14h] [bp+10h]\n\n  v1 = EditorSFXManager::collectAllSFXIDs((EditorSFXManager *)v12, (int)this);\n  v2 = v12[1];\n  v3 = (unsigned int *)v12[0];\n  while ( v3 != (unsigned int *)v2 )\n  {\n    v5 = *v3++;\n    v4 = (const char *)v5;\n    v6 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v1);\n    v7 = MusicDownloadManager::pathForSFX((MusicDownloadManager *)v13, v6, v5);\n    if ( (v13[0] & 1) != 0 )\n      v8 = v14;\n    else\n      v8 = (int)v13[0] >> 1;\n    if ( !v8\n      || (v9 = cocos2d::CCFileUtils::sharedFileUtils(v7),\n          (v7 = (MusicDownloadManager *)(*(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 80))(v9, v13)) == nullptr) )\n    {\n      v11 = MusicDownloadManager::sharedState(v7);\n      MusicDownloadManager::downloadSFX(v11, v4);\n    }\n    v1 = (MusicDownloadManager *)std::string::~string((int)v13);\n  }\n  return std::__vector_base<int>::~__vector_base(v12);\n}", "assembly": "; \n; EditorSFXManager::downloadAllMissing from 0x77d9d0 to 0x77da62 (146 bytes)\n; \n; 1 xrefs:\n; > EditorSoundsSettingsPopup::onDownloadAll @ 0x78bc8a\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:59:25 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x77d9d0\nSUB             SP, SP, #0x24                                          ; +0x4, 0x77d9d4\nLDR             R5, =(__stack_chk_guard_ptr - 0x77D9E2)                ; +0x6, 0x77d9d6\nADD             R7, SP, #4                                             ; +0x8, 0x77d9d8\nMOV             R1, R0                                                 ; +0xa, 0x77d9da\nADD             R4, SP, #0x24+var_14                                   ; +0xc, 0x77d9dc\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x77d9de\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x77d9e0\nMOV             R0, R7; this                                           ; +0x12, 0x77d9e2\nLDR             R3, [R5]                                               ; +0x14, 0x77d9e4\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x16, 0x77d9e6\nBL              _ZN16EditorSFXManager16collectAllSFXIDsEv; EditorSFXManager::collectAllSFXIDs(void) ; +0x18, 0x77d9e8\nLDR.W           R8, [SP,#0x24+var_1C]                                  ; +0x1c, 0x77d9ec\nLDR             R6, [SP,#0x24+var_20]                                  ; +0x20, 0x77d9f0\nCMP             R6, R8                                                 ; +0x22, 0x77d9f2\nBEQ             loc_77DA2C                                             ; +0x24, 0x77d9f4\nLDR.W           R9, [R6],#4                                            ; +0x26, 0x77d9f6\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x2a, 0x77d9fa\nMOV             R1, R0; int                                            ; +0x2e, 0x77d9fe\nMOV             R2, R9                                                 ; +0x30, 0x77da00\nMOV             R0, R4; this                                           ; +0x32, 0x77da02\nBL              _ZN20MusicDownloadManager10pathForSFXEi; MusicDownloadManager::pathForSFX(int) ; +0x34, 0x77da04\nLDRB.W          R3, [SP,#0x24+var_14]                                  ; +0x38, 0x77da08\nLSLS            R2, R3, #0x1F                                          ; +0x3c, 0x77da0c\nITE PL                                                                 ; +0x3e, 0x77da0e\nASRPL           R3, R3, #1                                             ; +0x40, 0x77da10\nLDRMI           R3, [SP,#0x24+var_10]                                  ; +0x42, 0x77da12\nCBZ             R3, loc_77DA50                                         ; +0x44, 0x77da14\nBL              _ZN7cocos2d11CCFileUtils15sharedFileUtilsEv; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x46, 0x77da16\nLDR             R3, [R0]                                               ; +0x4a, 0x77da1a\nMOV             R1, R4                                                 ; +0x4c, 0x77da1c\nLDR             R3, [R3,#0x50]                                         ; +0x4e, 0x77da1e\nBLX             R3                                                     ; +0x50, 0x77da20\nCBZ             R0, loc_77DA50                                         ; +0x52, 0x77da22\nMOV             R0, R4                                                 ; +0x54, 0x77da24\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x56, 0x77da26\nB               loc_77D9F2                                             ; +0x5a, 0x77da2a\nMOV             R0, R7                                                 ; +0x5c, 0x77da2c\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0x5e, 0x77da2e\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x62, 0x77da32\nLDR             R3, [R5]                                               ; +0x64, 0x77da34\nCMP             R2, R3                                                 ; +0x66, 0x77da36\nBEQ             loc_77DA5C                                             ; +0x68, 0x77da38\nBLX             __stack_chk_fail                                       ; +0x6a, 0x77da3a\nMOV             R0, R4                                                 ; +0x6e, 0x77da3e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x70, 0x77da40\nB               loc_77DA46                                             ; +0x74, 0x77da44\nMOV             R0, R7                                                 ; +0x76, 0x77da46\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0x78, 0x77da48\nBL              __cxa_end_cleanup                                      ; +0x7c, 0x77da4c\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x80, 0x77da50\nMOV             R1, R9; int                                            ; +0x84, 0x77da54\nBL              _ZN20MusicDownloadManager11downloadSFXEi; MusicDownloadManager::downloadSFX(int) ; +0x86, 0x77da56\nB               loc_77DA24                                             ; +0x8a, 0x77da5a\nADD             SP, SP, #0x24 ; '$'                                    ; +0x8c, 0x77da5c\nPOP.W           {R4-R9,PC}                                             ; +0x8e, 0x77da5e", "xrefs": ["EditorSoundsSettingsPopup::onDownloadAll @ 0x78bc8a"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}