//
// GameStatsManager::addSimpleSpecialChestReward from 0x10003de50 to 0x10003df2b (219 bytes)
//
// 19 xrefs:
// > GameStatsManager::createSpecialChestItems @ 0x1000275be
// > GameStatsManager::createSpecialChestItems @ 0x100027608
// > GameStatsManager::createSpecialChestItems @ 0x100027652
// > GameStatsManager::createSpecialChestItems @ 0x10002769c
// > GameStatsManager::createSpecialChestItems @ 0x1000276e6
// > GameStatsManager::createSpecialChestItems @ 0x100027730
// > GameStatsManager::createSpecialChestItems @ 0x10002777a
// > GameStatsManager::createSpecialChestItems @ 0x1000277c4
// > GameStatsManager::createSpecialChestItems @ 0x10002780e
// > GameStatsManager::createSpecialChestItems @ 0x100027858
// > GameStatsManager::createSpecialChestItems @ 0x1000278a2
// > GameStatsManager::createSpecialChestItems @ 0x1000278ec
// > GameStatsManager::createSpecialChestItems @ 0x100027936
// > GameStatsManager::createSpecialChestItems @ 0x100027980
// > GameStatsManager::createSpecialChestItems @ 0x1000279ca
// > GameStatsManager::createSpecialChestItems @ 0x100027a14
// > GameStatsManager::createSpecialChestItems @ 0x100027a5e
// > GameStatsManager::createSpecialChestItems @ 0x100027aa8
// > GameStatsManager::createSpecialChestItems @ 0x100027af2
//
// 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
//
__int64 __fastcall GameStatsManager::addSimpleSpecialChestReward(__int64 a1, __int64 a2, int a3, int a4)
{
__int64 v6; // r14
_DWORD *v7; // r13
__int64 v8; // r15
_QWORD *v9; // r12
__int64 v10; // rdi
__int128 v12; // [rsp+8h] [rbp-48h] BYREF
__int64 v13; // [rsp+20h] [rbp-30h]
v13 = a2;
v6 = sub_1007FE900(a1);
v7 = operator new(0x48u);
cocos2d::CCObject::CCObject(v7);
*(_QWORD *)v7 = off_100AB6EA8;
v7[14] = 9;
v7[16] = a4;
v7[17] = 1;
cocos2d::CCObject::autorelease(v7);
v7[15] = a3;
sub_1007FEBF0(v6, v7);
v8 = *(_QWORD *)(a1 + 360);
LOWORD(v12) = 0;
v9 = GJRewardItem::create(0, 0, &v12);
*((_DWORD *)v9 + 16) = 2;
v10 = v9[9];
if ( v10 != v6 )
{
if ( v6 )
{
cocos2d::CCObject::retain(v6);
v10 = v9[9];
}
if ( v10 )
cocos2d::CCObject::release(v10);
v9[9] = v6;
}
return cocos2d::CCDictionary::setObject(v8, v9, v13);
}