{"type": "func", "start": 6442846592, "end": 6442846776, "name": "cocos2d::CCMouseHandler::handlerWithDelegate", "pseudocode": "// \n// cocos2d::CCMouseHandler::handlerWithDelegate from 0x180060980 to 0x180060a38 (184 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCMouseDispatcher::addDelegate @ 0x180060c86\n// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x180060e48\n// > cocos2d::CCMouseDispatcher::forceAddDelegate @ 0x180060e8c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b34bc\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::CCMouseHandler *__fastcall cocos2d::CCMouseHandler::handlerWithDelegate(cocos2d::CCObject_vtbl *a1)\n{\n  cocos2d::CCObject *v2; // rax\n  cocos2d::CCObject *v3; // rbx\n  bool (__fastcall *copyWithZone)(cocos2d::CCMouseHandler *__hidden, struct cocos2d::CCMouseDelegate *); // 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::CCMouseHandler::`vftable';\n  }\n  else\n  {\n    v3 = nullptr;\n  }\n  if ( !v3 )\n    return (struct cocos2d::CCMouseHandler *)v3;\n  copyWithZone = (bool (__fastcall *)(cocos2d::CCMouseHandler *__hidden, struct cocos2d::CCMouseDelegate *))v3->__vftable[1].copyWithZone;\n  if ( copyWithZone == cocos2d::CCMouseHandler::initWithDelegate )\n  {\n    v3[1].__vftable = a1;\n    v5 = (cocos2d::CCObject *)_RTDynamicCast(\n                                a1,\n                                0,\n                                &cocos2d::CCMouseDelegate `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::CCMouseHandler *)v3;\n  }\n  if ( copyWithZone((cocos2d::CCMouseHandler *)v3, (struct cocos2d::CCMouseDelegate *)a1) )\n    goto LABEL_8;\n  cocos2d::CCObject::release(v3);\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCMouseHandler::handlerWithDelegate from 0x180060980 to 0x180060a38 (184 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCMouseDispatcher::addDelegate @ 0x180060c86\n; > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x180060e48\n; > cocos2d::CCMouseDispatcher::forceAddDelegate @ 0x180060e8c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b34bc\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, 0x180060980\npush    rdi                                                            ; +0x5, 0x180060985\nsub     rsp, 30h                                                       ; +0x6, 0x180060986\nmov     rdi, rcx                                                       ; +0xa, 0x18006098a\nmov     ecx, 40h ; '@'; Size                                           ; +0xd, 0x18006098d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x12, 0x180060992\nmov     rbx, rax                                                       ; +0x17, 0x180060997\nmov     [rsp+38h+arg_8], rax                                           ; +0x1a, 0x18006099a\ntest    rax, rax                                                       ; +0x1f, 0x18006099f\njz      short loc_1800609B8                                            ; +0x22, 0x1800609a2\nmov     rcx, rax; this                                                 ; +0x24, 0x1800609a4\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x27, 0x1800609a7\nlea     rax, ??_7CCMouseHandler@cocos2d@@6B@; const cocos2d::CCMouseHandler::`vftable' ; +0x2c, 0x1800609ac\nmov     [rbx], rax                                                     ; +0x33, 0x1800609b3\njmp     short loc_1800609BA                                            ; +0x36, 0x1800609b6\nxor     ebx, ebx                                                       ; +0x38, 0x1800609b8\ntest    rbx, rbx                                                       ; +0x3a, 0x1800609ba\njz      short loc_180060A15                                            ; +0x3d, 0x1800609bd\nmov     rax, [rbx]                                                     ; +0x3f, 0x1800609bf\nmov     r8, [rax+48h]                                                  ; +0x42, 0x1800609c2\nlea     rax, ?initWithDelegate@CCMouseHandler@cocos2d@@UEAA_NPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseHandler::initWithDelegate(cocos2d::CCMouseDelegate *) ; +0x46, 0x1800609c6\ncmp     r8, rax                                                        ; +0x4d, 0x1800609cd\njnz     short loc_180060A00                                            ; +0x50, 0x1800609d0\nmov     [rbx+38h], rdi                                                 ; +0x52, 0x1800609d2\nmov     [rsp+38h+var_18], 0                                            ; +0x56, 0x1800609d6\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x5e, 0x1800609de\nlea     r8, ??_R0?AVCCMouseDelegate@cocos2d@@@8; cocos2d::CCMouseDelegate `RTTI Type Descriptor' ; +0x65, 0x1800609e5\nxor     edx, edx                                                       ; +0x6c, 0x1800609ec\nmov     rcx, rdi                                                       ; +0x6e, 0x1800609ee\ncall    __RTDynamicCast                                                ; +0x71, 0x1800609f1\nmov     rcx, rax; this                                                 ; +0x76, 0x1800609f6\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x79, 0x1800609f9\njmp     short loc_180060A0D                                            ; +0x7e, 0x1800609fe\nmov     rdx, rdi                                                       ; +0x80, 0x180060a00\nmov     rcx, rbx                                                       ; +0x83, 0x180060a03\ncall    r8                                                             ; +0x86, 0x180060a06\ntest    al, al                                                         ; +0x89, 0x180060a09\njz      short loc_180060A23                                            ; +0x8b, 0x180060a0b\nmov     rcx, rbx; this                                                 ; +0x8d, 0x180060a0d\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x90, 0x180060a10\nmov     rax, rbx                                                       ; +0x95, 0x180060a15\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x98, 0x180060a18\nadd     rsp, 30h                                                       ; +0x9d, 0x180060a1d\npop     rdi                                                            ; +0xa1, 0x180060a21\nretn                                                                   ; +0xa2, 0x180060a22\nmov     rcx, rbx; this                                                 ; +0xa3, 0x180060a23\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xa6, 0x180060a26\nxor     eax, eax                                                       ; +0xab, 0x180060a2b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xad, 0x180060a2d\nadd     rsp, 30h                                                       ; +0xb2, 0x180060a32\npop     rdi                                                            ; +0xb6, 0x180060a36\nretn                                                                   ; +0xb7, 0x180060a37", "xrefs": ["cocos2d::CCMouseDispatcher::addDelegate @ 0x180060c86", "cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x180060e48", "cocos2d::CCMouseDispatcher::forceAddDelegate @ 0x180060e8c", "<???> @ 0x1801438a8", "<???> @ 0x1801b34bc"], "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"}