{"type": "func", "start": 6442468160, "end": 6442468274, "name": "cocos2d::extension::CCControl::registerWithTouchDispatcher", "pseudocode": "// \n// cocos2d::extension::CCControl::registerWithTouchDispatcher from 0x180004340 to 0x1800043b2 (114 bytes)\n// \n// 10 xrefs:\n// > <???> @ 0x180023a58\n// > <???> @ 0x180024058\n// > <???> @ 0x1800245c8\n// > <???> @ 0x180025280\n// > <???> @ 0x180025e18\n// > <???> @ 0x1800263e8\n// > <???> @ 0x180026a10\n// > <???> @ 0x180027ea0\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x1800493e4\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\nvoid __fastcall cocos2d::extension::CCControl::registerWithTouchDispatcher(\n        cocos2d::extension::CCControl *this,\n        __int64 a2)\n{\n  __int64 v3; // rsi\n  struct cocos2d::CCTouchDelegate *v4; // rbx\n  int v5; // ebp\n  cocos2d::CCTouchDispatcher *v6; // rax\n\n  v3 = cocos2d::CCDirector::sharedDirector(this, a2);\n  v4 = (cocos2d::extension::CCControl *)((char *)this + 320);\n  v5 = (*(__int64 (__fastcall **)(cocos2d::extension::CCControl *))(*(_QWORD *)this + 936LL))(this);\n  if ( !this )\n    v4 = nullptr;\n  v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 144LL))(v3);\n  cocos2d::CCTouchDispatcher::addTargetedDelegate(v6, v4, v5, 1);\n}", "assembly": "; \n; cocos2d::extension::CCControl::registerWithTouchDispatcher from 0x180004340 to 0x1800043b2 (114 bytes)\n; \n; 10 xrefs:\n; > <???> @ 0x180023a58\n; > <???> @ 0x180024058\n; > <???> @ 0x1800245c8\n; > <???> @ 0x180025280\n; > <???> @ 0x180025e18\n; > <???> @ 0x1800263e8\n; > <???> @ 0x180026a10\n; > <???> @ 0x180027ea0\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x1800493e4\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, 0x180004340\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180004345\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000434a\npush    rdi                                                            ; +0xf, 0x18000434f\nsub     rsp, 20h                                                       ; +0x10, 0x180004350\nmov     rdi, rcx                                                       ; +0x14, 0x180004354\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17, 0x180004357\nmov     rdx, [rdi]                                                     ; +0x1d, 0x18000435d\nmov     rcx, rdi                                                       ; +0x20, 0x180004360\nmov     rsi, rax                                                       ; +0x23, 0x180004363\ncall    qword ptr [rdx+3A8h]                                           ; +0x26, 0x180004366\nmov     r8, [rsi]                                                      ; +0x2c, 0x18000436c\nlea     rbx, [rdi+140h]                                                ; +0x2f, 0x18000436f\nmov     ebp, eax                                                       ; +0x36, 0x180004376\nmov     rcx, rsi                                                       ; +0x38, 0x180004378\nxor     eax, eax                                                       ; +0x3b, 0x18000437b\ntest    rdi, rdi                                                       ; +0x3d, 0x18000437d\ncmovz   rbx, rax                                                       ; +0x40, 0x180004380\ncall    qword ptr [r8+90h]                                             ; +0x44, 0x180004384\nmov     r9b, 1                                                         ; +0x4b, 0x18000438b\nmov     r8d, ebp                                                       ; +0x4e, 0x18000438e\nmov     rcx, rax                                                       ; +0x51, 0x180004391\nmov     rdx, rbx                                                       ; +0x54, 0x180004394\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x57, 0x180004397\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x5c, 0x18000439c\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x61, 0x1800043a1\nadd     rsp, 20h                                                       ; +0x66, 0x1800043a6\npop     rdi                                                            ; +0x6a, 0x1800043aa\njmp     cs:?addTargetedDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@H_N@Z; cocos2d::CCTouchDispatcher::addTargetedDelegate(cocos2d::CCTouchDelegate *,int,bool) ; +0x6b, 0x1800043ab", "xrefs": ["<???> @ 0x180023a58", "<???> @ 0x180024058", "<???> @ 0x1800245c8", "<???> @ 0x180025280", "<???> @ 0x180025e18", "<???> @ 0x1800263e8", "<???> @ 0x180026a10", "<???> @ 0x180027ea0", "<???> @ 0x18002fdf8", "<???> @ 0x1800493e4"], "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"}