{"type": "func", "start": 4296008760, "end": 4296009316, "name": "CustomSongWidget::processNextMultiAsset", "pseudocode": "// \n// CustomSongWidget::processNextMultiAsset from 0x1000fe438 to 0x1000fe664 (556 bytes)\n// \n// 4 xrefs:\n// > CustomSongWidget::startMultiAssetDownload @ 0x1000fd408\n// > CustomSongWidget::downloadAssetFinished @ 0x1000fe2fc\n// > CustomSongWidget::downloadAssetFailed @ 0x1000fe404\n// > CustomSongWidget::processNextMultiAsset @ 0x1000fe64c\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\nvoid __fastcall CustomSongWidget::processNextMultiAsset(CustomSongWidget *a1)\n{\n  cocos2d::extension::CCHttpClient *Instance; // x0\n  size_t v3; // x0\n  std::__vector_base<GJAssetDownloadAction>::pointer begin; // x21\n  std::__vector_base<GJAssetDownloadAction>::pointer end; // x8\n  size_t v6; // x20\n  float v7; // s0\n  float v8; // s1\n  cocos2d::CCLabelBMFont *m_errorLabel; // x0\n  GJAssetType m_assetType; // w8\n  int m_id; // w21\n  MusicDownloadManager *v12; // x0\n  MusicDownloadManager *v13; // x0\n  MusicDownloadManager *v14; // x0\n  cocos2d::extension::CCHttpClient *v15; // x0\n  size_t v16; // x0\n  int v17; // [xsp+8h] [xbp-28h] BYREF\n  __int16 v18; // [xsp+Ch] [xbp-24h] BYREF\n  char v19; // [xsp+Eh] [xbp-22h]\n\n  if ( a1->m_undownloadedAssets.__begin_ == a1->m_undownloadedAssets.__end_ )\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))a1->m_errorLabel->setColor)(\n      a1->m_errorLabel,\n      &unk_100636BC9);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_errorLabel->setString)(\n      a1->m_errorLabel,\n      \"Download complete.\");\n    if ( a1->m_isMusicLibrary )\n    {\n      v7 = 140.0;\n      v8 = 0.35;\n    }\n    else\n    {\n      v7 = 230.0;\n      v8 = 0.4;\n    }\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, v7, v8, 0.0);\n    CustomSongWidget::showError(a1, 1);\n    a1->m_unkBool2 = 0;\n    CustomSongWidget::updateMultiAssetInfo(a1, 1);\n  }\n  else\n  {\n    Instance = cocos2d::extension::CCHttpClient::getInstance();\n    v3 = cocos2d::extension::CCHttpClient::availableThreadCount(Instance);\n    begin = a1->m_undownloadedAssets.__begin_;\n    end = a1->m_undownloadedAssets.__end_;\n    if ( begin != end )\n    {\n      v6 = v3;\n      while ( LOBYTE(begin[1].m_id) == 1 )\n      {\n        begin = (std::__vector_base<GJAssetDownloadAction>::pointer)((char *)begin + 16);\n        if ( begin == end )\n          return;\n      }\n      if ( begin->m_status < 2 )\n      {\n        LOBYTE(begin[1].m_id) = 1;\n        m_assetType = begin->m_assetType;\n        if ( m_assetType == User )\n        {\n          v13 = MusicDownloadManager::sharedState();\n          MusicDownloadManager::downloadSFX(v13, begin->m_id);\n        }\n        else if ( m_assetType == 1 )\n        {\n          m_id = begin->m_id;\n          v17 = m_id;\n          if ( m_id > 9999999 )\n          {\n            v14 = MusicDownloadManager::sharedState();\n            MusicDownloadManager::downloadSong(v14, m_id);\n          }\n          else\n          {\n            sub_1000B4D20((__int64)&a1->m_nextSongIDs, &v17, &v17);\n            v12 = MusicDownloadManager::sharedState();\n            MusicDownloadManager::getSongInfo(v12, v17, 0);\n          }\n        }\n      }\n      else\n      {\n        CustomSongWidget::updateMultiAssetInfo(a1, 1);\n        m_errorLabel = a1->m_errorLabel;\n        v19 = 25;\n        v18 = 13055;\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))m_errorLabel->setColor)(m_errorLabel, &v18);\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_errorLabel->setString)(\n          a1->m_errorLabel,\n          \"Some assets failed to download.\");\n        cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, 230.0, 0.4, 0.0);\n        CustomSongWidget::showError(a1, 0);\n      }\n      v15 = cocos2d::extension::CCHttpClient::getInstance();\n      v16 = cocos2d::extension::CCHttpClient::availableThreadCount(v15);\n      if ( a1->m_undownloadedAssets.__begin_ != a1->m_undownloadedAssets.__end_ && v16 && v16 < v6 )\n        CustomSongWidget::processNextMultiAsset(a1);\n    }\n  }\n}", "assembly": "; \n; CustomSongWidget::processNextMultiAsset from 0x1000fe438 to 0x1000fe664 (556 bytes)\n; \n; 4 xrefs:\n; > CustomSongWidget::startMultiAssetDownload @ 0x1000fd408\n; > CustomSongWidget::downloadAssetFinished @ 0x1000fe2fc\n; > CustomSongWidget::downloadAssetFailed @ 0x1000fe404\n; > CustomSongWidget::processNextMultiAsset @ 0x1000fe64c\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x1000fe438\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1000fe43c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1000fe440\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1000fe444\nADD             X29, SP, #0x30                                         ; +0x10, 0x1000fe448\nMOV             X19, X0                                                ; +0x14, 0x1000fe44c\nLDR             X8, [X0,#0x240]                                        ; +0x18, 0x1000fe450\nLDR             X9, [X0,#0x248]                                        ; +0x1c, 0x1000fe454\nCMP             X8, X9                                                 ; +0x20, 0x1000fe458\nB.EQ            loc_1000FE498                                          ; +0x24, 0x1000fe45c\nBL              cocos2d__extension__CCHttpClient__getInstance          ; +0x28, 0x1000fe460\nBL              cocos2d__extension__CCHttpClient__availableThreadCount ; +0x2c, 0x1000fe464\nLDR             X21, [X19,#0x240]                                      ; +0x30, 0x1000fe468\nLDR             X8, [X19,#0x248]                                       ; +0x34, 0x1000fe46c\nCMP             X21, X8                                                ; +0x38, 0x1000fe470\nB.EQ            loc_1000FE650                                          ; +0x3c, 0x1000fe474\nMOV             X20, X0                                                ; +0x40, 0x1000fe478\nLDRB            W9, [X21,#0xC]                                         ; +0x44, 0x1000fe47c\nCMP             W9, #1                                                 ; +0x48, 0x1000fe480\nB.NE            loc_1000FE4EC                                          ; +0x4c, 0x1000fe484\nADD             X21, X21, #0x10                                        ; +0x50, 0x1000fe488\nCMP             X21, X8                                                ; +0x54, 0x1000fe48c\nB.NE            loc_1000FE47C                                          ; +0x58, 0x1000fe490\nB               loc_1000FE650                                          ; +0x5c, 0x1000fe494\nLDR             X0, [X19,#0x178]                                       ; +0x60, 0x1000fe498\nLDR             X8, [X0]                                               ; +0x64, 0x1000fe49c\nLDR             X8, [X8,#0x420]                                        ; +0x68, 0x1000fe4a0\nADRL            X1, unk_100636BC9                                      ; +0x6c, 0x1000fe4a4\nBLR             X8                                                     ; +0x74, 0x1000fe4ac\nLDR             X0, [X19,#0x178]                                       ; +0x78, 0x1000fe4b0\nLDR             X8, [X0]                                               ; +0x7c, 0x1000fe4b4\nLDR             X8, [X8,#0x390]                                        ; +0x80, 0x1000fe4b8\nADRL            X1, aDownloadComple; \"Download complete.\"              ; +0x84, 0x1000fe4bc\nBLR             X8                                                     ; +0x8c, 0x1000fe4c4\nLDRB            W8, [X19,#0x1ED]                                       ; +0x90, 0x1000fe4c8\nLDR             X0, [X19,#0x178]                                       ; +0x94, 0x1000fe4cc\nCMP             W8, #1                                                 ; +0x98, 0x1000fe4d0\nB.NE            loc_1000FE56C                                          ; +0x9c, 0x1000fe4d4\nMOV             W8, #0x430C0000                                        ; +0xa0, 0x1000fe4d8\nFMOV            S0, W8                                                 ; +0xa4, 0x1000fe4dc\nADRP            X8, #dword_1006353A4@PAGE                              ; +0xa8, 0x1000fe4e0\nLDR             S1, [X8,#dword_1006353A4@PAGEOFF]                      ; +0xac, 0x1000fe4e4\nB               loc_1000FE57C                                          ; +0xb0, 0x1000fe4e8\nLDR             W8, [X21,#8]                                           ; +0xb4, 0x1000fe4ec\nCMP             W8, #2                                                 ; +0xb8, 0x1000fe4f0\nB.LT            loc_1000FE5B0                                          ; +0xbc, 0x1000fe4f4\nMOV             X0, X19                                                ; +0xc0, 0x1000fe4f8\nMOV             W1, #1                                                 ; +0xc4, 0x1000fe4fc\nBL              CustomSongWidget__updateMultiAssetInfo                 ; +0xc8, 0x1000fe500\nLDR             X0, [X19,#0x178]                                       ; +0xcc, 0x1000fe504\nMOV             W8, #0x19                                              ; +0xd0, 0x1000fe508\nSTRB            W8, [SP,#0x30+var_22]                                  ; +0xd4, 0x1000fe50c\nMOV             W8, #0x32FF                                            ; +0xd8, 0x1000fe510\nSTRH            W8, [SP,#0x30+var_24]                                  ; +0xdc, 0x1000fe514\nLDR             X8, [X0]                                               ; +0xe0, 0x1000fe518\nLDR             X8, [X8,#0x420]                                        ; +0xe4, 0x1000fe51c\nADD             X1, SP, #0x30+var_24                                   ; +0xe8, 0x1000fe520\nBLR             X8                                                     ; +0xec, 0x1000fe524\nLDR             X0, [X19,#0x178]                                       ; +0xf0, 0x1000fe528\nLDR             X8, [X0]                                               ; +0xf4, 0x1000fe52c\nLDR             X8, [X8,#0x390]                                        ; +0xf8, 0x1000fe530\nADRL            X1, aSomeAssetsFail; \"Some assets failed to download.\" ; +0xfc, 0x1000fe534\nBLR             X8                                                     ; +0x104, 0x1000fe53c\nLDR             X0, [X19,#0x178]                                       ; +0x108, 0x1000fe540\nMOV             W8, #0x43660000                                        ; +0x10c, 0x1000fe544\nFMOV            S0, W8                                                 ; +0x110, 0x1000fe548\nADRP            X8, #dword_10063537C@PAGE                              ; +0x114, 0x1000fe54c\nLDR             S1, [X8,#dword_10063537C@PAGEOFF]                      ; +0x118, 0x1000fe550\nFMOV            S2, WZR                                                ; +0x11c, 0x1000fe554\nBL              cocos2d__CCLabelBMFont__limitLabelWidth                ; +0x120, 0x1000fe558\nMOV             X0, X19                                                ; +0x124, 0x1000fe55c\nMOV             W1, #0                                                 ; +0x128, 0x1000fe560\nBL              CustomSongWidget__showError                            ; +0x12c, 0x1000fe564\nB               loc_1000FE624                                          ; +0x130, 0x1000fe568\nMOV             W8, #0x43660000                                        ; +0x134, 0x1000fe56c\nFMOV            S0, W8                                                 ; +0x138, 0x1000fe570\nADRP            X8, #dword_10063537C@PAGE                              ; +0x13c, 0x1000fe574\nLDR             S1, [X8,#dword_10063537C@PAGEOFF]                      ; +0x140, 0x1000fe578\nFMOV            S2, WZR                                                ; +0x144, 0x1000fe57c\nBL              cocos2d__CCLabelBMFont__limitLabelWidth                ; +0x148, 0x1000fe580\nMOV             X0, X19                                                ; +0x14c, 0x1000fe584\nMOV             W1, #1                                                 ; +0x150, 0x1000fe588\nBL              CustomSongWidget__showError                            ; +0x154, 0x1000fe58c\nSTRB            WZR, [X19,#0x20A]                                      ; +0x158, 0x1000fe590\nMOV             X0, X19                                                ; +0x15c, 0x1000fe594\nMOV             W1, #1                                                 ; +0x160, 0x1000fe598\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x164, 0x1000fe59c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x168, 0x1000fe5a0\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x16c, 0x1000fe5a4\nADD             SP, SP, #0x40 ; '@'                                    ; +0x170, 0x1000fe5a8\nB               CustomSongWidget__updateMultiAssetInfo                 ; +0x174, 0x1000fe5ac\nMOV             W8, #1                                                 ; +0x178, 0x1000fe5b0\nSTRB            W8, [X21,#0xC]                                         ; +0x17c, 0x1000fe5b4\nLDR             W8, [X21,#4]                                           ; +0x180, 0x1000fe5b8\nCMP             W8, #2                                                 ; +0x184, 0x1000fe5bc\nB.EQ            loc_1000FE608                                          ; +0x188, 0x1000fe5c0\nCMP             W8, #1                                                 ; +0x18c, 0x1000fe5c4\nB.NE            loc_1000FE624                                          ; +0x190, 0x1000fe5c8\nLDR             W21, [X21]                                             ; +0x194, 0x1000fe5cc\nSTR             W21, [SP,#0x30+var_28]                                 ; +0x198, 0x1000fe5d0\nMOV             W8, #0x98967F                                          ; +0x19c, 0x1000fe5d4\nCMP             W21, W8                                                ; +0x1a4, 0x1000fe5dc\nB.GT            loc_1000FE618                                          ; +0x1a8, 0x1000fe5e0\nADD             X0, X19, #0x260                                        ; +0x1ac, 0x1000fe5e4\nADD             X1, SP, #0x30+var_28                                   ; +0x1b0, 0x1000fe5e8\nADD             X2, SP, #0x30+var_28                                   ; +0x1b4, 0x1000fe5ec\nBL              sub_1000B4D20                                          ; +0x1b8, 0x1000fe5f0\nBL              MusicDownloadManager__sharedState                      ; +0x1bc, 0x1000fe5f4\nLDR             W1, [SP,#0x30+var_28]                                  ; +0x1c0, 0x1000fe5f8\nMOV             W2, #0                                                 ; +0x1c4, 0x1000fe5fc\nBL              MusicDownloadManager__getSongInfo                      ; +0x1c8, 0x1000fe600\nB               loc_1000FE624                                          ; +0x1cc, 0x1000fe604\nBL              MusicDownloadManager__sharedState                      ; +0x1d0, 0x1000fe608\nLDR             W1, [X21]                                              ; +0x1d4, 0x1000fe60c\nBL              MusicDownloadManager__downloadSFX                      ; +0x1d8, 0x1000fe610\nB               loc_1000FE624                                          ; +0x1dc, 0x1000fe614\nBL              MusicDownloadManager__sharedState                      ; +0x1e0, 0x1000fe618\nMOV             X1, X21                                                ; +0x1e4, 0x1000fe61c\nBL              MusicDownloadManager__downloadSong                     ; +0x1e8, 0x1000fe620\nBL              cocos2d__extension__CCHttpClient__getInstance          ; +0x1ec, 0x1000fe624\nBL              cocos2d__extension__CCHttpClient__availableThreadCount ; +0x1f0, 0x1000fe628\nLDR             X8, [X19,#0x240]                                       ; +0x1f4, 0x1000fe62c\nLDR             X9, [X19,#0x248]                                       ; +0x1f8, 0x1000fe630\nCMP             X8, X9                                                 ; +0x1fc, 0x1000fe634\nB.EQ            loc_1000FE650                                          ; +0x200, 0x1000fe638\nCBZ             X0, loc_1000FE650                                      ; +0x204, 0x1000fe63c\nCMP             X0, X20                                                ; +0x208, 0x1000fe640\nB.CS            loc_1000FE650                                          ; +0x20c, 0x1000fe644\nMOV             X0, X19                                                ; +0x210, 0x1000fe648\nBL              CustomSongWidget__processNextMultiAsset                ; +0x214, 0x1000fe64c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x218, 0x1000fe650\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x21c, 0x1000fe654\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x220, 0x1000fe658\nADD             SP, SP, #0x40 ; '@'                                    ; +0x224, 0x1000fe65c\nRET                                                                    ; +0x228, 0x1000fe660", "xrefs": ["CustomSongWidget::startMultiAssetDownload @ 0x1000fd408", "CustomSongWidget::downloadAssetFinished @ 0x1000fe2fc", "CustomSongWidget::downloadAssetFailed @ 0x1000fe404", "CustomSongWidget::processNextMultiAsset @ 0x1000fe64c"], "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"}