//
// cocos2d::extension::CCControlButton::ccTouchBegan from 0x1003405f0 to 0x1003406ab (187 bytes)
//
// 2 xrefs:
// > ??> @ 0x100b1ddf8
// > ??> @ 0x100b524e0
//
// 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:28:43 +0000
//
char __fastcall cocos2d::extension::CCControlButton::ccTouchBegan(__int64 a1)
{
__int64 v1; // r14
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1352LL))(a1)
&& (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1272LL))(a1)
&& (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1)
&& (unsigned __int8)cocos2d::extension::CCControl::hasVisibleParents(a1) )
{
v1 = *(_QWORD *)(a1 + 216);
if ( !v1 )
{
LABEL_8:
*(_BYTE *)(a1 + 524) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1296LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1320LL))(a1, 1);
return 1;
}
while ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v1 + 352LL))(v1) )
{
v1 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 512LL))(v1);
if ( !v1 )
goto LABEL_8;
}
}
return 0;
}