{"type": "func", "start": 4298049848, "end": 4298050028, "name": "CustomSFXWidget::onDownload", "pseudocode": "// \n// CustomSFXWidget::onDownload from 0x1002f0938 to 0x1002f09ec (180 bytes)\n// \n// 2 xrefs:\n// > CustomSFXWidget::FLAlert_Clicked @ 0x1002f1848\n// > CustomSFXWidget::init @ 0x1002f00f4\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 CustomSFXWidget::onDownload(CustomSFXWidget *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  MusicDownloadManager *v4; // x0\n\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 0);\n  if ( a1->m_sfxObject )\n  {\n    v3 = GameManager::sharedState();\n    if ( GameManager::getGameVariable(v3, \"0016\") )\n    {\n      CustomSFXWidget::showLoadingArt(a1);\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_downloadButton->setVisible)(a1->m_downloadButton, 0);\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_cancelButton->setVisible)(a1->m_cancelButton, 1);\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_deleteButton->setVisible)(a1->m_deleteButton, 0);\n      CustomSFXWidget::startDownload(a1);\n    }\n    else\n    {\n      v4 = MusicDownloadManager::sharedState();\n      MusicDownloadManager::showTOS(v4, &a1->FLAlertLayerProtocol);\n    }\n  }\n}", "assembly": "; \n; CustomSFXWidget::onDownload from 0x1002f0938 to 0x1002f09ec (180 bytes)\n; \n; 2 xrefs:\n; > CustomSFXWidget::FLAlert_Clicked @ 0x1002f1848\n; > CustomSFXWidget::init @ 0x1002f00f4\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x1002f0938\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x1002f093c\nADD             X29, SP, #0x10                                         ; +0x8, 0x1002f0940\nMOV             X19, X0                                                ; +0xc, 0x1002f0944\nLDR             X0, [X0,#0x170]                                        ; +0x10, 0x1002f0948\nLDR             X8, [X0]                                               ; +0x14, 0x1002f094c\nLDR             X8, [X8,#0x148]                                        ; +0x18, 0x1002f0950\nMOV             W1, #0                                                 ; +0x1c, 0x1002f0954\nBLR             X8                                                     ; +0x20, 0x1002f0958\nLDR             X8, [X19,#0x150]                                       ; +0x24, 0x1002f095c\nCBZ             X8, loc_1002F09CC                                      ; +0x28, 0x1002f0960\nBL              GameManager__sharedState                               ; +0x2c, 0x1002f0964\nADRL            X1, a0016; \"0016\"                                      ; +0x30, 0x1002f0968\nBL              GameManager__getGameVariable                           ; +0x38, 0x1002f0970\nTBZ             W0, #0, loc_1002F09D8                                  ; +0x3c, 0x1002f0974\nMOV             X0, X19                                                ; +0x40, 0x1002f0978\nBL              CustomSFXWidget__showLoadingArt                        ; +0x44, 0x1002f097c\nLDR             X0, [X19,#0x178]                                       ; +0x48, 0x1002f0980\nLDR             X8, [X0]                                               ; +0x4c, 0x1002f0984\nLDR             X8, [X8,#0x148]                                        ; +0x50, 0x1002f0988\nMOV             W1, #0                                                 ; +0x54, 0x1002f098c\nBLR             X8                                                     ; +0x58, 0x1002f0990\nLDR             X0, [X19,#0x180]                                       ; +0x5c, 0x1002f0994\nLDR             X8, [X0]                                               ; +0x60, 0x1002f0998\nLDR             X8, [X8,#0x148]                                        ; +0x64, 0x1002f099c\nMOV             W1, #1                                                 ; +0x68, 0x1002f09a0\nBLR             X8                                                     ; +0x6c, 0x1002f09a4\nLDR             X0, [X19,#0x198]                                       ; +0x70, 0x1002f09a8\nLDR             X8, [X0]                                               ; +0x74, 0x1002f09ac\nLDR             X8, [X8,#0x148]                                        ; +0x78, 0x1002f09b0\nMOV             W1, #0                                                 ; +0x7c, 0x1002f09b4\nBLR             X8                                                     ; +0x80, 0x1002f09b8\nMOV             X0, X19                                                ; +0x84, 0x1002f09bc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x88, 0x1002f09c0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x8c, 0x1002f09c4\nB               CustomSFXWidget__startDownload                         ; +0x90, 0x1002f09c8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x94, 0x1002f09cc\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x98, 0x1002f09d0\nRET                                                                    ; +0x9c, 0x1002f09d4\nBL              MusicDownloadManager__sharedState                      ; +0xa0, 0x1002f09d8\nADD             X1, X19, #0x148                                        ; +0xa4, 0x1002f09dc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xa8, 0x1002f09e0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xac, 0x1002f09e4\nB               MusicDownloadManager__showTOS                          ; +0xb0, 0x1002f09e8", "xrefs": ["CustomSFXWidget::FLAlert_Clicked @ 0x1002f1848", "CustomSFXWidget::init @ 0x1002f00f4"], "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"}