{"type": "func", "start": 5373445856, "end": 5373446192, "name": "MusicDownloadManager::pathForSongFolder", "pseudocode": "// \n// MusicDownloadManager::pathForSongFolder from 0x1404846e0 to 0x140484830 (336 bytes)\n// \n// 4 xrefs:\n// > MusicDownloadManager::pathForSong @ 0x14048485c\n// > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x14048ce20\n// > MusicDownloadManager::parseMusicLibrary @ 0x14048cf52\n// > <???> @ 0x140928acc\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// Hidden C++ exception states: #wind=2\n_QWORD *__fastcall MusicDownloadManager::pathForSongFolder(__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 + 584), (unsigned __int8 *)v11) )\n  {\n    sub_140044D80(a2, \"songs/\", 6u);\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::pathForSongFolder from 0x1404846e0 to 0x140484830 (336 bytes)\n; \n; 4 xrefs:\n; > MusicDownloadManager::pathForSong @ 0x14048485c\n; > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x14048ce20\n; > MusicDownloadManager::parseMusicLibrary @ 0x14048cf52\n; > <???> @ 0x140928acc\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, 0x1404846e0\nsub     rsp, 60h                                                       ; +0x2, 0x1404846e2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x1404846e6\nxor     rax, rsp                                                       ; +0xd, 0x1404846ed\nmov     [rsp+68h+var_10], rax                                          ; +0x10, 0x1404846f0\nmov     rbx, rdx                                                       ; +0x15, 0x1404846f5\nmov     [rsp+68h+var_38], rdx                                          ; +0x18, 0x1404846f8\nxor     eax, eax                                                       ; +0x1d, 0x1404846fd\nmov     [rsp+68h+var_48], eax                                          ; +0x1f, 0x1404846ff\nxorps   xmm0, xmm0                                                     ; +0x23, 0x140484703\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x26, 0x140484706\nmov     [rdx+10h], rax                                                 ; +0x29, 0x140484709\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x2d, 0x14048470d\nmov     [rdx], al                                                      ; +0x35, 0x140484715\nmov     [rsp+68h+var_48], 1                                            ; +0x37, 0x140484717\nmov     dword ptr [rsp+68h+var_40], r8d                                ; +0x3f, 0x14048471f\nadd     rcx, 248h                                                      ; +0x44, 0x140484724\nlea     rdx, [rsp+68h+var_40]                                          ; +0x4b, 0x14048472b\ncall    sub_140066B50                                                  ; +0x50, 0x140484730\ntest    rax, rax                                                       ; +0x55, 0x140484735\njz      short loc_140484754                                            ; +0x58, 0x140484738\nmov     r8d, 6; Size                                                   ; +0x5a, 0x14048473a\nlea     rdx, aSongs; \"songs/\"                                          ; +0x60, 0x140484740\nmov     rcx, rbx; Src                                                  ; +0x67, 0x140484747\ncall    sub_140044D80                                                  ; +0x6a, 0x14048474a\njmp     loc_140484819                                                  ; +0x6f, 0x14048474f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x74, 0x140484754\ntest    rcx, rcx                                                       ; +0x7b, 0x14048475b\njnz     short loc_140484792                                            ; +0x7e, 0x14048475e\nmov     ecx, 6E8h; Size                                                ; +0x80, 0x140484760\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x85, 0x140484765\nmov     [rsp+68h+var_40], rax                                          ; +0x8a, 0x14048476a\nmov     rcx, rax                                                       ; +0x8f, 0x14048476f\ncall    GameManager__GameManager                                       ; +0x92, 0x140484772\nnop                                                                    ; +0x97, 0x140484777\nmov     cs:qword_14090BFD0, rax                                        ; +0x98, 0x140484778\nmov     rcx, [rax]                                                     ; +0x9f, 0x14048477f\nmov     rdx, [rcx+48h]                                                 ; +0xa2, 0x140484782\nmov     rcx, rax                                                       ; +0xa6, 0x140484786\ncall    rdx                                                            ; +0xa9, 0x140484789\nmov     rcx, cs:qword_14090BFD0                                        ; +0xab, 0x14048478b\nlea     rdx, a0033; \"0033\"                                             ; +0xb2, 0x140484792\ncall    GameManager__getGameVariable                                   ; +0xb9, 0x140484799\ntest    al, al                                                         ; +0xbe, 0x14048479e\njz      short loc_1404847E9                                            ; +0xc0, 0x1404847a0\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xc2, 0x1404847a2\nmov     rcx, [rax]                                                     ; +0xc8, 0x1404847a8\nmov     r8, [rcx+90h]                                                  ; +0xcb, 0x1404847ab\nlea     rdx, [rsp+68h+var_30]                                          ; +0xd2, 0x1404847b2\nmov     rcx, rax                                                       ; +0xd7, 0x1404847b7\ncall    r8                                                             ; +0xda, 0x1404847ba\nmov     rdx, rax                                                       ; +0xdd, 0x1404847bd\nmov     rcx, rbx                                                       ; +0xe0, 0x1404847c0\ncall    sub_140059C40                                                  ; +0xe3, 0x1404847c3\nlea     rcx, [rsp+68h+var_30]                                          ; +0xe8, 0x1404847c8\ncall    sub_14003D310                                                  ; +0xed, 0x1404847cd\nmov     r8d, 0Ah; Size                                                 ; +0xf2, 0x1404847d2\nlea     rdx, aResources_0; \"Resources\\\\\"                               ; +0xf8, 0x1404847d8\nmov     rcx, rbx; Src                                                  ; +0xff, 0x1404847df\ncall    sub_140044D80                                                  ; +0x102, 0x1404847e2\njmp     short loc_140484819                                            ; +0x107, 0x1404847e7\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x109, 0x1404847e9\nmov     rcx, [rax]                                                     ; +0x10f, 0x1404847ef\nmov     r8, [rcx+88h]                                                  ; +0x112, 0x1404847f2\nlea     rdx, [rsp+68h+var_30]                                          ; +0x119, 0x1404847f9\nmov     rcx, rax                                                       ; +0x11e, 0x1404847fe\ncall    r8                                                             ; +0x121, 0x140484801\nmov     rdx, rax                                                       ; +0x124, 0x140484804\nmov     rcx, rbx                                                       ; +0x127, 0x140484807\ncall    sub_140059C40                                                  ; +0x12a, 0x14048480a\nlea     rcx, [rsp+68h+var_30]                                          ; +0x12f, 0x14048480f\ncall    sub_14003D310                                                  ; +0x134, 0x140484814\nmov     rax, rbx                                                       ; +0x139, 0x140484819\nmov     rcx, [rsp+68h+var_10]                                          ; +0x13c, 0x14048481c\nxor     rcx, rsp; StackCookie                                          ; +0x141, 0x140484821\ncall    __security_check_cookie                                        ; +0x144, 0x140484824\nadd     rsp, 60h                                                       ; +0x149, 0x140484829\npop     rbx                                                            ; +0x14d, 0x14048482d\nretn                                                                   ; +0x14e, 0x14048482e\nalign 10h                                                              ; +0x14f, 0x14048482f", "xrefs": ["MusicDownloadManager::pathForSong @ 0x14048485c", "MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x14048ce20", "MusicDownloadManager::parseMusicLibrary @ 0x14048cf52", "<???> @ 0x140928acc"], "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"}