//
// SecretLayer3::onChest01 from 0x10030fb88 to 0x10030fc58 (208 bytes)
//
// 1 xrefs:
// > SecretLayer3::init @ 0x10030ea74
//
// 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
//
void __fastcall SecretLayer3::onChest01(SecretLayer3 *a1, cocos2d::CCObject *a2)
{
GameStatsManager *v4; // x20
__int64 v5; // x20
RewardUnlockLayer *v6; // x21
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v8; // [xsp+1Fh] [xbp-21h]
if ( !a1->m_lockInput )
{
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))a2->__vftable[13].copyWithZone)(a2, 0);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))a2->__vftable[4].~CCObject)(a2, 0);
v4 = GameStatsManager::sharedState();
sub_100009900(__p, "0001");
v5 = GameStatsManager::unlockSpecialChest(v4, __p);
if ( v8 < 0 )
operator delete(__p[0]);
if ( v5 )
{
v6 = RewardUnlockLayer::create(*(_DWORD *)(v5 + 64), nullptr);
((void (__fastcall *)(SecretLayer3 *, RewardUnlockLayer *, __int64))a1->addChild_0)(a1, v6, 100);
RewardUnlockLayer::showCollectReward(v6, (GJRewardItem *)v5);
}
}
}