{"type": "func", "start": 6443188448, "end": 6443188632, "name": "cocos2d::CCKeypadHandler::handlerWithDelegate", "pseudocode": "// \n// cocos2d::CCKeypadHandler::handlerWithDelegate from 0x1800b40e0 to 0x1800b4198 (184 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b43e6\n// > cocos2d::CCKeypadDispatcher::dispatchKeypadMSG @ 0x1800b4548\n// > cocos2d::CCKeypadDispatcher::forceAddDelegate @ 0x1800b45ac\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8814\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\nstruct cocos2d::CCKeypadHandler *__fastcall cocos2d::CCKeypadHandler::handlerWithDelegate(cocos2d::CCObject_vtbl *a1)\n{\n  cocos2d::CCObject *v2; // rax\n  cocos2d::CCObject *v3; // rbx\n  bool (__fastcall *copyWithZone)(cocos2d::CCKeypadHandler *__hidden, struct cocos2d::CCKeypadDelegate *); // r8\n  cocos2d::CCObject *v5; // rax\n\n  v2 = (cocos2d::CCObject *)operator new(0x40u);\n  v3 = v2;\n  if ( v2 )\n  {\n    cocos2d::CCObject::CCObject(v2);\n    v3->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCKeypadHandler::`vftable';\n  }\n  else\n  {\n    v3 = nullptr;\n  }\n  if ( !v3 )\n    return (struct cocos2d::CCKeypadHandler *)v3;\n  copyWithZone = (bool (__fastcall *)(cocos2d::CCKeypadHandler *__hidden, struct cocos2d::CCKeypadDelegate *))v3->__vftable[1].copyWithZone;\n  if ( copyWithZone == cocos2d::CCKeypadHandler::initWithDelegate )\n  {\n    v3[1].__vftable = a1;\n    v5 = (cocos2d::CCObject *)_RTDynamicCast(\n                                a1,\n                                0,\n                                &cocos2d::CCKeypadDelegate `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 (struct cocos2d::CCKeypadHandler *)v3;\n  }\n  if ( copyWithZone((cocos2d::CCKeypadHandler *)v3, (struct cocos2d::CCKeypadDelegate *)a1) )\n    goto LABEL_8;\n  cocos2d::CCObject::release(v3);\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCKeypadHandler::handlerWithDelegate from 0x1800b40e0 to 0x1800b4198 (184 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b43e6\n; > cocos2d::CCKeypadDispatcher::dispatchKeypadMSG @ 0x1800b4548\n; > cocos2d::CCKeypadDispatcher::forceAddDelegate @ 0x1800b45ac\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8814\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_0], rbx                                               ; +0x0, 0x1800b40e0\npush    rdi                                                            ; +0x5, 0x1800b40e5\nsub     rsp, 30h                                                       ; +0x6, 0x1800b40e6\nmov     rdi, rcx                                                       ; +0xa, 0x1800b40ea\nmov     ecx, 40h ; '@'; Size                                           ; +0xd, 0x1800b40ed\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x12, 0x1800b40f2\nmov     rbx, rax                                                       ; +0x17, 0x1800b40f7\nmov     [rsp+38h+arg_8], rax                                           ; +0x1a, 0x1800b40fa\ntest    rax, rax                                                       ; +0x1f, 0x1800b40ff\njz      short loc_1800B4118                                            ; +0x22, 0x1800b4102\nmov     rcx, rax; this                                                 ; +0x24, 0x1800b4104\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x27, 0x1800b4107\nlea     rax, ??_7CCKeypadHandler@cocos2d@@6B@; const cocos2d::CCKeypadHandler::`vftable' ; +0x2c, 0x1800b410c\nmov     [rbx], rax                                                     ; +0x33, 0x1800b4113\njmp     short loc_1800B411A                                            ; +0x36, 0x1800b4116\nxor     ebx, ebx                                                       ; +0x38, 0x1800b4118\ntest    rbx, rbx                                                       ; +0x3a, 0x1800b411a\njz      short loc_1800B4175                                            ; +0x3d, 0x1800b411d\nmov     rax, [rbx]                                                     ; +0x3f, 0x1800b411f\nmov     r8, [rax+48h]                                                  ; +0x42, 0x1800b4122\nlea     rax, ?initWithDelegate@CCKeypadHandler@cocos2d@@UEAA_NPEAVCCKeypadDelegate@2@@Z; cocos2d::CCKeypadHandler::initWithDelegate(cocos2d::CCKeypadDelegate *) ; +0x46, 0x1800b4126\ncmp     r8, rax                                                        ; +0x4d, 0x1800b412d\njnz     short loc_1800B4160                                            ; +0x50, 0x1800b4130\nmov     [rbx+38h], rdi                                                 ; +0x52, 0x1800b4132\nmov     [rsp+38h+var_18], 0                                            ; +0x56, 0x1800b4136\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x5e, 0x1800b413e\nlea     r8, ??_R0?AVCCKeypadDelegate@cocos2d@@@8; cocos2d::CCKeypadDelegate `RTTI Type Descriptor' ; +0x65, 0x1800b4145\nxor     edx, edx                                                       ; +0x6c, 0x1800b414c\nmov     rcx, rdi                                                       ; +0x6e, 0x1800b414e\ncall    __RTDynamicCast                                                ; +0x71, 0x1800b4151\nmov     rcx, rax; this                                                 ; +0x76, 0x1800b4156\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x79, 0x1800b4159\njmp     short loc_1800B416D                                            ; +0x7e, 0x1800b415e\nmov     rdx, rdi                                                       ; +0x80, 0x1800b4160\nmov     rcx, rbx                                                       ; +0x83, 0x1800b4163\ncall    r8                                                             ; +0x86, 0x1800b4166\ntest    al, al                                                         ; +0x89, 0x1800b4169\njz      short loc_1800B4183                                            ; +0x8b, 0x1800b416b\nmov     rcx, rbx; this                                                 ; +0x8d, 0x1800b416d\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x90, 0x1800b4170\nmov     rax, rbx                                                       ; +0x95, 0x1800b4175\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x98, 0x1800b4178\nadd     rsp, 30h                                                       ; +0x9d, 0x1800b417d\npop     rdi                                                            ; +0xa1, 0x1800b4181\nretn                                                                   ; +0xa2, 0x1800b4182\nmov     rcx, rbx; this                                                 ; +0xa3, 0x1800b4183\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xa6, 0x1800b4186\nxor     eax, eax                                                       ; +0xab, 0x1800b418b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xad, 0x1800b418d\nadd     rsp, 30h                                                       ; +0xb2, 0x1800b4192\npop     rdi                                                            ; +0xb6, 0x1800b4196\nretn                                                                   ; +0xb7, 0x1800b4197", "xrefs": ["cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b43e6", "cocos2d::CCKeypadDispatcher::dispatchKeypadMSG @ 0x1800b4548", "cocos2d::CCKeypadDispatcher::forceAddDelegate @ 0x1800b45ac", "<???> @ 0x1801438a8", "<???> @ 0x1801b8814"], "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"}