{"type": "func", "start": 5369502720, "end": 5369503257, "name": "CustomSFXWidget::onPlayback", "pseudocode": "// \n// CustomSFXWidget::onPlayback from 0x1400c1c00 to 0x1400c1e19 (537 bytes)\n// \n// 3 xrefs:\n// > CustomSFXWidget::downloadSFXFinished @ 0x1400c2670\n// > CustomSFXWidget::init @ 0x1400c0ee5\n// > <???> @ 0x1406c7f98\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\n// Hidden C++ exception states: #wind=5\nvoid CustomSFXWidget::onPlayback(CustomSFXWidget *a1, cocos2d::CCObject *a2)\n{\n  FMODAudioEngine *v3; // rcx\n  CustomSFXDelegate *m_delegate; // rcx\n  SFXInfoObject *m_sfxObject; // rbx\n  MusicDownloadManager *v6; // rax\n  _QWORD *v7; // rax\n  size_t v8; // r8\n  __int64 v9; // rbx\n  _QWORD *v10; // rax\n  FMODAudioEngine *v11; // [rsp+A0h] [rbp-88h]\n  FMODAudioEngine *v12; // [rsp+A8h] [rbp-80h]\n  __int128 v13; // [rsp+B0h] [rbp-78h] BYREF\n  __int64 v14; // [rsp+C0h] [rbp-68h]\n  __int64 v15; // [rsp+C8h] [rbp-60h]\n  __int128 *v16; // [rsp+D0h] [rbp-58h]\n  _BYTE v17[32]; // [rsp+D8h] [rbp-50h] BYREF\n  _BYTE v18[32]; // [rsp+F8h] [rbp-30h] BYREF\n\n  if ( a1->m_sfxObject )\n  {\n    v3 = (FMODAudioEngine *)qword_1406C2E88;\n    if ( !qword_1406C2E88 )\n    {\n      v11 = (FMODAudioEngine *)operator new(0x888u);\n      qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n      v3 = (FMODAudioEngine *)qword_1406C2E88;\n    }\n    FMODAudioEngine::stopAllEffects(v3);\n    m_delegate = a1->m_delegate;\n    if ( !m_delegate || !m_delegate->overridePlaySFX(m_delegate, a1->m_sfxObject) )\n    {\n      m_sfxObject = a1->m_sfxObject;\n      v6 = MusicDownloadManager::sharedState();\n      v7 = (_QWORD *)MusicDownloadManager::pathForSFX(v6, v18, (unsigned int)m_sfxObject->m_sfxID);\n      if ( v7[3] > 0xFu )\n        v7 = (_QWORD *)*v7;\n      v13 = 0;\n      v14 = 0;\n      v15 = 0;\n      v8 = -1;\n      do\n        ++v8;\n      while ( *((_BYTE *)v7 + v8) );\n      sub_14003A930(&v13, v7, v8);\n      v16 = &v13;\n      v9 = qword_1406C2E88;\n      if ( !qword_1406C2E88 )\n      {\n        v12 = (FMODAudioEngine *)operator new(0x888u);\n        qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v12);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n        v9 = qword_1406C2E88;\n      }\n      v10 = (_QWORD *)sub_14003BDB0((__int64)v17, (__int64)&v13);\n      FMODAudioEngine::playEffectAdvanced(v9, v10, 1.0, 0.0, 1.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0.0, 0);\n      sub_14003A830((__int64)&v13);\n      sub_14003A830((__int64)v18);\n    }\n  }\n}", "assembly": "; \n; CustomSFXWidget::onPlayback from 0x1400c1c00 to 0x1400c1e19 (537 bytes)\n; \n; 3 xrefs:\n; > CustomSFXWidget::downloadSFXFinished @ 0x1400c2670\n; > CustomSFXWidget::init @ 0x1400c0ee5\n; > <???> @ 0x1406c7f98\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1400c1c00\npush    rdi                                                            ; +0x5, 0x1400c1c05\nsub     rsp, 120h                                                      ; +0x6, 0x1400c1c06\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x1400c1c0d\nxor     rax, rsp                                                       ; +0x14, 0x1400c1c14\nmov     [rsp+128h+var_10], rax                                         ; +0x17, 0x1400c1c17\nmov     rbx, rcx                                                       ; +0x1f, 0x1400c1c1f\ncmp     qword ptr [rcx+150h], 0                                        ; +0x22, 0x1400c1c22\njz      loc_1400C1DF8                                                  ; +0x2a, 0x1400c1c2a\nmov     rcx, cs:qword_1406C2E88                                        ; +0x30, 0x1400c1c30\ntest    rcx, rcx                                                       ; +0x37, 0x1400c1c37\njnz     short loc_1400C1C6E                                            ; +0x3a, 0x1400c1c3a\nmov     ecx, 888h; Size                                                ; +0x3c, 0x1400c1c3c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x41, 0x1400c1c41\nmov     [rsp+128h+var_88], rax                                         ; +0x46, 0x1400c1c46\nmov     rcx, rax                                                       ; +0x4e, 0x1400c1c4e\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x51, 0x1400c1c51\nnop                                                                    ; +0x56, 0x1400c1c56\nmov     cs:qword_1406C2E88, rax                                        ; +0x57, 0x1400c1c57\nmov     rdx, [rax]                                                     ; +0x5e, 0x1400c1c5e\nmov     rcx, rax                                                       ; +0x61, 0x1400c1c61\ncall    qword ptr [rdx+48h]                                            ; +0x64, 0x1400c1c64\nmov     rcx, cs:qword_1406C2E88                                        ; +0x67, 0x1400c1c67\ncall    FMODAudioEngine__stopAllEffects                                ; +0x6e, 0x1400c1c6e\nmov     rcx, [rbx+1B8h]                                                ; +0x73, 0x1400c1c73\ntest    rcx, rcx                                                       ; +0x7a, 0x1400c1c7a\njz      short loc_1400C1C94                                            ; +0x7d, 0x1400c1c7d\nmov     rax, [rcx]                                                     ; +0x7f, 0x1400c1c7f\nmov     rdx, [rbx+150h]                                                ; +0x82, 0x1400c1c82\ncall    qword ptr [rax+10h]                                            ; +0x89, 0x1400c1c89\ntest    al, al                                                         ; +0x8c, 0x1400c1c8c\njnz     loc_1400C1DF8                                                  ; +0x8e, 0x1400c1c8e\nlea     rax, [rsp+128h+var_78]                                         ; +0x94, 0x1400c1c94\nmov     [rsp+128h+var_88], rax                                         ; +0x9c, 0x1400c1c9c\nmov     rbx, [rbx+150h]                                                ; +0xa4, 0x1400c1ca4\ncall    MusicDownloadManager__sharedState                              ; +0xab, 0x1400c1cab\nmov     rcx, rax                                                       ; +0xb0, 0x1400c1cb0\nmov     r8d, [rbx+38h]                                                 ; +0xb3, 0x1400c1cb3\nlea     rdx, [rsp+128h+var_30]                                         ; +0xb7, 0x1400c1cb7\ncall    MusicDownloadManager__pathForSFX                               ; +0xbf, 0x1400c1cbf\nnop                                                                    ; +0xc4, 0x1400c1cc4\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xc5, 0x1400c1cc5\njbe     short loc_1400C1CCF                                            ; +0xca, 0x1400c1cca\nmov     rax, [rax]                                                     ; +0xcc, 0x1400c1ccc\nxorps   xmm0, xmm0                                                     ; +0xcf, 0x1400c1ccf\nmovups  [rsp+128h+var_78], xmm0                                        ; +0xd2, 0x1400c1cd2\nxor     edi, edi                                                       ; +0xda, 0x1400c1cda\nmov     [rsp+128h+var_68], rdi                                         ; +0xdc, 0x1400c1cdc\nmov     [rsp+128h+var_60], rdi                                         ; +0xe4, 0x1400c1ce4\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xec, 0x1400c1cec\ninc     r8                                                             ; +0xf3, 0x1400c1cf3\ncmp     [rax+r8], dil                                                  ; +0xf6, 0x1400c1cf6\njnz     short loc_1400C1CF3                                            ; +0xfa, 0x1400c1cfa\nmov     rdx, rax                                                       ; +0xfc, 0x1400c1cfc\nlea     rcx, [rsp+128h+var_78]                                         ; +0xff, 0x1400c1cff\ncall    sub_14003A930                                                  ; +0x107, 0x1400c1d07\nlea     rax, [rsp+128h+var_78]                                         ; +0x10c, 0x1400c1d0c\nmov     [rsp+128h+var_58], rax                                         ; +0x114, 0x1400c1d14\nmov     rbx, cs:qword_1406C2E88                                        ; +0x11c, 0x1400c1d1c\ntest    rbx, rbx                                                       ; +0x123, 0x1400c1d23\njnz     short loc_1400C1D5A                                            ; +0x126, 0x1400c1d26\nmov     ecx, 888h; Size                                                ; +0x128, 0x1400c1d28\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x12d, 0x1400c1d2d\nmov     [rsp+128h+var_80], rax                                         ; +0x132, 0x1400c1d32\nmov     rcx, rax                                                       ; +0x13a, 0x1400c1d3a\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x13d, 0x1400c1d3d\nnop                                                                    ; +0x142, 0x1400c1d42\nmov     cs:qword_1406C2E88, rax                                        ; +0x143, 0x1400c1d43\nmov     rdx, [rax]                                                     ; +0x14a, 0x1400c1d4a\nmov     rcx, rax                                                       ; +0x14d, 0x1400c1d4d\ncall    qword ptr [rdx+48h]                                            ; +0x150, 0x1400c1d50\nmov     rbx, cs:qword_1406C2E88                                        ; +0x153, 0x1400c1d53\nlea     rdx, [rsp+128h+var_78]                                         ; +0x15a, 0x1400c1d5a\nlea     rcx, [rsp+128h+var_50]                                         ; +0x162, 0x1400c1d62\ncall    sub_14003BDB0                                                  ; +0x16a, 0x1400c1d6a\nmov     [rsp+128h+var_90], edi                                         ; +0x16f, 0x1400c1d6f\nxorps   xmm3, xmm3                                                     ; +0x176, 0x1400c1d76\nmovss   [rsp+128h+var_98], xmm3                                        ; +0x179, 0x1400c1d79\nmov     [rsp+128h+var_A0], edi                                         ; +0x182, 0x1400c1d82\nmov     [rsp+128h+var_A8], edi                                         ; +0x189, 0x1400c1d89\nmov     [rsp+128h+var_B0], 1                                           ; +0x190, 0x1400c1d90\nmov     [rsp+128h+var_B8], 0                                           ; +0x195, 0x1400c1d95\nmov     [rsp+128h+var_C0], edi                                         ; +0x19a, 0x1400c1d9a\nmov     [rsp+128h+var_C8], 0                                           ; +0x19e, 0x1400c1d9e\nmov     [rsp+128h+var_D0], edi                                         ; +0x1a3, 0x1400c1da3\nmov     [rsp+128h+var_D8], edi                                         ; +0x1a7, 0x1400c1da7\nmov     [rsp+128h+var_E0], edi                                         ; +0x1ab, 0x1400c1dab\nmov     [rsp+128h+var_E8], edi                                         ; +0x1af, 0x1400c1daf\nmov     [rsp+128h+var_F0], 0                                           ; +0x1b3, 0x1400c1db3\nmov     [rsp+128h+var_F8], 0                                           ; +0x1b8, 0x1400c1db8\nmovss   [rsp+128h+var_100], xmm3                                       ; +0x1bd, 0x1400c1dbd\nmovss   xmm2, cs:flt_140622C24                                         ; +0x1c3, 0x1400c1dc3\nmovss   [rsp+128h+var_108], xmm2                                       ; +0x1cb, 0x1400c1dcb\nmov     rdx, rax                                                       ; +0x1d1, 0x1400c1dd1\nmov     rcx, rbx                                                       ; +0x1d4, 0x1400c1dd4\ncall    FMODAudioEngine__playEffectAdvanced                            ; +0x1d7, 0x1400c1dd7\nnop                                                                    ; +0x1dc, 0x1400c1ddc\nlea     rcx, [rsp+128h+var_78]                                         ; +0x1dd, 0x1400c1ddd\ncall    sub_14003A830                                                  ; +0x1e5, 0x1400c1de5\nnop                                                                    ; +0x1ea, 0x1400c1dea\nlea     rcx, [rsp+128h+var_30]                                         ; +0x1eb, 0x1400c1deb\ncall    sub_14003A830                                                  ; +0x1f3, 0x1400c1df3\nmov     rcx, [rsp+128h+var_10]                                         ; +0x1f8, 0x1400c1df8\nxor     rcx, rsp; StackCookie                                          ; +0x200, 0x1400c1e00\ncall    __security_check_cookie                                        ; +0x203, 0x1400c1e03\nmov     rbx, [rsp+128h+arg_8]                                          ; +0x208, 0x1400c1e08\nadd     rsp, 120h                                                      ; +0x210, 0x1400c1e10\npop     rdi                                                            ; +0x217, 0x1400c1e17\nretn                                                                   ; +0x218, 0x1400c1e18", "xrefs": ["CustomSFXWidget::downloadSFXFinished @ 0x1400c2670", "CustomSFXWidget::init @ 0x1400c0ee5", "<???> @ 0x1406c7f98"], "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"}