//
// sub_1003DCBB4 from 0x1003dcbb4 to 0x1003dcc90 (220 bytes)
//
// 1 xrefs:
// > SecretRewardsLayer::onGoldChest @ 0x100384f4c
//
// This function is hookable on this platform (idp: arm, 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:04:19 +0000
//
__int64 __fastcall sub_1003DCBB4(__int64 a1, int a2)
{
__int64 v4; // x19
__int64 v5; // x0
int Stat; // w0
__int64 v7; // x21
void *v8; // x0
char *CString; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v12; // [xsp+1Fh] [xbp-21h]
if ( sub_1003D455C(a1, a2) )
return 0;
cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 344), a2);
v4 = v5;
if ( !v5 )
return v4;
Stat = GameStatsManager::getStat(a1, "43");
if ( Stat < 1 )
return 0;
GameStatsManager::setStat(a1, "43", Stat - 1);
sub_1003D1760(a1, v4);
GameStatsManager::registerRewardsFromItem(a1, v4);
v7 = *(_QWORD *)(a1 + 760);
v8 = sub_1003065B0("%i", a2);
CString = (char *)cocos2d::CCString::getCString((__int64)v8);
sub_100009900(__p, CString);
cocos2d::CCDictionary::setObject(v7, v4, __p);
if ( v12 < 0 )
operator delete(__p[0]);
return v4;
}