//
// SecretLayer4::onChest01 from 0x4efebc to 0x4eff48 (140 bytes)
//
// 0 xrefs:
//
// 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 SecretLayer4::onChest01(SecretLayer4 *a1, cocos2d::CCObject *a2)
{
int *v4; // r6
GJRewardItem *v5; // r6
RewardUnlockLayer *v6; // r4
_BYTE v7[4]; // [sp+8h] [bp-Ch] BYREF
a2->__vftable[13].copyWithZone(a2, nullptr);
((void (__fastcall *)(cocos2d::CCObject *, _DWORD))a2->__vftable[4].~CCObject)(a2, 0);
v4 = (int *)GameStatsManager::sharedState();
sub_776584((int)v7, "0003");
v5 = GameStatsManager::unlockSpecialChest(v4, (stl::StringData::Internal *)v7);
sub_774008(v7);
if ( v5 )
{
v6 = RewardUnlockLayer::create(v5->m_rewardType, nullptr);
a1->addChild_0(a1, v6, 100);
RewardUnlockLayer::showCollectReward(v6, v5);
}
}