{"type": "func", "start": 4301383952, "end": 4301384246, "name": "CustomSongWidget::deleteSong", "pseudocode": "// \n// CustomSongWidget::deleteSong from 0x10061e910 to 0x10061ea36 (294 bytes)\n// \n// 2 xrefs:\n// > CustomSongWidget::FLAlert_Clicked @ 0x100621476\n// > sub_100621480 @ 0x1006214dd\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::deleteSong(CustomSongWidget *a1)\n{\n  double v1; // xmm0_8\n  FMODAudioEngine *v3; // r14\n  MusicDownloadManager *v4; // rax\n  bool isMusicPlaying; // r14\n  FMODAudioEngine *v6; // rax\n  MusicDownloadManager *v7; // rax\n  cocos2d::CCLabelBMFont *m_errorLabel; // rdi\n  float v9; // xmm0_4\n  float v10; // xmm1_4\n  std::string v11; // [rsp+8h] [rbp-38h] BYREF\n  __int16 v12; // [rsp+24h] [rbp-1Ch] BYREF\n  char v13; // [rsp+26h] [rbp-1Ah]\n\n  if ( a1->m_songInfoObject )\n  {\n    v3 = FMODAudioEngine::sharedEngine();\n    v4 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::pathForSong(&v11, v1, (__int64)v4, a1->m_songInfoObject->m_songID);\n    isMusicPlaying = FMODAudioEngine::isMusicPlaying(v3, (unsigned __int8 *)&v11, 0);\n    if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )\n      operator delete(v11.__r_.__value_.__l.__data_);\n    if ( isMusicPlaying )\n    {\n      v6 = FMODAudioEngine::sharedEngine();\n      FMODAudioEngine::stopAllMusic(v6, 1);\n    }\n    v7 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::deleteSong(v7, a1->m_songInfoObject->m_songID);\n    CustomSongWidget::updateSongInfo(a1);\n    m_errorLabel = a1->m_errorLabel;\n    v13 = 0;\n    v12 = 25855;\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))m_errorLabel->setColor)(m_errorLabel, &v12);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_errorLabel->setString)(\n      a1->m_errorLabel,\n      \"Song Deleted\");\n    if ( a1->m_isMusicLibrary )\n    {\n      v9 = 140.0;\n      v10 = 0.34999999;\n    }\n    else\n    {\n      v9 = 230.0;\n      v10 = 0.40000001;\n    }\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, v9, v10, 0.0);\n    CustomSongWidget::showError(a1, 1);\n  }\n}", "assembly": "; \n; CustomSongWidget::deleteSong from 0x10061e910 to 0x10061ea36 (294 bytes)\n; \n; 2 xrefs:\n; > CustomSongWidget::FLAlert_Clicked @ 0x100621476\n; > sub_100621480 @ 0x1006214dd\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, 0x10061e910\nmov     rbp, rsp                                                       ; +0x1, 0x10061e911\npush    r15                                                            ; +0x4, 0x10061e914\npush    r14                                                            ; +0x6, 0x10061e916\npush    rbx                                                            ; +0x8, 0x10061e918\nsub     rsp, 28h                                                       ; +0x9, 0x10061e919\ncmp     qword ptr [rdi+150h], 0                                        ; +0xd, 0x10061e91d\njz      loc_10061EA2B                                                  ; +0x15, 0x10061e925\nmov     rbx, rdi                                                       ; +0x1b, 0x10061e92b\ncall    FMODAudioEngine__sharedEngine                                  ; +0x1e, 0x10061e92e\nmov     r14, rax                                                       ; +0x23, 0x10061e933\ncall    MusicDownloadManager__sharedState                              ; +0x26, 0x10061e936\nmov     rcx, [rbx+150h]                                                ; +0x2b, 0x10061e93b\nmov     edx, [rcx+13Ch]                                                ; +0x32, 0x10061e942\nlea     r15, [rbp+var_38]                                              ; +0x38, 0x10061e948\nmov     rdi, r15; this                                                 ; +0x3c, 0x10061e94c\nmov     rsi, rax                                                       ; +0x3f, 0x10061e94f\ncall    MusicDownloadManager__pathForSong                              ; +0x42, 0x10061e952\nmov     rdi, r14                                                       ; +0x47, 0x10061e957\nmov     rsi, r15                                                       ; +0x4a, 0x10061e95a\nxor     edx, edx                                                       ; +0x4d, 0x10061e95d\ncall    FMODAudioEngine__isMusicPlaying                                ; +0x4f, 0x10061e95f\nmov     r14d, eax                                                      ; +0x54, 0x10061e964\ntest    byte ptr [rbp+var_38.__r_.__value_], 1                         ; +0x57, 0x10061e967\njz      short loc_10061E976                                            ; +0x5b, 0x10061e96b\nmov     rdi, qword ptr [rbp+var_38.__r_.__value_+10h]; __p             ; +0x5d, 0x10061e96d\ncall    __ZdlPv; operator delete(void *)                               ; +0x61, 0x10061e971\ntest    r14b, r14b                                                     ; +0x66, 0x10061e976\njz      short loc_10061E98D                                            ; +0x69, 0x10061e979\ncall    FMODAudioEngine__sharedEngine                                  ; +0x6b, 0x10061e97b\nmov     rdi, rax                                                       ; +0x70, 0x10061e980\nmov     esi, 1                                                         ; +0x73, 0x10061e983\ncall    FMODAudioEngine__stopAllMusic                                  ; +0x78, 0x10061e988\ncall    MusicDownloadManager__sharedState                              ; +0x7d, 0x10061e98d\nmov     rcx, [rbx+150h]                                                ; +0x82, 0x10061e992\nmov     esi, [rcx+13Ch]                                                ; +0x89, 0x10061e999\nmov     rdi, rax; __ec                                                 ; +0x8f, 0x10061e99f\ncall    MusicDownloadManager__deleteSong                               ; +0x92, 0x10061e9a2\nmov     rdi, rbx                                                       ; +0x97, 0x10061e9a7\ncall    CustomSongWidget__updateSongInfo                               ; +0x9a, 0x10061e9aa\nmov     rdi, [rbx+178h]                                                ; +0x9f, 0x10061e9af\nmov     [rbp+var_1A], 0                                                ; +0xa6, 0x10061e9b6\nmov     [rbp+var_1C], 64FFh                                            ; +0xaa, 0x10061e9ba\nmov     rax, [rdi]                                                     ; +0xb0, 0x10061e9c0\nlea     rsi, [rbp+var_1C]                                              ; +0xb3, 0x10061e9c3\ncall    qword ptr [rax+420h]                                           ; +0xb7, 0x10061e9c7\nmov     rdi, [rbx+178h]                                                ; +0xbd, 0x10061e9cd\nmov     rax, [rdi]                                                     ; +0xc4, 0x10061e9d4\nlea     rsi, aSongDeleted; \"Song Deleted\"                              ; +0xc7, 0x10061e9d7\ncall    qword ptr [rax+390h]                                           ; +0xce, 0x10061e9de\nmov     rdi, [rbx+178h]                                                ; +0xd4, 0x10061e9e4\ncmp     byte ptr [rbx+1EDh], 1                                         ; +0xdb, 0x10061e9eb\njnz     short loc_10061EA06                                            ; +0xe2, 0x10061e9f2\nmovss   xmm0, cs:dword_100815734                                       ; +0xe4, 0x10061e9f4\nmovss   xmm1, cs:dword_100816000                                       ; +0xec, 0x10061e9fc\njmp     short loc_10061EA16                                            ; +0xf4, 0x10061ea04\nmovss   xmm0, cs:dword_100817F18                                       ; +0xf6, 0x10061ea06\nmovss   xmm1, cs:dword_100815004                                       ; +0xfe, 0x10061ea0e\nxorps   xmm2, xmm2                                                     ; +0x106, 0x10061ea16\ncall    cocos2d__CCLabelBMFont__limitLabelWidth                        ; +0x109, 0x10061ea19\nmov     rdi, rbx                                                       ; +0x10e, 0x10061ea1e\nmov     esi, 1                                                         ; +0x111, 0x10061ea21\ncall    CustomSongWidget__showError                                    ; +0x116, 0x10061ea26\nadd     rsp, 28h                                                       ; +0x11b, 0x10061ea2b\npop     rbx                                                            ; +0x11f, 0x10061ea2f\npop     r14                                                            ; +0x120, 0x10061ea30\npop     r15                                                            ; +0x122, 0x10061ea32\npop     rbp                                                            ; +0x124, 0x10061ea34\nretn                                                                   ; +0x125, 0x10061ea35", "xrefs": ["CustomSongWidget::FLAlert_Clicked @ 0x100621476", "sub_100621480 @ 0x1006214dd"], "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"}