//
// SecretLayer3::onChest02 from 0x10049edc0 to 0x10049ee6b (171 bytes)
//
// 1 xrefs:
// > SecretLayer3::init @ 0x10049d89b
//
// 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:30:52 +0000
//
void __fastcall SecretLayer3::onChest02(_BYTE *a1, __int64 a2, __m128 a3)
{
__int64 v3; // rax
__int64 v4; // r14
char *v5; // r15
char v6; // [rsp+0h] [rbp-30h] BYREF
char v7[15]; // [rsp+1h] [rbp-2Fh] BYREF
void *__p; // [rsp+10h] [rbp-20h]
if ( !a1[424] )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a2 + 1056LL))(a2, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a2 + 344LL))(a2, 0);
v3 = GameStatsManager::sharedState();
v6 = 8;
strcpy(v7, "0002");
v4 = GameStatsManager::unlockSpecialChest(v3, (__int64)&v6, a3);
if ( (v6 & 1) != 0 )
operator delete(__p);
if ( v4 )
{
v5 = RewardUnlockLayer::create(*(_DWORD *)(v4 + 64), 0);
(*(void (__fastcall **)(_BYTE *, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v5, 100);
RewardUnlockLayer::showCollectReward((__int64)v5, v4);
}
}
}