//
// GameStatsManager::linkSpecialChestUnlocks from 0x5260ec to 0x52617e (146 bytes)
//
// 3 xrefs:
// > GameStatsManager::createSpecialChestItems @ 0x528bc6
// > GameStatsManager::processOnlineChests @ 0x528c64
// > GameStatsManager::unlockOnlineChest @ 0x52ac28
//
// 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:54 +0000
//
unsigned int __fastcall GameStatsManager::linkSpecialChestUnlocks(unsigned int result, int a2, unsigned __int8 *a3)
{
int v4; // r8
cocos2d::CCArray *v5; // r7
int v6; // r10
unsigned int i; // r5
_DWORD *v8; // r3
int v9; // r11
cocos2d::CCObject *v10; // r0
int *v11; // r0
unsigned __int8 v12[12]; // [sp+0h] [bp-14h] BYREF
v4 = result;
if ( a2 )
{
v5 = *(cocos2d::CCArray **)(a2 + 64);
if ( v5 )
{
v6 = result + 312;
for ( i = 0; ; ++i )
{
result = cocos2d::CCArray::count(v5);
if ( i >= result )
break;
v8 = (_DWORD *)cocos2d::CCArray::objectAtIndex(v5, i);
if ( v8[13] == 9 )
{
GameStatsManager::getItemKey((GameStatsManager *)v12, v4, v8[15], v8[14]);
v9 = *(_DWORD *)(v4 + 288);
v10 = (cocos2d::CCObject *)cocos2d::CCString::create(a3);
cocos2d::CCDictionary::setObject(v9, v10);
v11 = std::unordered_map::operator[](v6, v12);
std::string::operator=((unsigned __int8 *)v11, a3);
std::string::~string((int)v12);
}
}
}
}
return result;
}