//
// GameStatsManager::keyCostForSecretChest from 0x8ccf14 to 0x8ccf6c (88 bytes)
//
// 4 xrefs:
// > GameStatsManager::unlockSecretChest @ 0x8eb2b4
// > GameStatsManager::recountSpecialStats @ 0x8ebdd8
// > SecretRewardsLayer::onSelectItem @ 0xb9ed14
// > ??> @ 0x51670
//
// 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 12:56:37 +0000
//
__int64 __fastcall GameStatsManager::keyCostForSecretChest(GameStatsManager *this, int a2)
{
__int64 result; // x0
result = 1;
if ( a2 <= 6000 )
{
result = 100;
if ( a2 <= 5000 )
{
result = 50;
if ( a2 <= 4000 )
{
result = 25;
if ( a2 <= 3000 )
{
result = 10;
if ( a2 <= 2000 )
{
if ( a2 <= 1000 )
return 1;
else
return 5;
}
}
}
}
}
return result;
}