//
// UIOptionsLayer::ccTouchBegan from 0x1002a2bb0 to 0x1002a2cc4 (276 bytes)
//
// 2 xrefs:
// > sub_1002A2CD0 @ 0x1002a2cdb
// > ??> @ 0x100b09c90
//
// 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:27:55 +0000
//
char __fastcall UIOptionsLayer::ccTouchBegan(__int64 a1, __int64 a2)
{
char v2; // bl
__int64 v3; // r12
__int64 v4; // r15
int v5; // eax
unsigned __int64 *v6; // rax
unsigned int v8; // [rsp+8h] [rbp-48h] BYREF
unsigned __int64 v9; // [rsp+10h] [rbp-40h] BYREF
__int64 v10; // [rsp+18h] [rbp-38h] BYREF
__int64 v11; // [rsp+20h] [rbp-30h]
v11 = a2;
cocos2d::CCTouch::getLocation((__int64)&v8, a2);
cocos2d::CCNode::convertToNodeSpace((double *)&v9, a1, &v8);
v2 = *(_BYTE *)(a1 + 1012);
v3 = 0;
while ( 1 )
{
v4 = *(_QWORD *)(a1 + 8 * v3 + 1016);
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v4 + 352LL))(v4) )
{
cocos2d::CCNode::convertToNodeSpace((double *)&v10, v4, &v8);
if ( (unsigned int)GJUINode::touchTest(v4, &v10) )
break;
}
if ( (unsigned int)v3 <= 2 )
{
++v3;
if ( v2 )
continue;
}
return 1;
}
if ( *(_BYTE *)(a1 + 1012) == 1 )
{
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4);
UIOptionsLayer::toggleUIGroup(a1, v5);
}
*(_DWORD *)(v4 + 352) = *(_DWORD *)(v11 + 56);
sub_100278300((_QWORD *)(v4 + 364), &v9);
v6 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4);
sub_100278370((double *)&v10, &v9, v6);
sub_100278300((_QWORD *)(v4 + 356), &v10);
return 1;
}