//
// GameStatsManager::addSimpleSpecialChestReward from 0x100077e00 to 0x100077edb (219 bytes)
//
// 18 xrefs:
// > GameStatsManager::createSpecialChestItems @ 0x100061ffe
// > GameStatsManager::createSpecialChestItems @ 0x100062048
// > GameStatsManager::createSpecialChestItems @ 0x100062092
// > GameStatsManager::createSpecialChestItems @ 0x1000620dc
// > GameStatsManager::createSpecialChestItems @ 0x100062126
// > GameStatsManager::createSpecialChestItems @ 0x100062170
// > GameStatsManager::createSpecialChestItems @ 0x1000621ba
// > GameStatsManager::createSpecialChestItems @ 0x100062204
// > GameStatsManager::createSpecialChestItems @ 0x10006224e
// > GameStatsManager::createSpecialChestItems @ 0x100062298
// > GameStatsManager::createSpecialChestItems @ 0x1000622e2
// > GameStatsManager::createSpecialChestItems @ 0x10006232c
// > GameStatsManager::createSpecialChestItems @ 0x100062376
// > GameStatsManager::createSpecialChestItems @ 0x1000623c0
// > GameStatsManager::createSpecialChestItems @ 0x10006240a
// > GameStatsManager::createSpecialChestItems @ 0x100062454
// > GameStatsManager::createSpecialChestItems @ 0x10006249e
// > GameStatsManager::createSpecialChestItems @ 0x1000624e8
//
// 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
//
__int64 __fastcall GameStatsManager::addSimpleSpecialChestReward(
__int64 a1,
__int64 a2,
int a3,
unsigned int a4,
double a5)
{
cocos2d::CCObject *v7; // r14
cocos2d::CCObject *v8; // r13
__int64 v9; // r15
cocos2d::CCObject *v10; // r12
cocos2d::CCObject *v11; // rdi
__int128 v13; // [rsp+8h] [rbp-48h] BYREF
__int64 v14; // [rsp+20h] [rbp-30h]
v14 = a2;
v7 = (cocos2d::CCObject *)sub_10071F9E0(a1, a2);
v8 = (cocos2d::CCObject *)operator new(0x48u);
cocos2d::CCObject::CCObject(v8);
v8->__vftable = (cocos2d::CCObject_vtbl *)off_1008B38A8;
LODWORD(v8[1].__vftable) = 9;
v8[1].m_uID = a4;
v8[1].m_nLuaID = 1;
cocos2d::CCObject::autorelease(v8);
HIDWORD(v8[1].__vftable) = a3;
sub_10071FCD0(v7, v8);
v9 = *(_QWORD *)(a1 + 360);
LOWORD(v13) = 0;
v10 = GJRewardItem::create(0, 0, &v13, a5);
v10[1].m_uID = 2;
v11 = *(cocos2d::CCObject **)&v10[1].m_nTag;
if ( v11 != v7 )
{
if ( v7 )
{
cocos2d::CCObject::retain(v7);
v11 = *(cocos2d::CCObject **)&v10[1].m_nTag;
}
if ( v11 )
cocos2d::CCObject::release(v11);
*(_QWORD *)&v10[1].m_nTag = v7;
}
return cocos2d::CCDictionary::setObject_1(v9, v10, v14);
}