//
// GameStatsManager::unlockOnlineChest from 0x1401ea7a0 to 0x1401ea857 (183 bytes)
//
// 3 xrefs:
// > GameStatsManager::completedDailyLevel @ 0x1401e3786
// > SecretLayer5::claimOnlineReward @ 0x1403f68e1
// > ??> @ 0x1406cc684
//
// 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
//
// Hidden C++ exception states: #wind=1
GJRewardItem *__fastcall GameStatsManager::unlockOnlineChest(GameStatsManager *a1, __int64 a2)
{
__int64 v4; // rax
GJRewardItem *v5; // rdi
struct cocos2d::CCString *v6; // rax
void **v7; // rax
_BYTE v9[32]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v10[32]; // [rsp+48h] [rbp-40h] BYREF
__int64 v11; // [rsp+68h] [rbp-20h]
v11 = a2;
v4 = sub_14003BDB0((__int64)v9, a2);
v5 = GameStatsManager::unlockSpecialChest(a1, v4);
if ( v5 )
{
v6 = cocos2d::CCString::createWithFormat("%i", 1);
cocos2d::CCDictionary::setObject(a1->m_wraithChests, v6, a2);
v7 = (void **)sub_14003BDB0((__int64)v10, a2);
GameStatsManager::linkSpecialChestUnlocks((__int64)a1, (__int64)v5, v7);
}
sub_14003A830(a2);
return v5;
}