//
// MenuGameLayer::ccTouchBegan from 0x1004f9fd0 to 0x1004fa0cc (252 bytes)
//
// 2 xrefs:
// > sub_1004FA0D0 @ 0x1004fa0db
// > ??> @ 0x100b640a8
//
// 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:31:28 +0000
//
char __fastcall MenuGameLayer::ccTouchBegan(__int64 a1, __int64 a2, double a3, double a4, double a5, __m128 a6)
{
double v6; // xmm0_8
unsigned __int64 *v7; // rax
__int64 v8; // rax
int v9; // eax
const char *v10; // r14
__int64 v11; // rax
__int64 v13; // [rsp+8h] [rbp-28h] BYREF
unsigned __int64 v14[4]; // [rsp+10h] [rbp-20h] BYREF
cocos2d::CCTouch::getLocation((__int64)v14, a2);
cocos2d::CCNode::convertToNodeSpace((double *)&v13, a1, (unsigned int *)v14);
sub_100278300(v14, &v13);
*(_QWORD *)&v6 = LODWORD(v14[0]);
if ( *(float *)v14 > 50.0 )
{
v7 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 192LL))(*(_QWORD *)(a1 + 432));
*(float *)&v6 = cocos2d::ccpDistance(v7, v14);
if ( *(float *)&v6 <= 30.0 )
{
if ( PlayerObject::isFlying(*(_BYTE **)(a1 + 432)) )
goto LABEL_12;
v8 = *(_QWORD *)(a1 + 432);
if ( *(_BYTE *)(v8 + 2419) )
goto LABEL_12;
if ( *(_BYTE *)(v8 + 2421) )
goto LABEL_12;
*(_QWORD *)&v6 = *(unsigned int *)(v8 + 2472);
if ( *(float *)&v6 != 1.0 )
goto LABEL_12;
v9 = *(_DWORD *)(v8 + 1560);
if ( v9 == 55 )
{
v10 = "geometry.ach.secret11";
}
else
{
if ( v9 != 50 )
{
LABEL_12:
MenuGameLayer::destroyPlayer(a1, v6, COERCE_DOUBLE(1106247680), a5, a6);
return 1;
}
v10 = "geometry.ach.secret12";
}
v11 = GameManager::sharedState();
GameManager::reportAchievementWithID(v11, v10, 100, 0);
goto LABEL_12;
}
}
return 1;
}