{"type": "func", "start": 6443187488, "end": 6443187726, "name": "cocos2d::CCTouchHandler::handlerWithDelegate", "pseudocode": "// \n// cocos2d::CCTouchHandler::handlerWithDelegate from 0x1800b3d20 to 0x1800b3e0e (238 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b87c0\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::CCTouchHandler *__fastcall cocos2d::CCTouchHandler::handlerWithDelegate(\n        struct cocos2d::CCTouchDelegate *a1,\n        int a2)\n{\n  cocos2d::CCTouchHandler *v4; // rbx\n  bool (__fastcall *initWithDelegate)(cocos2d::CCTouchHandler *__hidden, struct cocos2d::CCTouchDelegate *, int); // r9\n  cocos2d::CCObject *v6; // rax\n\n  v4 = (cocos2d::CCTouchHandler *)operator new(0x48u);\n  if ( v4 )\n  {\n    *(_OWORD *)&v4->__vftable = 0;\n    *(_OWORD *)&v4->m_nTag = 0;\n    *(_OWORD *)&v4->m_uIndexInArray = 0;\n    *(_OWORD *)&v4->m_uOrderOfArrival = 0;\n    *(_QWORD *)&v4->m_nPriority = 0;\n    cocos2d::CCObject::CCObject(v4);\n    v4->__vftable = (cocos2d::CCTouchHandler_vtbl *)&cocos2d::CCTouchHandler::`vftable';\n  }\n  else\n  {\n    v4 = nullptr;\n  }\n  if ( !v4 )\n    return v4;\n  initWithDelegate = (bool (__fastcall *)(cocos2d::CCTouchHandler *__hidden, struct cocos2d::CCTouchDelegate *, int))v4->initWithDelegate;\n  if ( initWithDelegate == cocos2d::CCTouchHandler::initWithDelegate )\n  {\n    v4->m_pDelegate = a1;\n    v6 = (cocos2d::CCObject *)_RTDynamicCast(\n                                a1,\n                                0,\n                                &cocos2d::CCTouchDelegate `RTTI Type Descriptor',\n                                &cocos2d::CCObject `RTTI Type Descriptor',\n                                0);\n    cocos2d::CCObject::retain(v6);\n    v4->m_nPriority = a2;\n    v4->m_nEnabledSelectors = 0;\nLABEL_8:\n    cocos2d::CCObject::autorelease(v4);\n    return v4;\n  }\n  if ( initWithDelegate(v4, a1, a2) )\n    goto LABEL_8;\n  cocos2d::CCObject::release(v4);\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCTouchHandler::handlerWithDelegate from 0x1800b3d20 to 0x1800b3e0e (238 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b87c0\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, 0x1800b3d20\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800b3d25\npush    rdi                                                            ; +0xa, 0x1800b3d2a\nsub     rsp, 30h                                                       ; +0xb, 0x1800b3d2b\nmov     esi, edx                                                       ; +0xf, 0x1800b3d2f\nmov     rdi, rcx                                                       ; +0x11, 0x1800b3d31\nmov     ecx, 48h ; 'H'; Size                                           ; +0x14, 0x1800b3d34\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x19, 0x1800b3d39\nmov     rbx, rax                                                       ; +0x1e, 0x1800b3d3e\nmov     [rsp+38h+arg_10], rax                                          ; +0x21, 0x1800b3d41\ntest    rax, rax                                                       ; +0x26, 0x1800b3d46\njz      short loc_1800B3D77                                            ; +0x29, 0x1800b3d49\nxorps   xmm0, xmm0                                                     ; +0x2b, 0x1800b3d4b\nxor     eax, eax                                                       ; +0x2e, 0x1800b3d4e\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x30, 0x1800b3d50\nmovups  xmmword ptr [rbx+10h], xmm0                                    ; +0x33, 0x1800b3d53\nmovups  xmmword ptr [rbx+20h], xmm0                                    ; +0x37, 0x1800b3d57\nmovups  xmmword ptr [rbx+30h], xmm0                                    ; +0x3b, 0x1800b3d5b\nmov     [rbx+40h], rax                                                 ; +0x3f, 0x1800b3d5f\nmov     rcx, rbx; this                                                 ; +0x43, 0x1800b3d63\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x46, 0x1800b3d66\nlea     rax, ??_7CCTouchHandler@cocos2d@@6B@; const cocos2d::CCTouchHandler::`vftable' ; +0x4b, 0x1800b3d6b\nmov     [rbx], rax                                                     ; +0x52, 0x1800b3d72\njmp     short loc_1800B3D79                                            ; +0x55, 0x1800b3d75\nxor     ebx, ebx                                                       ; +0x57, 0x1800b3d77\ntest    rbx, rbx                                                       ; +0x59, 0x1800b3d79\njz      short loc_1800B3DE1                                            ; +0x5c, 0x1800b3d7c\nmov     rax, [rbx]                                                     ; +0x5e, 0x1800b3d7e\nmov     r9, [rax+48h]                                                  ; +0x61, 0x1800b3d81\nlea     rax, ?initWithDelegate@CCTouchHandler@cocos2d@@UEAA_NPEAVCCTouchDelegate@2@H@Z; cocos2d::CCTouchHandler::initWithDelegate(cocos2d::CCTouchDelegate *,int) ; +0x65, 0x1800b3d85\ncmp     r9, rax                                                        ; +0x6c, 0x1800b3d8c\njnz     short loc_1800B3DC9                                            ; +0x6f, 0x1800b3d8f\nmov     [rbx+38h], rdi                                                 ; +0x71, 0x1800b3d91\nmov     [rsp+38h+var_18], 0                                            ; +0x75, 0x1800b3d95\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x7d, 0x1800b3d9d\nlea     r8, ??_R0?AVCCTouchDelegate@cocos2d@@@8; cocos2d::CCTouchDelegate `RTTI Type Descriptor' ; +0x84, 0x1800b3da4\nxor     edx, edx                                                       ; +0x8b, 0x1800b3dab\nmov     rcx, rdi                                                       ; +0x8d, 0x1800b3dad\ncall    __RTDynamicCast                                                ; +0x90, 0x1800b3db0\nmov     rcx, rax; this                                                 ; +0x95, 0x1800b3db5\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x98, 0x1800b3db8\nmov     [rbx+40h], esi                                                 ; +0x9d, 0x1800b3dbd\nmov     dword ptr [rbx+44h], 0                                         ; +0xa0, 0x1800b3dc0\njmp     short loc_1800B3DD9                                            ; +0xa7, 0x1800b3dc7\nmov     r8d, esi                                                       ; +0xa9, 0x1800b3dc9\nmov     rdx, rdi                                                       ; +0xac, 0x1800b3dcc\nmov     rcx, rbx                                                       ; +0xaf, 0x1800b3dcf\ncall    r9                                                             ; +0xb2, 0x1800b3dd2\ntest    al, al                                                         ; +0xb5, 0x1800b3dd5\njz      short loc_1800B3DF4                                            ; +0xb7, 0x1800b3dd7\nmov     rcx, rbx; this                                                 ; +0xb9, 0x1800b3dd9\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xbc, 0x1800b3ddc\nmov     rax, rbx                                                       ; +0xc1, 0x1800b3de1\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xc4, 0x1800b3de4\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xc9, 0x1800b3de9\nadd     rsp, 30h                                                       ; +0xce, 0x1800b3dee\npop     rdi                                                            ; +0xd2, 0x1800b3df2\nretn                                                                   ; +0xd3, 0x1800b3df3\nmov     rcx, rbx; this                                                 ; +0xd4, 0x1800b3df4\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xd7, 0x1800b3df7\nxor     eax, eax                                                       ; +0xdc, 0x1800b3dfc\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xde, 0x1800b3dfe\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xe3, 0x1800b3e03\nadd     rsp, 30h                                                       ; +0xe8, 0x1800b3e08\npop     rdi                                                            ; +0xec, 0x1800b3e0c\nretn                                                                   ; +0xed, 0x1800b3e0d", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b87c0"], "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"}