{"type": "func", "start": 5372113792, "end": 5372114119, "name": "MusicDownloadManager::pathForSongFolder", "pseudocode": "// \n// MusicDownloadManager::pathForSongFolder from 0x14033f380 to 0x14033f4c7 (327 bytes)\n// \n// 4 xrefs:\n// > MusicDownloadManager::pathForSong @ 0x14033f4fc\n// > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x140340c9e\n// > MusicDownloadManager::parseMusicLibrary @ 0x140340dd0\n// > <???> @ 0x1406d56d8\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// Hidden C++ exception states: #wind=2\n_QWORD *__fastcall MusicDownloadManager::pathForSongFolder(__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 + 544), (unsigned __int8 *)v11) )\n  {\n    sub_140041270(a2, \"songs/\", 6u);\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::pathForSongFolder from 0x14033f380 to 0x14033f4c7 (327 bytes)\n; \n; 4 xrefs:\n; > MusicDownloadManager::pathForSong @ 0x14033f4fc\n; > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x140340c9e\n; > MusicDownloadManager::parseMusicLibrary @ 0x140340dd0\n; > <???> @ 0x1406d56d8\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, 0x14033f380\nsub     rsp, 60h                                                       ; +0x2, 0x14033f382\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x14033f386\nxor     rax, rsp                                                       ; +0xd, 0x14033f38d\nmov     [rsp+68h+var_10], rax                                          ; +0x10, 0x14033f390\nmov     rbx, rdx                                                       ; +0x15, 0x14033f395\nmov     [rsp+68h+var_38], rdx                                          ; +0x18, 0x14033f398\nxor     eax, eax                                                       ; +0x1d, 0x14033f39d\nmov     [rsp+68h+var_48], eax                                          ; +0x1f, 0x14033f39f\nxorps   xmm0, xmm0                                                     ; +0x23, 0x14033f3a3\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x26, 0x14033f3a6\nmov     [rdx+10h], rax                                                 ; +0x29, 0x14033f3a9\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x2d, 0x14033f3ad\nmov     [rdx], al                                                      ; +0x35, 0x14033f3b5\nmov     [rsp+68h+var_48], 1                                            ; +0x37, 0x14033f3b7\nmov     dword ptr [rsp+68h+var_40], r8d                                ; +0x3f, 0x14033f3bf\nadd     rcx, 220h                                                      ; +0x44, 0x14033f3c4\nlea     rdx, [rsp+68h+var_40]                                          ; +0x4b, 0x14033f3cb\ncall    sub_14005F8D0                                                  ; +0x50, 0x14033f3d0\ntest    rax, rax                                                       ; +0x55, 0x14033f3d5\njz      short loc_14033F3F4                                            ; +0x58, 0x14033f3d8\nmov     r8d, 6; Size                                                   ; +0x5a, 0x14033f3da\nlea     rdx, aSongs; \"songs/\"                                          ; +0x60, 0x14033f3e0\nmov     rcx, rbx; Src                                                  ; +0x67, 0x14033f3e7\ncall    sub_140041270                                                  ; +0x6a, 0x14033f3ea\njmp     loc_14033F4B0                                                  ; +0x6f, 0x14033f3ef\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x74, 0x14033f3f4\ntest    rcx, rcx                                                       ; +0x7b, 0x14033f3fb\njnz     short loc_14033F42F                                            ; +0x7e, 0x14033f3fe\nmov     ecx, 668h; Size                                                ; +0x80, 0x14033f400\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x85, 0x14033f405\nmov     [rsp+68h+var_40], rax                                          ; +0x8a, 0x14033f40a\nmov     rcx, rax                                                       ; +0x8f, 0x14033f40f\ncall    sub_14017AB00                                                  ; +0x92, 0x14033f412\nnop                                                                    ; +0x97, 0x14033f417\nmov     cs:qword_1406C2ED8, rax                                        ; +0x98, 0x14033f418\nmov     rdx, [rax]                                                     ; +0x9f, 0x14033f41f\nmov     rcx, rax                                                       ; +0xa2, 0x14033f422\ncall    qword ptr [rdx+48h]                                            ; +0xa5, 0x14033f425\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xa8, 0x14033f428\nlea     rdx, a0033; \"0033\"                                             ; +0xaf, 0x14033f42f\ncall    GameManager__getGameVariable                                   ; +0xb6, 0x14033f436\ntest    al, al                                                         ; +0xbb, 0x14033f43b\njz      short loc_14033F483                                            ; +0xbd, 0x14033f43d\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xbf, 0x14033f43f\nmov     r8, [rax]                                                      ; +0xc5, 0x14033f445\nlea     rdx, [rsp+68h+var_30]                                          ; +0xc8, 0x14033f448\nmov     rcx, rax                                                       ; +0xcd, 0x14033f44d\ncall    qword ptr [r8+90h]                                             ; +0xd0, 0x14033f450\nmov     rdx, rax                                                       ; +0xd7, 0x14033f457\nmov     rcx, rbx                                                       ; +0xda, 0x14033f45a\ncall    sub_140051590                                                  ; +0xdd, 0x14033f45d\nlea     rcx, [rsp+68h+var_30]                                          ; +0xe2, 0x14033f462\ncall    sub_14003A830                                                  ; +0xe7, 0x14033f467\nmov     r8d, 0Ah; Size                                                 ; +0xec, 0x14033f46c\nlea     rdx, aResources_0; \"Resources\\\\\"                               ; +0xf2, 0x14033f472\nmov     rcx, rbx; Src                                                  ; +0xf9, 0x14033f479\ncall    sub_140041270                                                  ; +0xfc, 0x14033f47c\njmp     short loc_14033F4B0                                            ; +0x101, 0x14033f481\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x103, 0x14033f483\nmov     r8, [rax]                                                      ; +0x109, 0x14033f489\nlea     rdx, [rsp+68h+var_30]                                          ; +0x10c, 0x14033f48c\nmov     rcx, rax                                                       ; +0x111, 0x14033f491\ncall    qword ptr [r8+88h]                                             ; +0x114, 0x14033f494\nmov     rdx, rax                                                       ; +0x11b, 0x14033f49b\nmov     rcx, rbx                                                       ; +0x11e, 0x14033f49e\ncall    sub_140051590                                                  ; +0x121, 0x14033f4a1\nlea     rcx, [rsp+68h+var_30]                                          ; +0x126, 0x14033f4a6\ncall    sub_14003A830                                                  ; +0x12b, 0x14033f4ab\nmov     rax, rbx                                                       ; +0x130, 0x14033f4b0\nmov     rcx, [rsp+68h+var_10]                                          ; +0x133, 0x14033f4b3\nxor     rcx, rsp; StackCookie                                          ; +0x138, 0x14033f4b8\ncall    __security_check_cookie                                        ; +0x13b, 0x14033f4bb\nadd     rsp, 60h                                                       ; +0x140, 0x14033f4c0\npop     rbx                                                            ; +0x144, 0x14033f4c4\nretn                                                                   ; +0x145, 0x14033f4c5\ndb 0CCh                                                                ; +0x146, 0x14033f4c6", "xrefs": ["MusicDownloadManager::pathForSong @ 0x14033f4fc", "MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x140340c9e", "MusicDownloadManager::parseMusicLibrary @ 0x140340dd0", "<???> @ 0x1406d56d8"], "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"}