{"type": "func", "start": 5368991152, "end": 5368991415, "name": "CCMenuItemSpriteExtra::activate", "pseudocode": "// \n// CCMenuItemSpriteExtra::activate from 0x140044db0 to 0x140044eb7 (263 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x14052ec78\n// > <???> @ 0x1405539b8\n// > <???> @ 0x1406c468c\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=2\nvoid CCMenuItemSpriteExtra::activate(CCMenuItemSpriteExtra *a1)\n{\n  bool *p_m_animationEnabled; // rdx\n  size_t v3; // r8\n  int v4; // r8d\n  int v5; // r9d\n  int v6; // ecx\n  __int128 v7; // [rsp+30h] [rbp-28h] BYREF\n  __int64 v8; // [rsp+40h] [rbp-18h]\n  __int64 v9; // [rsp+48h] [rbp-10h]\n  FMODAudioEngine *v10; // [rsp+68h] [rbp+10h]\n\n  if ( a1->m_bEnabled )\n  {\n    cocos2d::CCNode::stopAllActions(a1);\n    if ( !LODWORD(a1->m_duration) )\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *))a1->setScale_0)(a1);\n    if ( *((_QWORD *)&a1->m_activateSound.m_data.m_bigStorage + 1) )\n    {\n      p_m_animationEnabled = &a1->m_animationEnabled;\n      if ( a1->m_activateSound.m_data.m_size > 0xF )\n        p_m_animationEnabled = *(bool **)p_m_animationEnabled;\n      v7 = 0;\n      v8 = 0;\n      v9 = 0;\n      v3 = -1;\n      do\n        ++v3;\n      while ( p_m_animationEnabled[v3] );\n      sub_14003A930(&v7, p_m_animationEnabled, v3);\n      v6 = qword_1406C2E88;\n      if ( !qword_1406C2E88 )\n      {\n        v10 = (FMODAudioEngine *)operator new(0x888u);\n        qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v10);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n        v6 = qword_1406C2E88;\n      }\n      FMODAudioEngine::playEffect(v6, (unsigned int)&v7, v4, v5, LODWORD(a1->m_baseScale));\n    }\n    cocos2d::CCMenuItem::activate(a1);\n  }\n}", "assembly": "; \n; CCMenuItemSpriteExtra::activate from 0x140044db0 to 0x140044eb7 (263 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x14052ec78\n; > <???> @ 0x1405539b8\n; > <???> @ 0x1406c468c\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    rbx                                                            ; +0x0, 0x140044db0\nsub     rsp, 50h                                                       ; +0x2, 0x140044db2\nmov     rbx, rcx                                                       ; +0x6, 0x140044db6\ncmp     byte ptr [rcx+159h], 0                                         ; +0x9, 0x140044db9\njz      loc_140044EB1                                                  ; +0x10, 0x140044dc0\ncall    cs:?stopAllActions@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::stopAllActions(void) ; +0x16, 0x140044dc6\ncmp     dword ptr [rbx+1F4h], 0                                        ; +0x1c, 0x140044dcc\njnz     short loc_140044DE9                                            ; +0x23, 0x140044dd3\nmov     rax, [rbx]                                                     ; +0x25, 0x140044dd5\nmovss   xmm1, dword ptr [rbx+194h]                                     ; +0x28, 0x140044dd8\nmov     rcx, rbx                                                       ; +0x30, 0x140044de0\ncall    qword ptr [rax+0A0h]                                           ; +0x33, 0x140044de3\ncmp     qword ptr [rbx+1B0h], 0                                        ; +0x39, 0x140044de9\njz      loc_140044EA2                                                  ; +0x41, 0x140044df1\nlea     rax, [rsp+58h+var_28]                                          ; +0x47, 0x140044df7\nmov     [rsp+58h+arg_0], rax                                           ; +0x4c, 0x140044dfc\nlea     rdx, [rbx+1A0h]                                                ; +0x51, 0x140044e01\ncmp     qword ptr [rdx+18h], 0Fh                                       ; +0x58, 0x140044e08\njbe     short loc_140044E12                                            ; +0x5d, 0x140044e0d\nmov     rdx, [rdx]                                                     ; +0x5f, 0x140044e0f\nxorps   xmm0, xmm0                                                     ; +0x62, 0x140044e12\nmovups  [rsp+58h+var_28], xmm0                                         ; +0x65, 0x140044e15\nxor     eax, eax                                                       ; +0x6a, 0x140044e1a\nmov     [rsp+58h+var_18], rax                                          ; +0x6c, 0x140044e1c\nmov     [rsp+58h+var_10], rax                                          ; +0x71, 0x140044e21\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x76, 0x140044e26\nnop     dword ptr [rax]                                                ; +0x7d, 0x140044e2d\ninc     r8                                                             ; +0x80, 0x140044e30\ncmp     [rdx+r8], al                                                   ; +0x83, 0x140044e33\njnz     short loc_140044E30                                            ; +0x87, 0x140044e37\nlea     rcx, [rsp+58h+var_28]                                          ; +0x89, 0x140044e39\ncall    sub_14003A930                                                  ; +0x8e, 0x140044e3e\nnop                                                                    ; +0x93, 0x140044e43\nmov     rcx, cs:qword_1406C2E88                                        ; +0x94, 0x140044e44\ntest    rcx, rcx                                                       ; +0x9b, 0x140044e4b\njnz     short loc_140044E7F                                            ; +0x9e, 0x140044e4e\nmov     ecx, 888h; Size                                                ; +0xa0, 0x140044e50\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa5, 0x140044e55\nmov     [rsp+58h+arg_8], rax                                           ; +0xaa, 0x140044e5a\nmov     rcx, rax                                                       ; +0xaf, 0x140044e5f\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xb2, 0x140044e62\nnop                                                                    ; +0xb7, 0x140044e67\nmov     cs:qword_1406C2E88, rax                                        ; +0xb8, 0x140044e68\nmov     rdx, [rax]                                                     ; +0xbf, 0x140044e6f\nmov     rcx, rax                                                       ; +0xc2, 0x140044e72\ncall    qword ptr [rdx+48h]                                            ; +0xc5, 0x140044e75\nmov     rcx, cs:qword_1406C2E88                                        ; +0xc8, 0x140044e78\nmovss   xmm0, dword ptr [rbx+19Ch]                                     ; +0xcf, 0x140044e7f\nmovss   [rsp+58h+var_38], xmm0                                         ; +0xd7, 0x140044e87\nxorps   xmm3, xmm3                                                     ; +0xdd, 0x140044e8d\nmovss   xmm2, cs:flt_140622C24                                         ; +0xe0, 0x140044e90\nlea     rdx, [rsp+58h+var_28]                                          ; +0xe8, 0x140044e98\ncall    FMODAudioEngine__playEffect                                    ; +0xed, 0x140044e9d\nmov     rcx, rbx                                                       ; +0xf2, 0x140044ea2\nadd     rsp, 50h                                                       ; +0xf5, 0x140044ea5\npop     rbx                                                            ; +0xf9, 0x140044ea9\njmp     cs:__imp_?activate@CCMenuItem@cocos2d@@UEAAXXZ; cocos2d::CCMenuItem::activate(void) ; +0xfa, 0x140044eaa\nadd     rsp, 50h                                                       ; +0x101, 0x140044eb1\npop     rbx                                                            ; +0x105, 0x140044eb5\nretn                                                                   ; +0x106, 0x140044eb6", "xrefs": ["<???> @ 0x14052ec78", "<???> @ 0x1405539b8", "<???> @ 0x1406c468c"], "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"}