{"type": "func", "start": 6443187072, "end": 6443187310, "name": "cocos2d::CCStandardTouchHandler::handlerWithDelegate", "pseudocode": "// \n// cocos2d::CCStandardTouchHandler::handlerWithDelegate from 0x1800b3b80 to 0x1800b3c6e (238 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2a9b\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b87a8\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\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCStandardTouchHandler *__fastcall cocos2d::CCStandardTouchHandler::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::CCStandardTouchHandler::`vftable';\n  }\n  else\n  {\n    v4 = nullptr;\n  }\n  if ( !v4 )\n    return (struct cocos2d::CCStandardTouchHandler *)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 (struct cocos2d::CCStandardTouchHandler *)v4;\n  }\n  if ( initWithDelegate(v4, a1, a2) )\n    goto LABEL_8;\n  cocos2d::CCObject::release(v4);\n  return nullptr;\n}", "assembly": "; \n; cocos2d::CCStandardTouchHandler::handlerWithDelegate from 0x1800b3b80 to 0x1800b3c6e (238 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2a9b\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b87a8\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, 0x1800b3b80\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800b3b85\npush    rdi                                                            ; +0xa, 0x1800b3b8a\nsub     rsp, 30h                                                       ; +0xb, 0x1800b3b8b\nmov     esi, edx                                                       ; +0xf, 0x1800b3b8f\nmov     rdi, rcx                                                       ; +0x11, 0x1800b3b91\nmov     ecx, 48h ; 'H'; Size                                           ; +0x14, 0x1800b3b94\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x19, 0x1800b3b99\nmov     rbx, rax                                                       ; +0x1e, 0x1800b3b9e\nmov     [rsp+38h+arg_10], rax                                          ; +0x21, 0x1800b3ba1\ntest    rax, rax                                                       ; +0x26, 0x1800b3ba6\njz      short loc_1800B3BD7                                            ; +0x29, 0x1800b3ba9\nxorps   xmm0, xmm0                                                     ; +0x2b, 0x1800b3bab\nxor     eax, eax                                                       ; +0x2e, 0x1800b3bae\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x30, 0x1800b3bb0\nmovups  xmmword ptr [rbx+10h], xmm0                                    ; +0x33, 0x1800b3bb3\nmovups  xmmword ptr [rbx+20h], xmm0                                    ; +0x37, 0x1800b3bb7\nmovups  xmmword ptr [rbx+30h], xmm0                                    ; +0x3b, 0x1800b3bbb\nmov     [rbx+40h], rax                                                 ; +0x3f, 0x1800b3bbf\nmov     rcx, rbx; this                                                 ; +0x43, 0x1800b3bc3\ncall    ??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x46, 0x1800b3bc6\nlea     rax, ??_7CCStandardTouchHandler@cocos2d@@6B@; const cocos2d::CCStandardTouchHandler::`vftable' ; +0x4b, 0x1800b3bcb\nmov     [rbx], rax                                                     ; +0x52, 0x1800b3bd2\njmp     short loc_1800B3BD9                                            ; +0x55, 0x1800b3bd5\nxor     ebx, ebx                                                       ; +0x57, 0x1800b3bd7\ntest    rbx, rbx                                                       ; +0x59, 0x1800b3bd9\njz      short loc_1800B3C41                                            ; +0x5c, 0x1800b3bdc\nmov     rax, [rbx]                                                     ; +0x5e, 0x1800b3bde\nmov     r9, [rax+48h]                                                  ; +0x61, 0x1800b3be1\nlea     rax, ?initWithDelegate@CCTouchHandler@cocos2d@@UEAA_NPEAVCCTouchDelegate@2@H@Z; cocos2d::CCTouchHandler::initWithDelegate(cocos2d::CCTouchDelegate *,int) ; +0x65, 0x1800b3be5\ncmp     r9, rax                                                        ; +0x6c, 0x1800b3bec\njnz     short loc_1800B3C29                                            ; +0x6f, 0x1800b3bef\nmov     [rbx+38h], rdi                                                 ; +0x71, 0x1800b3bf1\nmov     [rsp+38h+var_18], 0                                            ; +0x75, 0x1800b3bf5\nlea     r9, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x7d, 0x1800b3bfd\nlea     r8, ??_R0?AVCCTouchDelegate@cocos2d@@@8; cocos2d::CCTouchDelegate `RTTI Type Descriptor' ; +0x84, 0x1800b3c04\nxor     edx, edx                                                       ; +0x8b, 0x1800b3c0b\nmov     rcx, rdi                                                       ; +0x8d, 0x1800b3c0d\ncall    __RTDynamicCast                                                ; +0x90, 0x1800b3c10\nmov     rcx, rax; this                                                 ; +0x95, 0x1800b3c15\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x98, 0x1800b3c18\nmov     [rbx+40h], esi                                                 ; +0x9d, 0x1800b3c1d\nmov     dword ptr [rbx+44h], 0                                         ; +0xa0, 0x1800b3c20\njmp     short loc_1800B3C39                                            ; +0xa7, 0x1800b3c27\nmov     r8d, esi                                                       ; +0xa9, 0x1800b3c29\nmov     rdx, rdi                                                       ; +0xac, 0x1800b3c2c\nmov     rcx, rbx                                                       ; +0xaf, 0x1800b3c2f\ncall    r9                                                             ; +0xb2, 0x1800b3c32\ntest    al, al                                                         ; +0xb5, 0x1800b3c35\njz      short loc_1800B3C54                                            ; +0xb7, 0x1800b3c37\nmov     rcx, rbx; this                                                 ; +0xb9, 0x1800b3c39\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xbc, 0x1800b3c3c\nmov     rax, rbx                                                       ; +0xc1, 0x1800b3c41\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xc4, 0x1800b3c44\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xc9, 0x1800b3c49\nadd     rsp, 30h                                                       ; +0xce, 0x1800b3c4e\npop     rdi                                                            ; +0xd2, 0x1800b3c52\nretn                                                                   ; +0xd3, 0x1800b3c53\nmov     rcx, rbx; this                                                 ; +0xd4, 0x1800b3c54\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xd7, 0x1800b3c57\nxor     eax, eax                                                       ; +0xdc, 0x1800b3c5c\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xde, 0x1800b3c5e\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xe3, 0x1800b3c63\nadd     rsp, 30h                                                       ; +0xe8, 0x1800b3c68\npop     rdi                                                            ; +0xec, 0x1800b3c6c\nretn                                                                   ; +0xed, 0x1800b3c6d", "xrefs": ["cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2a9b", "<???> @ 0x1801438a8", "<???> @ 0x1801b87a8"], "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"}