{"type": "func", "start": 5372114608, "end": 5372114935, "name": "MusicDownloadManager::pathForSFXFolder", "pseudocode": "// \n// MusicDownloadManager::pathForSFXFolder from 0x14033f6b0 to 0x14033f7f7 (327 bytes)\n// \n// 5 xrefs:\n// > MusicDownloadManager::pathForSFX @ 0x14033f82c\n// > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x140342d03\n// > MusicDownloadManager::parseSFXLibrary @ 0x140342e1a\n// > SetupSFXPopup::onClose @ 0x140448657\n// > <???> @ 0x1406d56fc\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n_QWORD *__fastcall MusicDownloadManager::pathForSFXFolder(__int64 a1, _QWORD *a2, int a3)\n{\n  GameManager *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_14005F8D0((_QWORD *)(a1 + 480), (unsigned __int8 *)v11) )\n  {\n    sub_140041270(a2, \"sfx/\", 4u);\n  }\n  else\n  {\n    v4 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v11[0] = (__int64)operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v11[0]);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = (GameManager *)qword_1406C2ED8;\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_140051590((__int64)a2, v7);\n      sub_14003A830((__int64)v12);\n      sub_140041270(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_140051590((__int64)a2, v9);\n      sub_14003A830((__int64)v12);\n    }\n  }\n  return a2;\n}", "assembly": "; \n; MusicDownloadManager::pathForSFXFolder from 0x14033f6b0 to 0x14033f7f7 (327 bytes)\n; \n; 5 xrefs:\n; > MusicDownloadManager::pathForSFX @ 0x14033f82c\n; > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x140342d03\n; > MusicDownloadManager::parseSFXLibrary @ 0x140342e1a\n; > SetupSFXPopup::onClose @ 0x140448657\n; > <???> @ 0x1406d56fc\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x14033f6b0\nsub     rsp, 60h                                                       ; +0x2, 0x14033f6b2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x14033f6b6\nxor     rax, rsp                                                       ; +0xd, 0x14033f6bd\nmov     [rsp+68h+var_10], rax                                          ; +0x10, 0x14033f6c0\nmov     rbx, rdx                                                       ; +0x15, 0x14033f6c5\nmov     [rsp+68h+var_38], rdx                                          ; +0x18, 0x14033f6c8\nxor     eax, eax                                                       ; +0x1d, 0x14033f6cd\nmov     [rsp+68h+var_48], eax                                          ; +0x1f, 0x14033f6cf\nxorps   xmm0, xmm0                                                     ; +0x23, 0x14033f6d3\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x26, 0x14033f6d6\nmov     [rdx+10h], rax                                                 ; +0x29, 0x14033f6d9\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x2d, 0x14033f6dd\nmov     [rdx], al                                                      ; +0x35, 0x14033f6e5\nmov     [rsp+68h+var_48], 1                                            ; +0x37, 0x14033f6e7\nmov     dword ptr [rsp+68h+var_40], r8d                                ; +0x3f, 0x14033f6ef\nadd     rcx, 1E0h                                                      ; +0x44, 0x14033f6f4\nlea     rdx, [rsp+68h+var_40]                                          ; +0x4b, 0x14033f6fb\ncall    sub_14005F8D0                                                  ; +0x50, 0x14033f700\ntest    rax, rax                                                       ; +0x55, 0x14033f705\njz      short loc_14033F724                                            ; +0x58, 0x14033f708\nmov     r8d, 4; Size                                                   ; +0x5a, 0x14033f70a\nlea     rdx, aSfx; \"sfx/\"                                              ; +0x60, 0x14033f710\nmov     rcx, rbx; Src                                                  ; +0x67, 0x14033f717\ncall    sub_140041270                                                  ; +0x6a, 0x14033f71a\njmp     loc_14033F7E0                                                  ; +0x6f, 0x14033f71f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x74, 0x14033f724\ntest    rcx, rcx                                                       ; +0x7b, 0x14033f72b\njnz     short loc_14033F75F                                            ; +0x7e, 0x14033f72e\nmov     ecx, 668h; Size                                                ; +0x80, 0x14033f730\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x85, 0x14033f735\nmov     [rsp+68h+var_40], rax                                          ; +0x8a, 0x14033f73a\nmov     rcx, rax                                                       ; +0x8f, 0x14033f73f\ncall    sub_14017AB00                                                  ; +0x92, 0x14033f742\nnop                                                                    ; +0x97, 0x14033f747\nmov     cs:qword_1406C2ED8, rax                                        ; +0x98, 0x14033f748\nmov     rdx, [rax]                                                     ; +0x9f, 0x14033f74f\nmov     rcx, rax                                                       ; +0xa2, 0x14033f752\ncall    qword ptr [rdx+48h]                                            ; +0xa5, 0x14033f755\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xa8, 0x14033f758\nlea     rdx, a0033; \"0033\"                                             ; +0xaf, 0x14033f75f\ncall    GameManager__getGameVariable                                   ; +0xb6, 0x14033f766\ntest    al, al                                                         ; +0xbb, 0x14033f76b\njz      short loc_14033F7B3                                            ; +0xbd, 0x14033f76d\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xbf, 0x14033f76f\nmov     r8, [rax]                                                      ; +0xc5, 0x14033f775\nlea     rdx, [rsp+68h+var_30]                                          ; +0xc8, 0x14033f778\nmov     rcx, rax                                                       ; +0xcd, 0x14033f77d\ncall    qword ptr [r8+90h]                                             ; +0xd0, 0x14033f780\nmov     rdx, rax                                                       ; +0xd7, 0x14033f787\nmov     rcx, rbx                                                       ; +0xda, 0x14033f78a\ncall    sub_140051590                                                  ; +0xdd, 0x14033f78d\nlea     rcx, [rsp+68h+var_30]                                          ; +0xe2, 0x14033f792\ncall    sub_14003A830                                                  ; +0xe7, 0x14033f797\nmov     r8d, 0Ah; Size                                                 ; +0xec, 0x14033f79c\nlea     rdx, aResources_0; \"Resources\\\\\"                               ; +0xf2, 0x14033f7a2\nmov     rcx, rbx; Src                                                  ; +0xf9, 0x14033f7a9\ncall    sub_140041270                                                  ; +0xfc, 0x14033f7ac\njmp     short loc_14033F7E0                                            ; +0x101, 0x14033f7b1\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x103, 0x14033f7b3\nmov     r8, [rax]                                                      ; +0x109, 0x14033f7b9\nlea     rdx, [rsp+68h+var_30]                                          ; +0x10c, 0x14033f7bc\nmov     rcx, rax                                                       ; +0x111, 0x14033f7c1\ncall    qword ptr [r8+88h]                                             ; +0x114, 0x14033f7c4\nmov     rdx, rax                                                       ; +0x11b, 0x14033f7cb\nmov     rcx, rbx                                                       ; +0x11e, 0x14033f7ce\ncall    sub_140051590                                                  ; +0x121, 0x14033f7d1\nlea     rcx, [rsp+68h+var_30]                                          ; +0x126, 0x14033f7d6\ncall    sub_14003A830                                                  ; +0x12b, 0x14033f7db\nmov     rax, rbx                                                       ; +0x130, 0x14033f7e0\nmov     rcx, [rsp+68h+var_10]                                          ; +0x133, 0x14033f7e3\nxor     rcx, rsp; StackCookie                                          ; +0x138, 0x14033f7e8\ncall    __security_check_cookie                                        ; +0x13b, 0x14033f7eb\nadd     rsp, 60h                                                       ; +0x140, 0x14033f7f0\npop     rbx                                                            ; +0x144, 0x14033f7f4\nretn                                                                   ; +0x145, 0x14033f7f5\ndb 0CCh                                                                ; +0x146, 0x14033f7f6", "xrefs": ["MusicDownloadManager::pathForSFX @ 0x14033f82c", "MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x140342d03", "MusicDownloadManager::parseSFXLibrary @ 0x140342e1a", "SetupSFXPopup::onClose @ 0x140448657", "<???> @ 0x1406d56fc"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}