//
// GameStatsManager::linkSpecialChestUnlocks from 0x10003df40 to 0x10003e049 (265 bytes)
//
// 3 xrefs:
// > GameStatsManager::createSpecialChestItems @ 0x10002a0f1
// > GameStatsManager::unlockOnlineChest @ 0x10003a483
// > GameStatsManager::processOnlineChests @ 0x1000556cb
//
// This function is hookable on this platform (idp: pc, 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:19:34 +0000
//
void __fastcall GameStatsManager::linkSpecialChestUnlocks(__int64 a1, __int64 a2, const std::string *a3)
{
__int64 v3; // r15
unsigned int v5; // r13d
_DWORD *v6; // rax
__int64 v7; // r14
__int64 v8; // rax
__int64 v9; // rax
size_t v10[3]; // [rsp+0h] [rbp-60h] BYREF
size_t *v11; // [rsp+18h] [rbp-48h] BYREF
__int64 v12; // [rsp+20h] [rbp-40h]
__int64 v13; // [rsp+28h] [rbp-38h]
_BYTE v14[41]; // [rsp+37h] [rbp-29h] BYREF
v13 = a1;
if ( a2 )
{
v3 = *(_QWORD *)(a2 + 72);
if ( v3 )
{
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a2 + 72)) )
{
v12 = v13 + 416;
v5 = 0;
do
{
v6 = (_DWORD *)sub_1007FEFE0(v3, v5);
if ( v6[14] == 9 )
{
GameStatsManager::getItemKey(v10, v5, v6[16], v6[15]);
v7 = *(_QWORD *)(v13 + 368);
v8 = sub_10088E600(a3);
cocos2d::CCDictionary::setObject(v7, v8, v10);
v11 = v10;
v9 = sub_1000587E0(v12, v10, &unk_100A03BEE, &v11, v14);
std::string::operator=((std::string *)(v9 + 40), a3);
if ( (v10[0] & 1) != 0 )
operator delete((void *)v10[2]);
}
++v5;
}
while ( v5 < (unsigned int)sub_1007FEF90(v3) );
}
}
}
}