{"type": "func", "start": 6442781808, "end": 6442781970, "name": "cocos2d::CCLayer::setKeypadEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setKeypadEnabled from 0x180050c70 to 0x180050d12 (162 bytes)\n// \n// 11 xrefs:\n// > <???> @ 0x1800ed2c0\n// > <???> @ 0x1800ed780\n// > <???> @ 0x1800edcb8\n// > <???> @ 0x1800ee220\n// > <???> @ 0x1800ee7f8\n// > <???> @ 0x1800f70c8\n// > <???> @ 0x18013804c\n// > <???> @ 0x180138060\n// > <???> @ 0x180138070\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b20b8\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::setKeypadEnabled(cocos2d::CCLayer *this, bool a2)\n{\n  bool v4; // zf\n  struct cocos2d::CCDirector *v5; // rax\n  struct cocos2d::CCKeypadDelegate *v6; // rsi\n  cocos2d::CCDirector_vtbl *v7; // rdx\n  cocos2d::CCKeypadDispatcher *v8; // rax\n  cocos2d::CCMouseDispatcher *v9; // rax\n\n  ((void (__fastcall *)(cocos2d::CCLayer *))this->setKeyboardEnabled)(this);\n  if ( a2 != this->m_bKeypadEnabled )\n  {\n    v4 = !this->m_bRunning;\n    this->m_bKeypadEnabled = a2;\n    if ( !v4 )\n    {\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = &this->cocos2d::CCKeypadDelegate;\n      v7 = v5->cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      if ( a2 )\n      {\n        if ( !this )\n          v6 = nullptr;\n        v8 = (cocos2d::CCKeypadDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v7->getKeypadDispatcher)(v5);\n        cocos2d::CCKeypadDispatcher::addDelegate(v8, v6);\n      }\n      else\n      {\n        if ( !this )\n          v6 = nullptr;\n        v9 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v7->getKeypadDispatcher)(v5);\n        cocos2d::CCMouseDispatcher::removeDelegate(v9, (struct cocos2d::CCObject *)v6);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setKeypadEnabled from 0x180050c70 to 0x180050d12 (162 bytes)\n; \n; 11 xrefs:\n; > <???> @ 0x1800ed2c0\n; > <???> @ 0x1800ed780\n; > <???> @ 0x1800edcb8\n; > <???> @ 0x1800ee220\n; > <???> @ 0x1800ee7f8\n; > <???> @ 0x1800f70c8\n; > <???> @ 0x18013804c\n; > <???> @ 0x180138060\n; > <???> @ 0x180138070\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b20b8\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, 0x180050c70\npush    rdi                                                            ; +0x5, 0x180050c75\nsub     rsp, 20h                                                       ; +0x6, 0x180050c76\nmov     rax, [rcx]                                                     ; +0xa, 0x180050c7a\nmovzx   edi, dl                                                        ; +0xd, 0x180050c7d\nmov     rbx, rcx                                                       ; +0x10, 0x180050c80\ncall    qword ptr [rax+3E0h]                                           ; +0x13, 0x180050c83\ncmp     dil, [rbx+16Ah]                                                ; +0x19, 0x180050c89\njz      short loc_180050D07                                            ; +0x20, 0x180050c90\ncmp     byte ptr [rbx+110h], 0                                         ; +0x22, 0x180050c92\nmov     [rbx+16Ah], dil                                                ; +0x29, 0x180050c99\njz      short loc_180050D07                                            ; +0x30, 0x180050ca0\nmov     [rsp+28h+arg_0], rsi                                           ; +0x32, 0x180050ca2\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x37, 0x180050ca7\nxor     ecx, ecx                                                       ; +0x3c, 0x180050cac\nlea     rsi, [rbx+150h]                                                ; +0x3e, 0x180050cae\nmov     rdx, [rax]                                                     ; +0x45, 0x180050cb5\ntest    dil, dil                                                       ; +0x48, 0x180050cb8\njz      short loc_180050CE7                                            ; +0x4b, 0x180050cbb\ntest    rbx, rbx                                                       ; +0x4d, 0x180050cbd\ncmovz   rsi, rcx                                                       ; +0x50, 0x180050cc0\nmov     rcx, rax                                                       ; +0x54, 0x180050cc4\ncall    qword ptr [rdx+0A0h]                                           ; +0x57, 0x180050cc7\nmov     rcx, rax; this                                                 ; +0x5d, 0x180050ccd\nmov     rdx, rsi; struct cocos2d::CCKeypadDelegate *                   ; +0x60, 0x180050cd0\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x63, 0x180050cd3\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x68, 0x180050cd8\nadd     rsp, 20h                                                       ; +0x6d, 0x180050cdd\npop     rdi                                                            ; +0x71, 0x180050ce1\njmp     ?addDelegate@CCKeypadDispatcher@cocos2d@@QEAAXPEAVCCKeypadDelegate@2@@Z; cocos2d::CCKeypadDispatcher::addDelegate(cocos2d::CCKeypadDelegate *) ; +0x72, 0x180050ce2\ntest    rbx, rbx                                                       ; +0x77, 0x180050ce7\ncmovz   rsi, rcx                                                       ; +0x7a, 0x180050cea\nmov     rcx, rax                                                       ; +0x7e, 0x180050cee\ncall    qword ptr [rdx+0A0h]                                           ; +0x81, 0x180050cf1\nmov     rcx, rax; this                                                 ; +0x87, 0x180050cf7\nmov     rdx, rsi; struct cocos2d::CCMouseDelegate *                    ; +0x8a, 0x180050cfa\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x8d, 0x180050cfd\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x92, 0x180050d02\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x97, 0x180050d07\nadd     rsp, 20h                                                       ; +0x9c, 0x180050d0c\npop     rdi                                                            ; +0xa0, 0x180050d10\nretn                                                                   ; +0xa1, 0x180050d11", "xrefs": ["<???> @ 0x1800ed2c0", "<???> @ 0x1800ed780", "<???> @ 0x1800edcb8", "<???> @ 0x1800ee220", "<???> @ 0x1800ee7f8", "<???> @ 0x1800f70c8", "<???> @ 0x18013804c", "<???> @ 0x180138060", "<???> @ 0x180138070", "<???> @ 0x1801438a8", "<???> @ 0x1801b20b8"], "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"}