{"type": "func", "start": 5370157392, "end": 5370157860, "name": "CustomSFXWidget::deleteSFX", "pseudocode": "// \n// CustomSFXWidget::deleteSFX from 0x140161950 to 0x140161b24 (468 bytes)\n// \n// 2 xrefs:\n// > CustomSFXWidget::FLAlert_Clicked @ 0x1401639a9\n// > <???> @ 0x140917cf0\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:25 +0000\n// \n\n// Hidden C++ exception states: #wind=4\nvoid __fastcall CustomSFXWidget::deleteSFX(__int64 a1)\n{\n  __int64 v2; // rcx\n  _QWORD *v3; // rcx\n  __int64 v4; // rcx\n  const char *v5; // rcx\n  __int64 v6; // rdx\n  __int16 v7; // [rsp+20h] [rbp-68h] BYREF\n  char v8; // [rsp+22h] [rbp-66h]\n  void *v9; // [rsp+28h] [rbp-60h]\n  char *FileName[4]; // [rsp+30h] [rbp-58h] BYREF\n  _BYTE v11[32]; // [rsp+50h] [rbp-38h] BYREF\n\n  if ( *(_QWORD *)(a1 + 336) )\n  {\n    v2 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v9 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v2 = qword_14090C070;\n    }\n    MusicDownloadManager::pathForSFX(v2, v11, *(unsigned int *)(*(_QWORD *)(a1 + 336) + 56LL));\n    v3 = (_QWORD *)qword_14090BF60;\n    if ( !qword_14090BF60 )\n    {\n      v9 = operator new(0x8A8u);\n      qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n      v3 = (_QWORD *)qword_14090BF60;\n    }\n    FMODAudioEngine::stopAllEffects(v3);\n    v4 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v9 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v4 = qword_14090C070;\n    }\n    MusicDownloadManager::pathForSFX(v4, FileName, *(unsigned int *)(*(_QWORD *)(a1 + 336) + 56LL));\n    v5 = (const char *)FileName;\n    if ( FileName[3] > (char *)0xF )\n      v5 = FileName[0];\n    remove(v5);\n    sub_14003D310((__int64)FileName);\n    CustomSFXWidget::updateSFXInfo(a1);\n    LOBYTE(v6) = 1;\n    (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 368) + 336LL))(*(_QWORD *)(a1 + 368), v6);\n    v7 = 25855;\n    v8 = 0;\n    (**(void (__fastcall ***)(__int64, __int16 *))(*(_QWORD *)(a1 + 368) + 368LL))(*(_QWORD *)(a1 + 368) + 368LL, &v7);\n    (**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 368) + 360LL))(\n      *(_QWORD *)(a1 + 368) + 360LL,\n      \"SFX Deleted\");\n    cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 368), 230.0, 0.40000001, 0.0);\n    sub_14003D310((__int64)v11);\n  }\n}", "assembly": "; \n; CustomSFXWidget::deleteSFX from 0x140161950 to 0x140161b24 (468 bytes)\n; \n; 2 xrefs:\n; > CustomSFXWidget::FLAlert_Clicked @ 0x1401639a9\n; > <???> @ 0x140917cf0\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:25 +0000\n; \npush    rbx                                                            ; +0x0, 0x140161950\nsub     rsp, 80h                                                       ; +0x2, 0x140161952\nmov     rax, cs:__security_cookie                                      ; +0x9, 0x140161959\nxor     rax, rsp                                                       ; +0x10, 0x140161960\nmov     [rsp+88h+var_18], rax                                          ; +0x13, 0x140161963\nmov     rbx, rcx                                                       ; +0x18, 0x140161968\ncmp     qword ptr [rcx+150h], 0                                        ; +0x1b, 0x14016196b\njz      loc_140161B0E                                                  ; +0x23, 0x140161973\nmov     rcx, cs:qword_14090C070                                        ; +0x29, 0x140161979\ntest    rcx, rcx                                                       ; +0x30, 0x140161980\njnz     short loc_1401619B7                                            ; +0x33, 0x140161983\nmov     ecx, 3D0h; Size                                                ; +0x35, 0x140161985\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3a, 0x14016198a\nmov     [rsp+88h+var_60], rax                                          ; +0x3f, 0x14016198f\nmov     rcx, rax                                                       ; +0x44, 0x140161994\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x47, 0x140161997\nnop                                                                    ; +0x4c, 0x14016199c\nmov     cs:qword_14090C070, rax                                        ; +0x4d, 0x14016199d\nmov     rcx, [rax]                                                     ; +0x54, 0x1401619a4\nmov     rdx, [rcx+48h]                                                 ; +0x57, 0x1401619a7\nmov     rcx, rax                                                       ; +0x5b, 0x1401619ab\ncall    rdx                                                            ; +0x5e, 0x1401619ae\nmov     rcx, cs:qword_14090C070                                        ; +0x60, 0x1401619b0\nmov     r8, [rbx+150h]                                                 ; +0x67, 0x1401619b7\nmov     r8d, [r8+38h]                                                  ; +0x6e, 0x1401619be\nlea     rdx, [rsp+88h+var_38]                                          ; +0x72, 0x1401619c2\ncall    MusicDownloadManager__pathForSFX                               ; +0x77, 0x1401619c7\nnop                                                                    ; +0x7c, 0x1401619cc\nmov     rcx, cs:qword_14090BF60                                        ; +0x7d, 0x1401619cd\ntest    rcx, rcx                                                       ; +0x84, 0x1401619d4\njnz     short loc_140161A08                                            ; +0x87, 0x1401619d7\nmov     ecx, 8A8h; Size                                                ; +0x89, 0x1401619d9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8e, 0x1401619de\nmov     [rsp+88h+var_60], rax                                          ; +0x93, 0x1401619e3\nmov     rcx, rax                                                       ; +0x98, 0x1401619e8\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x9b, 0x1401619eb\nnop                                                                    ; +0xa0, 0x1401619f0\nmov     cs:qword_14090BF60, rax                                        ; +0xa1, 0x1401619f1\nmov     rdx, [rax]                                                     ; +0xa8, 0x1401619f8\nmov     rcx, rax                                                       ; +0xab, 0x1401619fb\ncall    qword ptr [rdx+48h]                                            ; +0xae, 0x1401619fe\nmov     rcx, cs:qword_14090BF60                                        ; +0xb1, 0x140161a01\ncall    FMODAudioEngine__stopAllEffects                                ; +0xb8, 0x140161a08\nmov     rcx, cs:qword_14090C070                                        ; +0xbd, 0x140161a0d\ntest    rcx, rcx                                                       ; +0xc4, 0x140161a14\njnz     short loc_140161A4B                                            ; +0xc7, 0x140161a17\nmov     ecx, 3D0h; Size                                                ; +0xc9, 0x140161a19\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xce, 0x140161a1e\nmov     [rsp+88h+var_60], rax                                          ; +0xd3, 0x140161a23\nmov     rcx, rax                                                       ; +0xd8, 0x140161a28\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0xdb, 0x140161a2b\nnop                                                                    ; +0xe0, 0x140161a30\nmov     cs:qword_14090C070, rax                                        ; +0xe1, 0x140161a31\nmov     rcx, [rax]                                                     ; +0xe8, 0x140161a38\nmov     rdx, [rcx+48h]                                                 ; +0xeb, 0x140161a3b\nmov     rcx, rax                                                       ; +0xef, 0x140161a3f\ncall    rdx                                                            ; +0xf2, 0x140161a42\nmov     rcx, cs:qword_14090C070                                        ; +0xf4, 0x140161a44\nmov     r8, [rbx+150h]                                                 ; +0xfb, 0x140161a4b\nmov     r8d, [r8+38h]                                                  ; +0x102, 0x140161a52\nlea     rdx, [rsp+88h+FileName]                                        ; +0x106, 0x140161a56\ncall    MusicDownloadManager__pathForSFX                               ; +0x10b, 0x140161a5b\nlea     rcx, [rsp+88h+FileName]                                        ; +0x110, 0x140161a60\ncmp     [rsp+88h+var_40], 0Fh                                          ; +0x115, 0x140161a65\ncmova   rcx, [rsp+88h+FileName]; FileName                              ; +0x11b, 0x140161a6b\ncall    cs:remove                                                      ; +0x121, 0x140161a71\nlea     rcx, [rsp+88h+FileName]                                        ; +0x127, 0x140161a77\ncall    sub_14003D310                                                  ; +0x12c, 0x140161a7c\nmov     rcx, rbx                                                       ; +0x131, 0x140161a81\ncall    CustomSFXWidget__updateSFXInfo                                 ; +0x134, 0x140161a84\nmov     rcx, [rbx+170h]                                                ; +0x139, 0x140161a89\nmov     rax, [rcx]                                                     ; +0x140, 0x140161a90\nmov     dl, 1                                                          ; +0x143, 0x140161a93\ncall    qword ptr [rax+150h]                                           ; +0x145, 0x140161a95\nmov     [rsp+88h+var_68], 64FFh                                        ; +0x14b, 0x140161a9b\nmovzx   eax, [rsp+88h+var_68]                                          ; +0x152, 0x140161aa2\nmov     [rsp+88h+var_68], ax                                           ; +0x157, 0x140161aa7\nmov     [rsp+88h+var_66], 0                                            ; +0x15c, 0x140161aac\nmov     rcx, [rbx+170h]                                                ; +0x161, 0x140161ab1\nadd     rcx, 170h                                                      ; +0x168, 0x140161ab8\nmov     rax, [rcx]                                                     ; +0x16f, 0x140161abf\nlea     rdx, [rsp+88h+var_68]                                          ; +0x172, 0x140161ac2\ncall    qword ptr [rax]                                                ; +0x177, 0x140161ac7\nmov     rcx, [rbx+170h]                                                ; +0x179, 0x140161ac9\nadd     rcx, 168h                                                      ; +0x180, 0x140161ad0\nmov     rax, [rcx]                                                     ; +0x187, 0x140161ad7\nlea     rdx, aSfxDeleted; \"SFX Deleted\"                                ; +0x18a, 0x140161ada\ncall    qword ptr [rax]                                                ; +0x191, 0x140161ae1\nxorps   xmm3, xmm3                                                     ; +0x193, 0x140161ae3\nmovss   xmm2, cs:dword_140834EDC                                       ; +0x196, 0x140161ae6\nmovss   xmm1, cs:dword_140835938                                       ; +0x19e, 0x140161aee\nmov     rcx, [rbx+170h]                                                ; +0x1a6, 0x140161af6\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x1ad, 0x140161afd\nnop                                                                    ; +0x1b3, 0x140161b03\nlea     rcx, [rsp+88h+var_38]                                          ; +0x1b4, 0x140161b04\ncall    sub_14003D310                                                  ; +0x1b9, 0x140161b09\nmov     rcx, [rsp+88h+var_18]                                          ; +0x1be, 0x140161b0e\nxor     rcx, rsp; StackCookie                                          ; +0x1c3, 0x140161b13\ncall    __security_check_cookie                                        ; +0x1c6, 0x140161b16\nadd     rsp, 80h                                                       ; +0x1cb, 0x140161b1b\npop     rbx                                                            ; +0x1d2, 0x140161b22\nretn                                                                   ; +0x1d3, 0x140161b23", "xrefs": ["CustomSFXWidget::FLAlert_Clicked @ 0x1401639a9", "<???> @ 0x140917cf0"], "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"}