//
// CCTextInputNode::ccTouchBegan from 0x140058bd0 to 0x140058d32 (354 bytes)
//
// 2 xrefs:
// > ??> @ 0x14070d5a0
// > ??> @ 0x1409104c0
//
// 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 11:25:41 +0000
//
char __fastcall CCTextInputNode::ccTouchBegan(__int64 a1, __int64 a2)
{
__int64 v2; // rdi
__int64 i; // rbx
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v11; // rcx
float *v12; // rax
_BYTE v13[40]; // [rsp+30h] [rbp-28h] BYREF
char v14; // [rsp+60h] [rbp+8h] BYREF
char v15; // [rsp+78h] [rbp+20h] BYREF
v2 = a1 - 320;
if ( CCTextInputNode::isVisibleInTree(a1 - 320) )
{
cocos2d::CCTouch::getLocation(a2, &v14);
if ( v2 )
{
for ( i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 504LL))(v2);
i;
i = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)i + 504LL))(i) )
{
v6 = _RTDynamicCast(
i,
0,
&cocos2d::CCNode `RTTI Type Descriptor',
&cocos2d::CCTouchClipper `RTTI Type Descriptor',
0);
if ( v6 )
{
if ( !(*(unsigned __int8 (__fastcall **)(__int64, char *))(*(_QWORD *)v6 + 8LL))(v6, &v14) )
return 0;
}
}
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);
if ( CCTextInputNode::containsTouchPoint(v2, v7) )
{
v9 = *(_QWORD *)(a1 + 336);
if ( v9 )
{
ScrollableContentLayer::handleTouchBegan(v9, a2);
LABEL_10:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);
return 1;
}
v11 = *(_QWORD *)(a1 + 280);
if ( !v11 || (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 40LL))(v11, v2) )
{
LOBYTE(v8) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1032LL))(v2, v8);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v13, (const struct cocos2d::CCRect *)&unk_140909B68);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);
CCTextInputNode::updateCursorPosition(v2, v12);
goto LABEL_10;
}
}
}
return 0;
}