//
// GameStatsManager::awardSecretKey from 0x7ba3e8 to 0x7ba46c (132 bytes)
//
// 3 xrefs:
// > PlayLayer::levelComplete @ 0x5d1208
// > PlayLayer::destroyPlayer @ 0x5d20c8
// > ??> @ 0x8d1c8
//
// 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 GameStatsManager::awardSecretKey(GameStatsManager *a1)
{
bool shouldAwardSecretKey; // w21
int v3; // w19
int v4; // w2
shouldAwardSecretKey = GameStatsManager::shouldAwardSecretKey(a1);
if ( shouldAwardSecretKey )
{
v3 = a1->m_bonusKey.random - a1->m_bonusKey.seed + 1;
a1->m_bonusKey.value = v3;
v4 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_bonusKey.seed = v4;
a1->m_bonusKey.random = v3 + v4;
GameStatsManager::incrementStat(a1, "21");
}
return shouldAwardSecretKey;
}