{"type": "func", "start": 7640172, "end": 7640496, "name": "CustomSongWidget::loadSongInfoFinished", "pseudocode": "// \n// CustomSongWidget::loadSongInfoFinished from 0x74946c to 0x7495b0 (324 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'CustomSongWidget::loadSongInfoFinished @ 0x7495b4\n// > <???> @ 0xa0950\n// > <???> @ 0x1161900\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 CustomSongWidget::loadSongInfoFinished(CustomSongWidget *a1, SongInfoObject *a2)\n{\n  std::_Rb_tree_node_base *p_M_header; // x4\n  std::set<int> *p_m_nextSongIDs; // x22\n  std::_Rb_tree_node_base::_Base_ptr M_parent; // x0\n  int m_songID; // w3\n  std::_Rb_tree_node_base *v8; // x1\n  _QWORD *v9; // x0\n  _QWORD *v10; // x1\n  MusicDownloadManager *v11; // x0\n  cocos2d::CCSequence *v12; // x21\n  cocos2d::CCFiniteTimeAction *v13; // x0\n  cocos2d::CCAction *v14; // x0\n  int v15; // [xsp+34h] [xbp+34h] BYREF\n\n  p_M_header = &a1->m_nextSongIDs._M_t._M_impl._M_header;\n  p_m_nextSongIDs = &a1->m_nextSongIDs;\n  M_parent = a1->m_nextSongIDs._M_t._M_impl._M_header._M_parent;\n  m_songID = a2->m_songID;\n  if ( !M_parent )\n    goto LABEL_17;\n  v8 = p_M_header;\n  do\n  {\n    while ( m_songID <= (int)M_parent[1]._M_color )\n    {\n      v8 = M_parent;\n      M_parent = M_parent->_M_left;\n      if ( !M_parent )\n        goto LABEL_5;\n    }\n    M_parent = M_parent->_M_right;\n  }\n  while ( M_parent );\nLABEL_5:\n  if ( v8 == p_M_header || m_songID < (int)v8[1]._M_color )\n  {\nLABEL_17:\n    if ( CustomSongWidget::verifySongID(a1, m_songID) )\n    {\n      CustomSongWidget::updateSongObject(a1, a2);\n      if ( a1->m_isNotDownloading )\n        CustomSongWidget::startDownload(a1);\n      v12 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(0.0);\n      v13 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, CustomSongWidget::updateSongInfo, 0);\n      v14 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v12, v13, 0);\n      cocos2d::CCNode::runAction(a1, v14);\n    }\n  }\n  else\n  {\n    v15 = m_songID;\n    v9 = (_QWORD *)std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::equal_range(\n                     (__int64)p_m_nextSongIDs,\n                     &v15);\n    std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase_aux(\n      p_m_nextSongIDs,\n      v9,\n      v10);\n    v11 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::downloadSong(v11, a2->m_songID);\n  }\n}", "assembly": "; \n; CustomSongWidget::loadSongInfoFinished from 0x74946c to 0x7495b0 (324 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'CustomSongWidget::loadSongInfoFinished @ 0x7495b4\n; > <???> @ 0xa0950\n; > <???> @ 0x1161900\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             X29, X30, [SP,#var_40]!                                ; +0x0, 0x74946c\nADD             X4, X0, #0x298                                         ; +0x4, 0x749470\nMOV             X29, SP                                                ; +0x8, 0x749474\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0xc, 0x749478\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x74947c\nMOV             X19, X0                                                ; +0x14, 0x749480\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x18, 0x749484\nMOV             X21, X1                                                ; +0x1c, 0x749488\nADD             X22, X0, #0x290                                        ; +0x20, 0x74948c\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x749490\nLDR             X0, [X0,#0x2A0]                                        ; +0x28, 0x749494\nLDR             W3, [X21,#0x13C]                                       ; +0x2c, 0x749498\nLDR             X1, [X1]                                               ; +0x30, 0x74949c\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x34, 0x7494a0\nCBZ             X0, loc_749538                                         ; +0x38, 0x7494a4\nMOV             X1, X4                                                 ; +0x3c, 0x7494a8\nLDR             W2, [X0,#0x20]                                         ; +0x40, 0x7494ac\nCMP             W3, W2                                                 ; +0x44, 0x7494b0\nB.GT            loc_74952C                                             ; +0x48, 0x7494b4\nMOV             X1, X0                                                 ; +0x4c, 0x7494b8\nLDR             X0, [X0,#0x10]                                         ; +0x50, 0x7494bc\nCBNZ            X0, loc_7494AC                                         ; +0x54, 0x7494c0\nCMP             X1, X4                                                 ; +0x58, 0x7494c4\nB.EQ            loc_749538                                             ; +0x5c, 0x7494c8\nLDR             W0, [X1,#0x20]                                         ; +0x60, 0x7494cc\nCMP             W3, W0                                                 ; +0x64, 0x7494d0\nB.LT            loc_749538                                             ; +0x68, 0x7494d4\nADD             X1, X29, #0x40+arg_0                                   ; +0x6c, 0x7494d8\nMOV             X0, X22                                                ; +0x70, 0x7494dc\nSTR             W3, [X1,#-0xC]!                                        ; +0x74, 0x7494e0\nBL              _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE11equal_rangeERKi; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::equal_range(int const&) ; +0x78, 0x7494e4\nMOV             X3, X0                                                 ; +0x7c, 0x7494e8\nMOV             X2, X1                                                 ; +0x80, 0x7494ec\nMOV             X0, X22                                                ; +0x84, 0x7494f0\nMOV             X1, X3                                                 ; +0x88, 0x7494f4\nBL              _ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE12_M_erase_auxESt23_Rb_tree_const_iteratorIiES7_; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_erase_aux(std::_Rb_tree_const_iterator<int>,std::_Rb_tree_const_iterator<int>) ; +0x8c, 0x7494f8\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x90, 0x7494fc\nLDR             W1, [X21,#0x13C]; int                                  ; +0x94, 0x749500\nBL              _ZN20MusicDownloadManager12downloadSongEi; MusicDownloadManager::downloadSong(int) ; +0x98, 0x749504\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x9c, 0x749508\nLDR             X1, [X29,#0x40+var_8]                                  ; +0xa0, 0x74950c\nLDR             X0, [X20]                                              ; +0xa4, 0x749510\nCMP             X1, X0                                                 ; +0xa8, 0x749514\nB.NE            loc_7495AC                                             ; +0xac, 0x749518\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xb0, 0x74951c\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xb4, 0x749520\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xb8, 0x749524\nRET                                                                    ; +0xbc, 0x749528\nLDR             X0, [X0,#0x18]                                         ; +0xc0, 0x74952c\nCBNZ            X0, loc_7494AC                                         ; +0xc4, 0x749530\nB               loc_7494C4                                             ; +0xc8, 0x749534\nMOV             X0, X19; this                                          ; +0xcc, 0x749538\nMOV             W1, W3; int                                            ; +0xd0, 0x74953c\nBL              _ZN16CustomSongWidget12verifySongIDEi; CustomSongWidget::verifySongID(int) ; +0xd4, 0x749540\nUXTB            W0, W0                                                 ; +0xd8, 0x749544\nCBZ             W0, loc_749508                                         ; +0xdc, 0x749548\nMOV             X0, X19; this                                          ; +0xe0, 0x74954c\nMOV             X1, X21; SongInfoObject *                              ; +0xe4, 0x749550\nBL              _ZN16CustomSongWidget16updateSongObjectEP14SongInfoObject; CustomSongWidget::updateSongObject(SongInfoObject *) ; +0xe8, 0x749554\nLDRB            W0, [X19,#0x1EB]; this                                 ; +0xec, 0x749558\nCBNZ            W0, loc_7495A0                                         ; +0xf0, 0x74955c\nFMOV            S0, WZR; float                                         ; +0xf4, 0x749560\nBL              _ZN7cocos2d11CCDelayTime6createEf; cocos2d::CCDelayTime::create(float) ; +0xf8, 0x749564\nMOV             X21, X0                                                ; +0xfc, 0x749568\nADRP            X1, #_ZN16CustomSongWidget14updateSongInfoEv_ptr@PAGE  ; +0x100, 0x74956c\nMOV             X0, X19                                                ; +0x104, 0x749570\nMOV             X2, #0                                                 ; +0x108, 0x749574\nLDR             X1, [X1,#_ZN16CustomSongWidget14updateSongInfoEv_ptr@PAGEOFF]; CustomSongWidget::updateSongInfo(void) ... ; +0x10c, 0x749578\nBL              _ZN7cocos2d10CCCallFunc6createEPNS_8CCObjectEMS1_FvvE; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x110, 0x74957c\nMOV             X1, X0; cocos2d::CCFiniteTimeAction *                  ; +0x114, 0x749580\nMOV             X2, #0                                                 ; +0x118, 0x749584\nMOV             X0, X21; this                                          ; +0x11c, 0x749588\nBL              _ZN7cocos2d10CCSequence6createEPNS_18CCFiniteTimeActionEz; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x120, 0x74958c\nMOV             X1, X0; cocos2d::CCAction *                            ; +0x124, 0x749590\nMOV             X0, X19; this                                          ; +0x128, 0x749594\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x12c, 0x749598\nB               loc_749508                                             ; +0x130, 0x74959c\nMOV             X0, X19; this                                          ; +0x134, 0x7495a0\nBL              _ZN16CustomSongWidget13startDownloadEv; CustomSongWidget::startDownload(void) ; +0x138, 0x7495a4\nB               loc_749560                                             ; +0x13c, 0x7495a8\nBL              .__stack_chk_fail                                      ; +0x140, 0x7495ac", "xrefs": ["`non-virtual thunk to'CustomSongWidget::loadSongInfoFinished @ 0x7495b4", "<???> @ 0xa0950", "<???> @ 0x1161900"], "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"}