{"type": "func", "start": 5373442192, "end": 5373442377, "name": "MusicDownloadManager::getDownloadedSongs", "pseudocode": "// \n// MusicDownloadManager::getDownloadedSongs from 0x140483890 to 0x140483949 (185 bytes)\n// \n// 6 xrefs:\n// > GJSongBrowser::customSetup @ 0x1403bdcd6\n// > GJSongBrowser::FLAlert_Clicked @ 0x1403be11a\n// > MusicDownloadManager::onDownloadSongCompleted @ 0x1404841e3\n// > <???> @ 0x1408cff04\n// > <???> @ 0x1408cff3c\n// > <???> @ 0x140928a30\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:45 +0000\n// \n\ncocos2d::CCArray *__fastcall MusicDownloadManager::getDownloadedSongs(__int64 a1)\n{\n  __int64 v2; // rax\n  __int64 v3; // rdx\n  cocos2d::CCArray *v4; // rdi\n  __int64 v5; // rdx\n  __int64 i; // rbx\n  unsigned int *v7; // rsi\n\n  v2 = cocos2d::CCArray::create(a1);\n  v3 = *(_QWORD *)(a1 + 344);\n  v4 = (cocos2d::CCArray *)v2;\n  if ( v3 )\n  {\n    v5 = *(_QWORD *)(v3 + 56);\n    if ( v5 )\n    {\n      for ( i = *(_QWORD *)(v5 + 288); ; i = *(_QWORD *)(i + 288) )\n      {\n        v7 = *(unsigned int **)(v5 + 264);\n        if ( (unsigned __int8)MusicDownloadManager::isSongDownloaded(a1, v7[80]) )\n          cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v7);\n        v5 = i;\n        if ( !i )\n          break;\n      }\n    }\n  }\n  if ( cocos2d::CCArray::count(v4) > 1 )\n    qsort(\n      *(void **)(*((_QWORD *)v4 + 7) + 16LL),\n      **((unsigned int **)v4 + 7),\n      8u,\n      (_CoreCrtNonSecureSearchSortCompareFunction)sub_140481A40);\n  return v4;\n}", "assembly": "; \n; MusicDownloadManager::getDownloadedSongs from 0x140483890 to 0x140483949 (185 bytes)\n; \n; 6 xrefs:\n; > GJSongBrowser::customSetup @ 0x1403bdcd6\n; > GJSongBrowser::FLAlert_Clicked @ 0x1403be11a\n; > MusicDownloadManager::onDownloadSongCompleted @ 0x1404841e3\n; > <???> @ 0x1408cff04\n; > <???> @ 0x1408cff3c\n; > <???> @ 0x140928a30\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:45 +0000\n; \npush    rdi                                                            ; +0x0, 0x140483890\nsub     rsp, 20h                                                       ; +0x2, 0x140483892\nmov     [rsp+28h+arg_8], rbp                                           ; +0x6, 0x140483896\nmov     rbp, rcx                                                       ; +0xb, 0x14048389b\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0xe, 0x14048389e\nmov     rdx, [rbp+158h]                                                ; +0x14, 0x1404838a4\nmov     rdi, rax                                                       ; +0x1b, 0x1404838ab\ntest    rdx, rdx                                                       ; +0x1e, 0x1404838ae\njz      short loc_140483910                                            ; +0x21, 0x1404838b1\nmov     rdx, [rdx+38h]                                                 ; +0x23, 0x1404838b3\ntest    rdx, rdx                                                       ; +0x27, 0x1404838b7\njz      short loc_140483910                                            ; +0x2a, 0x1404838ba\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2c, 0x1404838bc\nmov     rbx, [rdx+120h]                                                ; +0x31, 0x1404838c1\nmov     [rsp+28h+arg_10], rsi                                          ; +0x38, 0x1404838c8\nnop     dword ptr [rax]                                                ; +0x3d, 0x1404838cd\nmov     rsi, [rdx+108h]                                                ; +0x40, 0x1404838d0\nmov     rcx, rbp                                                       ; +0x47, 0x1404838d7\nmov     edx, [rsi+140h]                                                ; +0x4a, 0x1404838da\ncall    MusicDownloadManager__isSongDownloaded                         ; +0x50, 0x1404838e0\ntest    al, al                                                         ; +0x55, 0x1404838e5\njz      short loc_1404838F5                                            ; +0x57, 0x1404838e7\nmov     rdx, rsi                                                       ; +0x59, 0x1404838e9\nmov     rcx, rdi                                                       ; +0x5c, 0x1404838ec\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x5f, 0x1404838ef\nmov     rdx, rbx                                                       ; +0x65, 0x1404838f5\ntest    rbx, rbx                                                       ; +0x68, 0x1404838f8\njz      short loc_140483906                                            ; +0x6b, 0x1404838fb\nmov     rbx, [rbx+120h]                                                ; +0x6d, 0x1404838fd\njmp     short loc_1404838D0                                            ; +0x74, 0x140483904\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x76, 0x140483906\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x7b, 0x14048390b\nmov     rcx, rdi                                                       ; +0x80, 0x140483910\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x83, 0x140483913\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x89, 0x140483919\ncmp     eax, 1                                                         ; +0x8e, 0x14048391e\njbe     short loc_140483940                                            ; +0x91, 0x140483921\nmov     rcx, [rdi+38h]                                                 ; +0x93, 0x140483923\nlea     r9, sub_140481A40; CompareFunction                             ; +0x97, 0x140483927\nmov     r8d, 8; SizeOfElements                                         ; +0x9e, 0x14048392e\nmov     edx, [rcx]; NumOfElements                                      ; +0xa4, 0x140483934\nmov     rcx, [rcx+10h]; Base                                           ; +0xa6, 0x140483936\ncall    cs:qsort                                                       ; +0xaa, 0x14048393a\nmov     rax, rdi                                                       ; +0xb0, 0x140483940\nadd     rsp, 20h                                                       ; +0xb3, 0x140483943\npop     rdi                                                            ; +0xb7, 0x140483947\nretn                                                                   ; +0xb8, 0x140483948", "xrefs": ["GJSongBrowser::customSetup @ 0x1403bdcd6", "GJSongBrowser::FLAlert_Clicked @ 0x1403be11a", "MusicDownloadManager::onDownloadSongCompleted @ 0x1404841e3", "<???> @ 0x1408cff04", "<???> @ 0x1408cff3c", "<???> @ 0x140928a30"], "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"}