{"type": "func", "start": 5370196592, "end": 5370197224, "name": "CustomSongWidget::deleteSong", "pseudocode": "// \n// CustomSongWidget::deleteSong from 0x14016b270 to 0x14016b4e8 (632 bytes)\n// \n// 2 xrefs:\n// > CustomSongWidget::FLAlert_Clicked @ 0x14016ed59\n// > <???> @ 0x1409180d4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:29 +0000\n// \n\n// Hidden C++ exception states: #wind=6\nvoid __fastcall CustomSongWidget::deleteSong(__int64 a1)\n{\n  __int64 v2; // rcx\n  _QWORD *v3; // rbx\n  _QWORD *v4; // rcx\n  _QWORD *v5; // rbx\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  const char *v8; // rcx\n  float v9; // xmm2_4\n  float v10; // xmm1_4\n  __int64 v11; // rdx\n  __int16 v12; // [rsp+20h] [rbp-68h] BYREF\n  char v13; // [rsp+22h] [rbp-66h]\n  void *v14; // [rsp+28h] [rbp-60h]\n  _BYTE *v15; // [rsp+30h] [rbp-58h]\n  _BYTE v16[32]; // [rsp+38h] [rbp-50h] BYREF\n  char *FileName[4]; // [rsp+58h] [rbp-30h] BYREF\n\n  if ( *(_QWORD *)(a1 + 336) )\n  {\n    v15 = v16;\n    v2 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v14 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v2 = qword_14090C070;\n    }\n    v3 = (_QWORD *)MusicDownloadManager::pathForSong(v2, v16, *(unsigned int *)(*(_QWORD *)(a1 + 336) + 320LL));\n    v4 = (_QWORD *)qword_14090BF60;\n    if ( !qword_14090BF60 )\n    {\n      v14 = operator new(0x8A8u);\n      qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n      v4 = (_QWORD *)qword_14090BF60;\n    }\n    if ( FMODAudioEngine::isMusicPlaying(v4, v3) )\n    {\n      v5 = (_QWORD *)qword_14090BF60;\n      if ( !qword_14090BF60 )\n      {\n        v14 = operator new(0x8A8u);\n        qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v14);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n        v5 = (_QWORD *)qword_14090BF60;\n      }\n      v6 = v5[69];\n      if ( v6 )\n        FMOD::ChannelControl::stop(v6);\n      sub_14003EB60(v5 + 137);\n      sub_14003EB60(v5 + 145);\n      sub_14003EB60(v5 + 153);\n    }\n    v7 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v14 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v7 = qword_14090C070;\n    }\n    MusicDownloadManager::pathForSong(v7, FileName, *(unsigned int *)(*(_QWORD *)(a1 + 336) + 320LL));\n    v8 = (const char *)FileName;\n    if ( FileName[3] > (char *)0xF )\n      v8 = FileName[0];\n    remove(v8);\n    sub_14003D310((__int64)FileName);\n    CustomSongWidget::updateSongInfo(a1);\n    v12 = 25855;\n    v13 = 0;\n    (**(void (__fastcall ***)(__int64, __int16 *))(*(_QWORD *)(a1 + 376) + 368LL))(*(_QWORD *)(a1 + 376) + 368LL, &v12);\n    (**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 376) + 360LL))(\n      *(_QWORD *)(a1 + 376) + 360LL,\n      \"Song Deleted\");\n    if ( *(_BYTE *)(a1 + 501) )\n    {\n      v9 = 0.34999999;\n      v10 = 140.0;\n    }\n    else\n    {\n      v9 = 0.40000001;\n      v10 = 230.0;\n    }\n    cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 376), v10, v9, 0.0);\n    LOBYTE(v11) = 1;\n    CustomSongWidget::showError(a1, v11);\n  }\n}", "assembly": "; \n; CustomSongWidget::deleteSong from 0x14016b270 to 0x14016b4e8 (632 bytes)\n; \n; 2 xrefs:\n; > CustomSongWidget::FLAlert_Clicked @ 0x14016ed59\n; > <???> @ 0x1409180d4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:29 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14016b270\npush    rdi                                                            ; +0x5, 0x14016b275\nsub     rsp, 80h                                                       ; +0x6, 0x14016b276\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x14016b27d\nxor     rax, rsp                                                       ; +0x14, 0x14016b284\nmov     [rsp+88h+var_10], rax                                          ; +0x17, 0x14016b287\nmov     rdi, rcx                                                       ; +0x1c, 0x14016b28c\ncmp     qword ptr [rcx+150h], 0                                        ; +0x1f, 0x14016b28f\njz      loc_14016B4CA                                                  ; +0x27, 0x14016b297\nlea     rax, [rsp+88h+var_50]                                          ; +0x2d, 0x14016b29d\nmov     [rsp+88h+var_58], rax                                          ; +0x32, 0x14016b2a2\nmov     rcx, cs:qword_14090C070                                        ; +0x37, 0x14016b2a7\ntest    rcx, rcx                                                       ; +0x3e, 0x14016b2ae\njnz     short loc_14016B2E5                                            ; +0x41, 0x14016b2b1\nmov     ecx, 3D0h; Size                                                ; +0x43, 0x14016b2b3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x48, 0x14016b2b8\nmov     [rsp+88h+var_60], rax                                          ; +0x4d, 0x14016b2bd\nmov     rcx, rax                                                       ; +0x52, 0x14016b2c2\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x55, 0x14016b2c5\nnop                                                                    ; +0x5a, 0x14016b2ca\nmov     cs:qword_14090C070, rax                                        ; +0x5b, 0x14016b2cb\nmov     rcx, [rax]                                                     ; +0x62, 0x14016b2d2\nmov     rdx, [rcx+48h]                                                 ; +0x65, 0x14016b2d5\nmov     rcx, rax                                                       ; +0x69, 0x14016b2d9\ncall    rdx                                                            ; +0x6c, 0x14016b2dc\nmov     rcx, cs:qword_14090C070                                        ; +0x6e, 0x14016b2de\nmov     r8, [rdi+150h]                                                 ; +0x75, 0x14016b2e5\nmov     r8d, [r8+140h]                                                 ; +0x7c, 0x14016b2ec\nlea     rdx, [rsp+88h+var_50]                                          ; +0x83, 0x14016b2f3\ncall    MusicDownloadManager__pathForSong                              ; +0x88, 0x14016b2f8\nmov     rbx, rax                                                       ; +0x8d, 0x14016b2fd\nmov     rcx, cs:qword_14090BF60                                        ; +0x90, 0x14016b300\ntest    rcx, rcx                                                       ; +0x97, 0x14016b307\njnz     short loc_14016B33E                                            ; +0x9a, 0x14016b30a\nmov     ecx, 8A8h; Size                                                ; +0x9c, 0x14016b30c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa1, 0x14016b311\nmov     [rsp+88h+var_60], rax                                          ; +0xa6, 0x14016b316\nmov     rcx, rax                                                       ; +0xab, 0x14016b31b\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xae, 0x14016b31e\nnop                                                                    ; +0xb3, 0x14016b323\nmov     cs:qword_14090BF60, rax                                        ; +0xb4, 0x14016b324\nmov     rcx, [rax]                                                     ; +0xbb, 0x14016b32b\nmov     rdx, [rcx+48h]                                                 ; +0xbe, 0x14016b32e\nmov     rcx, rax                                                       ; +0xc2, 0x14016b332\ncall    rdx                                                            ; +0xc5, 0x14016b335\nmov     rcx, cs:qword_14090BF60                                        ; +0xc7, 0x14016b337\nmov     rdx, rbx                                                       ; +0xce, 0x14016b33e\ncall    FMODAudioEngine__isMusicPlaying                                ; +0xd1, 0x14016b341\ntest    al, al                                                         ; +0xd6, 0x14016b346\njz      short loc_14016B3BE                                            ; +0xd8, 0x14016b348\nmov     rbx, cs:qword_14090BF60                                        ; +0xda, 0x14016b34a\ntest    rbx, rbx                                                       ; +0xe1, 0x14016b351\njnz     short loc_14016B388                                            ; +0xe4, 0x14016b354\nmov     ecx, 8A8h; Size                                                ; +0xe6, 0x14016b356\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xeb, 0x14016b35b\nmov     [rsp+88h+var_60], rax                                          ; +0xf0, 0x14016b360\nmov     rcx, rax                                                       ; +0xf5, 0x14016b365\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xf8, 0x14016b368\nnop                                                                    ; +0xfd, 0x14016b36d\nmov     cs:qword_14090BF60, rax                                        ; +0xfe, 0x14016b36e\nmov     rcx, [rax]                                                     ; +0x105, 0x14016b375\nmov     rdx, [rcx+48h]                                                 ; +0x108, 0x14016b378\nmov     rcx, rax                                                       ; +0x10c, 0x14016b37c\ncall    rdx                                                            ; +0x10f, 0x14016b37f\nmov     rbx, cs:qword_14090BF60                                        ; +0x111, 0x14016b381\nmov     rcx, [rbx+228h]                                                ; +0x118, 0x14016b388\ntest    rcx, rcx                                                       ; +0x11f, 0x14016b38f\njz      short loc_14016B39A                                            ; +0x122, 0x14016b392\ncall    cs:?stop@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@XZ; FMOD::ChannelControl::stop(void) ; +0x124, 0x14016b394\nlea     rcx, [rbx+448h]                                                ; +0x12a, 0x14016b39a\ncall    sub_14003EB60                                                  ; +0x131, 0x14016b3a1\nlea     rcx, [rbx+488h]                                                ; +0x136, 0x14016b3a6\ncall    sub_14003EB60                                                  ; +0x13d, 0x14016b3ad\nlea     rcx, [rbx+4C8h]                                                ; +0x142, 0x14016b3b2\ncall    sub_14003EB60                                                  ; +0x149, 0x14016b3b9\nmov     rcx, cs:qword_14090C070                                        ; +0x14e, 0x14016b3be\ntest    rcx, rcx                                                       ; +0x155, 0x14016b3c5\njnz     short loc_14016B3FC                                            ; +0x158, 0x14016b3c8\nmov     ecx, 3D0h; Size                                                ; +0x15a, 0x14016b3ca\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x15f, 0x14016b3cf\nmov     [rsp+88h+var_60], rax                                          ; +0x164, 0x14016b3d4\nmov     rcx, rax                                                       ; +0x169, 0x14016b3d9\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x16c, 0x14016b3dc\nnop                                                                    ; +0x171, 0x14016b3e1\nmov     cs:qword_14090C070, rax                                        ; +0x172, 0x14016b3e2\nmov     rcx, [rax]                                                     ; +0x179, 0x14016b3e9\nmov     rdx, [rcx+48h]                                                 ; +0x17c, 0x14016b3ec\nmov     rcx, rax                                                       ; +0x180, 0x14016b3f0\ncall    rdx                                                            ; +0x183, 0x14016b3f3\nmov     rcx, cs:qword_14090C070                                        ; +0x185, 0x14016b3f5\nmov     r8, [rdi+150h]                                                 ; +0x18c, 0x14016b3fc\nmov     r8d, [r8+140h]                                                 ; +0x193, 0x14016b403\nlea     rdx, [rsp+88h+FileName]                                        ; +0x19a, 0x14016b40a\ncall    MusicDownloadManager__pathForSong                              ; +0x19f, 0x14016b40f\nlea     rcx, [rsp+88h+FileName]                                        ; +0x1a4, 0x14016b414\ncmp     [rsp+88h+var_18], 0Fh                                          ; +0x1a9, 0x14016b419\ncmova   rcx, [rsp+88h+FileName]; FileName                              ; +0x1af, 0x14016b41f\ncall    cs:remove                                                      ; +0x1b5, 0x14016b425\nlea     rcx, [rsp+88h+FileName]                                        ; +0x1bb, 0x14016b42b\ncall    sub_14003D310                                                  ; +0x1c0, 0x14016b430\nmov     rcx, rdi                                                       ; +0x1c5, 0x14016b435\ncall    CustomSongWidget__updateSongInfo                               ; +0x1c8, 0x14016b438\nmov     [rsp+88h+var_68], 64FFh                                        ; +0x1cd, 0x14016b43d\nmovzx   eax, [rsp+88h+var_68]                                          ; +0x1d4, 0x14016b444\nmov     [rsp+88h+var_68], ax                                           ; +0x1d9, 0x14016b449\nmov     [rsp+88h+var_66], 0                                            ; +0x1de, 0x14016b44e\nmov     rcx, [rdi+178h]                                                ; +0x1e3, 0x14016b453\nadd     rcx, 170h                                                      ; +0x1ea, 0x14016b45a\nmov     rax, [rcx]                                                     ; +0x1f1, 0x14016b461\nlea     rdx, [rsp+88h+var_68]                                          ; +0x1f4, 0x14016b464\ncall    qword ptr [rax]                                                ; +0x1f9, 0x14016b469\nmov     rcx, [rdi+178h]                                                ; +0x1fb, 0x14016b46b\nadd     rcx, 168h                                                      ; +0x202, 0x14016b472\nmov     rax, [rcx]                                                     ; +0x209, 0x14016b479\nlea     rdx, aSongDeleted; \"Song Deleted\"                              ; +0x20c, 0x14016b47c\ncall    qword ptr [rax]                                                ; +0x213, 0x14016b483\nxorps   xmm3, xmm3                                                     ; +0x215, 0x14016b485\nmov     rcx, [rdi+178h]                                                ; +0x218, 0x14016b488\ncmp     byte ptr [rdi+1F5h], 0                                         ; +0x21f, 0x14016b48f\njz      short loc_14016B4AA                                            ; +0x226, 0x14016b496\nmovss   xmm2, cs:dword_140834EC0                                       ; +0x228, 0x14016b498\nmovss   xmm1, cs:dword_14083583C                                       ; +0x230, 0x14016b4a0\njmp     short loc_14016B4BA                                            ; +0x238, 0x14016b4a8\nmovss   xmm2, cs:dword_140834EDC                                       ; +0x23a, 0x14016b4aa\nmovss   xmm1, cs:dword_140835938                                       ; +0x242, 0x14016b4b2\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x24a, 0x14016b4ba\nmov     dl, 1                                                          ; +0x250, 0x14016b4c0\nmov     rcx, rdi                                                       ; +0x252, 0x14016b4c2\ncall    CustomSongWidget__showError                                    ; +0x255, 0x14016b4c5\nmov     rcx, [rsp+88h+var_10]                                          ; +0x25a, 0x14016b4ca\nxor     rcx, rsp; StackCookie                                          ; +0x25f, 0x14016b4cf\ncall    __security_check_cookie                                        ; +0x262, 0x14016b4d2\nmov     rbx, [rsp+88h+arg_8]                                           ; +0x267, 0x14016b4d7\nadd     rsp, 80h                                                       ; +0x26f, 0x14016b4df\npop     rdi                                                            ; +0x276, 0x14016b4e6\nretn                                                                   ; +0x277, 0x14016b4e7", "xrefs": ["CustomSongWidget::FLAlert_Clicked @ 0x14016ed59", "<???> @ 0x1409180d4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}