//
// GameStatsManager::addSimpleSpecialChestReward from 0x1402ee330 to 0x1402ee452 (290 bytes)
//
// 20 xrefs:
// > GameStatsManager::createSpecialChestItems @ 0x1402ec626
// > GameStatsManager::createSpecialChestItems @ 0x1402ec64d
// > GameStatsManager::createSpecialChestItems @ 0x1402ec674
// > GameStatsManager::createSpecialChestItems @ 0x1402ec69b
// > GameStatsManager::createSpecialChestItems @ 0x1402ec6c2
// > GameStatsManager::createSpecialChestItems @ 0x1402ec6e9
// > GameStatsManager::createSpecialChestItems @ 0x1402ec710
// > GameStatsManager::createSpecialChestItems @ 0x1402ec737
// > GameStatsManager::createSpecialChestItems @ 0x1402ec75e
// > GameStatsManager::createSpecialChestItems @ 0x1402ec785
// > GameStatsManager::createSpecialChestItems @ 0x1402ec7ac
// > GameStatsManager::createSpecialChestItems @ 0x1402ec7d3
// > GameStatsManager::createSpecialChestItems @ 0x1402ec80f
// > GameStatsManager::createSpecialChestItems @ 0x1402ec84b
// > GameStatsManager::createSpecialChestItems @ 0x1402ec887
// > GameStatsManager::createSpecialChestItems @ 0x1402ec8c3
// > GameStatsManager::createSpecialChestItems @ 0x1402ec8ff
// > GameStatsManager::createSpecialChestItems @ 0x1402ec93b
// > GameStatsManager::createSpecialChestItems @ 0x1402ec977
// > ??> @ 0x14091e0bc
//
// 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 11:29:55 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall GameStatsManager::addSimpleSpecialChestReward(__int64 a1, __int64 a2, int a3, int a4)
{
cocos2d::CCArray *v8; // rbp
__int64 v9; // rbx
cocos2d::CCObject *v10; // rcx
cocos2d::CCObject *v11; // [rsp+20h] [rbp-68h]
__int128 v12; // [rsp+28h] [rbp-60h] BYREF
__int64 v13; // [rsp+38h] [rbp-50h]
__int64 v14; // [rsp+40h] [rbp-48h]
__int64 v15; // [rsp+48h] [rbp-40h]
v15 = a2;
v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v11 = (cocos2d::CCObject *)operator new(0x48u);
cocos2d::CCObject::CCObject(v11);
*(_QWORD *)v11 = &GJRewardObject::`vftable';
*((_DWORD *)v11 + 14) = 9;
*((_DWORD *)v11 + 16) = a4;
*((_DWORD *)v11 + 17) = 1;
cocos2d::CCObject::autorelease(v11);
*((_DWORD *)v11 + 15) = a3;
cocos2d::CCArray::addObject(v8, v11);
v12 = 0;
v13 = 0;
v14 = 15;
LOBYTE(v12) = 0;
v9 = GJRewardItem::create(0, 0, &v12);
*(_DWORD *)(v9 + 64) = 2;
if ( *(cocos2d::CCArray **)(v9 + 72) != v8 )
{
if ( v8 )
cocos2d::CCObject::retain(v8);
v10 = *(cocos2d::CCObject **)(v9 + 72);
if ( v10 )
cocos2d::CCObject::release(v10);
*(_QWORD *)(v9 + 72) = v8;
}
cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 368), v9, a2);
sub_14003D310(a2);
}