//
// SecretGame01Layer::onSelectButton from 0x6e3358 to 0x6e33cc (116 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:22 +0000
//
int __fastcall SecretGame01Layer::onSelectButton(SecretGame01Layer *this, cocos2d::CCObject *a2)
{
int v3; // r0
unsigned int v4; // r6
int v5; // r5
CCMenuItemSpriteExtra *v6; // r6
int v7; // r0
cocos2d::CCArray *v8; // r0
unsigned int v9; // r5
v3 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v4 = *((_DWORD *)this + 82);
v5 = v3;
if ( v4 > cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 80)) - 1 )
{
v6 = nullptr;
v7 = -1;
}
else
{
v6 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(
*((cocos2d::CCArray **)this + 80),
*((_DWORD *)this + 82));
v7 = (*(int (__fastcall **)(CCMenuItemSpriteExtra *))(*(_DWORD *)v6 + 32))(v6);
}
if ( v5 != v7 )
return SecretGame01Layer::showGameOver(this);
v8 = *((cocos2d::CCArray **)this + 80);
v9 = *((_DWORD *)this + 82) + 1;
*((_DWORD *)this + 82) = v9;
if ( v9 >= cocos2d::CCArray::count(v8) )
return SecretGame01Layer::showGameWon(this);
else
return SecretGame01Layer::didSelectCorrectObject((int)this, v6);
}