//
// GameStatsManager::getItemUnlockStateLite from 0x528d98 to 0x528e94 (252 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:51:57 +0000
//
int __fastcall GameStatsManager::getItemUnlockStateLite(AchievementManager *a1, int a2, int a3)
{
int v6; // r0
int *v7; // r0
AchievementManager *v8; // r10
int v9; // r2
int v10; // r3
int isAchievementAvailable; // r10
unsigned int ItemUnlockState; // r0
int v13; // r4
int v14; // r4
cocos2d::CCString *SpecialChestKeyForItem; // r0
const char *CString; // r9
size_t v17; // r0
int isSpecialChestLiteUnlockable; // r7
int v20[3]; // [sp+0h] [bp-28h] BYREF
int v21[3]; // [sp+Ch] [bp-1Ch] BYREF
int v22[3]; // [sp+18h] [bp-10h] BYREF
v6 = AchievementManager::sharedState(a1);
v7 = AchievementManager::achievementForUnlock(v20, v6, a2, a3);
v8 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v7);
std::string::basic_string(v21, (int)v20);
isAchievementAvailable = AchievementManager::isAchievementAvailable(v8, (int)v21, v9, v10);
std::string::~string((int)v21);
if ( !isAchievementAvailable )
std::string::assign(v20, (char *)&unk_B6B226);
ItemUnlockState = GameStatsManager::getItemUnlockState((int)a1, a2, a3);
if ( ItemUnlockState == 1 )
{
if ( (v20[0] & 1) != 0 )
v13 = v20[1];
else
v13 = (int)LOBYTE(v20[0]) >> 1;
v14 = v13 != 0;
}
else if ( ItemUnlockState > 1 )
{
SpecialChestKeyForItem = (cocos2d::CCString *)GameStatsManager::getSpecialChestKeyForItem((int)a1, a2, a3);
v14 = (int)SpecialChestKeyForItem;
if ( SpecialChestKeyForItem )
{
CString = (const char *)cocos2d::CCString::getCString(SpecialChestKeyForItem);
memset(v22, 0, sizeof(v22));
v17 = strlen(CString);
std::string::__init(v22, CString, v17);
isSpecialChestLiteUnlockable = GameStatsManager::isSpecialChestLiteUnlockable((int)a1, (int)v22);
std::string::~string((int)v22);
if ( isSpecialChestLiteUnlockable )
v14 = 3;
else
v14 = 0;
}
}
else
{
v14 = 0;
}
std::string::~string((int)v20);
return v14;
}