{"type": "func", "start": 6442824960, "end": 6442825123, "name": "cocos2d::CCMenuItemSprite::selected", "pseudocode": "// \n// cocos2d::CCMenuItemSprite::selected from 0x18005b500 to 0x18005b5a3 (163 bytes)\n// \n// 7 xrefs:\n// > <???> @ 0x1800f86d0\n// > <???> @ 0x1800f8b30\n// > <???> @ 0x180138e20\n// > <???> @ 0x180138e30\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2e14\n// > <???> @ 0x1801b2e20\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 cocos2d::CCMenuItemSprite::selected(cocos2d::CCMenuItemSprite *this, __int64 a2)\n{\n  bool v2; // zf\n  cocos2d::CCNode **p_m_pNormalImage; // rsi\n  cocos2d::CCNode *m_pSelectedImage; // rcx\n  cocos2d::CCNode **v6; // r14\n  cocos2d::CCNode *v7; // rcx\n  cocos2d::CCNode_vtbl *v8; // rax\n\n  v2 = this->m_pNormalImage == nullptr;\n  this->m_bSelected = 1;\n  if ( !v2 || this->m_pSelectedImage )\n  {\n    p_m_pNormalImage = &this->m_pNormalImage;\n    if ( *(_QWORD *)&this->m_nScriptTapHandler )\n    {\n      m_pSelectedImage = this->m_pSelectedImage;\n      v6 = &this->m_pNormalImage;\n      if ( m_pSelectedImage )\n      {\n        ((void (__fastcall *)(cocos2d::CCNode *, _QWORD))m_pSelectedImage->setVisible)(m_pSelectedImage, 0);\n        v6 = p_m_pNormalImage;\n      }\n      v7 = *(cocos2d::CCNode **)&this->m_nScriptTapHandler;\n      v8 = v7->__vftable;\n      if ( this->m_pNormalImage )\n      {\n        ((void (__fastcall *)(cocos2d::CCNode *, _QWORD))v8->setVisible)(v7, 0);\n        v7 = *v6;\n        v8 = (*v6)->__vftable;\n      }\n      LOBYTE(a2) = 1;\n      ((void (__fastcall *)(cocos2d::CCNode *, __int64))v8->setVisible)(v7, a2);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCMenuItemSprite::selected from 0x18005b500 to 0x18005b5a3 (163 bytes)\n; \n; 7 xrefs:\n; > <???> @ 0x1800f86d0\n; > <???> @ 0x1800f8b30\n; > <???> @ 0x180138e20\n; > <???> @ 0x180138e30\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2e14\n; > <???> @ 0x1801b2e20\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, 0x18005b500\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18005b505\npush    rdi                                                            ; +0xa, 0x18005b50a\nsub     rsp, 20h                                                       ; +0xb, 0x18005b50b\ncmp     qword ptr [rcx+180h], 0                                        ; +0xf, 0x18005b50f\nmov     rbx, rcx                                                       ; +0x17, 0x18005b517\nmov     byte ptr [rcx+158h], 1                                         ; +0x1a, 0x18005b51a\njnz     short loc_18005B52D                                            ; +0x21, 0x18005b521\ncmp     qword ptr [rcx+188h], 0                                        ; +0x23, 0x18005b523\njz      short loc_18005B593                                            ; +0x2b, 0x18005b52b\ncmp     qword ptr [rcx+178h], 0                                        ; +0x2d, 0x18005b52d\nlea     rsi, [rcx+180h]                                                ; +0x35, 0x18005b535\njz      short loc_18005B593                                            ; +0x3c, 0x18005b53c\nmov     rcx, [rcx+188h]                                                ; +0x3e, 0x18005b53e\nmov     [rsp+28h+arg_0], r14                                           ; +0x45, 0x18005b545\nlea     r14, [rbx+180h]                                                ; +0x4a, 0x18005b54a\ntest    rcx, rcx                                                       ; +0x51, 0x18005b551\njz      short loc_18005B564                                            ; +0x54, 0x18005b554\nmov     rax, [rcx]                                                     ; +0x56, 0x18005b556\nxor     edx, edx                                                       ; +0x59, 0x18005b559\ncall    qword ptr [rax+140h]                                           ; +0x5b, 0x18005b55b\nmov     r14, rsi                                                       ; +0x61, 0x18005b561\ncmp     qword ptr [rbx+180h], 0                                        ; +0x64, 0x18005b564\nmov     rcx, [rbx+178h]                                                ; +0x6c, 0x18005b56c\nmov     rax, [rcx]                                                     ; +0x73, 0x18005b573\njz      short loc_18005B586                                            ; +0x76, 0x18005b576\nxor     edx, edx                                                       ; +0x78, 0x18005b578\ncall    qword ptr [rax+140h]                                           ; +0x7a, 0x18005b57a\nmov     rcx, [r14]                                                     ; +0x80, 0x18005b580\nmov     rax, [rcx]                                                     ; +0x83, 0x18005b583\nmov     dl, 1                                                          ; +0x86, 0x18005b586\ncall    qword ptr [rax+140h]                                           ; +0x88, 0x18005b588\nmov     r14, [rsp+28h+arg_0]                                           ; +0x8e, 0x18005b58e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x93, 0x18005b593\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x98, 0x18005b598\nadd     rsp, 20h                                                       ; +0x9d, 0x18005b59d\npop     rdi                                                            ; +0xa1, 0x18005b5a1\nretn                                                                   ; +0xa2, 0x18005b5a2", "xrefs": ["<???> @ 0x1800f86d0", "<???> @ 0x1800f8b30", "<???> @ 0x180138e20", "<???> @ 0x180138e30", "<???> @ 0x1801438a8", "<???> @ 0x1801b2e14", "<???> @ 0x1801b2e20"], "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"}