{"type": "func", "start": 6442781984, "end": 6442782135, "name": "cocos2d::CCLayer::setMouseEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setMouseEnabled from 0x180050d20 to 0x180050db7 (151 bytes)\n// \n// 11 xrefs:\n// > <???> @ 0x1800ed2e0\n// > <???> @ 0x1800ed7a0\n// > <???> @ 0x1800edcd8\n// > <???> @ 0x1800ee240\n// > <???> @ 0x1800ee818\n// > <???> @ 0x1800f70e8\n// > <???> @ 0x1801380bc\n// > <???> @ 0x1801380d0\n// > <???> @ 0x1801380e0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b20e8\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::CCLayer::setMouseEnabled(cocos2d::CCLayer *this, bool a2)\n{\n  bool v4; // zf\n  struct cocos2d::CCDirector *v5; // rax\n  struct cocos2d::CCMouseDelegate *v6; // rsi\n  cocos2d::CCDirector_vtbl *v7; // rdx\n  cocos2d::CCMouseDispatcher *v8; // rax\n  cocos2d::CCMouseDispatcher *v9; // rax\n\n  if ( a2 != this->m_bMouseEnabled )\n  {\n    v4 = !this->m_bRunning;\n    this->m_bMouseEnabled = a2;\n    if ( !v4 )\n    {\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = &this->cocos2d::CCMouseDelegate;\n      v7 = v5->cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      if ( a2 )\n      {\n        if ( !this )\n          v6 = nullptr;\n        v8 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v7->getMouseDispatcher)(v5);\n        cocos2d::CCMouseDispatcher::addDelegate(v8, v6);\n      }\n      else\n      {\n        if ( !this )\n          v6 = nullptr;\n        v9 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v7->getMouseDispatcher)(v5);\n        cocos2d::CCMouseDispatcher::removeDelegate(v9, (struct cocos2d::CCObject *)v6);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setMouseEnabled from 0x180050d20 to 0x180050db7 (151 bytes)\n; \n; 11 xrefs:\n; > <???> @ 0x1800ed2e0\n; > <???> @ 0x1800ed7a0\n; > <???> @ 0x1800edcd8\n; > <???> @ 0x1800ee240\n; > <???> @ 0x1800ee818\n; > <???> @ 0x1800f70e8\n; > <???> @ 0x1801380bc\n; > <???> @ 0x1801380d0\n; > <???> @ 0x1801380e0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b20e8\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, 0x180050d20\npush    rdi                                                            ; +0x5, 0x180050d25\nsub     rsp, 20h                                                       ; +0x6, 0x180050d26\nmovzx   edi, dl                                                        ; +0xa, 0x180050d2a\nmov     rbx, rcx                                                       ; +0xd, 0x180050d2d\ncmp     dl, [rcx+16Ch]                                                 ; +0x10, 0x180050d30\njz      short loc_180050DAC                                            ; +0x16, 0x180050d36\ncmp     byte ptr [rcx+110h], 0                                         ; +0x18, 0x180050d38\nmov     [rcx+16Ch], dl                                                 ; +0x1f, 0x180050d3f\njz      short loc_180050DAC                                            ; +0x25, 0x180050d45\nmov     [rsp+28h+arg_0], rsi                                           ; +0x27, 0x180050d47\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x2c, 0x180050d4c\nxor     ecx, ecx                                                       ; +0x31, 0x180050d51\nlea     rsi, [rbx+160h]                                                ; +0x33, 0x180050d53\nmov     rdx, [rax]                                                     ; +0x3a, 0x180050d5a\ntest    dil, dil                                                       ; +0x3d, 0x180050d5d\njz      short loc_180050D8C                                            ; +0x40, 0x180050d60\ntest    rbx, rbx                                                       ; +0x42, 0x180050d62\ncmovz   rsi, rcx                                                       ; +0x45, 0x180050d65\nmov     rcx, rax                                                       ; +0x49, 0x180050d69\ncall    qword ptr [rdx+0C0h]                                           ; +0x4c, 0x180050d6c\nmov     rcx, rax; this                                                 ; +0x52, 0x180050d72\nmov     rdx, rsi; struct cocos2d::CCMouseDelegate *                    ; +0x55, 0x180050d75\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x58, 0x180050d78\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x5d, 0x180050d7d\nadd     rsp, 20h                                                       ; +0x62, 0x180050d82\npop     rdi                                                            ; +0x66, 0x180050d86\njmp     ?addDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::addDelegate(cocos2d::CCMouseDelegate *) ; +0x67, 0x180050d87\ntest    rbx, rbx                                                       ; +0x6c, 0x180050d8c\ncmovz   rsi, rcx                                                       ; +0x6f, 0x180050d8f\nmov     rcx, rax                                                       ; +0x73, 0x180050d93\ncall    qword ptr [rdx+0C0h]                                           ; +0x76, 0x180050d96\nmov     rcx, rax; this                                                 ; +0x7c, 0x180050d9c\nmov     rdx, rsi; struct cocos2d::CCMouseDelegate *                    ; +0x7f, 0x180050d9f\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x82, 0x180050da2\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x87, 0x180050da7\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x8c, 0x180050dac\nadd     rsp, 20h                                                       ; +0x91, 0x180050db1\npop     rdi                                                            ; +0x95, 0x180050db5\nretn                                                                   ; +0x96, 0x180050db6", "xrefs": ["<???> @ 0x1800ed2e0", "<???> @ 0x1800ed7a0", "<???> @ 0x1800edcd8", "<???> @ 0x1800ee240", "<???> @ 0x1800ee818", "<???> @ 0x1800f70e8", "<???> @ 0x1801380bc", "<???> @ 0x1801380d0", "<???> @ 0x1801380e0", "<???> @ 0x1801438a8", "<???> @ 0x1801b20e8"], "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"}