{"type": "func", "start": 6442782384, "end": 6442782496, "name": "cocos2d::CCLayer::setTouchEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setTouchEnabled from 0x180050eb0 to 0x180050f20 (112 bytes)\n// \n// 10 xrefs:\n// > <???> @ 0x1800ed278\n// > <???> @ 0x1800ed738\n// > <???> @ 0x1800edc70\n// > <???> @ 0x1800ee1d8\n// > <???> @ 0x1800ee7b0\n// > <???> @ 0x1800f7080\n// > <???> @ 0x18013801c\n// > <???> @ 0x18013802c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2148\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::setTouchEnabled(cocos2d::CCLayer *this, bool a2)\n{\n  bool v3; // zf\n  struct cocos2d::CCDirector *v4; // rax\n  struct cocos2d::CCTouchDelegate *v5; // rbx\n  cocos2d::CCTouchDispatcher *v6; // rax\n\n  if ( this->m_bTouchEnabled != a2 )\n  {\n    v3 = !this->m_bRunning;\n    this->m_bTouchEnabled = a2;\n    if ( !v3 )\n    {\n      if ( a2 )\n      {\n        ((void (__fastcall *)(cocos2d::CCLayer *))this->registerWithTouchDispatcher)(this);\n      }\n      else\n      {\n        v4 = cocos2d::CCDirector::sharedDirector();\n        v5 = &this->cocos2d::CCTouchDelegate;\n        if ( !this )\n          v5 = nullptr;\n        v6 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v4->getTouchDispatcher)(v4);\n        cocos2d::CCTouchDispatcher::removeDelegate(v6, v5);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setTouchEnabled from 0x180050eb0 to 0x180050f20 (112 bytes)\n; \n; 10 xrefs:\n; > <???> @ 0x1800ed278\n; > <???> @ 0x1800ed738\n; > <???> @ 0x1800edc70\n; > <???> @ 0x1800ee1d8\n; > <???> @ 0x1800ee7b0\n; > <???> @ 0x1800f7080\n; > <???> @ 0x18013801c\n; > <???> @ 0x18013802c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2148\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\npush    rdi                                                            ; +0x0, 0x180050eb0\nsub     rsp, 20h                                                       ; +0x2, 0x180050eb2\nmov     rdi, rcx                                                       ; +0x6, 0x180050eb6\ncmp     [rcx+168h], dl                                                 ; +0x9, 0x180050eb9\njz      short loc_180050F1A                                            ; +0xf, 0x180050ebf\ncmp     byte ptr [rcx+110h], 0                                         ; +0x11, 0x180050ec1\nmov     [rcx+168h], dl                                                 ; +0x18, 0x180050ec8\njz      short loc_180050F1A                                            ; +0x1e, 0x180050ece\ntest    dl, dl                                                         ; +0x20, 0x180050ed0\njz      short loc_180050EE3                                            ; +0x22, 0x180050ed2\nmov     rax, [rcx]                                                     ; +0x24, 0x180050ed4\nadd     rsp, 20h                                                       ; +0x27, 0x180050ed7\npop     rdi                                                            ; +0x2b, 0x180050edb\njmp     qword ptr [rax+368h]                                           ; +0x2c, 0x180050edc\nmov     [rsp+28h+arg_0], rbx                                           ; +0x33, 0x180050ee3\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x38, 0x180050ee8\nxor     ecx, ecx                                                       ; +0x3d, 0x180050eed\nlea     rbx, [rdi+140h]                                                ; +0x3f, 0x180050eef\ntest    rdi, rdi                                                       ; +0x46, 0x180050ef6\nmov     r8, [rax]                                                      ; +0x49, 0x180050ef9\ncmovz   rbx, rcx                                                       ; +0x4c, 0x180050efc\nmov     rcx, rax                                                       ; +0x50, 0x180050f00\ncall    qword ptr [r8+90h]                                             ; +0x53, 0x180050f03\nmov     rcx, rax; this                                                 ; +0x5a, 0x180050f0a\nmov     rdx, rbx; struct cocos2d::CCTouchDelegate *                    ; +0x5d, 0x180050f0d\ncall    ?removeDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@@Z; cocos2d::CCTouchDispatcher::removeDelegate(cocos2d::CCTouchDelegate *) ; +0x60, 0x180050f10\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x65, 0x180050f15\nadd     rsp, 20h                                                       ; +0x6a, 0x180050f1a\npop     rdi                                                            ; +0x6e, 0x180050f1e\nretn                                                                   ; +0x6f, 0x180050f1f", "xrefs": ["<???> @ 0x1800ed278", "<???> @ 0x1800ed738", "<???> @ 0x1800edc70", "<???> @ 0x1800ee1d8", "<???> @ 0x1800ee7b0", "<???> @ 0x1800f7080", "<???> @ 0x18013801c", "<???> @ 0x18013802c", "<???> @ 0x1801438a8", "<???> @ 0x1801b2148"], "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"}