//
// SecretGame01Layer::onSelectButton from 0x1004747d0 to 0x100474898 (200 bytes)
//
// 1 xrefs:
// > SecretGame01Layer::resetGame @ 0x100473eaf
//
// 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:30:34 +0000
//
__int64 __fastcall SecretGame01Layer::onSelectButton(__int64 a1, __int64 a2)
{
int v2; // r14d
unsigned int v3; // r15d
__int64 v4; // r15
unsigned int v6; // r14d
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v3 = *(_DWORD *)(a1 + 432);
if ( v3 <= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 416)) - 1 )
{
v4 = sub_1007FEFE0(*(_QWORD *)(a1 + 416), *(unsigned int *)(a1 + 432));
if ( v2 != (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4) )
goto LABEL_3;
}
else
{
v4 = 0;
if ( v2 != -1 )
{
LABEL_3:
*(_DWORD *)(a1 + 436) = 0;
return SecretGame01Layer::scaleOutGame(a1, 0);
}
}
v6 = *(_DWORD *)(a1 + 432) + 1;
*(_DWORD *)(a1 + 432) = v6;
if ( v6 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 416)) )
return SecretGame01Layer::didSelectCorrectObject(a1, v4);
++*(_DWORD *)(a1 + 436);
return SecretGame01Layer::scaleOutGame(a1, 1);
}