//
// GameStatsManager::getItemUnlockStateLite from 0x41cb98 to 0x41cc7e (230 bytes)
//
// 0 xrefs:
//
// 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
//
int GameStatsManager::getItemUnlockStateLite(GameStatsManager *a1, int a2, UnlockType a3)
{
AchievementManager *v6; // r0
AchievementManager *v7; // r10
stl::StringData::Internal *v8; // r2
stl::StringData::Internal *v9; // r3
cocos2d::CCDictionary *v10; // r10
unsigned int ItemUnlockState; // r0
int v12; // r4
cocos2d::CCString *SpecialChestKeyForItem; // r0
char *CString; // r0
cocos2d::CCDictionary *v15; // r7
int v17; // [sp+8h] [bp-10h] BYREF
const char *v18; // [sp+Ch] [bp-Ch] BYREF
std::string v19; // [sp+10h] [bp-8h] BYREF
v6 = AchievementManager::sharedState();
AchievementManager::achievementForUnlock((int)&v17, (int)v6, a2, a3);
v7 = AchievementManager::sharedState();
sub_775C20(&v18);
v10 = AchievementManager::isAchievementAvailable(v7, &v18, v8, v9);
sub_774008(&v18);
if ( !v10 )
sub_7753D4((int)&v17, (char *)&unk_939830);
ItemUnlockState = GameStatsManager::getItemUnlockState(a1, a2, a3);
if ( ItemUnlockState == 1 )
{
v12 = *(_DWORD *)(v17 - 12) != 0;
}
else if ( ItemUnlockState > 1 )
{
SpecialChestKeyForItem = GameStatsManager::getSpecialChestKeyForItem(a1, a2, a3);
v12 = (int)SpecialChestKeyForItem;
if ( SpecialChestKeyForItem )
{
CString = (char *)cocos2d::CCString::getCString(SpecialChestKeyForItem);
sub_776584((int)&v19, CString);
v15 = GameStatsManager::isSpecialChestLiteUnlockable((int)a1, &v19);
sub_774008(&v19);
if ( v15 )
v12 = 3;
else
v12 = 0;
}
}
else
{
v12 = 0;
}
sub_774008(&v17);
return v12;
}