{"type": "func", "start": 3040572, "end": 3040904, "name": "CCMenuItemSpriteExtra::selected", "pseudocode": "// \n// CCMenuItemSpriteExtra::selected from 0x2e653c to 0x2e6688 (332 bytes)\n// \n// 0 xrefs:\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 CCMenuItemSpriteExtra::selected(CCMenuItemSpriteExtra *a1)\n{\n  FMODAudioEngine *v2; // r7\n  float v3; // s16\n  cocos2d::CCNode *v4; // r0\n  int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r2\n  MenuAnimationType m_animationType; // r5\n  float v7; // r2\n  cocos2d::CCActionInterval *v8; // r0\n  cocos2d::CCEaseBounceOut *v9; // r7\n  CCMenuItemSpriteExtra *v10; // r0\n  cocos2d::CCAction *v11; // r1\n  cocos2d::CCNode *v12; // r7\n  float m_duration; // r8\n  cocos2d::CCMoveTo *v14; // r0\n  cocos2d::CCEaseInOut *v15; // r4\n  cocos2d::CCPoint v16; // [sp+14h] [bp-Ch] BYREF\n\n  if ( a1->m_bEnabled )\n  {\n    cocos2d::CCMenuItemSprite::selected(a1);\n    if ( *((_DWORD *)a1->m_selectSound.m_data.m_data - 3) )\n    {\n      v2 = FMODAudioEngine::sharedEngine();\n      sub_776584((int)&v16, (char *)a1->m_selectSound.m_data.m_data);\n      FMODAudioEngine::playEffect((int)v2, (int)&v16, 1065353216, 0, a1->m_volume);\n      sub_774008(&v16);\n    }\n    if ( a1->m_colorEnabled )\n    {\n      v3 = a1->m_colorDip * 255.0;\n      v4 = a1->getNormalImage(a1);\n      getTag = v4->__vftable[1].getTag;\n      LOBYTE(v16.x) = (unsigned int)v3;\n      BYTE1(v16.x) = LOBYTE(v16.x);\n      BYTE2(v16.x) = LOBYTE(v16.x);\n      ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *))getTag)(v4, &v16);\n    }\n    if ( a1->m_animationEnabled )\n    {\n      m_animationType = a1->m_animationType;\n      if ( m_animationType )\n      {\n        if ( m_animationType != Move )\n          return;\n        v12 = a1->getNormalImage(a1);\n        cocos2d::CCNode::stopActionByTag(v12, 0);\n        m_duration = a1->m_duration;\n        cocos2d::CCPoint::operator+(&v16, &a1->m_startPosition, &a1->m_offset);\n        v14 = cocos2d::CCMoveTo::create(m_duration, &v16);\n        v15 = cocos2d::CCEaseInOut::create(v14, 1.5);\n        v15->setTag(v15, 0);\n        v10 = (CCMenuItemSpriteExtra *)v12;\n        v11 = v15;\n      }\n      else\n      {\n        cocos2d::CCNode::stopActionByTag(a1, 0);\n        v8 = (cocos2d::CCActionInterval *)cocos2d::CCScaleTo::create(\n                                            (cocos2d::CCScaleTo *)LODWORD(a1->m_duration),\n                                            a1->m_baseScale * a1->m_scaleMultiplier,\n                                            v7);\n        v9 = cocos2d::CCEaseBounceOut::create(v8);\n        v9->setTag(v9, 0);\n        v10 = a1;\n        v11 = v9;\n      }\n      cocos2d::CCNode::runAction(v10, v11);\n    }\n  }\n}", "assembly": "; \n; CCMenuItemSpriteExtra::selected from 0x2e653c to 0x2e6688 (332 bytes)\n; \n; 0 xrefs:\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\nLDR             R2, =(__stack_chk_guard_ptr - 0x2E6546)                ; +0x0, 0x2e653c\nPUSH.W          {R4-R8,LR}                                             ; +0x2, 0x2e653e\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x6, 0x2e6542\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x8, 0x2e6544\nVPUSH           {D8}                                                   ; +0xa, 0x2e6546\nMOV             R4, R0                                                 ; +0xe, 0x2e654a\nLDR             R3, [R2]                                               ; +0x10, 0x2e654c\nMOV             R6, R2                                                 ; +0x12, 0x2e654e\nSUB             SP, SP, #0x20                                          ; +0x14, 0x2e6550\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x16, 0x2e6552\nLDRB.W          R3, [R0,#0x117]                                        ; +0x18, 0x2e6554\nCMP             R3, #0                                                 ; +0x1c, 0x2e6558\nBEQ.W           loc_2E6672                                             ; +0x1e, 0x2e655a\nBL              _ZN7cocos2d16CCMenuItemSprite8selectedEv; cocos2d::CCMenuItemSprite::selected(void) ; +0x22, 0x2e655e\nLDR.W           R3, [R4,#0x14C]                                        ; +0x26, 0x2e6562\nLDR.W           R3, [R3,#-0xC]                                         ; +0x2a, 0x2e6566\nCBZ             R3, loc_2E659A                                         ; +0x2e, 0x2e656a\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x30, 0x2e656c\nADD             R5, SP, #0x20+var_C                                    ; +0x34, 0x2e6570\nLDR.W           R1, [R4,#0x14C]; char *                                ; +0x36, 0x2e6572\nADD             R2, SP, #0x20+var_10                                   ; +0x3a, 0x2e6576\nMOV             R7, R0                                                 ; +0x3c, 0x2e6578\nMOV             R0, R5; int                                            ; +0x3e, 0x2e657a\nBL              sub_776584                                             ; +0x40, 0x2e657c\nLDR.W           R3, [R4,#0x144]                                        ; +0x44, 0x2e6580\nMOV             R0, R7; int                                            ; +0x48, 0x2e6584\nMOV             R1, R5; int                                            ; +0x4a, 0x2e6586\nMOV.W           R2, #0x3F800000; int                                   ; +0x4c, 0x2e6588\nSTR             R3, [SP,#0x20+var_20]; float                           ; +0x50, 0x2e658c\nMOVS            R3, #0; int                                            ; +0x52, 0x2e658e\nBL              _ZN15FMODAudioEngine10playEffectESsfff; FMODAudioEngine::playEffect(std::string,float,float,float) ; +0x54, 0x2e6590\nMOV             R0, R5                                                 ; +0x58, 0x2e6594\nBL              sub_774008                                             ; +0x5a, 0x2e6596\nLDRB.W          R3, [R4,#0x141]                                        ; +0x5e, 0x2e659a\nCBZ             R3, loc_2E65D8                                         ; +0x62, 0x2e659e\nVLDR            S15, [R4,#0x150]                                       ; +0x64, 0x2e65a0\nMOV             R0, R4                                                 ; +0x68, 0x2e65a4\nLDR             R3, [R4]                                               ; +0x6a, 0x2e65a6\nVLDR            S16, =255.0                                            ; +0x6c, 0x2e65a8\nLDR.W           R3, [R3,#0x210]                                        ; +0x70, 0x2e65ac\nVMUL.F32        S16, S15, S16                                          ; +0x74, 0x2e65b0\nBLX             R3                                                     ; +0x78, 0x2e65b4\nADD             R1, SP, #0x20+var_C                                    ; +0x7a, 0x2e65b6\nVCVT.U32.F32    S16, S16                                               ; +0x7c, 0x2e65b8\nVSTR            S16, [SP,#0x20+var_14]                                 ; +0x80, 0x2e65bc\nLDR             R3, [R0]                                               ; +0x84, 0x2e65c0\nLDR.W           R2, [R3,#0x1D8]                                        ; +0x86, 0x2e65c2\nLDRB.W          R3, [SP,#0x20+var_14]                                  ; +0x8a, 0x2e65c6\nSTRB.W          R3, [SP,#0x20+var_C]                                   ; +0x8e, 0x2e65ca\nSTRB.W          R3, [SP,#0x20+var_B]                                   ; +0x92, 0x2e65ce\nSTRB.W          R3, [SP,#0x20+var_A]                                   ; +0x96, 0x2e65d2\nBLX             R2                                                     ; +0x9a, 0x2e65d6\nLDRB.W          R3, [R4,#0x140]                                        ; +0x9c, 0x2e65d8\nCMP             R3, #0                                                 ; +0xa0, 0x2e65dc\nBEQ             loc_2E6672                                             ; +0xa2, 0x2e65de\nLDR.W           R5, [R4,#0x164]                                        ; +0xa4, 0x2e65e0\nCBNZ            R5, loc_2E661A                                         ; +0xa8, 0x2e65e4\nMOV             R0, R4; this                                           ; +0xaa, 0x2e65e6\nMOV             R1, R5; int                                            ; +0xac, 0x2e65e8\nBL              _ZN7cocos2d6CCNode15stopActionByTagEi; cocos2d::CCNode::stopActionByTag(int) ; +0xae, 0x2e65ea\nVLDR            S14, [R4,#0x13C]                                       ; +0xb2, 0x2e65ee\nLDR.W           R0, [R4,#0x15C]; this                                  ; +0xb6, 0x2e65f2\nVLDR            S15, [R4,#0x138]                                       ; +0xba, 0x2e65f6\nVMUL.F32        S15, S14, S15                                          ; +0xbe, 0x2e65fa\nVMOV            R1, S15; float                                         ; +0xc2, 0x2e65fe\nBL              _ZN7cocos2d9CCScaleTo6createEff; cocos2d::CCScaleTo::create(float,float) ; +0xc6, 0x2e6602\nBL              _ZN7cocos2d15CCEaseBounceOut6createEPNS_16CCActionIntervalE; cocos2d::CCEaseBounceOut::create(cocos2d::CCActionInterval *) ; +0xca, 0x2e6606\nMOV             R1, R5                                                 ; +0xce, 0x2e660a\nLDR             R3, [R0]                                               ; +0xd0, 0x2e660c\nMOV             R7, R0                                                 ; +0xd2, 0x2e660e\nLDR             R3, [R3,#0x24]                                         ; +0xd4, 0x2e6610\nBLX             R3                                                     ; +0xd6, 0x2e6612\nMOV             R0, R4                                                 ; +0xd8, 0x2e6614\nMOV             R1, R7                                                 ; +0xda, 0x2e6616\nB               loc_2E6662                                             ; +0xdc, 0x2e6618\nCMP             R5, #1                                                 ; +0xde, 0x2e661a\nBNE             loc_2E6672                                             ; +0xe0, 0x2e661c\nLDR             R3, [R4]                                               ; +0xe2, 0x2e661e\nMOV             R0, R4                                                 ; +0xe4, 0x2e6620\nADD             R5, SP, #0x20+var_C                                    ; +0xe6, 0x2e6622\nLDR.W           R3, [R3,#0x210]                                        ; +0xe8, 0x2e6624\nBLX             R3                                                     ; +0xec, 0x2e6628\nMOVS            R1, #0; int                                            ; +0xee, 0x2e662a\nMOV             R7, R0                                                 ; +0xf0, 0x2e662c\nBL              _ZN7cocos2d6CCNode15stopActionByTagEi; cocos2d::CCNode::stopActionByTag(int) ; +0xf2, 0x2e662e\nLDR.W           R8, [R4,#0x15C]                                        ; +0xf6, 0x2e6632\nADD.W           R2, R4, #0x154                                         ; +0xfa, 0x2e6636\nADD.W           R1, R4, #0x168                                         ; +0xfe, 0x2e663a\nMOV             R0, R5                                                 ; +0x102, 0x2e663e\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x104, 0x2e6640\nMOV             R1, R5; float                                          ; +0x108, 0x2e6644\nMOV             R0, R8; this                                           ; +0x10a, 0x2e6646\nBL              _ZN7cocos2d8CCMoveTo6createEfRKNS_7CCPointE; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const&) ; +0x10c, 0x2e6648\nMOV.W           R1, #0x3FC00000; cocos2d::CCActionInterval *           ; +0x110, 0x2e664c\nBL              _ZN7cocos2d11CCEaseInOut6createEPNS_16CCActionIntervalEf; cocos2d::CCEaseInOut::create(cocos2d::CCActionInterval *,float) ; +0x114, 0x2e6650\nMOVS            R1, #0                                                 ; +0x118, 0x2e6654\nLDR             R3, [R0]                                               ; +0x11a, 0x2e6656\nMOV             R4, R0                                                 ; +0x11c, 0x2e6658\nLDR             R3, [R3,#0x24]                                         ; +0x11e, 0x2e665a\nBLX             R3                                                     ; +0x120, 0x2e665c\nMOV             R0, R7; this                                           ; +0x122, 0x2e665e\nMOV             R1, R4; cocos2d::CCAction *                            ; +0x124, 0x2e6660\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x126, 0x2e6662\nB               loc_2E6672                                             ; +0x12a, 0x2e6666\nMOV             R0, R5                                                 ; +0x12c, 0x2e6668\nBL              sub_774008                                             ; +0x12e, 0x2e666a\nBL              __cxa_end_cleanup                                      ; +0x132, 0x2e666e\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x136, 0x2e6672\nLDR             R3, [R6]                                               ; +0x138, 0x2e6674\nCMP             R2, R3                                                 ; +0x13a, 0x2e6676\nBEQ             loc_2E667E                                             ; +0x13c, 0x2e6678\nBLX             __stack_chk_fail                                       ; +0x13e, 0x2e667a\nADD             SP, SP, #0x20 ; ' '                                    ; +0x142, 0x2e667e\nVPOP            {D8}                                                   ; +0x144, 0x2e6680\nPOP.W           {R4-R8,PC}                                             ; +0x148, 0x2e6684", "xrefs": [], "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"}