//
// RewardUnlockLayer::step2 from 0x1002004c0 to 0x100200569 (169 bytes)
//
// 1 xrefs:
// > RewardUnlockLayer::init @ 0x1001fff5c
//
// 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:26:51 +0000
//
__int64 __fastcall RewardUnlockLayer::step2(__int64 a1, double a2)
{
__int64 v2; // rax
int v3; // r14d
int v4; // eax
int v5; // ecx
int v6; // r8d
int v7; // r9d
__int64 v8; // rax
char v10; // [rsp+8h] [rbp-28h] BYREF
_BYTE v11[23]; // [rsp+9h] [rbp-27h] BYREF
v2 = FMODAudioEngine::sharedEngine(a2);
v10 = 30;
strcpy(v11, "chestOpen01.ogg");
FMODAudioEngine::playEffect_1(v2, &v10);
if ( (v10 & 1) != 0 )
operator delete(*(void **)&v11[15]);
GJChestSprite::switchToState(*(_QWORD *)(a1 + 688), 3, 0);
v3 = cocos2d::CCDelayTime::create(0.30000001);
v4 = cocos2d::CCCallFunc::create(a1, RewardUnlockLayer::step3, 0);
v8 = sub_10039EB60(v3, v4, 0, v5, v6, v7);
return cocos2d::CCNode::runAction(a1, v8);
}