{"type": "func", "start": 6442789360, "end": 6442789511, "name": "cocos2d::CCLayer::setKeyboardEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setKeyboardEnabled from 0x1800529f0 to 0x180052a87 (151 bytes)\n// \n// 11 xrefs:\n// > <???> @ 0x1800f3430\n// > <???> @ 0x1800f3910\n// > <???> @ 0x1800f3e68\n// > <???> @ 0x1800f43f0\n// > <???> @ 0x1800f49e8\n// > <???> @ 0x1800fd520\n// > <???> @ 0x1801412ac\n// > <???> @ 0x1801412c0\n// > <???> @ 0x1801412d0\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc31c\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::setKeyboardEnabled(cocos2d::CCLayer *this, char a2)\n{\n  bool v4; // zf\n  struct cocos2d::CCDirector *v5; // rax\n  struct cocos2d::CCKeyboardDelegate *v6; // rsi\n  __int64 v7; // rdx\n  cocos2d::CCKeyboardDispatcher *v8; // rax\n  cocos2d::CCMouseDispatcher *v9; // rax\n\n  if ( a2 != *((_BYTE *)this + 363) )\n  {\n    v4 = *((_BYTE *)this + 272) == 0;\n    *((_BYTE *)this + 363) = a2;\n    if ( !v4 )\n    {\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = (cocos2d::CCLayer *)((char *)this + 344);\n      v7 = *(_QWORD *)v5;\n      if ( a2 )\n      {\n        if ( !this )\n          v6 = nullptr;\n        v8 = (cocos2d::CCKeyboardDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(v7 + 176))(v5);\n        cocos2d::CCKeyboardDispatcher::addDelegate(v8, v6);\n      }\n      else\n      {\n        if ( !this )\n          v6 = nullptr;\n        v9 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(v7 + 176))(v5);\n        cocos2d::CCMouseDispatcher::removeDelegate(v9, v6);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setKeyboardEnabled from 0x1800529f0 to 0x180052a87 (151 bytes)\n; \n; 11 xrefs:\n; > <???> @ 0x1800f3430\n; > <???> @ 0x1800f3910\n; > <???> @ 0x1800f3e68\n; > <???> @ 0x1800f43f0\n; > <???> @ 0x1800f49e8\n; > <???> @ 0x1800fd520\n; > <???> @ 0x1801412ac\n; > <???> @ 0x1801412c0\n; > <???> @ 0x1801412d0\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc31c\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; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800529f0\npush    rdi                                                            ; +0x5, 0x1800529f5\nsub     rsp, 20h                                                       ; +0x6, 0x1800529f6\nmovzx   edi, dl                                                        ; +0xa, 0x1800529fa\nmov     rbx, rcx                                                       ; +0xd, 0x1800529fd\ncmp     dl, [rcx+16Bh]                                                 ; +0x10, 0x180052a00\njz      short loc_180052A7C                                            ; +0x16, 0x180052a06\ncmp     byte ptr [rcx+110h], 0                                         ; +0x18, 0x180052a08\nmov     [rcx+16Bh], dl                                                 ; +0x1f, 0x180052a0f\njz      short loc_180052A7C                                            ; +0x25, 0x180052a15\nmov     [rsp+28h+arg_0], rsi                                           ; +0x27, 0x180052a17\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x2c, 0x180052a1c\nxor     ecx, ecx                                                       ; +0x31, 0x180052a21\nlea     rsi, [rbx+158h]                                                ; +0x33, 0x180052a23\nmov     rdx, [rax]                                                     ; +0x3a, 0x180052a2a\ntest    dil, dil                                                       ; +0x3d, 0x180052a2d\njz      short loc_180052A5C                                            ; +0x40, 0x180052a30\ntest    rbx, rbx                                                       ; +0x42, 0x180052a32\ncmovz   rsi, rcx                                                       ; +0x45, 0x180052a35\nmov     rcx, rax                                                       ; +0x49, 0x180052a39\ncall    qword ptr [rdx+0B0h]                                           ; +0x4c, 0x180052a3c\nmov     rcx, rax; this                                                 ; +0x52, 0x180052a42\nmov     rdx, rsi; struct cocos2d::CCKeyboardDelegate *                 ; +0x55, 0x180052a45\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x58, 0x180052a48\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x5d, 0x180052a4d\nadd     rsp, 20h                                                       ; +0x62, 0x180052a52\npop     rdi                                                            ; +0x66, 0x180052a56\njmp     ?addDelegate@CCKeyboardDispatcher@cocos2d@@QEAAXPEAVCCKeyboardDelegate@2@@Z; cocos2d::CCKeyboardDispatcher::addDelegate(cocos2d::CCKeyboardDelegate *) ; +0x67, 0x180052a57\ntest    rbx, rbx                                                       ; +0x6c, 0x180052a5c\ncmovz   rsi, rcx                                                       ; +0x6f, 0x180052a5f\nmov     rcx, rax                                                       ; +0x73, 0x180052a63\ncall    qword ptr [rdx+0B0h]                                           ; +0x76, 0x180052a66\nmov     rcx, rax; this                                                 ; +0x7c, 0x180052a6c\nmov     rdx, rsi; struct cocos2d::CCMouseDelegate *                    ; +0x7f, 0x180052a6f\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x82, 0x180052a72\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x87, 0x180052a77\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x8c, 0x180052a7c\nadd     rsp, 20h                                                       ; +0x91, 0x180052a81\npop     rdi                                                            ; +0x95, 0x180052a85\nretn                                                                   ; +0x96, 0x180052a86", "xrefs": ["<???> @ 0x1800f3430", "<???> @ 0x1800f3910", "<???> @ 0x1800f3e68", "<???> @ 0x1800f43f0", "<???> @ 0x1800f49e8", "<???> @ 0x1800fd520", "<???> @ 0x1801412ac", "<???> @ 0x1801412c0", "<???> @ 0x1801412d0", "<???> @ 0x18014cf68", "<???> @ 0x1801bc31c"], "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"}