{"type": "func", "start": 6442790096, "end": 6442790211, "name": "cocos2d::CCLayer::setTouchEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setTouchEnabled from 0x180052cd0 to 0x180052d43 (115 bytes)\n// \n// 10 xrefs:\n// > <???> @ 0x1800f33d8\n// > <???> @ 0x1800f38b8\n// > <???> @ 0x1800f3e10\n// > <???> @ 0x1800f4398\n// > <???> @ 0x1800f4990\n// > <???> @ 0x1800fd4c8\n// > <???> @ 0x180141244\n// > <???> @ 0x180141254\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc3dc\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:21:46 +0000\n// \n\nvoid __fastcall cocos2d::CCLayer::setTouchEnabled(cocos2d::CCLayer *this, char 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 ( *((_BYTE *)this + 360) != a2 )\n  {\n    v3 = *((_BYTE *)this + 272) == 0;\n    *((_BYTE *)this + 360) = a2;\n    if ( !v3 )\n    {\n      if ( a2 )\n      {\n        (*(void (__fastcall **)(cocos2d::CCLayer *))(*(_QWORD *)this + 888LL))(this);\n      }\n      else\n      {\n        v4 = cocos2d::CCDirector::sharedDirector();\n        v5 = (cocos2d::CCLayer *)((char *)this + 320);\n        if ( !this )\n          v5 = nullptr;\n        v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v4 + 144LL))(v4);\n        cocos2d::CCTouchDispatcher::removeDelegate(v6, v5);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setTouchEnabled from 0x180052cd0 to 0x180052d43 (115 bytes)\n; \n; 10 xrefs:\n; > <???> @ 0x1800f33d8\n; > <???> @ 0x1800f38b8\n; > <???> @ 0x1800f3e10\n; > <???> @ 0x1800f4398\n; > <???> @ 0x1800f4990\n; > <???> @ 0x1800fd4c8\n; > <???> @ 0x180141244\n; > <???> @ 0x180141254\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc3dc\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:21:46 +0000\n; \npush    rdi                                                            ; +0x0, 0x180052cd0\nsub     rsp, 20h                                                       ; +0x2, 0x180052cd2\nmov     rdi, rcx                                                       ; +0x6, 0x180052cd6\ncmp     [rcx+168h], dl                                                 ; +0x9, 0x180052cd9\njz      short loc_180052D3D                                            ; +0xf, 0x180052cdf\ncmp     byte ptr [rcx+110h], 0                                         ; +0x11, 0x180052ce1\nmov     [rcx+168h], dl                                                 ; +0x18, 0x180052ce8\njz      short loc_180052D3D                                            ; +0x1e, 0x180052cee\ntest    dl, dl                                                         ; +0x20, 0x180052cf0\njz      short loc_180052D03                                            ; +0x22, 0x180052cf2\nmov     rax, [rcx]                                                     ; +0x24, 0x180052cf4\nadd     rsp, 20h                                                       ; +0x27, 0x180052cf7\npop     rdi                                                            ; +0x2b, 0x180052cfb\njmp     qword ptr [rax+378h]                                           ; +0x2c, 0x180052cfc\nmov     [rsp+28h+arg_0], rbx                                           ; +0x33, 0x180052d03\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x38, 0x180052d08\nxor     ecx, ecx                                                       ; +0x3d, 0x180052d0d\nlea     rbx, [rdi+140h]                                                ; +0x3f, 0x180052d0f\ntest    rdi, rdi                                                       ; +0x46, 0x180052d16\ncmovz   rbx, rcx                                                       ; +0x49, 0x180052d19\nmov     rcx, [rax]                                                     ; +0x4d, 0x180052d1d\nmov     r8, [rcx+90h]                                                  ; +0x50, 0x180052d20\nmov     rcx, rax                                                       ; +0x57, 0x180052d27\ncall    r8                                                             ; +0x5a, 0x180052d2a\nmov     rcx, rax; this                                                 ; +0x5d, 0x180052d2d\nmov     rdx, rbx; struct cocos2d::CCTouchDelegate *                    ; +0x60, 0x180052d30\ncall    ?removeDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@@Z; cocos2d::CCTouchDispatcher::removeDelegate(cocos2d::CCTouchDelegate *) ; +0x63, 0x180052d33\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x68, 0x180052d38\nadd     rsp, 20h                                                       ; +0x6d, 0x180052d3d\npop     rdi                                                            ; +0x71, 0x180052d41\nretn                                                                   ; +0x72, 0x180052d42", "xrefs": ["<???> @ 0x1800f33d8", "<???> @ 0x1800f38b8", "<???> @ 0x1800f3e10", "<???> @ 0x1800f4398", "<???> @ 0x1800f4990", "<???> @ 0x1800fd4c8", "<???> @ 0x180141244", "<???> @ 0x180141254", "<???> @ 0x18014cf68", "<???> @ 0x1801bc3dc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}