{"type": "func", "start": 5372091456, "end": 5372091761, "name": "MusicBrowser::trySetupMusicBrowser", "pseudocode": "// \n// MusicBrowser::trySetupMusicBrowser from 0x140339c40 to 0x140339d71 (305 bytes)\n// \n// 3 xrefs:\n// > MusicBrowser::init @ 0x140339431\n// > MusicBrowser::musicActionFinished @ 0x140339deb\n// > <???> @ 0x1406d5354\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=1\nvoid MusicBrowser::trySetupMusicBrowser(MusicBrowser *a1)\n{\n  MusicDownloadManager *v2; // rax\n  GJSongType m_songType; // esi\n  cocos2d::CCObject *v4; // rax\n  MusicSearchResult *v5; // rdi\n  __int64 v6; // rdx\n  MusicDownloadManager *v7; // rax\n  MusicDownloadManager *v8; // rax\n  MusicDownloadManager *v9; // rax\n  MusicSearchResult *v10; // [rsp+38h] [rbp+10h]\n\n  if ( MusicDownloadManager::sharedState()->m_musicObjects )\n  {\n    if ( !MusicDownloadManager::sharedState()->m_customContentURL.m_data.m_size )\n    {\n      v2 = MusicDownloadManager::sharedState();\n      MusicDownloadManager::getCustomContentURL(v2);\n    }\n    m_songType = a1->m_songType;\n    v10 = (MusicSearchResult *)operator new(0x90u);\n    v4 = MusicSearchResult::MusicSearchResult(v10);\n    v5 = (MusicSearchResult *)v4;\n    if ( v4 )\n    {\n      v4[2].m_uAutoReleaseCount = m_songType;\n      cocos2d::CCObject::autorelease(v4);\n    }\n    v6 = 0;\n    if ( a1->m_songType == 1 )\n      v6 = 6;\n    v5->updateObjects(v5, (AudioSortType)v6);\n    MusicBrowser::setupList(a1, v5);\n    if ( !MusicDownloadManager::sharedState()->m_downloadingMusicLibrary )\n    {\n      a1->m_autoUpdating = 1;\n      if ( !MusicDownloadManager::sharedState()->m_customContentURL.m_data.m_size )\n      {\n        a1->m_gettingURL = 1;\nLABEL_11:\n        v7 = MusicDownloadManager::sharedState();\n        MusicDownloadManager::getCustomContentURL(v7);\n        return;\n      }\n      a1->m_gettingURL = 0;\n      v8 = MusicDownloadManager::sharedState();\n      MusicDownloadManager::tryUpdateMusicLibrary(v8);\n    }\n  }\n  else\n  {\n    if ( !MusicDownloadManager::sharedState()->m_customContentURL.m_data.m_size )\n      goto LABEL_11;\n    v9 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::downloadMusicLibrary(v9);\n  }\n}", "assembly": "; \n; MusicBrowser::trySetupMusicBrowser from 0x140339c40 to 0x140339d71 (305 bytes)\n; \n; 3 xrefs:\n; > MusicBrowser::init @ 0x140339431\n; > MusicBrowser::musicActionFinished @ 0x140339deb\n; > <???> @ 0x1406d5354\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140339c40\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140339c45\npush    rdi                                                            ; +0xa, 0x140339c4a\nsub     rsp, 20h                                                       ; +0xb, 0x140339c4b\nmov     rbx, rcx                                                       ; +0xf, 0x140339c4f\ncall    MusicDownloadManager__sharedState                              ; +0x12, 0x140339c52\ncmp     qword ptr [rax+1B0h], 0                                        ; +0x17, 0x140339c57\njz      loc_140339D45                                                  ; +0x1f, 0x140339c5f\ncall    MusicDownloadManager__sharedState                              ; +0x25, 0x140339c65\ncmp     qword ptr [rax+180h], 0                                        ; +0x2a, 0x140339c6a\njnz     short loc_140339C81                                            ; +0x32, 0x140339c72\ncall    MusicDownloadManager__sharedState                              ; +0x34, 0x140339c74\nmov     rcx, rax                                                       ; +0x39, 0x140339c79\ncall    MusicDownloadManager__getCustomContentURL                      ; +0x3c, 0x140339c7c\nmov     esi, [rbx+2A0h]                                                ; +0x41, 0x140339c81\nmov     ecx, 90h; Size                                                 ; +0x47, 0x140339c87\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x4c, 0x140339c8c\nmov     [rsp+28h+arg_8], rax                                           ; +0x51, 0x140339c91\nmov     rcx, rax                                                       ; +0x56, 0x140339c96\ncall    MusicSearchResult__MusicSearchResult                           ; +0x59, 0x140339c99\nmov     rdi, rax                                                       ; +0x5e, 0x140339c9e\ntest    rax, rax                                                       ; +0x61, 0x140339ca1\njz      short loc_140339CB5                                            ; +0x64, 0x140339ca4\nmov     [rax+88h], esi                                                 ; +0x66, 0x140339ca6\nmov     rcx, rax                                                       ; +0x6c, 0x140339cac\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x6f, 0x140339caf\nmov     r8, [rdi]                                                      ; +0x75, 0x140339cb5\nxor     edx, edx                                                       ; +0x78, 0x140339cb8\nmov     eax, 6                                                         ; +0x7a, 0x140339cba\ncmp     dword ptr [rbx+2A0h], 1                                        ; +0x7f, 0x140339cbf\ncmovz   edx, eax                                                       ; +0x86, 0x140339cc6\nmov     rcx, rdi                                                       ; +0x89, 0x140339cc9\ncall    qword ptr [r8+48h]                                             ; +0x8c, 0x140339ccc\nmov     rdx, rdi                                                       ; +0x90, 0x140339cd0\nmov     rcx, rbx                                                       ; +0x93, 0x140339cd3\ncall    MusicBrowser__setupList                                        ; +0x96, 0x140339cd6\ncall    MusicDownloadManager__sharedState                              ; +0x9b, 0x140339cdb\ncmp     byte ptr [rax+1DCh], 0                                         ; +0xa0, 0x140339ce0\njnz     short loc_140339D61                                            ; +0xa7, 0x140339ce7\nmov     byte ptr [rbx+330h], 1                                         ; +0xa9, 0x140339ce9\ncall    MusicDownloadManager__sharedState                              ; +0xb0, 0x140339cf0\ncmp     qword ptr [rax+180h], 0                                        ; +0xb5, 0x140339cf5\njnz     short loc_140339D22                                            ; +0xbd, 0x140339cfd\nmov     byte ptr [rbx+308h], 1                                         ; +0xbf, 0x140339cff\ncall    MusicDownloadManager__sharedState                              ; +0xc6, 0x140339d06\nmov     rcx, rax                                                       ; +0xcb, 0x140339d0b\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xce, 0x140339d0e\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xd3, 0x140339d13\nadd     rsp, 20h                                                       ; +0xd8, 0x140339d18\npop     rdi                                                            ; +0xdc, 0x140339d1c\njmp     MusicDownloadManager__getCustomContentURL                      ; +0xdd, 0x140339d1d\nmov     byte ptr [rbx+308h], 0                                         ; +0xe2, 0x140339d22\ncall    MusicDownloadManager__sharedState                              ; +0xe9, 0x140339d29\nmov     rcx, rax                                                       ; +0xee, 0x140339d2e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xf1, 0x140339d31\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xf6, 0x140339d36\nadd     rsp, 20h                                                       ; +0xfb, 0x140339d3b\npop     rdi                                                            ; +0xff, 0x140339d3f\njmp     MusicDownloadManager__tryUpdateMusicLibrary                    ; +0x100, 0x140339d40\ncall    MusicDownloadManager__sharedState                              ; +0x105, 0x140339d45\ncmp     qword ptr [rax+180h], 0                                        ; +0x10a, 0x140339d4a\njz      short loc_140339D06                                            ; +0x112, 0x140339d52\ncall    MusicDownloadManager__sharedState                              ; +0x114, 0x140339d54\nmov     rcx, rax                                                       ; +0x119, 0x140339d59\ncall    MusicDownloadManager__downloadMusicLibrary                     ; +0x11c, 0x140339d5c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x121, 0x140339d61\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x126, 0x140339d66\nadd     rsp, 20h                                                       ; +0x12b, 0x140339d6b\npop     rdi                                                            ; +0x12f, 0x140339d6f\nretn                                                                   ; +0x130, 0x140339d70", "xrefs": ["MusicBrowser::init @ 0x140339431", "MusicBrowser::musicActionFinished @ 0x140339deb", "<???> @ 0x1406d5354"], "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"}