{"type": "func", "start": 4301384848, "end": 4301385070, "name": "CustomSongWidget::getSongInfoIfUnloaded", "pseudocode": "// \n// CustomSongWidget::getSongInfoIfUnloaded from 0x10061ec90 to 0x10061ed6e (222 bytes)\n// \n// 2 xrefs:\n// > CustomSongLayer::init @ 0x10021586f\n// > CustomSongLayer::onSearch @ 0x100215b9f\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::getSongInfoIfUnloaded(CustomSongWidget *a1)\n{\n  SongInfoObject *m_songInfoObject; // rdi\n  cocos2d::extension::CCScale9Sprite *m_bgSpr; // rdi\n  MusicDownloadManager *v4; // rax\n  std::string __str; // [rsp+0h] [rbp-20h] BYREF\n\n  m_songInfoObject = a1->m_songInfoObject;\n  if ( m_songInfoObject && m_songInfoObject->m_unloaded )\n  {\n    __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;\n    strcpy(__str.__r_.__value_.__s.__data_, \"Loading\");\n    std::string::operator=((std::string *)&m_songInfoObject->m_songName, &__str);\n    if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n      operator delete(__str.__r_.__value_.__l.__data_);\n    CustomSongWidget::updateSongInfo(a1);\n    if ( a1->m_songInfoObject )\n    {\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 0);\n      m_bgSpr = a1->m_bgSpr;\n      if ( m_bgSpr )\n        ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _QWORD))m_bgSpr->setVisible)(m_bgSpr, 0);\n      v4 = MusicDownloadManager::sharedState();\n      MusicDownloadManager::getSongInfo(v4, a1->m_customSongID, 0);\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, void *))a1->m_getSongInfoBtn->setColor)(\n        a1->m_getSongInfoBtn,\n        &unk_100822622);\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_getSongInfoBtn->setEnabled)(a1->m_getSongInfoBtn, 0);\n    }\n  }\n}", "assembly": "; \n; CustomSongWidget::getSongInfoIfUnloaded from 0x10061ec90 to 0x10061ed6e (222 bytes)\n; \n; 2 xrefs:\n; > CustomSongLayer::init @ 0x10021586f\n; > CustomSongLayer::onSearch @ 0x100215b9f\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\npush    rbp                                                            ; +0x0, 0x10061ec90\nmov     rbp, rsp                                                       ; +0x1, 0x10061ec91\npush    rbx                                                            ; +0x4, 0x10061ec94\nsub     rsp, 18h                                                       ; +0x5, 0x10061ec95\nmov     rbx, rdi                                                       ; +0x9, 0x10061ec99\nmov     rdi, [rdi+150h]                                                ; +0xc, 0x10061ec9c\ntest    rdi, rdi                                                       ; +0x13, 0x10061eca3\njz      loc_10061ED67                                                  ; +0x16, 0x10061eca6\ncmp     byte ptr [rdi+1F8h], 1                                         ; +0x1c, 0x10061ecac\njnz     loc_10061ED67                                                  ; +0x23, 0x10061ecb3\nmov     byte ptr [rbp+__str.__r_.__value_], 0Eh                        ; +0x29, 0x10061ecb9\nmov     dword ptr [rbp+__str.__r_.__value_+1], 64616F4Ch               ; +0x2d, 0x10061ecbd\nmov     dword ptr [rbp+__str.__r_.__value_+4], 676E6964h               ; +0x34, 0x10061ecc4\nmov     byte ptr [rbp+__str.__r_.__value_+8], 0                        ; +0x3b, 0x10061eccb\nadd     rdi, 140h; this                                                ; +0x3f, 0x10061eccf\nlea     rsi, [rbp+__str]; __str                                        ; +0x46, 0x10061ecd6\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x4a, 0x10061ecda\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0x4f, 0x10061ecdf\njz      short loc_10061ECEE                                            ; +0x53, 0x10061ece3\nmov     rdi, qword ptr [rbp+__str.__r_.__value_+10h]; __p              ; +0x55, 0x10061ece5\ncall    __ZdlPv; operator delete(void *)                               ; +0x59, 0x10061ece9\nmov     rdi, rbx                                                       ; +0x5e, 0x10061ecee\ncall    CustomSongWidget__updateSongInfo                               ; +0x61, 0x10061ecf1\ncmp     qword ptr [rbx+150h], 0                                        ; +0x66, 0x10061ecf6\njz      short loc_10061ED67                                            ; +0x6e, 0x10061ecfe\nmov     rdi, [rbx+178h]                                                ; +0x70, 0x10061ed00\nmov     rax, [rdi]                                                     ; +0x77, 0x10061ed07\nxor     esi, esi                                                       ; +0x7a, 0x10061ed0a\ncall    qword ptr [rax+148h]                                           ; +0x7c, 0x10061ed0c\nmov     rdi, [rbx+1D8h]                                                ; +0x82, 0x10061ed12\ntest    rdi, rdi                                                       ; +0x89, 0x10061ed19\njz      short loc_10061ED29                                            ; +0x8c, 0x10061ed1c\nmov     rax, [rdi]                                                     ; +0x8e, 0x10061ed1e\nxor     esi, esi                                                       ; +0x91, 0x10061ed21\ncall    qword ptr [rax+148h]                                           ; +0x93, 0x10061ed23\ncall    MusicDownloadManager__sharedState                              ; +0x99, 0x10061ed29\nmov     esi, [rbx+1F0h]                                                ; +0x9e, 0x10061ed2e\nmov     rdi, rax                                                       ; +0xa4, 0x10061ed34\nxor     edx, edx                                                       ; +0xa7, 0x10061ed37\ncall    MusicDownloadManager__getSongInfo                              ; +0xa9, 0x10061ed39\nmov     rdi, [rbx+198h]                                                ; +0xae, 0x10061ed3e\nmov     rax, [rdi]                                                     ; +0xb5, 0x10061ed45\nlea     rsi, unk_100822622                                             ; +0xb8, 0x10061ed48\ncall    qword ptr [rax+3B0h]                                           ; +0xbf, 0x10061ed4f\nmov     rdi, [rbx+198h]                                                ; +0xc5, 0x10061ed55\nmov     rax, [rdi]                                                     ; +0xcc, 0x10061ed5c\nxor     esi, esi                                                       ; +0xcf, 0x10061ed5f\ncall    qword ptr [rax+410h]                                           ; +0xd1, 0x10061ed61\nadd     rsp, 18h                                                       ; +0xd7, 0x10061ed67\npop     rbx                                                            ; +0xdb, 0x10061ed6b\npop     rbp                                                            ; +0xdc, 0x10061ed6c\nretn                                                                   ; +0xdd, 0x10061ed6d", "xrefs": ["CustomSongLayer::init @ 0x10021586f", "CustomSongLayer::onSearch @ 0x100215b9f"], "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"}