{"type": "func", "start": 6442789520, "end": 6442789682, "name": "cocos2d::CCLayer::setKeypadEnabled", "pseudocode": "// \n// cocos2d::CCLayer::setKeypadEnabled from 0x180052a90 to 0x180052b32 (162 bytes)\n// \n// 11 xrefs:\n// > <???> @ 0x1800f3420\n// > <???> @ 0x1800f3900\n// > <???> @ 0x1800f3e58\n// > <???> @ 0x1800f43e0\n// > <???> @ 0x1800f49d8\n// > <???> @ 0x1800fd510\n// > <???> @ 0x180141274\n// > <???> @ 0x180141288\n// > <???> @ 0x180141298\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc34c\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::setKeypadEnabled(cocos2d::CCLayer *this, char a2)\n{\n  bool v4; // zf\n  struct cocos2d::CCDirector *v5; // rax\n  struct cocos2d::CCKeypadDelegate *v6; // rsi\n  __int64 v7; // rdx\n  cocos2d::CCKeypadDispatcher *v8; // rax\n  cocos2d::CCMouseDispatcher *v9; // rax\n\n  (*(void (__fastcall **)(cocos2d::CCLayer *))(*(_QWORD *)this + 1008LL))(this);\n  if ( a2 != *((_BYTE *)this + 362) )\n  {\n    v4 = *((_BYTE *)this + 272) == 0;\n    *((_BYTE *)this + 362) = a2;\n    if ( !v4 )\n    {\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = (cocos2d::CCLayer *)((char *)this + 336);\n      v7 = *(_QWORD *)v5;\n      if ( a2 )\n      {\n        if ( !this )\n          v6 = nullptr;\n        v8 = (cocos2d::CCKeypadDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(v7 + 160))(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 + 160))(v5);\n        cocos2d::CCMouseDispatcher::removeDelegate(v9, v6);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::setKeypadEnabled from 0x180052a90 to 0x180052b32 (162 bytes)\n; \n; 11 xrefs:\n; > <???> @ 0x1800f3420\n; > <???> @ 0x1800f3900\n; > <???> @ 0x1800f3e58\n; > <???> @ 0x1800f43e0\n; > <???> @ 0x1800f49d8\n; > <???> @ 0x1800fd510\n; > <???> @ 0x180141274\n; > <???> @ 0x180141288\n; > <???> @ 0x180141298\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc34c\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, 0x180052a90\npush    rdi                                                            ; +0x5, 0x180052a95\nsub     rsp, 20h                                                       ; +0x6, 0x180052a96\nmov     rax, [rcx]                                                     ; +0xa, 0x180052a9a\nmovzx   edi, dl                                                        ; +0xd, 0x180052a9d\nmov     rbx, rcx                                                       ; +0x10, 0x180052aa0\ncall    qword ptr [rax+3F0h]                                           ; +0x13, 0x180052aa3\ncmp     dil, [rbx+16Ah]                                                ; +0x19, 0x180052aa9\njz      short loc_180052B27                                            ; +0x20, 0x180052ab0\ncmp     byte ptr [rbx+110h], 0                                         ; +0x22, 0x180052ab2\nmov     [rbx+16Ah], dil                                                ; +0x29, 0x180052ab9\njz      short loc_180052B27                                            ; +0x30, 0x180052ac0\nmov     [rsp+28h+arg_0], rsi                                           ; +0x32, 0x180052ac2\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x37, 0x180052ac7\nxor     ecx, ecx                                                       ; +0x3c, 0x180052acc\nlea     rsi, [rbx+150h]                                                ; +0x3e, 0x180052ace\nmov     rdx, [rax]                                                     ; +0x45, 0x180052ad5\ntest    dil, dil                                                       ; +0x48, 0x180052ad8\njz      short loc_180052B07                                            ; +0x4b, 0x180052adb\ntest    rbx, rbx                                                       ; +0x4d, 0x180052add\ncmovz   rsi, rcx                                                       ; +0x50, 0x180052ae0\nmov     rcx, rax                                                       ; +0x54, 0x180052ae4\ncall    qword ptr [rdx+0A0h]                                           ; +0x57, 0x180052ae7\nmov     rcx, rax; this                                                 ; +0x5d, 0x180052aed\nmov     rdx, rsi; struct cocos2d::CCKeypadDelegate *                   ; +0x60, 0x180052af0\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x63, 0x180052af3\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x68, 0x180052af8\nadd     rsp, 20h                                                       ; +0x6d, 0x180052afd\npop     rdi                                                            ; +0x71, 0x180052b01\njmp     ?addDelegate@CCKeypadDispatcher@cocos2d@@QEAAXPEAVCCKeypadDelegate@2@@Z; cocos2d::CCKeypadDispatcher::addDelegate(cocos2d::CCKeypadDelegate *) ; +0x72, 0x180052b02\ntest    rbx, rbx                                                       ; +0x77, 0x180052b07\ncmovz   rsi, rcx                                                       ; +0x7a, 0x180052b0a\nmov     rcx, rax                                                       ; +0x7e, 0x180052b0e\ncall    qword ptr [rdx+0A0h]                                           ; +0x81, 0x180052b11\nmov     rcx, rax; this                                                 ; +0x87, 0x180052b17\nmov     rdx, rsi; struct cocos2d::CCMouseDelegate *                    ; +0x8a, 0x180052b1a\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x8d, 0x180052b1d\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x92, 0x180052b22\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x97, 0x180052b27\nadd     rsp, 20h                                                       ; +0x9c, 0x180052b2c\npop     rdi                                                            ; +0xa0, 0x180052b30\nretn                                                                   ; +0xa1, 0x180052b31", "xrefs": ["<???> @ 0x1800f3420", "<???> @ 0x1800f3900", "<???> @ 0x1800f3e58", "<???> @ 0x1800f43e0", "<???> @ 0x1800f49d8", "<???> @ 0x1800fd510", "<???> @ 0x180141274", "<???> @ 0x180141288", "<???> @ 0x180141298", "<???> @ 0x18014cf68", "<???> @ 0x1801bc34c"], "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"}