//
// GameStatsManager::isSecretChestUnlocked from 0x40e424 to 0x40e47c (88 bytes)
//
// 5 xrefs:
// > GameStatsManager::getNextGoldChestID @ 0x40e494
// > GameStatsManager::isItemUnlocked @ 0x41b9c0
// > GameStatsManager::unlockSecretChest @ 0x41c924
// > GameStatsManager::unlockGoldChest @ 0x41c9e2
// > SecretRewardsLayer::generateChestItems @ 0x589c94
//
// 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::isSecretChestUnlocked(GameStatsManager *a1, int a2)
{
cocos2d::CCDictionary *m_treasureRoomChests; // r6
cocos2d::CCString *v3; // r0
char *CString; // r0
int v5; // r6
bool result; // r0
std::string v7; // [sp+8h] [bp-8h] BYREF
m_treasureRoomChests = a1->m_treasureRoomChests;
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v3);
sub_776584((int)&v7, CString);
v5 = cocos2d::CCDictionary::objectForKey(m_treasureRoomChests, &v7);
sub_774008(&v7);
result = v5;
if ( v5 )
return 1;
return result;
}