{"type": "func", "start": 5372113488, "end": 5372113782, "name": "MusicDownloadManager::isSongDownloaded", "pseudocode": "// \n// MusicDownloadManager::isSongDownloaded from 0x14033f250 to 0x14033f376 (294 bytes)\n// \n// 10 xrefs:\n// > AudioAssetsBrowser::onInfo @ 0x14008407c\n// > CustomSongWidget::updateSongInfo @ 0x1400cbbab\n// > CustomSongWidget::updateWithMultiAssets @ 0x1400cc450\n// > GameManager::getMenuMusicFile @ 0x14017b75c\n// > GJSongBrowser::loadPage @ 0x1402b780c\n// > LevelInfoLayer::onPlay @ 0x1402fc50f\n// > MusicDownloadManager::getDownloadedSongs @ 0x14033e630\n// > MusicDownloadManager::clearUnusedSongs @ 0x14033e88c\n// > PlayLayer::togglePracticeMode @ 0x1403b9f94\n// > <???> @ 0x1406d56cc\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\nbool MusicDownloadManager::isSongDownloaded(MusicDownloadManager *a1, int a2)\n{\n  __int64 v3; // r11\n  _QWORD *v5; // rax\n  size_t v6; // r8\n  __int64 v7; // rcx\n  __int64 v8; // rax\n  char v9; // bl\n  void *v10; // rcx\n  int v11; // [rsp+20h] [rbp-58h] BYREF\n  void *Block[2]; // [rsp+28h] [rbp-50h] BYREF\n  __m128i si128; // [rsp+38h] [rbp-40h]\n  _BYTE v14[32]; // [rsp+48h] [rbp-30h] BYREF\n\n  v11 = a2;\n  if ( sub_14005F8D0(&a1->m_resourceSongUnorderedSet._Traitsobj._Mypair._Myval2._Myval2, (unsigned __int8 *)&v11) )\n    return 1;\n  v5 = (_QWORD *)MusicDownloadManager::pathForSong(v3, v14, (unsigned int)a2);\n  if ( v5[3] > 0xFu )\n    v5 = (_QWORD *)*v5;\n  *(_OWORD *)Block = 0;\n  si128 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( *((_BYTE *)v5 + v6) );\n  sub_14003A930(Block, v5, v6);\n  v8 = cocos2d::CCFileUtils::sharedFileUtils(v7);\n  v9 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v8 + 152LL))(v8, Block);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v10 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v10);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n  LOBYTE(Block[0]) = 0;\n  sub_14003A830((__int64)v14);\n  return v9;\n}", "assembly": "; \n; MusicDownloadManager::isSongDownloaded from 0x14033f250 to 0x14033f376 (294 bytes)\n; \n; 10 xrefs:\n; > AudioAssetsBrowser::onInfo @ 0x14008407c\n; > CustomSongWidget::updateSongInfo @ 0x1400cbbab\n; > CustomSongWidget::updateWithMultiAssets @ 0x1400cc450\n; > GameManager::getMenuMusicFile @ 0x14017b75c\n; > GJSongBrowser::loadPage @ 0x1402b780c\n; > LevelInfoLayer::onPlay @ 0x1402fc50f\n; > MusicDownloadManager::getDownloadedSongs @ 0x14033e630\n; > MusicDownloadManager::clearUnusedSongs @ 0x14033e88c\n; > PlayLayer::togglePracticeMode @ 0x1403b9f94\n; > <???> @ 0x1406d56cc\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, 0x14033f250\nsub     rsp, 70h                                                       ; +0x2, 0x14033f252\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x14033f256\nxor     rax, rsp                                                       ; +0xd, 0x14033f25d\nmov     [rsp+78h+var_10], rax                                          ; +0x10, 0x14033f260\nmov     ebx, edx                                                       ; +0x15, 0x14033f265\nmov     r11, rcx                                                       ; +0x17, 0x14033f267\nmov     [rsp+78h+var_58], edx                                          ; +0x1a, 0x14033f26a\nadd     rcx, 220h                                                      ; +0x1e, 0x14033f26e\nlea     rdx, [rsp+78h+var_58]                                          ; +0x25, 0x14033f275\ncall    sub_14005F8D0                                                  ; +0x2a, 0x14033f27a\ntest    rax, rax                                                       ; +0x2f, 0x14033f27f\njz      short loc_14033F299                                            ; +0x32, 0x14033f282\nmov     al, 1                                                          ; +0x34, 0x14033f284\nmov     rcx, [rsp+78h+var_10]                                          ; +0x36, 0x14033f286\nxor     rcx, rsp; StackCookie                                          ; +0x3b, 0x14033f28b\ncall    __security_check_cookie                                        ; +0x3e, 0x14033f28e\nadd     rsp, 70h                                                       ; +0x43, 0x14033f293\npop     rbx                                                            ; +0x47, 0x14033f297\nretn                                                                   ; +0x48, 0x14033f298\nmov     r8d, ebx                                                       ; +0x49, 0x14033f299\nlea     rdx, [rsp+78h+var_30]                                          ; +0x4c, 0x14033f29c\nmov     rcx, r11                                                       ; +0x51, 0x14033f2a1\ncall    MusicDownloadManager__pathForSong                              ; +0x54, 0x14033f2a4\nnop                                                                    ; +0x59, 0x14033f2a9\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x5a, 0x14033f2aa\njbe     short loc_14033F2B4                                            ; +0x5f, 0x14033f2af\nmov     rax, [rax]                                                     ; +0x61, 0x14033f2b1\nxorps   xmm0, xmm0                                                     ; +0x64, 0x14033f2b4\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x67, 0x14033f2b7\nxorps   xmm1, xmm1                                                     ; +0x6c, 0x14033f2bc\nmovdqu  [rsp+78h+var_40], xmm1                                         ; +0x6f, 0x14033f2bf\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x75, 0x14033f2c5\nnop     dword ptr [rax+00h]                                            ; +0x7c, 0x14033f2cc\ninc     r8                                                             ; +0x80, 0x14033f2d0\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x14033f2d3\njnz     short loc_14033F2D0                                            ; +0x88, 0x14033f2d8\nmov     rdx, rax                                                       ; +0x8a, 0x14033f2da\nlea     rcx, [rsp+78h+Block]                                           ; +0x8d, 0x14033f2dd\ncall    sub_14003A930                                                  ; +0x92, 0x14033f2e2\nnop                                                                    ; +0x97, 0x14033f2e7\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x98, 0x14033f2e8\nmov     r8, [rax]                                                      ; +0x9e, 0x14033f2ee\nlea     rdx, [rsp+78h+Block]                                           ; +0xa1, 0x14033f2f1\nmov     rcx, rax                                                       ; +0xa6, 0x14033f2f6\ncall    qword ptr [r8+98h]                                             ; +0xa9, 0x14033f2f9\nmovzx   ebx, al                                                        ; +0xb0, 0x14033f300\nmov     rdx, qword ptr [rsp+78h+var_40+8]                              ; +0xb3, 0x14033f303\ncmp     rdx, 0Fh                                                       ; +0xb8, 0x14033f308\njbe     short loc_14033F343                                            ; +0xbc, 0x14033f30c\ninc     rdx                                                            ; +0xbe, 0x14033f30e\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0xc1, 0x14033f311\nmov     rax, rcx                                                       ; +0xc6, 0x14033f316\ncmp     rdx, 1000h                                                     ; +0xc9, 0x14033f319\njb      short loc_14033F33E                                            ; +0xd0, 0x14033f320\nadd     rdx, 27h ; '''                                                 ; +0xd2, 0x14033f322\nmov     rcx, [rcx-8]                                                   ; +0xd6, 0x14033f326\nsub     rax, rcx                                                       ; +0xda, 0x14033f32a\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xdd, 0x14033f32d\ncmp     rax, 1Fh                                                       ; +0xe1, 0x14033f331\njbe     short loc_14033F33E                                            ; +0xe5, 0x14033f335\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe7, 0x14033f337\nalign 2                                                                ; +0xed, 0x14033f33d\ncall    j_j_free                                                       ; +0xee, 0x14033f33e\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0xf3, 0x14033f343\nmovdqu  [rsp+78h+var_40], xmm0                                         ; +0xfb, 0x14033f34b\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0x101, 0x14033f351\nlea     rcx, [rsp+78h+var_30]                                          ; +0x106, 0x14033f356\ncall    sub_14003A830                                                  ; +0x10b, 0x14033f35b\nmovzx   eax, bl                                                        ; +0x110, 0x14033f360\nmov     rcx, [rsp+78h+var_10]                                          ; +0x113, 0x14033f363\nxor     rcx, rsp; StackCookie                                          ; +0x118, 0x14033f368\ncall    __security_check_cookie                                        ; +0x11b, 0x14033f36b\nadd     rsp, 70h                                                       ; +0x120, 0x14033f370\npop     rbx                                                            ; +0x124, 0x14033f374\nretn                                                                   ; +0x125, 0x14033f375", "xrefs": ["AudioAssetsBrowser::onInfo @ 0x14008407c", "CustomSongWidget::updateSongInfo @ 0x1400cbbab", "CustomSongWidget::updateWithMultiAssets @ 0x1400cc450", "GameManager::getMenuMusicFile @ 0x14017b75c", "GJSongBrowser::loadPage @ 0x1402b780c", "LevelInfoLayer::onPlay @ 0x1402fc50f", "MusicDownloadManager::getDownloadedSongs @ 0x14033e630", "MusicDownloadManager::clearUnusedSongs @ 0x14033e88c", "PlayLayer::togglePracticeMode @ 0x1403b9f94", "<???> @ 0x1406d56cc"], "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"}