//
// SecretLayer4::onChest01 from 0x6213e4 to 0x621478 (148 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:55:06 +0000
//
int __fastcall SecretLayer4::onChest01(SecretLayer4 *this, cocos2d::CCObject *a2)
{
GameStatsManager *v4; // r0
int *v5; // r6
int v6; // r2
int v7; // r3
RewardUnlockLayer **v8; // r6
int result; // r0
RewardsPage *v10; // r2
FLAlertLayer *v11; // r4
int v12[3]; // [sp+0h] [bp-14h] BYREF
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)a2 + 528))(a2, 0);
v4 = (GameStatsManager *)(*(int (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)a2 + 172))(a2, 0);
memset(v12, 0, sizeof(v12));
v5 = (int *)GameStatsManager::sharedState(v4);
std::string::__init(v12, "0003", 4u);
v8 = (RewardUnlockLayer **)GameStatsManager::unlockSpecialChest(v5, (int)v12, v6, v7);
result = std::string::~string((int)v12);
if ( v8 )
{
v11 = RewardUnlockLayer::create(v8[15], nullptr, v10);
(*(void (__fastcall **)(SecretLayer4 *, FLAlertLayer *, int))(*(_DWORD *)this + 232))(this, v11, 100);
return RewardUnlockLayer::showCollectReward(v11, (GJRewardItem *)v8);
}
return result;
}