{"type": "func", "start": 4297144668, "end": 4297144864, "name": "CCMenuItemSpriteExtra::activate", "pseudocode": "// \n// CCMenuItemSpriteExtra::activate from 0x10021395c to 0x100213a20 (196 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1007c2cd8\n// > <???> @ 0x100815898\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 CCMenuItemSpriteExtra::activate(CCMenuItemSpriteExtra *a1)\n{\n  std::string *p_m_activateSound; // x21\n  FMODAudioEngine *v3; // x20\n  void *__p[2]; // [xsp+8h] [xbp-38h] BYREF\n  char v5; // [xsp+1Fh] [xbp-21h]\n\n  if ( a1->m_bEnabled )\n  {\n    cocos2d::CCNode::stopAllActions(a1);\n    if ( !a1->m_animationType )\n      ((void (__fastcall *)(CCMenuItemSpriteExtra *, float))a1->setScale)(a1, a1->m_baseScale);\n    if ( (a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] & 0x8000000000000000LL) != 0 )\n    {\n      if ( !a1->m_activateSound.m_data.m_long.size )\n      {\nLABEL_12:\n        cocos2d::CCMenuItem::activate(a1);\n        return;\n      }\n    }\n    else if ( !a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] )\n    {\n      goto LABEL_12;\n    }\n    p_m_activateSound = &a1->m_activateSound;\n    v3 = FMODAudioEngine::sharedEngine();\n    if ( a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      p_m_activateSound = (std::string *)p_m_activateSound->m_data.m_long.capacitym1;\n    sub_100009900(__p, (char *)p_m_activateSound);\n    FMODAudioEngine::playEffect((__int64)v3, (__int64)__p, 1.0, 0.0, a1->m_volume);\n    if ( v5 < 0 )\n      operator delete(__p[0]);\n    goto LABEL_12;\n  }\n}", "assembly": "; \n; CCMenuItemSpriteExtra::activate from 0x10021395c to 0x100213a20 (196 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1007c2cd8\n; > <???> @ 0x100815898\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x10021395c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x100213960\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100213964\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100213968\nADD             X29, SP, #0x40                                         ; +0x10, 0x10021396c\nLDRB            W8, [X0,#0x153]                                        ; +0x14, 0x100213970\nCMP             W8, #1                                                 ; +0x18, 0x100213974\nB.NE            loc_100213A0C                                          ; +0x1c, 0x100213978\nMOV             X19, X0                                                ; +0x20, 0x10021397c\nBL              cocos2d__CCNode__stopAllActions                        ; +0x24, 0x100213980\nLDR             W8, [X19,#0x1E4]                                       ; +0x28, 0x100213984\nCBNZ            W8, loc_1002139A0                                      ; +0x2c, 0x100213988\nLDR             S0, [X19,#0x194]                                       ; +0x30, 0x10021398c\nLDR             X8, [X19]                                              ; +0x34, 0x100213990\nLDR             X8, [X8,#0xA0]                                         ; +0x38, 0x100213994\nMOV             X0, X19                                                ; +0x3c, 0x100213998\nBLR             X8                                                     ; +0x40, 0x10021399c\nLDRSB           X8, [X19,#0x1B7]                                       ; +0x44, 0x1002139a0\nTBNZ            X8, #0x3F, loc_1002139B0 ; '?'                         ; +0x48, 0x1002139a4\nCBNZ            X8, loc_1002139B8                                      ; +0x4c, 0x1002139a8\nB               loc_100213A04                                          ; +0x50, 0x1002139ac\nLDR             X8, [X19,#0x1A8]                                       ; +0x54, 0x1002139b0\nCBZ             X8, loc_100213A04                                      ; +0x58, 0x1002139b4\nADD             X21, X19, #0x1A0                                       ; +0x5c, 0x1002139b8\nBL              FMODAudioEngine__sharedEngine                          ; +0x60, 0x1002139bc\nMOV             X20, X0                                                ; +0x64, 0x1002139c0\nLDRSB           W8, [X19,#0x1B7]                                       ; +0x68, 0x1002139c4\nTBZ             W8, #0x1F, loc_1002139D0                               ; +0x6c, 0x1002139c8\nLDR             X21, [X21]                                             ; +0x70, 0x1002139cc\nADD             X0, SP, #0x40+__p; int                                 ; +0x74, 0x1002139d0\nMOV             X1, X21; __s                                           ; +0x78, 0x1002139d4\nBL              sub_100009900                                          ; +0x7c, 0x1002139d8\nLDR             S2, [X19,#0x19C]                                       ; +0x80, 0x1002139dc\nADD             X1, SP, #0x40+__p                                      ; +0x84, 0x1002139e0\nFMOV            S0, #1.0                                               ; +0x88, 0x1002139e4\nFMOV            S1, WZR                                                ; +0x8c, 0x1002139e8\nMOV             X0, X20                                                ; +0x90, 0x1002139ec\nBL              FMODAudioEngine__playEffect                            ; +0x94, 0x1002139f0\nLDRSB           W8, [SP,#0x40+var_21]                                  ; +0x98, 0x1002139f4\nTBZ             W8, #0x1F, loc_100213A04                               ; +0x9c, 0x1002139f8\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0xa0, 0x1002139fc\nBL              __ZdlPv; operator delete(void *)                       ; +0xa4, 0x100213a00\nMOV             X0, X19                                                ; +0xa8, 0x100213a04\nBL              cocos2d__CCMenuItem__activate                          ; +0xac, 0x100213a08\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xb0, 0x100213a0c\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xb4, 0x100213a10\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xb8, 0x100213a14\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xbc, 0x100213a18\nRET                                                                    ; +0xc0, 0x100213a1c", "xrefs": ["<???> @ 0x1007c2cd8", "<???> @ 0x100815898"], "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"}