{"type": "func", "start": 6442815344, "end": 6442815552, "name": "cocos2d::CCMenu::ccTouchBegan", "pseudocode": "// \n// cocos2d::CCMenu::ccTouchBegan from 0x180058f70 to 0x180059040 (208 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800f7110\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2a84\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\nchar __fastcall cocos2d::CCMenu::ccTouchBegan(\n        cocos2d::CCMenu *this,\n        struct cocos2d::CCTouch *a2,\n        struct cocos2d::CCEvent *a3)\n{\n  __int64 v5; // rbx\n  struct cocos2d::CCMenuItem *v6; // rcx\n\n  if ( !LODWORD(this->m_sAdditionalTransform.a) && *((_BYTE *)this - 34) && LOBYTE(this->m_obContentSize.height) )\n  {\n    v5 = *((_QWORD *)this - 13);\n    if ( v5 )\n    {\n      while ( (*(unsigned __int8 (__fastcall **)(__int64, struct cocos2d::CCTouch *, struct cocos2d::CCEvent *))(*(_QWORD *)v5 + 328LL))(\n                v5,\n                a2,\n                a3) )\n      {\n        v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 488LL))(v5);\n        if ( !v5 )\n          goto LABEL_7;\n      }\n    }\n    else\n    {\nLABEL_7:\n      v6 = cocos2d::CCMenu::itemForTouch((cocos2d::CCMenu *)((char *)this - 320), a2, 0);\n      if ( !v6 )\n        v6 = cocos2d::CCMenu::itemForTouch((cocos2d::CCMenu *)((char *)this - 320), a2, 1);\n      *(_QWORD *)&this->m_sAdditionalTransform.b = v6;\n      if ( v6 )\n      {\n        LODWORD(this->m_sAdditionalTransform.a) = 1;\n        ((void (__fastcall *)(struct cocos2d::CCMenuItem *))v6->selected)(v6);\n        return 1;\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; cocos2d::CCMenu::ccTouchBegan from 0x180058f70 to 0x180059040 (208 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800f7110\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2a84\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, 0x180058f70\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180058f75\npush    rdi                                                            ; +0xa, 0x180058f7a\nsub     rsp, 20h                                                       ; +0xb, 0x180058f7b\ncmp     dword ptr [rcx+74h], 0                                         ; +0xf, 0x180058f7f\nmov     rsi, rdx                                                       ; +0x13, 0x180058f83\nmov     rdi, rcx                                                       ; +0x16, 0x180058f86\njnz     loc_18005902E                                                  ; +0x19, 0x180058f89\ncmp     byte ptr [rcx-22h], 0                                          ; +0x1f, 0x180058f8f\njz      loc_18005902E                                                  ; +0x23, 0x180058f93\ncmp     byte ptr [rcx+70h], 0                                          ; +0x29, 0x180058f99\njz      loc_18005902E                                                  ; +0x2d, 0x180058f9d\nmov     rbx, [rcx-68h]                                                 ; +0x33, 0x180058fa3\ntest    rbx, rbx                                                       ; +0x37, 0x180058fa7\njz      short loc_180058FD4                                            ; +0x3a, 0x180058faa\nnop     dword ptr [rax+00h]                                            ; +0x3c, 0x180058fac\nmov     rax, [rbx]                                                     ; +0x40, 0x180058fb0\nmov     rcx, rbx                                                       ; +0x43, 0x180058fb3\ncall    qword ptr [rax+148h]                                           ; +0x46, 0x180058fb6\ntest    al, al                                                         ; +0x4c, 0x180058fbc\njz      short loc_18005902E                                            ; +0x4e, 0x180058fbe\nmov     rax, [rbx]                                                     ; +0x50, 0x180058fc0\nmov     rcx, rbx                                                       ; +0x53, 0x180058fc3\ncall    qword ptr [rax+1E8h]                                           ; +0x56, 0x180058fc6\nmov     rbx, rax                                                       ; +0x5c, 0x180058fcc\ntest    rax, rax                                                       ; +0x5f, 0x180058fcf\njnz     short loc_180058FB0                                            ; +0x62, 0x180058fd2\nxor     r8d, r8d; bool                                                 ; +0x64, 0x180058fd4\nlea     rcx, [rdi-140h]; this                                          ; +0x67, 0x180058fd7\nmov     rdx, rsi; struct cocos2d::CCTouch *                            ; +0x6e, 0x180058fde\ncall    ?itemForTouch@CCMenu@cocos2d@@IEAAPEAVCCMenuItem@2@PEAVCCTouch@2@_N@Z; cocos2d::CCMenu::itemForTouch(cocos2d::CCTouch *,bool) ; +0x71, 0x180058fe1\nmov     rcx, rax                                                       ; +0x76, 0x180058fe6\ntest    rax, rax                                                       ; +0x79, 0x180058fe9\njnz     short loc_180059003                                            ; +0x7c, 0x180058fec\nmov     r8b, 1; bool                                                   ; +0x7e, 0x180058fee\nlea     rcx, [rdi-140h]; this                                          ; +0x81, 0x180058ff1\nmov     rdx, rsi; struct cocos2d::CCTouch *                            ; +0x88, 0x180058ff8\ncall    ?itemForTouch@CCMenu@cocos2d@@IEAAPEAVCCMenuItem@2@PEAVCCTouch@2@_N@Z; cocos2d::CCMenu::itemForTouch(cocos2d::CCTouch *,bool) ; +0x8b, 0x180058ffb\nmov     rcx, rax                                                       ; +0x90, 0x180059000\nmov     [rdi+78h], rcx                                                 ; +0x93, 0x180059003\ntest    rcx, rcx                                                       ; +0x97, 0x180059007\njz      short loc_18005902E                                            ; +0x9a, 0x18005900a\nmov     dword ptr [rdi+74h], 1                                         ; +0x9c, 0x18005900c\nmov     rax, [rcx]                                                     ; +0xa3, 0x180059013\ncall    qword ptr [rax+370h]                                           ; +0xa6, 0x180059016\nmov     al, 1                                                          ; +0xac, 0x18005901c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xae, 0x18005901e\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xb3, 0x180059023\nadd     rsp, 20h                                                       ; +0xb8, 0x180059028\npop     rdi                                                            ; +0xbc, 0x18005902c\nretn                                                                   ; +0xbd, 0x18005902d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbe, 0x18005902e\nxor     al, al                                                         ; +0xc3, 0x180059033\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc5, 0x180059035\nadd     rsp, 20h                                                       ; +0xca, 0x18005903a\npop     rdi                                                            ; +0xce, 0x18005903e\nretn                                                                   ; +0xcf, 0x18005903f", "xrefs": ["<???> @ 0x1800f7110", "<???> @ 0x1801438a8", "<???> @ 0x1801b2a84"], "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"}