{"type": "func", "start": 6442788656, "end": 6442788782, "name": "cocos2d::CCLayer::registerWithTouchDispatcher", "pseudocode": "// \n// cocos2d::CCLayer::registerWithTouchDispatcher from 0x180052730 to 0x1800527ae (126 bytes)\n// \n// 7 xrefs:\n// > <???> @ 0x1800f33b8\n// > <???> @ 0x1800f3898\n// > <???> @ 0x1800f3df0\n// > <???> @ 0x1800f4378\n// > <???> @ 0x1800f4970\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc2c8\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:45 +0000\n// \n\nvoid __fastcall cocos2d::CCLayer::registerWithTouchDispatcher(cocos2d::CCLayer *this)\n{\n  struct cocos2d::CCDirector *v2; // rax\n  cocos2d::CCTouchDispatcher *v3; // rax\n  __int64 v4; // r8\n  struct cocos2d::CCTouchDelegate *v5; // rdx\n  char v6; // r9\n  int v7; // r8d\n\n  v2 = cocos2d::CCDirector::sharedDirector();\n  v3 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v2 + 144LL))(v2);\n  v4 = *((_QWORD *)this + 46);\n  v5 = (cocos2d::CCLayer *)((char *)this + 320);\n  if ( v4 )\n  {\n    if ( !*(_BYTE *)(v4 + 64) )\n    {\n      v6 = *(_BYTE *)(v4 + 72);\n      v7 = *(_DWORD *)(v4 + 68);\nLABEL_9:\n      if ( !this )\n        v5 = nullptr;\n      cocos2d::CCTouchDispatcher::addTargetedDelegate(v3, v5, v7, v6);\n      return;\n    }\n  }\n  else if ( *((_DWORD *)this + 99) )\n  {\n    v7 = *((_DWORD *)this + 98);\n    v6 = 1;\n    goto LABEL_9;\n  }\n  if ( !this )\n    v5 = nullptr;\n  cocos2d::CCTouchDispatcher::addStandardDelegate(v3, v5, 0);\n}", "assembly": "; \n; cocos2d::CCLayer::registerWithTouchDispatcher from 0x180052730 to 0x1800527ae (126 bytes)\n; \n; 7 xrefs:\n; > <???> @ 0x1800f33b8\n; > <???> @ 0x1800f3898\n; > <???> @ 0x1800f3df0\n; > <???> @ 0x1800f4378\n; > <???> @ 0x1800f4970\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc2c8\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:45 +0000\n; \npush    rbx                                                            ; +0x0, 0x180052730\nsub     rsp, 20h                                                       ; +0x2, 0x180052732\nmov     rbx, rcx                                                       ; +0x6, 0x180052736\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x9, 0x180052739\nmov     rcx, rax                                                       ; +0xe, 0x18005273e\nmov     rdx, [rax]                                                     ; +0x11, 0x180052741\ncall    qword ptr [rdx+90h]                                            ; +0x14, 0x180052744\nmov     r8, [rbx+170h]                                                 ; +0x1a, 0x18005274a\nlea     rdx, [rbx+140h]                                                ; +0x21, 0x180052751\nxor     ecx, ecx                                                       ; +0x28, 0x180052758\ntest    r8, r8                                                         ; +0x2a, 0x18005275a\njz      short loc_180052770                                            ; +0x2d, 0x18005275d\ncmp     [r8+40h], cl                                                   ; +0x2f, 0x18005275f\njnz     short loc_180052779                                            ; +0x33, 0x180052763\nmovzx   r9d, byte ptr [r8+48h]                                         ; +0x35, 0x180052765\nmov     r8d, [r8+44h]                                                  ; +0x3a, 0x18005276a\njmp     short loc_18005279A                                            ; +0x3e, 0x18005276e\ncmp     dword ptr [rbx+18Ch], 0                                        ; +0x40, 0x180052770\njnz     short loc_180052790                                            ; +0x47, 0x180052777\ntest    rbx, rbx                                                       ; +0x49, 0x180052779\ncmovz   rdx, rcx; struct cocos2d::CCTouchDelegate *                    ; +0x4c, 0x18005277c\nxor     r8d, r8d; int                                                  ; +0x50, 0x180052780\nmov     rcx, rax; this                                                 ; +0x53, 0x180052783\nadd     rsp, 20h                                                       ; +0x56, 0x180052786\npop     rbx                                                            ; +0x5a, 0x18005278a\njmp     ?addStandardDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@H@Z; cocos2d::CCTouchDispatcher::addStandardDelegate(cocos2d::CCTouchDelegate *,int) ; +0x5b, 0x18005278b\nmov     r8d, [rbx+188h]; int                                           ; +0x60, 0x180052790\nmov     r9b, 1; bool                                                   ; +0x67, 0x180052797\ntest    rbx, rbx                                                       ; +0x6a, 0x18005279a\ncmovz   rdx, rcx; struct cocos2d::CCTouchDelegate *                    ; +0x6d, 0x18005279d\nmov     rcx, rax; this                                                 ; +0x71, 0x1800527a1\nadd     rsp, 20h                                                       ; +0x74, 0x1800527a4\npop     rbx                                                            ; +0x78, 0x1800527a8\njmp     ?addTargetedDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@H_N@Z; cocos2d::CCTouchDispatcher::addTargetedDelegate(cocos2d::CCTouchDelegate *,int,bool) ; +0x79, 0x1800527a9", "xrefs": ["<???> @ 0x1800f33b8", "<???> @ 0x1800f3898", "<???> @ 0x1800f3df0", "<???> @ 0x1800f4378", "<???> @ 0x1800f4970", "<???> @ 0x18014cf68", "<???> @ 0x1801bc2c8"], "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"}