//
// SecretGame01Layer::onSelectButton from 0xbc52b4 to 0xbc5380 (204 bytes)
//
// 3 xrefs:
// > ??> @ 0xb0e48
// > SecretGame01Layer::resetGame @ 0xbc7204
// > ??> @ 0x15450a0
//
// This function is hookable on this platform (idp: arm, 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 13:03:31 +0000
//
__int64 __fastcall SecretGame01Layer::onSelectButton(SecretGame01Layer *this, cocos2d::CCObject *a2)
{
int v3; // w20
unsigned int v4; // w21
CCMenuItemSpriteExtra *v5; // x21
cocos2d::CCArray *v7; // x0
unsigned int v8; // w20
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *((_DWORD *)this + 108);
if ( v4 <= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 52)) - 1 )
{
v5 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(
*((cocos2d::CCArray **)this + 52),
*((_DWORD *)this + 108));
if ( (*(unsigned int (__fastcall **)(CCMenuItemSpriteExtra *))(*(_QWORD *)v5 + 64LL))(v5) != v3 )
return SecretGame01Layer::showGameOver(this);
}
else
{
v5 = nullptr;
if ( v3 != -1 )
return SecretGame01Layer::showGameOver(this);
}
v7 = *((cocos2d::CCArray **)this + 52);
v8 = *((_DWORD *)this + 108) + 1;
*((_DWORD *)this + 108) = v8;
if ( v8 >= (unsigned int)cocos2d::CCArray::count(v7) )
return SecretGame01Layer::showGameWon(this);
else
return SecretGame01Layer::didSelectCorrectObject((__int64)this, v5);
}