//
// SecretLayer::playCoinEffect from 0x1005fce70 to 0x1005fd281 (1041 bytes)
//
// 1 xrefs:
// > SecretLayer::onSubmit @ 0x1005fbf01
//
// 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 SecretLayer::playCoinEffect(SecretLayer *a1)
{
cocos2d::CCParticleSystemQuad *v2; // rbx
CCCircleWave *v3; // rbx
CCCircleWave *v4; // rbx
cocos2d::CCSprite *v5; // rbx
cocos2d::CCArray *v6; // r15
cocos2d::CCSpriteFrameCache *v7; // r13
cocos2d::CCString *v8; // rax
const char *CString; // rax
cocos2d::CCSpriteFrame *v10; // rax
cocos2d::CCSpriteFrameCache *v11; // r13
cocos2d::CCString *v12; // rax
const char *v13; // rax
cocos2d::CCSpriteFrame *v14; // rax
cocos2d::CCSpriteFrameCache *v15; // r13
cocos2d::CCString *v16; // rax
const char *v17; // rax
cocos2d::CCSpriteFrame *v18; // rax
cocos2d::CCSpriteFrameCache *v19; // r13
cocos2d::CCString *v20; // rax
const char *v21; // rax
cocos2d::CCSpriteFrame *v22; // rax
cocos2d::CCAnimation *v23; // rax
cocos2d::CCAnimate *v24; // rax
cocos2d::CCRepeatForever *v25; // rax
int v26; // eax
cocos2d::CCFiniteTimeAction *v27; // r14
cocos2d::CCCallFunc *v28; // rax
cocos2d::CCSequence *v29; // rax
cocos2d::CCDelayTime *v30; // r14
cocos2d::CCFadeOut *v31; // rax
cocos2d::CCSequence *v32; // rax
char v33; // [rsp+0h] [rbp-70h]
char v34; // [rsp+0h] [rbp-70h]
char v35; // [rsp+0h] [rbp-70h]
char v36; // [rsp+0h] [rbp-70h]
__int64 v37; // [rsp+4h] [rbp-6Ch] BYREF
__int64 v38; // [rsp+Ch] [rbp-64h] BYREF
__int64 v39; // [rsp+14h] [rbp-5Ch] BYREF
double v40; // [rsp+1Ch] [rbp-54h] BYREF
float v41[2]; // [rsp+24h] [rbp-4Ch] BYREF
double v42; // [rsp+2Ch] [rbp-44h] BYREF
float v43[2]; // [rsp+34h] [rbp-3Ch] BYREF
float v44; // [rsp+3Ch] [rbp-34h]
__int64 v45; // [rsp+40h] [rbp-30h] BYREF
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v41);
sub_10028CBE0((float *)&v40, v41[0] * 0.5, (float)(v41[1] * 0.5) + 50.0);
v2 = cocos2d::CCParticleSystemQuad::create("coinPickupEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v2->setAutoRemoveOnFinish)(v2, 1);
((void (__fastcall *)(SecretLayer *, cocos2d::CCParticleSystemQuad *, __int64))a1->addChild_0)(a1, v2, 1);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, double *))v2->setPosition)(v2, &v40);
v3 = CCCircleWave::create(25.0, 5.0, 0.30000001, 0, 0);
v3->m_color.b = 0;
*(_WORD *)&v3->m_color.r = -14081;
((void (__fastcall *)(CCCircleWave *, double *))v3->setPosition)(v3, &v40);
((void (__fastcall *)(SecretLayer *, CCCircleWave *, _QWORD))a1->addChild_0)(a1, v3, 0);
v4 = CCCircleWave::create_1(5.0, 60.0, 0.30000001, 0);
v4->m_color.b = 0;
*(_WORD *)&v4->m_color.r = -1;
((void (__fastcall *)(CCCircleWave *, double *))v4->setPosition)(v4, &v40);
((void (__fastcall *)(SecretLayer *, CCCircleWave *, _QWORD))a1->addChild_0)(a1, v4, 0);
*(_QWORD *)&v4->m_circleMode = 0x400000001LL;
v5 = cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
((void (__fastcall *)(SecretLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v5, 2);
((void (__fastcall *)(cocos2d::CCSprite *, double *))v5->setPosition)(v5, &v40);
v6 = (cocos2d::CCArray *)sub_10071F9E0(v5, &v40);
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = (cocos2d::CCString *)sub_1007AB580("%s_01_001.png", v33);
CString = cocos2d::CCString::getCString(v8);
v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, CString);
sub_10071FCD0(v6, v10);
v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v12 = (cocos2d::CCString *)sub_1007AB580("%s_01_002.png", v34);
v13 = cocos2d::CCString::getCString(v12);
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, v13);
sub_10071FCD0(v6, v14);
v15 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v16 = (cocos2d::CCString *)sub_1007AB580("%s_01_003.png", v35);
v17 = cocos2d::CCString::getCString(v16);
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v15, v17);
sub_10071FCD0(v6, v18);
v19 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v20 = (cocos2d::CCString *)sub_1007AB580("%s_01_004.png", v36);
v21 = cocos2d::CCString::getCString(v20);
v22 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v21);
sub_10071FCD0(v6, v22);
v23 = cocos2d::CCAnimation::createWithSpriteFrames(v6, 0.050000001);
v24 = cocos2d::CCAnimate::create(v23);
v25 = cocos2d::CCRepeatForever::create(v24);
cocos2d::CCNode::runAction(v5, v25);
sub_10028CC60(&v45, &v40);
v44 = *(float *)&v40;
v26 = rand();
sub_10028CBE0(
v43,
(float)((float)((float)((float)((float)v26 * 4.6566129e-10) + (float)((float)v26 * 4.6566129e-10)) + -1.0) * 50.0)
+ v44,
*((float *)&v45 + 1) + -60.0);
sub_10028CC30(&v37);
sub_10028CC30(&v38);
sub_10028CC30(&v39);
sub_10028CBE0((float *)&v42, *(float *)&v45, *((float *)&v45 + 1) + 90.0);
sub_10028CC90(&v38, &v42);
sub_10028CBE0((float *)&v42, v43[0], *((float *)&v45 + 1) + 180.0);
sub_10028CC90(&v39, &v42);
sub_10028CBE0((float *)&v42, v43[0], v43[1] + -20.0);
sub_10028CC90(&v37, &v42);
v27 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCBezierTo::create((double *)&v37, (__m128)0x3F400000u);
v28 = cocos2d::CCCallFunc::create(v5, (cocos2d::SEL_CallFunc)0x209uLL);
v29 = sub_1003B5760(v27, v28, 0);
cocos2d::CCNode::runAction(v5, v29);
v30 = cocos2d::CCDelayTime::create(0.5);
v31 = cocos2d::CCFadeOut::create(0.30000001);
v32 = sub_1003B5760(v30, v31, 0);
cocos2d::CCNode::runAction(v5, v32);
}