//
// CCTextInputNode::rightClick from 0x10006c9b0 to 0x10006cc61 (689 bytes)
//
// 2 xrefs:
// > sub_10006CC70 @ 0x10006cc7c
// > ??> @ 0x100aba2f8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:19:45 +0000
//
char __fastcall CCTextInputNode::rightClick(__int64 a1, float a2, float a3)
{
__int64 v4; // rax
__int64 v5; // r14
__int64 v6; // rax
const void *v7; // r14
void *v8; // rax
__int64 v9; // rax
__int64 v10; // rax
double v11; // xmm0_8
double v12; // xmm2_8
double v13; // xmm3_8
double v14; // xmm1_8
__int64 v15; // rax
__int64 v16; // rax
__int64 Handler_1; // rax
__int64 v18; // rdi
int Priority; // r14d
__int64 v20; // rax
__int64 v21; // rdi
_BYTE v23[8]; // [rsp+8h] [rbp-68h] BYREF
_BYTE v24[16]; // [rsp+10h] [rbp-60h] BYREF
float v25; // [rsp+20h] [rbp-50h] BYREF
float v26; // [rsp+28h] [rbp-48h] BYREF
float v27; // [rsp+2Ch] [rbp-44h]
_DWORD v28[2]; // [rsp+30h] [rbp-40h] BYREF
float v29; // [rsp+38h] [rbp-38h]
float v30; // [rsp+3Ch] [rbp-34h]
_BYTE v31[48]; // [rsp+40h] [rbp-30h] BYREF
v29 = a3;
v30 = a2;
if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1) )
return 0;
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);
if ( v4 )
{
v5 = v4;
while ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v5 + 352LL))(v5) )
{
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 512LL))(v5);
if ( !v5 )
goto LABEL_6;
}
return 0;
}
LABEL_6:
if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 992LL))(a1) )
return 0;
sub_100278250(v31, v30, v29);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);
if ( v6 )
{
v7 = (const void *)v6;
do
{
v8 = __dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,
-2);
if ( v8 )
{
if ( !(*(unsigned __int8 (__fastcall **)(void *, _BYTE *))(*(_QWORD *)v8 + 16LL))(v8, v31) )
return 0;
}
v7 = (const void *)(*(__int64 (__fastcall **)(const void *))(*(_QWORD *)v7 + 512LL))(v7);
}
while ( v7 );
}
sub_1002782D0(v23, v31);
cocos2d::CCNode::convertToNodeSpace(&v25, a1, v23);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278630(&v26, v9);
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 304LL))(*(_QWORD *)(a1 + 576));
sub_1002782D0(v28, v10);
*(_QWORD *)&v11 = v28[0] ^ 0x8000000080000000LL;
*(_QWORD *)&v12 = *(unsigned int *)(a1 + 628);
*(_QWORD *)&v13 = *(unsigned int *)(a1 + 632);
*(float *)&v11 = (float)(*(float *)&v11 * v26) - *(float *)&v12;
*(_QWORD *)&v14 = v28[1] ^ 0x8000000080000000LL;
*(float *)&v14 = (float)(*(float *)&v14 * v27) - *(float *)&v13;
*(float *)&v12 = (float)(*(float *)&v12 + *(float *)&v12) + v26;
*(float *)&v13 = (float)(*(float *)&v13 + *(float *)&v13) + v27;
sub_100278270(v24, v11, v14, v12, v13);
if ( !(unsigned __int8)sub_100278940(v24, &v25) )
return 0;
v15 = cocos2d::CCDirector::sharedDirector(v24, &v25);
v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 160LL))(v15);
Handler_1 = cocos2d::CCTouchDispatcher::findHandler_1(v16, a1 + 320);
if ( Handler_1 )
{
v18 = Handler_1;
Priority = cocos2d::CCTouchHandler::getPriority(Handler_1);
v20 = cocos2d::CCDirector::sharedDirector(v18, a1 + 320);
if ( Priority > *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 160LL))(v20) + 128) )
return 0;
}
v21 = *(_QWORD *)(a1 + 584);
if ( v21 )
{
if ( !(*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 40LL))(v21, a1) )
return 0;
}
sub_1002782D0(&v25, v31);
sub_1002787F0(v24, &unk_100BE1030);
CCTextInputNode::updateCursorPosition(a1, &v25);
if ( !*(_BYTE *)(a1 + 460) )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1160LL))(a1, 1);
sub_1002782D0(v24, v31);
CCTextInputNode::openEditMenu(a1, (__int64)v24);
return 1;
}