{"type": "func", "start": 5370331440, "end": 5370331891, "name": "EditorSFXManager::downloadAllMissing", "pseudocode": "// \n// EditorSFXManager::downloadAllMissing from 0x14018c130 to 0x14018c2f3 (451 bytes)\n// \n// 2 xrefs:\n// > EditorSoundsSettingsPopup::onDownloadAll @ 0x1403d4eed\n// > <???> @ 0x140918fb0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:41 +0000\n// \n\n// Hidden C++ exception states: #wind=5\nvoid __fastcall EditorSFXManager::downloadAllMissing(__int64 a1)\n{\n  unsigned int v1; // edi\n  unsigned int *v2; // rbx\n  unsigned int *i; // rbp\n  unsigned int v4; // esi\n  __int64 v5; // rcx\n  int v6; // edi\n  void **v7; // rax\n  void *v8; // rdx\n  __int64 v9; // rcx\n  __int64 v10; // rax\n  __int64 v11; // rcx\n  unsigned int *v12; // [rsp+28h] [rbp-80h] BYREF\n  unsigned int *v13; // [rsp+30h] [rbp-78h]\n  void *v14; // [rsp+40h] [rbp-68h]\n  void *v15; // [rsp+48h] [rbp-60h]\n  _QWORD Src[4]; // [rsp+50h] [rbp-58h] BYREF\n  _QWORD v17[4]; // [rsp+70h] [rbp-38h] BYREF\n\n  v1 = 0;\n  EditorSFXManager::collectAllSFXIDs(a1, (__int64)&v12);\n  v2 = v12;\n  for ( i = v13; v2 != i; ++v2 )\n  {\n    v4 = *v2;\n    v5 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v14 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v5 = qword_14090C070;\n    }\n    MusicDownloadManager::pathForSFXFolder(v5, Src, v4);\n    v6 = v1 | 1;\n    sub_140044D80(Src, &unk_14070D03C, 1u);\n    v7 = (void **)GameToolbox::intToString(v17, v4);\n    v8 = v7;\n    if ( (unsigned __int64)v7[3] > 0xF )\n      v8 = *v7;\n    sub_140044D80(Src, v8, (size_t)v7[2]);\n    sub_14003D310((__int64)v17);\n    sub_140044D80(Src, \".ogg\", 4u);\n    if ( !Src[2]\n      || (v10 = cocos2d::CCFileUtils::sharedFileUtils(v9),\n          !(*(unsigned __int8 (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v10 + 152LL))(v10, Src)) )\n    {\n      v11 = qword_14090C070;\n      if ( !qword_14090C070 )\n      {\n        v15 = operator new(0x3D0u);\n        qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v15);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n        v11 = qword_14090C070;\n      }\n      MusicDownloadManager::downloadSFX(v11, v4);\n    }\n    v1 = v6 & 0xFFFFFFFE;\n    sub_14003D310((__int64)Src);\n  }\n  sub_140069730((__int64)&v12);\n}", "assembly": "; \n; EditorSFXManager::downloadAllMissing from 0x14018c130 to 0x14018c2f3 (451 bytes)\n; \n; 2 xrefs:\n; > EditorSoundsSettingsPopup::onDownloadAll @ 0x1403d4eed\n; > <???> @ 0x140918fb0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:41 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14018c130\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14018c135\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14018c13a\npush    rdi                                                            ; +0xf, 0x14018c13f\nsub     rsp, 0A0h                                                      ; +0x10, 0x14018c140\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x14018c147\nxor     rax, rsp                                                       ; +0x1e, 0x14018c14e\nmov     [rsp+0A8h+var_18], rax                                         ; +0x21, 0x14018c151\nxor     edi, edi                                                       ; +0x29, 0x14018c159\nmov     [rsp+0A8h+var_88], edi                                         ; +0x2b, 0x14018c15b\nlea     rdx, [rsp+0A8h+var_80]                                         ; +0x2f, 0x14018c15f\ncall    EditorSFXManager__collectAllSFXIDs                             ; +0x34, 0x14018c164\nnop                                                                    ; +0x39, 0x14018c169\nmov     rbx, [rsp+0A8h+var_80]                                         ; +0x3a, 0x14018c16a\nmov     rbp, [rsp+0A8h+var_78]                                         ; +0x3f, 0x14018c16f\ncmp     rbx, rbp                                                       ; +0x44, 0x14018c174\njz      loc_14018C2C0                                                  ; +0x47, 0x14018c177\nnop     dword ptr [rax]                                                ; +0x4d, 0x14018c17d\nmov     esi, [rbx]                                                     ; +0x50, 0x14018c180\nmov     rcx, cs:qword_14090C070                                        ; +0x52, 0x14018c182\ntest    rcx, rcx                                                       ; +0x59, 0x14018c189\njnz     short loc_14018C1C0                                            ; +0x5c, 0x14018c18c\nmov     ecx, 3D0h; Size                                                ; +0x5e, 0x14018c18e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x63, 0x14018c193\nmov     [rsp+0A8h+var_68], rax                                         ; +0x68, 0x14018c198\nmov     rcx, rax                                                       ; +0x6d, 0x14018c19d\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x70, 0x14018c1a0\nnop                                                                    ; +0x75, 0x14018c1a5\nmov     cs:qword_14090C070, rax                                        ; +0x76, 0x14018c1a6\nmov     rcx, [rax]                                                     ; +0x7d, 0x14018c1ad\nmov     rdx, [rcx+48h]                                                 ; +0x80, 0x14018c1b0\nmov     rcx, rax                                                       ; +0x84, 0x14018c1b4\ncall    rdx                                                            ; +0x87, 0x14018c1b7\nmov     rcx, cs:qword_14090C070                                        ; +0x89, 0x14018c1b9\nmov     r8d, esi                                                       ; +0x90, 0x14018c1c0\nlea     rdx, [rsp+0A8h+Src]                                            ; +0x93, 0x14018c1c3\ncall    MusicDownloadManager__pathForSFXFolder                         ; +0x98, 0x14018c1c8\nor      edi, 1                                                         ; +0x9d, 0x14018c1cd\nmov     [rsp+0A8h+var_88], edi                                         ; +0xa0, 0x14018c1d0\nmov     r8d, 1; Size                                                   ; +0xa4, 0x14018c1d4\nlea     rdx, unk_14070D03C; void *                                     ; +0xaa, 0x14018c1da\nlea     rcx, [rsp+0A8h+Src]; Src                                       ; +0xb1, 0x14018c1e1\ncall    sub_140044D80                                                  ; +0xb6, 0x14018c1e6\nmov     edx, esi                                                       ; +0xbb, 0x14018c1eb\nlea     rcx, [rsp+0A8h+var_38]                                         ; +0xbd, 0x14018c1ed\ncall    GameToolbox__intToString                                       ; +0xc2, 0x14018c1f2\nnop                                                                    ; +0xc7, 0x14018c1f7\nmov     rdx, rax                                                       ; +0xc8, 0x14018c1f8\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xcb, 0x14018c1fb\njbe     short loc_14018C205                                            ; +0xd0, 0x14018c200\nmov     rdx, [rax]; void *                                             ; +0xd2, 0x14018c202\nmov     r8, [rax+10h]; Size                                            ; +0xd5, 0x14018c205\nlea     rcx, [rsp+0A8h+Src]; Src                                       ; +0xd9, 0x14018c209\ncall    sub_140044D80                                                  ; +0xde, 0x14018c20e\nnop                                                                    ; +0xe3, 0x14018c213\nlea     rcx, [rsp+0A8h+var_38]                                         ; +0xe4, 0x14018c214\ncall    sub_14003D310                                                  ; +0xe9, 0x14018c219\nmov     r8d, 4; Size                                                   ; +0xee, 0x14018c21e\nlea     rdx, aOgg; \".ogg\"                                              ; +0xf4, 0x14018c224\nlea     rcx, [rsp+0A8h+Src]; Src                                       ; +0xfb, 0x14018c22b\ncall    sub_140044D80                                                  ; +0x100, 0x14018c230\ncmp     [rsp+0A8h+var_48], 0                                           ; +0x105, 0x14018c235\njz      short loc_14018C25C                                            ; +0x10b, 0x14018c23b\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x10d, 0x14018c23d\nmov     rcx, [rax]                                                     ; +0x113, 0x14018c243\nmov     r8, [rcx+98h]                                                  ; +0x116, 0x14018c246\nlea     rdx, [rsp+0A8h+Src]                                            ; +0x11d, 0x14018c24d\nmov     rcx, rax                                                       ; +0x122, 0x14018c252\ncall    r8                                                             ; +0x125, 0x14018c255\ntest    al, al                                                         ; +0x128, 0x14018c258\njnz     short loc_14018C2A2                                            ; +0x12a, 0x14018c25a\nmov     rcx, cs:qword_14090C070                                        ; +0x12c, 0x14018c25c\ntest    rcx, rcx                                                       ; +0x133, 0x14018c263\njnz     short loc_14018C29B                                            ; +0x136, 0x14018c266\nmov     ecx, 3D0h; Size                                                ; +0x138, 0x14018c268\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x13d, 0x14018c26d\nmov     [rsp+0A8h+var_60], rax                                         ; +0x142, 0x14018c272\nmov     rcx, rax                                                       ; +0x147, 0x14018c277\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x14a, 0x14018c27a\nnop                                                                    ; +0x14f, 0x14018c27f\nmov     cs:qword_14090C070, rax                                        ; +0x150, 0x14018c280\nmov     rcx, [rax]                                                     ; +0x157, 0x14018c287\nmov     r8, [rcx+48h]                                                  ; +0x15a, 0x14018c28a\nmov     rcx, rax                                                       ; +0x15e, 0x14018c28e\ncall    r8                                                             ; +0x161, 0x14018c291\nmov     rcx, cs:qword_14090C070                                        ; +0x164, 0x14018c294\nmov     edx, esi                                                       ; +0x16b, 0x14018c29b\ncall    MusicDownloadManager__downloadSFX                              ; +0x16d, 0x14018c29d\nand     edi, 0FFFFFFFEh                                                ; +0x172, 0x14018c2a2\nmov     [rsp+0A8h+var_88], edi                                         ; +0x175, 0x14018c2a5\nlea     rcx, [rsp+0A8h+Src]                                            ; +0x179, 0x14018c2a9\ncall    sub_14003D310                                                  ; +0x17e, 0x14018c2ae\nadd     rbx, 4                                                         ; +0x183, 0x14018c2b3\ncmp     rbx, rbp                                                       ; +0x187, 0x14018c2b7\njnz     loc_14018C180                                                  ; +0x18a, 0x14018c2ba\nlea     rcx, [rsp+0A8h+var_80]                                         ; +0x190, 0x14018c2c0\ncall    sub_140069730                                                  ; +0x195, 0x14018c2c5\nmov     rcx, [rsp+0A8h+var_18]                                         ; +0x19a, 0x14018c2ca\nxor     rcx, rsp; StackCookie                                          ; +0x1a2, 0x14018c2d2\ncall    __security_check_cookie                                        ; +0x1a5, 0x14018c2d5\nlea     r11, [rsp+0A8h+var_8]                                          ; +0x1aa, 0x14018c2da\nmov     rbx, [r11+18h]                                                 ; +0x1b2, 0x14018c2e2\nmov     rbp, [r11+20h]                                                 ; +0x1b6, 0x14018c2e6\nmov     rsi, [r11+28h]                                                 ; +0x1ba, 0x14018c2ea\nmov     rsp, r11                                                       ; +0x1be, 0x14018c2ee\npop     rdi                                                            ; +0x1c1, 0x14018c2f1\nretn                                                                   ; +0x1c2, 0x14018c2f2", "xrefs": ["EditorSoundsSettingsPopup::onDownloadAll @ 0x1403d4eed", "<???> @ 0x140918fb0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}