{"type": "func", "start": 4296886424, "end": 4296886572, "name": "MusicDownloadManager::getDownloadedSongs", "pseudocode": "// \n// MusicDownloadManager::getDownloadedSongs from 0x1001d4898 to 0x1001d492c (148 bytes)\n// \n// 3 xrefs:\n// > MusicDownloadManager::limitDownloadedSongs @ 0x1001d4a94\n// > GJSongBrowser::customSetup @ 0x1003031c4\n// > GJSongBrowser::FLAlert_Clicked @ 0x10030345c\n// \n// This function is hookable on this platform (idp: arm, 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:00:24 +0000\n// \n\n__int64 __fastcall MusicDownloadManager::getDownloadedSongs(__int64 a1)\n{\n  __int64 v2; // x19\n  __int64 v3; // x8\n  __int64 v4; // x22\n  __int64 v5; // x21\n\n  v2 = sub_1002E736C(a1);\n  v3 = *(_QWORD *)(a1 + 344);\n  if ( v3 )\n  {\n    v4 = *(_QWORD *)(v3 + 56);\n    while ( v4 )\n    {\n      v5 = *(_QWORD *)(v4 + 264);\n      v4 = *(_QWORD *)(v4 + 288);\n      if ( (unsigned int)MusicDownloadManager::isSongDownloaded(a1, *(unsigned int *)(v5 + 316)) )\n        sub_1002E74E0(v2, v5);\n    }\n  }\n  if ( (unsigned int)sub_1002E757C(v2) >= 2 )\n    qsort(\n      *(void **)(*(_QWORD *)(v2 + 56) + 16LL),\n      **(unsigned int **)(v2 + 56),\n      8u,\n      (int (__cdecl *)(const void *, const void *))sub_1001D1A0C);\n  return v2;\n}", "assembly": "; \n; MusicDownloadManager::getDownloadedSongs from 0x1001d4898 to 0x1001d492c (148 bytes)\n; \n; 3 xrefs:\n; > MusicDownloadManager::limitDownloadedSongs @ 0x1001d4a94\n; > GJSongBrowser::customSetup @ 0x1003031c4\n; > GJSongBrowser::FLAlert_Clicked @ 0x10030345c\n; \n; This function is hookable on this platform (idp: arm, 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:00:24 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1001d4898\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001d489c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001d48a0\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001d48a4\nMOV             X20, X0                                                ; +0x10, 0x1001d48a8\nBL              sub_1002E736C                                          ; +0x14, 0x1001d48ac\nMOV             X19, X0                                                ; +0x18, 0x1001d48b0\nLDR             X8, [X20,#0x158]                                       ; +0x1c, 0x1001d48b4\nCBZ             X8, loc_1001D48EC                                      ; +0x20, 0x1001d48b8\nLDR             X22, [X8,#0x38]                                        ; +0x24, 0x1001d48bc\nCBZ             X22, loc_1001D48EC                                     ; +0x28, 0x1001d48c0\nLDR             X21, [X22,#0x108]                                      ; +0x2c, 0x1001d48c4\nLDR             X22, [X22,#0x120]                                      ; +0x30, 0x1001d48c8\nLDR             W1, [X21,#0x13C]                                       ; +0x34, 0x1001d48cc\nMOV             X0, X20                                                ; +0x38, 0x1001d48d0\nBL              MusicDownloadManager__isSongDownloaded                 ; +0x3c, 0x1001d48d4\nCBZ             W0, loc_1001D48E8                                      ; +0x40, 0x1001d48d8\nMOV             X0, X19                                                ; +0x44, 0x1001d48dc\nMOV             X1, X21                                                ; +0x48, 0x1001d48e0\nBL              sub_1002E74E0                                          ; +0x4c, 0x1001d48e4\nCBNZ            X22, loc_1001D48C4                                     ; +0x50, 0x1001d48e8\nMOV             X0, X19                                                ; +0x54, 0x1001d48ec\nBL              sub_1002E757C                                          ; +0x58, 0x1001d48f0\nCMP             W0, #2                                                 ; +0x5c, 0x1001d48f4\nB.CC            loc_1001D4918                                          ; +0x60, 0x1001d48f8\nLDR             X8, [X19,#0x38]                                        ; +0x64, 0x1001d48fc\nLDR             X0, [X8,#0x10]; __base                                 ; +0x68, 0x1001d4900\nLDR             W1, [X8]; __nel                                        ; +0x6c, 0x1001d4904\nADRL            X3, sub_1001D1A0C; __compar                            ; +0x70, 0x1001d4908\nMOV             W2, #8; __width                                        ; +0x78, 0x1001d4910\nBL              _qsort                                                 ; +0x7c, 0x1001d4914\nMOV             X0, X19                                                ; +0x80, 0x1001d4918\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x84, 0x1001d491c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x88, 0x1001d4920\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x8c, 0x1001d4924\nRET                                                                    ; +0x90, 0x1001d4928", "xrefs": ["MusicDownloadManager::limitDownloadedSongs @ 0x1001d4a94", "GJSongBrowser::customSetup @ 0x1003031c4", "GJSongBrowser::FLAlert_Clicked @ 0x10030345c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}