//
// CCScrollLayerExt::ccTouchBegan from 0x10041b960 to 0x10041bae6 (390 bytes)
//
// 3 xrefs:
// > sub_10041BAF0 @ 0x10041bafc
// > TableView::ccTouchBegan @ 0x1006ff465
// > ??> @ 0x100b3fc78
//
// 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:30:13 +0000
//
char __fastcall CCScrollLayerExt::ccTouchBegan(__int64 a1, __int64 a2)
{
__int64 v3; // rax
const void *v4; // r14
void *v5; // rax
__int64 v6; // rsi
__int64 v7; // rax
_QWORD *v8; // rax
_QWORD *v9; // rax
__int64 v10; // [rsp-50h] [rbp-50h] BYREF
__int64 v11; // [rsp-48h] [rbp-48h]
_OWORD v12[4]; // [rsp-40h] [rbp-40h] BYREF
if ( *(_BYTE *)(a1 + 501) )
return 0;
v11 = a2;
cocos2d::CCTouch::getLocation((__int64)v12, a2);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);
if ( v3 )
{
v4 = (const void *)v3;
while ( 1 )
{
v5 = __dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,
-2);
if ( v5 )
{
if ( !(*(unsigned __int8 (__fastcall **)(void *, _OWORD *))(*(_QWORD *)v5 + 16LL))(v5, v12) )
break;
}
v4 = (const void *)(*(__int64 (__fastcall **)(const void *))(*(_QWORD *)v4 + 512LL))(v4);
if ( !v4 )
goto LABEL_9;
}
}
else
{
LABEL_9:
v6 = v11;
*(_QWORD *)(a1 + 416) = v11;
cocos2d::CCTouch::getLocationInView((__int64)&v10, v6);
v7 = cocos2d::CCDirector::sharedDirector(&v10, v6);
cocos2d::CCDirector::convertToGL(v12, v7, &v10);
v8 = sub_100278300((_QWORD *)(a1 + 424), v12);
sub_100278300((_QWORD *)(a1 + 432), v8);
cocos2d::CCNode::convertToNodeSpace((double *)v12, a1, (unsigned int *)(a1 + 424));
sub_100278300(&v10, v12);
sub_1002787A0(v12);
sub_100278300(v12, &qword_100BE38C8);
v9 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278660((_QWORD *)v12 + 1, v9);
if ( sub_100278940((float *)v12, (float *)&v10) )
{
cocos2d::CCNode::stopAllActions(*(_QWORD *)(a1 + 488));
cocos2d::CCTime::gettimeofdayCocos2d((timeval *)(a1 + 440));
*(_BYTE *)(a1 + 456) = 1;
return *(_BYTE *)(a1 + 501) ^ 1;
}
}
return 0;
}