//
// SecretLayer2::playCoinEffect from 0x14057ef90 to 0x14057f427 (1175 bytes)
//
// 2 xrefs:
// > SecretLayer2::onSubmit @ 0x14057bbbc
// > ??> @ 0x14092c924
//
// 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 11:34:25 +0000
//
// Merged with: SecretLayer2::playCoinEffect, SecretLayer4::playCoinEffect
struct cocos2d::CCAction *__fastcall SecretLayer2::playCoinEffect(__int64 a1)
{
__int64 v2; // rax
struct cocos2d::CCParticleSystemQuad *v3; // rax
__int64 v4; // rdx
struct cocos2d::CCParticleSystemQuad *v5; // rbx
__int64 v6; // rdx
__int64 v7; // rcx
__int64 v8; // r8
cocos2d::CCObject *v9; // rbx
__int64 v10; // rdx
__int64 v11; // rcx
__int64 v12; // r8
cocos2d::CCObject *v13; // rbx
cocos2d::CCNode *v14; // rsi
__int64 v15; // rcx
cocos2d::CCArray *v16; // rdi
cocos2d::CCString *v17; // rax
const char *CString; // rbx
__int64 v19; // rdx
__int64 v20; // rcx
cocos2d::CCSpriteFrameCache *v21; // rax
struct cocos2d::CCObject *v22; // rax
cocos2d::CCString *v23; // rax
const char *v24; // rbx
__int64 v25; // rdx
__int64 v26; // rcx
cocos2d::CCSpriteFrameCache *v27; // rax
struct cocos2d::CCObject *v28; // rax
cocos2d::CCString *v29; // rax
const char *v30; // rbx
__int64 v31; // rdx
__int64 v32; // rcx
cocos2d::CCSpriteFrameCache *v33; // rax
struct cocos2d::CCObject *v34; // rax
cocos2d::CCString *v35; // rax
const char *v36; // rbx
__int64 v37; // rdx
__int64 v38; // rcx
cocos2d::CCSpriteFrameCache *v39; // rax
struct cocos2d::CCObject *v40; // rax
struct cocos2d::CCAnimation *v41; // rax
struct cocos2d::CCActionInterval *v42; // rax
struct cocos2d::CCAction *v43; // rax
float v44; // xmm6_4
int v45; // eax
__int64 v46; // rax
__int64 v47; // rax
__int64 v48; // rax
struct cocos2d::CCFiniteTimeAction *v49; // rbx
__int64 v50; // rax
struct cocos2d::CCAction *v51; // rax
struct cocos2d::CCFiniteTimeAction *v52; // rbx
struct cocos2d::CCFadeOut *v53; // rax
struct cocos2d::CCAction *v54; // rax
_BYTE v56[8]; // [rsp+38h] [rbp-29h] BYREF
_BYTE v57[8]; // [rsp+40h] [rbp-21h] BYREF
_BYTE v58[8]; // [rsp+48h] [rbp-19h] BYREF
__int128 v59; // [rsp+50h] [rbp-11h] BYREF
float v60; // [rsp+C8h] [rbp+67h] BYREF
float v61; // [rsp+D0h] [rbp+6Fh] BYREF
float v62; // [rsp+D4h] [rbp+73h]
float v63; // [rsp+D8h] [rbp+77h] BYREF
float v64; // [rsp+DCh] [rbp+7Bh]
float v65; // [rsp+E0h] [rbp+7Fh] BYREF
float v66; // [rsp+E4h] [rbp+83h]
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v65);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v60, v65 * 0.5, (float)(v66 * 0.5) + 50.0);
v3 = cocos2d::CCParticleSystemQuad::create("coinPickupEffect.plist", 0);
LOBYTE(v4) = 1;
v5 = v3;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v3 + 1544LL))(v3, v4);
(*(void (__fastcall **)(__int64, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v5, 1);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, float *))(*(_QWORD *)v5 + 184LL))(v5, &v60);
v9 = CCCircleWave::create(v7, v6, v8, 0, 0);
*((_WORD *)v9 + 170) = -14081;
*((_BYTE *)v9 + 342) = 0;
(*(void (__fastcall **)(cocos2d::CCObject *, float *))(*(_QWORD *)v9 + 184LL))(v9, &v60);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, v9, 0);
v13 = CCCircleWave::create(v11, v10, v12, 0, 1);
*((_WORD *)v13 + 170) = -1;
*((_BYTE *)v13 + 342) = 0;
(*(void (__fastcall **)(cocos2d::CCObject *, float *))(*(_QWORD *)v13 + 184LL))(v13, &v60);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, v13, 0);
*((_DWORD *)v13 + 88) = 1;
*((_DWORD *)v13 + 89) = 4;
v14 = cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v14, 2);
(*(void (__fastcall **)(cocos2d::CCNode *, float *))(*(_QWORD *)v14 + 184LL))(v14, &v60);
v16 = (cocos2d::CCArray *)cocos2d::CCArray::create(v15);
v17 = cocos2d::CCString::createWithFormat("%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v17);
v21 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v20, v19);
v22 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v21, CString);
cocos2d::CCArray::addObject(v16, v22);
v23 = cocos2d::CCString::createWithFormat("%s_01_002.png", "secretCoin");
v24 = cocos2d::CCString::getCString(v23);
v27 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v26, v25);
v28 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v27, v24);
cocos2d::CCArray::addObject(v16, v28);
v29 = cocos2d::CCString::createWithFormat("%s_01_003.png", "secretCoin");
v30 = cocos2d::CCString::getCString(v29);
v33 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v32, v31);
v34 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v33, v30);
cocos2d::CCArray::addObject(v16, v34);
v35 = cocos2d::CCString::createWithFormat("%s_01_004.png", "secretCoin");
v36 = cocos2d::CCString::getCString(v35);
v39 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v38, v37);
v40 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v39, v36);
cocos2d::CCArray::addObject(v16, v40);
v41 = cocos2d::CCAnimation::createWithSpriteFrames(v16, 0.050000001);
v42 = cocos2d::CCAnimate::create(v41);
v43 = cocos2d::CCRepeatForever::create(v42);
cocos2d::CCNode::runAction(v14, v43);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v61, (const struct cocos2d::CCPoint *)&v60);
v44 = v62 - 60.0;
v45 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v63,
(float)((float)((float)((float)((float)v45 / 32767.0) + (float)((float)v45 / 32767.0)) - 1.0) * 50.0) + v60,
v44);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v61, v62 + 90.0);
cocos2d::CCPoint::operator=(v58, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v63, v62 + 180.0);
cocos2d::CCPoint::operator=(&v59, v47);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v63, v64 - 20.0);
cocos2d::CCPoint::operator=(v57, v48);
v49 = cocos2d::CCBezierTo::create(0.75, (const struct cocos2d::_ccBezierConfig *)v57);
v50 = cocos2d::CCCallFunc::create(v14, sub_14003F5B0);
v51 = cocos2d::CCSequence::create(v49, v50, 0);
cocos2d::CCNode::runAction(v14, v51);
v52 = cocos2d::CCDelayTime::create(0.5);
v53 = cocos2d::CCFadeOut::create(0.30000001);
v54 = cocos2d::CCSequence::create(v52, v53, 0);
return cocos2d::CCNode::runAction(v14, v54);
}