{"type": "func", "start": 6442826480, "end": 6442826626, "name": "cocos2d::CCMenuItemSprite::setSelectedImage", "pseudocode": "// \n// cocos2d::CCMenuItemSprite::setSelectedImage from 0x18005baf0 to 0x18005bb82 (146 bytes)\n// \n// 6 xrefs:\n// > <???> @ 0x1800f8720\n// > <???> @ 0x1800f8b80\n// > <???> @ 0x180138da0\n// > <???> @ 0x180138db0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2f40\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::setSelectedImage(\n        cocos2d::CCMenuItemSprite *this,\n        struct cocos2d::CCNode *a2,\n        __int64 a3)\n{\n  cocos2d::CCNode_vtbl *v5; // rbx\n  float *v6; // rax\n  cocos2d::CCNode *m_pNormalImage; // rdx\n  cocos2d::CCMenuItemSprite_vtbl *v8; // rax\n  float v9; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( a2 != *(struct cocos2d::CCNode **)&this->m_nScriptTapHandler )\n  {\n    if ( a2 )\n    {\n      ((void (__fastcall *)(cocos2d::CCMenuItemSprite *, struct cocos2d::CCNode *, _QWORD, __int64))this->addChild)(\n        this,\n        a2,\n        0,\n        2);\n      v5 = a2->__vftable;\n      v6 = kmVec2Fill(&v9, 0.0, 0.0);\n      ((void (__fastcall *)(struct cocos2d::CCNode *, float *))v5->setAnchorPoint)(a2, v6);\n    }\n    m_pNormalImage = this->m_pNormalImage;\n    if ( m_pNormalImage )\n    {\n      LOBYTE(a3) = 1;\n      ((void (__fastcall *)(cocos2d::CCMenuItemSprite *, cocos2d::CCNode *, __int64))this->removeChild)(\n        this,\n        m_pNormalImage,\n        a3);\n    }\n    v8 = this->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    this->m_pNormalImage = a2;\n    ((void (__fastcall *)(cocos2d::CCMenuItemSprite *))v8->updateImagesVisibility)(this);\n  }\n}", "assembly": "; \n; cocos2d::CCMenuItemSprite::setSelectedImage from 0x18005baf0 to 0x18005bb82 (146 bytes)\n; \n; 6 xrefs:\n; > <???> @ 0x1800f8720\n; > <???> @ 0x1800f8b80\n; > <???> @ 0x180138da0\n; > <???> @ 0x180138db0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2f40\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_10], rsi                                              ; +0x0, 0x18005baf0\npush    rdi                                                            ; +0x5, 0x18005baf5\nsub     rsp, 20h                                                       ; +0x6, 0x18005baf6\nmov     rsi, rdx                                                       ; +0xa, 0x18005bafa\nmov     rdi, rcx                                                       ; +0xd, 0x18005bafd\ncmp     rdx, [rcx+178h]                                                ; +0x10, 0x18005bb00\njz      short loc_18005BB77                                            ; +0x17, 0x18005bb07\ntest    rdx, rdx                                                       ; +0x19, 0x18005bb09\njz      short loc_18005BB49                                            ; +0x1c, 0x18005bb0c\nmov     rax, [rcx]                                                     ; +0x1e, 0x18005bb0e\nmov     r9d, 2                                                         ; +0x21, 0x18005bb11\nxor     r8d, r8d                                                       ; +0x27, 0x18005bb17\nmov     [rsp+28h+arg_8], rbx                                           ; +0x2a, 0x18005bb1a\ncall    qword ptr [rax+1B0h]                                           ; +0x2f, 0x18005bb1f\nmov     rbx, [rsi]                                                     ; +0x35, 0x18005bb25\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x38, 0x18005bb28\nxorps   xmm2, xmm2                                                     ; +0x3d, 0x18005bb2d\nxorps   xmm1, xmm1                                                     ; +0x40, 0x18005bb30\ncall    kmVec2Fill                                                     ; +0x43, 0x18005bb33\nmov     rdx, rax                                                       ; +0x48, 0x18005bb38\nmov     rcx, rsi                                                       ; +0x4b, 0x18005bb3b\ncall    qword ptr [rbx+110h]                                           ; +0x4e, 0x18005bb3e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x54, 0x18005bb44\nmov     rdx, [rdi+180h]                                                ; +0x59, 0x18005bb49\ntest    rdx, rdx                                                       ; +0x60, 0x18005bb50\njz      short loc_18005BB64                                            ; +0x63, 0x18005bb53\nmov     rax, [rdi]                                                     ; +0x65, 0x18005bb55\nmov     r8b, 1                                                         ; +0x68, 0x18005bb58\nmov     rcx, rdi                                                       ; +0x6b, 0x18005bb5b\ncall    qword ptr [rax+208h]                                           ; +0x6e, 0x18005bb5e\nmov     rax, [rdi]                                                     ; +0x74, 0x18005bb64\nmov     rcx, rdi                                                       ; +0x77, 0x18005bb67\nmov     [rdi+180h], rsi                                                ; +0x7a, 0x18005bb6a\ncall    qword ptr [rax+3D8h]                                           ; +0x81, 0x18005bb71\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x87, 0x18005bb77\nadd     rsp, 20h                                                       ; +0x8c, 0x18005bb7c\npop     rdi                                                            ; +0x90, 0x18005bb80\nretn                                                                   ; +0x91, 0x18005bb81", "xrefs": ["<???> @ 0x1800f8720", "<???> @ 0x1800f8b80", "<???> @ 0x180138da0", "<???> @ 0x180138db0", "<???> @ 0x1801438a8", "<???> @ 0x1801b2f40"], "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"}