{"type": "func", "start": 5373446688, "end": 5373447024, "name": "MusicDownloadManager::pathForSFXFolder", "pseudocode": "// \n// MusicDownloadManager::pathForSFXFolder from 0x140484a20 to 0x140484b70 (336 bytes)\n// \n// 6 xrefs:\n// > EditorSFXManager::downloadAllMissing @ 0x14018c1c8\n// > MusicDownloadManager::pathForSFX @ 0x140484b9c\n// > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x14048fb65\n// > MusicDownloadManager::parseSFXLibrary @ 0x14048fc7d\n// > SetupSFXPopup::onClose @ 0x1405ddb62\n// > <???> @ 0x140928af0\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:32:46 +0000\n// \n\n_QWORD *__fastcall MusicDownloadManager::pathForSFXFolder(__int64 a1, _QWORD *a2, int a3)\n{\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // rax\n  __int64 v11[2]; // [rsp+28h] [rbp-40h] BYREF\n  _BYTE v12[32]; // [rsp+38h] [rbp-30h] BYREF\n\n  v11[1] = (__int64)a2;\n  *(_OWORD *)a2 = 0;\n  a2[2] = 0;\n  a2[3] = 15;\n  *(_BYTE *)a2 = 0;\n  LODWORD(v11[0]) = a3;\n  if ( sub_140066B50((_QWORD *)(a1 + 520), (unsigned __int8 *)v11) )\n  {\n    sub_140044D80(a2, \"sfx/\", 4u);\n  }\n  else\n  {\n    v4 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v11[0] = (__int64)operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v11[0]);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v4 = qword_14090BFD0;\n    }\n    if ( GameManager::getGameVariable(v4, \"0033\") )\n    {\n      v6 = cocos2d::CCFileUtils::sharedFileUtils(v5);\n      v7 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v6 + 144LL))(v6, v12);\n      sub_140059C40((__int64)a2, v7);\n      sub_14003D310((__int64)v12);\n      sub_140044D80(a2, \"Resources\\\\\", 0xAu);\n    }\n    else\n    {\n      v8 = cocos2d::CCFileUtils::sharedFileUtils(v5);\n      v9 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 136LL))(v8, v12);\n      sub_140059C40((__int64)a2, v9);\n      sub_14003D310((__int64)v12);\n    }\n  }\n  return a2;\n}", "assembly": "; \n; MusicDownloadManager::pathForSFXFolder from 0x140484a20 to 0x140484b70 (336 bytes)\n; \n; 6 xrefs:\n; > EditorSFXManager::downloadAllMissing @ 0x14018c1c8\n; > MusicDownloadManager::pathForSFX @ 0x140484b9c\n; > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x14048fb65\n; > MusicDownloadManager::parseSFXLibrary @ 0x14048fc7d\n; > SetupSFXPopup::onClose @ 0x1405ddb62\n; > <???> @ 0x140928af0\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:32:46 +0000\n; \npush    rbx                                                            ; +0x0, 0x140484a20\nsub     rsp, 60h                                                       ; +0x2, 0x140484a22\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x140484a26\nxor     rax, rsp                                                       ; +0xd, 0x140484a2d\nmov     [rsp+68h+var_10], rax                                          ; +0x10, 0x140484a30\nmov     rbx, rdx                                                       ; +0x15, 0x140484a35\nmov     [rsp+68h+var_38], rdx                                          ; +0x18, 0x140484a38\nxor     eax, eax                                                       ; +0x1d, 0x140484a3d\nmov     [rsp+68h+var_48], eax                                          ; +0x1f, 0x140484a3f\nxorps   xmm0, xmm0                                                     ; +0x23, 0x140484a43\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x26, 0x140484a46\nmov     [rdx+10h], rax                                                 ; +0x29, 0x140484a49\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x2d, 0x140484a4d\nmov     [rdx], al                                                      ; +0x35, 0x140484a55\nmov     [rsp+68h+var_48], 1                                            ; +0x37, 0x140484a57\nmov     dword ptr [rsp+68h+var_40], r8d                                ; +0x3f, 0x140484a5f\nadd     rcx, 208h                                                      ; +0x44, 0x140484a64\nlea     rdx, [rsp+68h+var_40]                                          ; +0x4b, 0x140484a6b\ncall    sub_140066B50                                                  ; +0x50, 0x140484a70\ntest    rax, rax                                                       ; +0x55, 0x140484a75\njz      short loc_140484A94                                            ; +0x58, 0x140484a78\nmov     r8d, 4; Size                                                   ; +0x5a, 0x140484a7a\nlea     rdx, aSfx_0; \"sfx/\"                                            ; +0x60, 0x140484a80\nmov     rcx, rbx; Src                                                  ; +0x67, 0x140484a87\ncall    sub_140044D80                                                  ; +0x6a, 0x140484a8a\njmp     loc_140484B59                                                  ; +0x6f, 0x140484a8f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x74, 0x140484a94\ntest    rcx, rcx                                                       ; +0x7b, 0x140484a9b\njnz     short loc_140484AD2                                            ; +0x7e, 0x140484a9e\nmov     ecx, 6E8h; Size                                                ; +0x80, 0x140484aa0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x85, 0x140484aa5\nmov     [rsp+68h+var_40], rax                                          ; +0x8a, 0x140484aaa\nmov     rcx, rax                                                       ; +0x8f, 0x140484aaf\ncall    GameManager__GameManager                                       ; +0x92, 0x140484ab2\nnop                                                                    ; +0x97, 0x140484ab7\nmov     cs:qword_14090BFD0, rax                                        ; +0x98, 0x140484ab8\nmov     rcx, [rax]                                                     ; +0x9f, 0x140484abf\nmov     rdx, [rcx+48h]                                                 ; +0xa2, 0x140484ac2\nmov     rcx, rax                                                       ; +0xa6, 0x140484ac6\ncall    rdx                                                            ; +0xa9, 0x140484ac9\nmov     rcx, cs:qword_14090BFD0                                        ; +0xab, 0x140484acb\nlea     rdx, a0033; \"0033\"                                             ; +0xb2, 0x140484ad2\ncall    GameManager__getGameVariable                                   ; +0xb9, 0x140484ad9\ntest    al, al                                                         ; +0xbe, 0x140484ade\njz      short loc_140484B29                                            ; +0xc0, 0x140484ae0\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xc2, 0x140484ae2\nmov     rcx, [rax]                                                     ; +0xc8, 0x140484ae8\nmov     r8, [rcx+90h]                                                  ; +0xcb, 0x140484aeb\nlea     rdx, [rsp+68h+var_30]                                          ; +0xd2, 0x140484af2\nmov     rcx, rax                                                       ; +0xd7, 0x140484af7\ncall    r8                                                             ; +0xda, 0x140484afa\nmov     rdx, rax                                                       ; +0xdd, 0x140484afd\nmov     rcx, rbx                                                       ; +0xe0, 0x140484b00\ncall    sub_140059C40                                                  ; +0xe3, 0x140484b03\nlea     rcx, [rsp+68h+var_30]                                          ; +0xe8, 0x140484b08\ncall    sub_14003D310                                                  ; +0xed, 0x140484b0d\nmov     r8d, 0Ah; Size                                                 ; +0xf2, 0x140484b12\nlea     rdx, aResources_0; \"Resources\\\\\"                               ; +0xf8, 0x140484b18\nmov     rcx, rbx; Src                                                  ; +0xff, 0x140484b1f\ncall    sub_140044D80                                                  ; +0x102, 0x140484b22\njmp     short loc_140484B59                                            ; +0x107, 0x140484b27\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x109, 0x140484b29\nmov     rcx, [rax]                                                     ; +0x10f, 0x140484b2f\nmov     r8, [rcx+88h]                                                  ; +0x112, 0x140484b32\nlea     rdx, [rsp+68h+var_30]                                          ; +0x119, 0x140484b39\nmov     rcx, rax                                                       ; +0x11e, 0x140484b3e\ncall    r8                                                             ; +0x121, 0x140484b41\nmov     rdx, rax                                                       ; +0x124, 0x140484b44\nmov     rcx, rbx                                                       ; +0x127, 0x140484b47\ncall    sub_140059C40                                                  ; +0x12a, 0x140484b4a\nlea     rcx, [rsp+68h+var_30]                                          ; +0x12f, 0x140484b4f\ncall    sub_14003D310                                                  ; +0x134, 0x140484b54\nmov     rax, rbx                                                       ; +0x139, 0x140484b59\nmov     rcx, [rsp+68h+var_10]                                          ; +0x13c, 0x140484b5c\nxor     rcx, rsp; StackCookie                                          ; +0x141, 0x140484b61\ncall    __security_check_cookie                                        ; +0x144, 0x140484b64\nadd     rsp, 60h                                                       ; +0x149, 0x140484b69\npop     rbx                                                            ; +0x14d, 0x140484b6d\nretn                                                                   ; +0x14e, 0x140484b6e\nalign 10h                                                              ; +0x14f, 0x140484b6f", "xrefs": ["EditorSFXManager::downloadAllMissing @ 0x14018c1c8", "MusicDownloadManager::pathForSFX @ 0x140484b9c", "MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x14048fb65", "MusicDownloadManager::parseSFXLibrary @ 0x14048fc7d", "SetupSFXPopup::onClose @ 0x1405ddb62", "<???> @ 0x140928af0"], "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"}