//
// GameStatsManager::processOnlineChests from 0x8e76cc to 0x8e78b0 (484 bytes)
//
// 2 xrefs:
// > GameStatsManager::removeErrorFromSpecialChests @ 0x8e78e4
// > ??> @ 0xed7d8
//
// 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:53 +0000
//
__int64 __fastcall GameStatsManager::processOnlineChests(cocos2d::CCDictionary **this)
{
unsigned int v1; // w22
cocos2d::CCArray *v3; // x24
cocos2d::CCString *v4; // x0
const char *CString; // x0
const char *v6; // x26
size_t v7; // x0
size_t v8; // x21
char *v9; // x3
__int64 v10; // x21
unsigned __int64 v12; // x0
__int64 v13; // x23
char *v14; // x0
__int64 v15; // [xsp+68h] [xbp+68h] BYREF
size_t v16; // [xsp+70h] [xbp+70h]
void *v17; // [xsp+78h] [xbp+78h]
__int64 v18; // [xsp+80h] [xbp+80h] BYREF
size_t v19; // [xsp+88h] [xbp+88h]
void *v20; // [xsp+90h] [xbp+90h]
v1 = 0;
v3 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 100));
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
while ( 1 )
{
v4 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v3, v1);
CString = (const char *)cocos2d::CCString::getCString(v4);
v15 = 0;
v16 = 0;
v6 = CString;
v17 = nullptr;
v7 = strlen(CString);
v8 = v7;
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62CC1C();
if ( v7 > 0x16 )
break;
LOBYTE(v15) = 2 * v7;
v9 = (char *)&v15 + 1;
if ( v7 )
goto LABEL_14;
LABEL_5:
v9[v8] = 0;
v10 = cocos2d::CCDictionary::objectForKey(*(this + 98), &v15);
v18 = 0;
v19 = 0;
v20 = nullptr;
if ( (v15 & 1) != 0 )
{
std::string::__init(&v18, v17, v16);
}
else
{
v20 = v17;
v18 = v15;
v19 = v16;
}
GameStatsManager::linkSpecialChestUnlocks((__int64)this, v10, &v18);
if ( (v18 & 1) != 0 )
operator delete(v20);
++v1;
if ( (v15 & 1) != 0 )
operator delete(v17);
if ( v1 >= (unsigned int)cocos2d::CCArray::count(v3) )
return _stack_chk_guard;
}
v12 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v13 = v12 | 1;
v14 = (char *)operator new(v12);
v15 = v13;
v9 = v14;
v17 = v14;
v16 = v8;
LABEL_14:
v9 = (char *)memcpy(v9, v6, v8);
goto LABEL_5;
}
return _stack_chk_guard;
}