{"type": "func", "start": 4301145696, "end": 4301145920, "name": "CustomSFXWidget::deleteSFX", "pseudocode": "// \n// CustomSFXWidget::deleteSFX from 0x1005e4660 to 0x1005e4740 (224 bytes)\n// \n// 2 xrefs:\n// > CustomSFXWidget::FLAlert_Clicked @ 0x1005e4eb6\n// > sub_1005E4EC0 @ 0x1005e4f1d\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 CustomSFXWidget::deleteSFX(CustomSFXWidget *a1)\n{\n  double v1; // xmm0_8\n  MusicDownloadManager *v3; // rax\n  FMODAudioEngine *v4; // rax\n  MusicDownloadManager *v5; // rax\n  cocos2d::CCLabelBMFont *m_errorLabel; // rdi\n  std::string v7; // [rsp+8h] [rbp-28h] BYREF\n  __int16 v8; // [rsp+24h] [rbp-Ch] BYREF\n  char v9; // [rsp+26h] [rbp-Ah]\n\n  if ( a1->m_sfxObject )\n  {\n    v3 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::pathForSFX(&v7, v1, (__int64)v3, a1->m_sfxObject->m_sfxID);\n    v4 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::stopAllEffects(v4);\n    v5 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::deleteSFX(v5, a1->m_sfxObject->m_sfxID);\n    CustomSFXWidget::updateSFXInfo(a1);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 1);\n    m_errorLabel = a1->m_errorLabel;\n    v9 = 0;\n    v8 = 25855;\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))m_errorLabel->setColor)(m_errorLabel, &v8);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_errorLabel->setString)(\n      a1->m_errorLabel,\n      \"SFX Deleted\");\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, 230.0, 0.40000001, 0.0);\n    if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 )\n      operator delete(v7.__r_.__value_.__l.__data_);\n  }\n}", "assembly": "; \n; CustomSFXWidget::deleteSFX from 0x1005e4660 to 0x1005e4740 (224 bytes)\n; \n; 2 xrefs:\n; > CustomSFXWidget::FLAlert_Clicked @ 0x1005e4eb6\n; > sub_1005E4EC0 @ 0x1005e4f1d\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, 0x1005e4660\nmov     rbp, rsp                                                       ; +0x1, 0x1005e4661\npush    rbx                                                            ; +0x4, 0x1005e4664\nsub     rsp, 28h                                                       ; +0x5, 0x1005e4665\ncmp     qword ptr [rdi+150h], 0                                        ; +0x9, 0x1005e4669\njz      loc_1005E4739                                                  ; +0x11, 0x1005e4671\nmov     rbx, rdi                                                       ; +0x17, 0x1005e4677\ncall    MusicDownloadManager__sharedState                              ; +0x1a, 0x1005e467a\nmov     rcx, [rbx+150h]                                                ; +0x1f, 0x1005e467f\nmov     edx, [rcx+38h]                                                 ; +0x26, 0x1005e4686\nlea     rdi, [rbp+var_28]; this                                        ; +0x29, 0x1005e4689\nmov     rsi, rax                                                       ; +0x2d, 0x1005e468d\ncall    MusicDownloadManager__pathForSFX                               ; +0x30, 0x1005e4690\ncall    FMODAudioEngine__sharedEngine                                  ; +0x35, 0x1005e4695\nmov     rdi, rax                                                       ; +0x3a, 0x1005e469a\ncall    FMODAudioEngine__stopAllEffects                                ; +0x3d, 0x1005e469d\ncall    MusicDownloadManager__sharedState                              ; +0x42, 0x1005e46a2\nmov     rcx, [rbx+150h]                                                ; +0x47, 0x1005e46a7\nmov     esi, [rcx+38h]                                                 ; +0x4e, 0x1005e46ae\nmov     rdi, rax; __ec                                                 ; +0x51, 0x1005e46b1\ncall    MusicDownloadManager__deleteSFX                                ; +0x54, 0x1005e46b4\nmov     rdi, rbx                                                       ; +0x59, 0x1005e46b9\ncall    CustomSFXWidget__updateSFXInfo                                 ; +0x5c, 0x1005e46bc\nmov     rdi, [rbx+170h]                                                ; +0x61, 0x1005e46c1\nmov     rax, [rdi]                                                     ; +0x68, 0x1005e46c8\nmov     esi, 1                                                         ; +0x6b, 0x1005e46cb\ncall    qword ptr [rax+148h]                                           ; +0x70, 0x1005e46d0\nmov     rdi, [rbx+170h]                                                ; +0x76, 0x1005e46d6\nmov     [rbp+var_A], 0                                                 ; +0x7d, 0x1005e46dd\nmov     [rbp+var_C], 64FFh                                             ; +0x81, 0x1005e46e1\nmov     rax, [rdi]                                                     ; +0x87, 0x1005e46e7\nlea     rsi, [rbp+var_C]                                               ; +0x8a, 0x1005e46ea\ncall    qword ptr [rax+420h]                                           ; +0x8e, 0x1005e46ee\nmov     rdi, [rbx+170h]                                                ; +0x94, 0x1005e46f4\nmov     rax, [rdi]                                                     ; +0x9b, 0x1005e46fb\nlea     rsi, aSfxDeleted; \"SFX Deleted\"                                ; +0x9e, 0x1005e46fe\ncall    qword ptr [rax+390h]                                           ; +0xa5, 0x1005e4705\nmov     rdi, [rbx+170h]                                                ; +0xab, 0x1005e470b\nmovss   xmm0, cs:dword_100817F18                                       ; +0xb2, 0x1005e4712\nmovss   xmm1, cs:dword_100815004                                       ; +0xba, 0x1005e471a\nxorps   xmm2, xmm2                                                     ; +0xc2, 0x1005e4722\ncall    cocos2d__CCLabelBMFont__limitLabelWidth                        ; +0xc5, 0x1005e4725\ntest    byte ptr [rbp+var_28.__r_.__value_], 1                         ; +0xca, 0x1005e472a\njz      short loc_1005E4739                                            ; +0xce, 0x1005e472e\nmov     rdi, qword ptr [rbp+var_28.__r_.__value_+10h]; __p             ; +0xd0, 0x1005e4730\ncall    __ZdlPv; operator delete(void *)                               ; +0xd4, 0x1005e4734\nadd     rsp, 28h                                                       ; +0xd9, 0x1005e4739\npop     rbx                                                            ; +0xdd, 0x1005e473d\npop     rbp                                                            ; +0xde, 0x1005e473e\nretn                                                                   ; +0xdf, 0x1005e473f", "xrefs": ["CustomSFXWidget::FLAlert_Clicked @ 0x1005e4eb6", "sub_1005E4EC0 @ 0x1005e4f1d"], "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"}