// // CustomSongWidget::loadSongInfoFailed from 0x1006204f0 to 0x100620707 (535 bytes) // // 2 xrefs: // > sub_1006207D0 @ 0x1006207dc // > @ 0x100982240 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // local variable allocation has failed, the output may be wrong! void __fastcall CustomSongWidget::loadSongInfoFailed(CustomSongWidget *a1, int a2, GJSongError a3) { __int64 *left; // rdi __int64 *v6; // rcx cocos2d::CCLabelBMFont *m_errorLabel; // rdi cocos2d::CCLabelBMFont *v8; // rdi void (__cdecl *setString)(cocos2d::CCLabelBMFont *__hidden, const char *); // rax unsigned __int32 v10; // r14d cocos2d::CCLabelBMFont *v11; // rdi float v12; // xmm0_4 float v13; // xmm1_4 std::__compressed_pair *>> *p_pair1; // r15 __int64 *v15; // rcx std::__tree_end_node *> *v16; // rcx std::__tree_end_node *> *v17; // rax std::__compressed_pair *>> *v18; // rcx bool v19; // zf __int16 v20; // [rsp+Ch] [rbp-24h] BYREF char v21; // [rsp+Eh] [rbp-22h] left = (__int64 *)a1->m_nextSongIDs.__tree_.__pair1_.__value_.__left_; if ( !left ) { LABEL_7: if ( a1->m_customSongID != a2 || a1->m_customSongID == 0 ) return; m_errorLabel = a1->m_errorLabel; v21 = 25; v20 = 13055; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))m_errorLabel->setColor)(m_errorLabel, &v20); v8 = a1->m_errorLabel; setString = v8->setString; v10 = a3 - 1; if ( v10 > 2 ) { ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))setString)(v8, "Download failed. Please try later."); v11 = a1->m_errorLabel; if ( !a1->m_isMusicLibrary ) goto LABEL_10; } else { ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))setString)(v8, off_100982350[v10]); v11 = a1->m_errorLabel; if ( !a1->m_isMusicLibrary ) { LABEL_10: v12 = 230.0; v13 = 0.40000001; LABEL_22: cocos2d::CCLabelBMFont::limitLabelWidth(v11, v12, v13, 0.0); CustomSongWidget::showError(a1, 0); ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_sliderGroove->setVisible)(a1->m_sliderGroove, 0); cocos2d::CCNode::unschedule( a1, (cocos2d::SEL_SCHEDULE)(unsigned __int64)CustomSongWidget::updateDownloadProgress); a1->m_isNotDownloading = 0; CustomSongWidget::updateSongInfo(a1); return; } } v12 = 140.0; v13 = 0.34999999; goto LABEL_22; } v6 = left; while ( *((_DWORD *)v6 + 7) > a2 ) { LABEL_3: v6 = (__int64 *)*v6; if ( !v6 ) goto LABEL_7; } if ( *((_DWORD *)v6 + 7) < a2 ) { ++v6; goto LABEL_3; } p_pair1 = &a1->m_nextSongIDs.__tree_.__pair1_; v15 = left; do { if ( *((_DWORD *)v15 + 7) >= a2 ) p_pair1 = (std::__compressed_pair *>> *)v15; v15 = (__int64 *)v15[*((_DWORD *)v15 + 7) < a2]; } while ( v15 ); if ( p_pair1 != &a1->m_nextSongIDs.__tree_.__pair1_ && SHIDWORD(p_pair1[3].__value_.__left_) <= a2 ) { v16 = (std::__tree_end_node *> *)p_pair1[1].__value_.__left_; if ( v16 ) { do { v17 = v16; v16 = (std::__tree_end_node *> *)v16->__left_; } while ( v16 ); } else { v18 = p_pair1; do { v17 = (std::__tree_end_node *> *)v18[2].__value_.__left_; v19 = v17->__left_ == (std::__tree_end_node *>::pointer)v18; v18 = (std::__compressed_pair *>> *)v17; } while ( !v19 ); } if ( (std::__compressed_pair *>> *)a1->m_nextSongIDs.__tree_.__begin_node_ == p_pair1 ) a1->m_nextSongIDs.__tree_.__begin_node_ = v17; --a1->m_nextSongIDs.__tree_.__pair3_.__value_; sub_100165F60(left, (__int64 *)p_pair1); operator delete(p_pair1); *(_QWORD *)&a2 = (unsigned int)a2; } ((void (__fastcall *)(CustomSongWidget *, _QWORD, _QWORD))a1->downloadSongFailed)( a1, *(_QWORD *)&a2, (unsigned int)a3); }