//
// GameStatsManager::awardSecretKey from 0x10033e2dc to 0x10033e380 (164 bytes)
//
// 2 xrefs:
// > PlayLayer::levelComplete @ 0x10011a030
// > PlayLayer::destroyPlayer @ 0x10011eebc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall GameStatsManager::awardSecretKey(GameStatsManager *a1)
{
int Stat; // w0
int v3; // w8
float v4; // s8
float v5; // s9
int v6; // w20
float v7; // s0
Stat = GameStatsManager::getStat(a1, "22");
v3 = a1->m_bonusKey.random - a1->m_bonusKey.seed;
v4 = (float)v3;
v5 = floorf((float)Stat / 500.0);
if ( v5 > (float)v3 )
{
v6 = v3 + 1;
a1->m_bonusKey.value = v3 + 1;
v7 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
a1->m_bonusKey.seed = (int)v7;
a1->m_bonusKey.random = v6 + (int)v7;
GameStatsManager::incrementStat(a1, "21", 1);
}
return v5 > v4;
}