{"type": "func", "start": 6442817680, "end": 6442817791, "name": "cocos2d::CCMenu::registerWithTouchDispatcher", "pseudocode": "// \n// cocos2d::CCMenu::registerWithTouchDispatcher from 0x180059890 to 0x1800598ff (111 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800f7060\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2b74\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::CCMenu::registerWithTouchDispatcher(cocos2d::CCMenu *this)\n{\n  struct cocos2d::CCDirector *v2; // rsi\n  struct cocos2d::CCTouchDelegate *v3; // rbx\n  int v4; // ebp\n  cocos2d::CCTouchDispatcher *v5; // rax\n\n  v2 = cocos2d::CCDirector::sharedDirector();\n  v3 = &this->cocos2d::CCTouchDelegate;\n  v4 = ((__int64 (__fastcall *)(cocos2d::CCMenu *))this->getTouchPriority)(this);\n  if ( !this )\n    v3 = nullptr;\n  v5 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getTouchDispatcher)(v2);\n  cocos2d::CCTouchDispatcher::addTargetedDelegate(v5, v3, v4, 1);\n}", "assembly": "; \n; cocos2d::CCMenu::registerWithTouchDispatcher from 0x180059890 to 0x1800598ff (111 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800f7060\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2b74\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, 0x180059890\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180059895\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18005989a\npush    rdi                                                            ; +0xf, 0x18005989f\nsub     rsp, 20h                                                       ; +0x10, 0x1800598a0\nmov     rdi, rcx                                                       ; +0x14, 0x1800598a4\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17, 0x1800598a7\nmov     rdx, [rdi]                                                     ; +0x1c, 0x1800598ac\nmov     rcx, rdi                                                       ; +0x1f, 0x1800598af\nmov     rsi, rax                                                       ; +0x22, 0x1800598b2\ncall    qword ptr [rdx+3A8h]                                           ; +0x25, 0x1800598b5\nmov     r8, [rsi]                                                      ; +0x2b, 0x1800598bb\nlea     rbx, [rdi+140h]                                                ; +0x2e, 0x1800598be\nmov     ebp, eax                                                       ; +0x35, 0x1800598c5\nmov     rcx, rsi                                                       ; +0x37, 0x1800598c7\nxor     eax, eax                                                       ; +0x3a, 0x1800598ca\ntest    rdi, rdi                                                       ; +0x3c, 0x1800598cc\ncmovz   rbx, rax                                                       ; +0x3f, 0x1800598cf\ncall    qword ptr [r8+90h]                                             ; +0x43, 0x1800598d3\nmov     r9b, 1; bool                                                   ; +0x4a, 0x1800598da\nmov     r8d, ebp; int                                                  ; +0x4d, 0x1800598dd\nmov     rcx, rax; this                                                 ; +0x50, 0x1800598e0\nmov     rdx, rbx; struct cocos2d::CCTouchDelegate *                    ; +0x53, 0x1800598e3\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x56, 0x1800598e6\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x5b, 0x1800598eb\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x60, 0x1800598f0\nadd     rsp, 20h                                                       ; +0x65, 0x1800598f5\npop     rdi                                                            ; +0x69, 0x1800598f9\njmp     ?addTargetedDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@H_N@Z; cocos2d::CCTouchDispatcher::addTargetedDelegate(cocos2d::CCTouchDelegate *,int,bool) ; +0x6a, 0x1800598fa", "xrefs": ["<???> @ 0x1800f7060", "<???> @ 0x1801438a8", "<???> @ 0x1801b2b74"], "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"}