{"type": "func", "start": 5369074000, "end": 5369074512, "name": "CCTextInputNode::rightClick", "pseudocode": "// \n// CCTextInputNode::rightClick from 0x140059150 to 0x140059350 (512 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14070d568\n// > <???> @ 0x14091052c\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:25:41 +0000\n// \n\nchar __fastcall CCTextInputNode::rightClick(__int64 a1, float a2, float a3)\n{\n  __int64 v3; // rdi\n  __int64 i; // rbx\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rax\n  struct cocos2d::CCTouchDelegate *v9; // rbx\n  cocos2d::CCTouchDispatcher *v10; // rax\n  cocos2d::CCTouchHandler *Handler; // rsi\n  __int64 v12; // rax\n  int v13; // ebx\n  __int64 v14; // rcx\n  float *v15; // rax\n  __int64 v16; // rdx\n  __int64 v17; // rax\n  _BYTE v19[16]; // [rsp+30h] [rbp-48h] BYREF\n  char v20; // [rsp+80h] [rbp+8h] BYREF\n  char v21; // [rsp+98h] [rbp+20h] BYREF\n\n  v3 = a1 - 352;\n  if ( !CCTextInputNode::isVisibleInTree(a1 - 352)\n    || !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v3 + 912LL))(v3) )\n  {\n    return 0;\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, a2, a3);\n  if ( v3 )\n  {\n    for ( i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 504LL))(v3);\n          i;\n          i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)i + 504LL))(i) )\n    {\n      v6 = _RTDynamicCast(\n             i,\n             0,\n             &cocos2d::CCNode `RTTI Type Descriptor',\n             &cocos2d::CCTouchClipper `RTTI Type Descriptor',\n             0);\n      if ( v6 )\n      {\n        if ( !(*(unsigned __int8 (__fastcall **)(__int64, char *))(*(_QWORD *)v6 + 8LL))(v6, &v20) )\n          return 0;\n      }\n    }\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, (const struct cocos2d::CCPoint *)&v20);\n  if ( !CCTextInputNode::containsTouchPoint(v3, v7) )\n    return 0;\n  v8 = cocos2d::CCDirector::sharedDirector();\n  v9 = (struct cocos2d::CCTouchDelegate *)(v3 + 320);\n  if ( !v3 )\n    v9 = nullptr;\n  v10 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 144LL))(v8);\n  Handler = cocos2d::CCTouchDispatcher::findHandler(v10, v9);\n  if ( Handler )\n  {\n    v12 = cocos2d::CCDirector::sharedDirector();\n    v13 = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 144LL))(v12) + 128);\n    if ( cocos2d::CCTouchHandler::getPriority(Handler) > v13 )\n      return 0;\n  }\n  v14 = *(_QWORD *)(a1 + 248);\n  if ( v14 )\n  {\n    if ( !(*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 40LL))(v14, v3) )\n      return 0;\n  }\n  cocos2d::CCRect::CCRect((cocos2d::CCRect *)v19, (const struct cocos2d::CCRect *)&unk_140909B68);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, (const struct cocos2d::CCPoint *)&v20);\n  CCTextInputNode::updateCursorPosition(v3, v15);\n  if ( !*(_BYTE *)(a1 + 116) )\n  {\n    LOBYTE(v16) = 1;\n    (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 1032LL))(v3, v16);\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, (const struct cocos2d::CCPoint *)&v20);\n  CCTextInputNode::openEditMenu(v3, v17);\n  return 1;\n}", "assembly": "; \n; CCTextInputNode::rightClick from 0x140059150 to 0x140059350 (512 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14070d568\n; > <???> @ 0x14091052c\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:25:41 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140059150\npush    rbp                                                            ; +0x5, 0x140059155\npush    rsi                                                            ; +0x6, 0x140059156\npush    rdi                                                            ; +0x7, 0x140059157\nsub     rsp, 60h                                                       ; +0x8, 0x140059158\nmovaps  [rsp+78h+var_28], xmm6                                         ; +0xc, 0x14005915c\nlea     rdi, [rcx-160h]                                                ; +0x11, 0x140059161\nmov     rbp, rcx                                                       ; +0x18, 0x140059168\nmovaps  [rsp+78h+var_38], xmm7                                         ; +0x1b, 0x14005916b\nmov     rcx, rdi                                                       ; +0x20, 0x140059170\nmovaps  xmm6, xmm2                                                     ; +0x23, 0x140059173\nmovaps  xmm7, xmm1                                                     ; +0x26, 0x140059176\ncall    CCTextInputNode__isVisibleInTree                               ; +0x29, 0x140059179\ntest    al, al                                                         ; +0x2e, 0x14005917e\njz      loc_140059334                                                  ; +0x30, 0x140059180\nmov     rax, [rdi]                                                     ; +0x36, 0x140059186\nmov     rcx, rdi                                                       ; +0x39, 0x140059189\ncall    qword ptr [rax+390h]                                           ; +0x3c, 0x14005918c\ntest    al, al                                                         ; +0x42, 0x140059192\njz      loc_140059334                                                  ; +0x44, 0x140059194\nmovaps  xmm2, xmm6                                                     ; +0x4a, 0x14005919a\nlea     rcx, [rsp+78h+arg_0]                                           ; +0x4d, 0x14005919d\nmovaps  xmm1, xmm7                                                     ; +0x55, 0x1400591a5\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x58, 0x1400591a8\nxor     esi, esi                                                       ; +0x5e, 0x1400591ae\ntest    rdi, rdi                                                       ; +0x60, 0x1400591b0\njz      short loc_140059222                                            ; +0x63, 0x1400591b3\nmov     rax, [rdi]                                                     ; +0x65, 0x1400591b5\nmov     rcx, rdi                                                       ; +0x68, 0x1400591b8\ncall    qword ptr [rax+1F8h]                                           ; +0x6b, 0x1400591bb\nmov     rbx, rax                                                       ; +0x71, 0x1400591c1\ntest    rax, rax                                                       ; +0x74, 0x1400591c4\njz      short loc_140059222                                            ; +0x77, 0x1400591c7\nnop     dword ptr [rax+00000000h]                                      ; +0x79, 0x1400591c9\nlea     r9, ??_R0?AVCCTouchClipper@cocos2d@@@8; cocos2d::CCTouchClipper `RTTI Type Descriptor' ; +0x80, 0x1400591d0\nmov     [rsp+78h+var_58], esi                                          ; +0x87, 0x1400591d7\nlea     r8, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x8b, 0x1400591db\nxor     edx, edx                                                       ; +0x92, 0x1400591e2\nmov     rcx, rbx                                                       ; +0x94, 0x1400591e4\ncall    __RTDynamicCast                                                ; +0x97, 0x1400591e7\ntest    rax, rax                                                       ; +0x9c, 0x1400591ec\njz      short loc_14005920E                                            ; +0x9f, 0x1400591ef\nmov     rcx, [rax]                                                     ; +0xa1, 0x1400591f1\nlea     rdx, [rsp+78h+arg_0]                                           ; +0xa4, 0x1400591f4\nmov     r8, [rcx+8]                                                    ; +0xac, 0x1400591fc\nmov     rcx, rax                                                       ; +0xb0, 0x140059200\ncall    r8                                                             ; +0xb3, 0x140059203\ntest    al, al                                                         ; +0xb6, 0x140059206\njz      loc_140059334                                                  ; +0xb8, 0x140059208\nmov     rax, [rbx]                                                     ; +0xbe, 0x14005920e\nmov     rcx, rbx                                                       ; +0xc1, 0x140059211\ncall    qword ptr [rax+1F8h]                                           ; +0xc4, 0x140059214\nmov     rbx, rax                                                       ; +0xca, 0x14005921a\ntest    rax, rax                                                       ; +0xcd, 0x14005921d\njnz     short loc_1400591D0                                            ; +0xd0, 0x140059220\nlea     rdx, [rsp+78h+arg_0]                                           ; +0xd2, 0x140059222\nlea     rcx, [rsp+78h+arg_18]                                          ; +0xda, 0x14005922a\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xe2, 0x140059232\nmov     rdx, rax                                                       ; +0xe8, 0x140059238\nmov     rcx, rdi                                                       ; +0xeb, 0x14005923b\ncall    CCTextInputNode__containsTouchPoint                            ; +0xee, 0x14005923e\ntest    al, al                                                         ; +0xf3, 0x140059243\njz      loc_140059334                                                  ; +0xf5, 0x140059245\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xfb, 0x14005924b\ntest    rdi, rdi                                                       ; +0x101, 0x140059251\nlea     rbx, [rdi+140h]                                                ; +0x104, 0x140059254\ncmovz   rbx, rsi                                                       ; +0x10b, 0x14005925b\nmov     rcx, [rax]                                                     ; +0x10f, 0x14005925f\nmov     r8, [rcx+90h]                                                  ; +0x112, 0x140059262\nmov     rcx, rax                                                       ; +0x119, 0x140059269\ncall    r8                                                             ; +0x11c, 0x14005926c\nmov     rcx, rax                                                       ; +0x11f, 0x14005926f\nmov     rdx, rbx                                                       ; +0x122, 0x140059272\ncall    cs:?findHandler@CCTouchDispatcher@cocos2d@@QEAAPEAVCCTouchHandler@2@PEAVCCTouchDelegate@2@@Z; cocos2d::CCTouchDispatcher::findHandler(cocos2d::CCTouchDelegate *) ; +0x125, 0x140059275\nmov     rsi, rax                                                       ; +0x12b, 0x14005927b\ntest    rax, rax                                                       ; +0x12e, 0x14005927e\njz      short loc_1400592AF                                            ; +0x131, 0x140059281\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x133, 0x140059283\nmov     rcx, [rax]                                                     ; +0x139, 0x140059289\nmov     rdx, [rcx+90h]                                                 ; +0x13c, 0x14005928c\nmov     rcx, rax                                                       ; +0x143, 0x140059293\ncall    rdx                                                            ; +0x146, 0x140059296\nmov     rcx, rsi                                                       ; +0x148, 0x140059298\nmov     ebx, [rax+80h]                                                 ; +0x14b, 0x14005929b\ncall    cs:?getPriority@CCTouchHandler@cocos2d@@QEAAHXZ; cocos2d::CCTouchHandler::getPriority(void) ; +0x151, 0x1400592a1\ncmp     eax, ebx                                                       ; +0x157, 0x1400592a7\njg      loc_140059334                                                  ; +0x159, 0x1400592a9\nmov     rcx, [rbp+0F8h]                                                ; +0x15f, 0x1400592af\ntest    rcx, rcx                                                       ; +0x166, 0x1400592b6\njz      short loc_1400592C8                                            ; +0x169, 0x1400592b9\nmov     rax, [rcx]                                                     ; +0x16b, 0x1400592bb\nmov     rdx, rdi                                                       ; +0x16e, 0x1400592be\ncall    qword ptr [rax+28h]                                            ; +0x171, 0x1400592c1\ntest    al, al                                                         ; +0x174, 0x1400592c4\njz      short loc_140059334                                            ; +0x176, 0x1400592c6\nlea     rdx, unk_140909B68                                             ; +0x178, 0x1400592c8\nlea     rcx, [rsp+78h+var_48]                                          ; +0x17f, 0x1400592cf\ncall    cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x184, 0x1400592d4\nlea     rdx, [rsp+78h+arg_0]                                           ; +0x18a, 0x1400592da\nlea     rcx, [rsp+78h+arg_18]                                          ; +0x192, 0x1400592e2\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x19a, 0x1400592ea\nmov     rdx, rax                                                       ; +0x1a0, 0x1400592f0\nmov     rcx, rdi                                                       ; +0x1a3, 0x1400592f3\ncall    CCTextInputNode__updateCursorPosition                          ; +0x1a6, 0x1400592f6\ncmp     byte ptr [rbp+74h], 0                                          ; +0x1ab, 0x1400592fb\njnz     short loc_14005930F                                            ; +0x1af, 0x1400592ff\nmov     rax, [rdi]                                                     ; +0x1b1, 0x140059301\nmov     dl, 1                                                          ; +0x1b4, 0x140059304\nmov     rcx, rdi                                                       ; +0x1b6, 0x140059306\ncall    qword ptr [rax+408h]                                           ; +0x1b9, 0x140059309\nlea     rdx, [rsp+78h+arg_0]                                           ; +0x1bf, 0x14005930f\nlea     rcx, [rsp+78h+arg_18]                                          ; +0x1c7, 0x140059317\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1cf, 0x14005931f\nmov     rdx, rax                                                       ; +0x1d5, 0x140059325\nmov     rcx, rdi                                                       ; +0x1d8, 0x140059328\ncall    CCTextInputNode__openEditMenu                                  ; +0x1db, 0x14005932b\nmov     al, 1                                                          ; +0x1e0, 0x140059330\njmp     short loc_140059336                                            ; +0x1e2, 0x140059332\nxor     al, al                                                         ; +0x1e4, 0x140059334\nmov     rbx, [rsp+78h+arg_8]                                           ; +0x1e6, 0x140059336\nmovaps  xmm6, [rsp+78h+var_28]                                         ; +0x1ee, 0x14005933e\nmovaps  xmm7, [rsp+78h+var_38]                                         ; +0x1f3, 0x140059343\nadd     rsp, 60h                                                       ; +0x1f8, 0x140059348\npop     rdi                                                            ; +0x1fc, 0x14005934c\npop     rsi                                                            ; +0x1fd, 0x14005934d\npop     rbp                                                            ; +0x1fe, 0x14005934e\nretn                                                                   ; +0x1ff, 0x14005934f", "xrefs": ["<???> @ 0x14070d568", "<???> @ 0x14091052c"], "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"}