//
// GameStatsManager::removeErrorFromSpecialChests from 0x528ca0 to 0x528d40 (160 bytes)
//
// 2 xrefs:
// > GameStatsManager::dataLoaded @ 0x529cb8
// > GameStatsManager::recountSpecialStats @ 0x52b132
//
// 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
//
unsigned int __fastcall GameStatsManager::removeErrorFromSpecialChests(
cocos2d::CCDictionary **this,
int a2,
int a3,
int a4)
{
unsigned int v5; // r6
cocos2d::CCArray *v6; // r9
unsigned int result; // r0
cocos2d::CCString *v8; // r0
const char *CString; // r0
const char *v10; // r10
size_t v11; // r0
cocos2d::CCDictionary **v12; // [sp+0h] [bp-10h] BYREF
int v13; // [sp+4h] [bp-Ch]
int v14; // [sp+8h] [bp-8h]
int v15; // [sp+Ch] [bp-4h]
v12 = this;
v13 = a2;
v14 = a3;
v15 = a4;
v5 = 0;
GameStatsManager::processOnlineChests(this);
v6 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 126));
while ( 1 )
{
result = cocos2d::CCArray::count(v6);
if ( v5 >= result )
break;
v8 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v6, v5);
CString = (const char *)cocos2d::CCString::getCString(v8);
v12 = nullptr;
v13 = 0;
v14 = 0;
v10 = CString;
v11 = strlen(CString);
std::string::__init((int *)&v12, v10, v11);
if ( !cocos2d::CCDictionary::objectForKey(*(this + 71), &v12)
&& !cocos2d::CCDictionary::objectForKey(*(this + 128), &v12) )
{
cocos2d::CCDictionary::removeObjectForKey(*(this + 126));
}
++v5;
std::string::~string((int)&v12);
}
return result;
}