{"type": "func", "start": 6442733088, "end": 6442733272, "name": "cocos2d::CCKeyboardHandler::handlerWithDelegate", "pseudocode": "// \n// cocos2d::CCKeyboardHandler::handlerWithDelegate from 0x180044e20 to 0x180044ed8 (184 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180045ab6\n// > cocos2d::CCKeyboardDispatcher::flushPendingDelegates @ 0x180046518\n// > cocos2d::CCKeyboardDispatcher::forceAddDelegate @ 0x18004655c\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bb734\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:40 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCKeyboardHandler *__fastcall cocos2d::CCKeyboardHandler::handlerWithDelegate(\n        struct cocos2d::CCKeyboardDelegate *a1)\n{\n  cocos2d::CCObject *v2; // rax\n  cocos2d::CCObject *v3; // rbx\n  bool (__fastcall *v4)(cocos2d::CCKeyboardHandler *__hidden, struct cocos2d::CCKeyboardDelegate *); // r8\n  cocos2d::CCObject *v5; // rax\n\n  v2 = (cocos2d::CCObject *)sub_1800E4AC0(0x40u);\n  v3 = v2;\n  if ( v2 )\n  {\n    cocos2d::CCObject::CCObject(v2);\n    *(_QWORD *)v3 = &cocos2d::CCKeyboardHandler::`vftable';\n  }\n  else\n  {\n    v3 = nullptr;\n  }\n  if ( !v3 )\n    return v3;\n  v4 = *(bool (__fastcall **)(cocos2d::CCKeyboardHandler *__hidden, struct cocos2d::CCKeyboardDelegate *))(*(_QWORD *)v3 + 72LL);\n  if ( v4 == cocos2d::CCKeyboardHandler::initWithDelegate )\n  {\n    *((_QWORD *)v3 + 7) = a1;\n    v5 = (cocos2d::CCObject *)_RTDynamicCast(\n                                a1,\n                                0,\n                                &cocos2d::CCKeyboardDelegate `RTTI Type Descriptor',\n                                &cocos2d::CCObject `RTTI Type Descriptor',\n                                0);\n    cocos2d::CCObject::retain(v5);\nLABEL_8:\n    cocos2d::CCObject::autorelease(v3);\n    return v3;\n  }\n  if ( v4(v3, a1) )\n    goto LABEL_8;\n  cocos2d::CCObject::release(v3);\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCKeyboardHandler::handlerWithDelegate from 0x180044e20 to 0x180044ed8 (184 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180045ab6\n; > cocos2d::CCKeyboardDispatcher::flushPendingDelegates @ 0x180046518\n; > cocos2d::CCKeyboardDispatcher::forceAddDelegate @ 0x18004655c\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bb734\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:40 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180044e20\npush    rdi                                                            ; +0x5, 0x180044e25\nsub     rsp, 30h                                                       ; +0x6, 0x180044e26\nmov     rdi, rcx                                                       ; +0xa, 0x180044e2a\nmov     ecx, 40h ; '@'; Size                                           ; +0xd, 0x180044e2d\ncall    sub_1800E4AC0                                                  ; +0x12, 0x180044e32\nmov     rbx, rax                                                       ; +0x17, 0x180044e37\nmov     [rsp+38h+arg_8], rax                                           ; +0x1a, 0x180044e3a\ntest    rax, rax                                                       ; +0x1f, 0x180044e3f\njz      short loc_180044E58                                            ; +0x22, 0x180044e42\nmov     rcx, rax; this                                                 ; +0x24, 0x180044e44\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x27, 0x180044e47\nlea     rax, ??_7CCKeyboardHandler@cocos2d@@6B@; const cocos2d::CCKeyboardHandler::`vftable' ; +0x2c, 0x180044e4c\nmov     [rbx], rax                                                     ; +0x33, 0x180044e53\njmp     short loc_180044E5A                                            ; +0x36, 0x180044e56\nxor     ebx, ebx                                                       ; +0x38, 0x180044e58\ntest    rbx, rbx                                                       ; +0x3a, 0x180044e5a\njz      short loc_180044EB5                                            ; +0x3d, 0x180044e5d\nmov     rax, [rbx]                                                     ; +0x3f, 0x180044e5f\nmov     r8, [rax+48h]                                                  ; +0x42, 0x180044e62\nlea     rax, ?initWithDelegate@CCKeyboardHandler@cocos2d@@UEAA_NPEAVCCKeyboardDelegate@2@@Z; cocos2d::CCKeyboardHandler::initWithDelegate(cocos2d::CCKeyboardDelegate *) ; +0x46, 0x180044e66\ncmp     r8, rax                                                        ; +0x4d, 0x180044e6d\njnz     short loc_180044EA0                                            ; +0x50, 0x180044e70\nmov     [rbx+38h], rdi                                                 ; +0x52, 0x180044e72\nmov     [rsp+38h+var_18], 0                                            ; +0x56, 0x180044e76\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x5e, 0x180044e7e\nlea     r8, ??_R0?AVCCKeyboardDelegate@cocos2d@@@8; cocos2d::CCKeyboardDelegate `RTTI Type Descriptor' ; +0x65, 0x180044e85\nxor     edx, edx                                                       ; +0x6c, 0x180044e8c\nmov     rcx, rdi                                                       ; +0x6e, 0x180044e8e\ncall    __RTDynamicCast                                                ; +0x71, 0x180044e91\nmov     rcx, rax; this                                                 ; +0x76, 0x180044e96\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x79, 0x180044e99\njmp     short loc_180044EAD                                            ; +0x7e, 0x180044e9e\nmov     rdx, rdi                                                       ; +0x80, 0x180044ea0\nmov     rcx, rbx                                                       ; +0x83, 0x180044ea3\ncall    r8                                                             ; +0x86, 0x180044ea6\ntest    al, al                                                         ; +0x89, 0x180044ea9\njz      short loc_180044EC3                                            ; +0x8b, 0x180044eab\nmov     rcx, rbx; this                                                 ; +0x8d, 0x180044ead\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x90, 0x180044eb0\nmov     rax, rbx                                                       ; +0x95, 0x180044eb5\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x98, 0x180044eb8\nadd     rsp, 30h                                                       ; +0x9d, 0x180044ebd\npop     rdi                                                            ; +0xa1, 0x180044ec1\nretn                                                                   ; +0xa2, 0x180044ec2\nmov     rcx, rbx; this                                                 ; +0xa3, 0x180044ec3\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xa6, 0x180044ec6\nxor     eax, eax                                                       ; +0xab, 0x180044ecb\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xad, 0x180044ecd\nadd     rsp, 30h                                                       ; +0xb2, 0x180044ed2\npop     rdi                                                            ; +0xb6, 0x180044ed6\nretn                                                                   ; +0xb7, 0x180044ed7", "xrefs": ["cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180045ab6", "cocos2d::CCKeyboardDispatcher::flushPendingDelegates @ 0x180046518", "cocos2d::CCKeyboardDispatcher::forceAddDelegate @ 0x18004655c", "<???> @ 0x18014cf68", "<???> @ 0x1801bb734"], "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"}