//
// SecretLayer2::playCoinEffect from 0x1403e93d0 to 0x1403e984c (1148 bytes)
//
// 3 xrefs:
// > SecretLayer2::onSubmit @ 0x1403e5d7c
// > ??> @ 0x1406d8018
// > ??> @ 0x1406d8024
//
// 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 SecretLayer2::playCoinEffect(SecretLayer2 *a1)
{
float v1; // xmm0_4
float v2; // xmm3_4
cocos2d::CCDirector *v4; // rax
struct cocos2d::CCParticleSystemQuad *v5; // rax
_BOOL8 v6; // rdx
cocos2d::CCNode *v7; // rbx
CCCircleWave *v8; // rbx
CCCircleWave *v9; // rbx
CCCircleWave_vtbl *v10; // r8
CCLightFlash *v11; // rsi
__int64 v12; // rcx
cocos2d::CCArray *v13; // rdi
cocos2d::CCString *v14; // rax
const char *CString; // rbx
__int64 v16; // rcx
cocos2d::CCSpriteFrameCache *v17; // rax
struct cocos2d::CCSpriteFrame *v18; // rax
cocos2d::CCString *v19; // rax
const char *v20; // rbx
__int64 v21; // rcx
cocos2d::CCSpriteFrameCache *v22; // rax
struct cocos2d::CCSpriteFrame *v23; // rax
cocos2d::CCString *v24; // rax
const char *v25; // rbx
__int64 v26; // rcx
cocos2d::CCSpriteFrameCache *v27; // rax
struct cocos2d::CCSpriteFrame *v28; // rax
cocos2d::CCString *v29; // rax
const char *v30; // rbx
__int64 v31; // rcx
cocos2d::CCSpriteFrameCache *v32; // rax
struct cocos2d::CCSpriteFrame *v33; // rax
struct cocos2d::CCAnimation *v34; // rax
struct cocos2d::CCAnimate *v35; // rax
struct cocos2d::CCRepeatForever *v36; // rax
cocos2d::ccColor3B *v37; // r8
double v38; // xmm0_8
int v39; // eax
double v40; // xmm0_8
__int64 v41; // rax
double v42; // xmm0_8
__int64 v43; // rax
double v44; // xmm0_8
__int64 v45; // rax
struct cocos2d::CCBezierTo *v46; // rbx
__int64 v47; // rax
struct cocos2d::CCSequence *v48; // rax
cocos2d::ccColor3B *v49; // r8
struct cocos2d::CCDelayTime *v50; // rbx
struct cocos2d::CCFadeOut *v51; // rax
struct cocos2d::CCSequence *v52; // rax
cocos2d::ccColor3B *v53; // r8
float v54; // [rsp+28h] [rbp-39h]
float v55; // [rsp+28h] [rbp-39h]
float v56; // [rsp+28h] [rbp-39h]
cocos2d::CCPoint v57; // [rsp+40h] [rbp-21h] BYREF
cocos2d::CCPoint v58; // [rsp+48h] [rbp-19h] BYREF
__int128 v59; // [rsp+50h] [rbp-11h] BYREF
float v60; // [rsp+C8h] [rbp+67h] BYREF
cocos2d::CCPoint v61; // [rsp+D0h] [rbp+6Fh] BYREF
float v62; // [rsp+D8h] [rbp+77h]
float v63; // [rsp+E0h] [rbp+7Fh]
v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v4);
cocos2d::CCPoint::CCPoint(v1, v63 * 0.5);
v5 = cocos2d::CCParticleSystemQuad::create("coinPickupEffect.plist", 0);
LOBYTE(v6) = 1;
v7 = v5;
v5->setAutoRemoveOnFinish(v5, v6);
a1->addChild_0(a1, v7, 1);
v7->setPosition_0(v7, (const cocos2d::CCPoint *)&v60);
v8 = CCCircleWave::create(25.0, 5.0, 0.30000001, 0, 0);
*(_WORD *)&v8->m_color.r = -14081;
v8->m_color.b = 0;
v8->setPosition_0(v8, (const cocos2d::CCPoint *)&v60);
a1->addChild_0(a1, v8, 0);
v9 = CCCircleWave::create(5.0, 60.0, 0.30000001, 0, 1);
v10 = v9->__vftable;
*(_WORD *)&v9->m_color.r = -1;
v9->m_color.b = 0;
v10->setPosition_0(v9, (const cocos2d::CCPoint *)&v60);
a1->addChild_0(a1, v9, 0);
v9->m_circleMode = Outline;
v9->m_lineWidth = 4;
v11 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
a1->addChild_0(a1, v11, 2);
v11->setPosition_0(v11, (const cocos2d::CCPoint *)&v60);
v13 = (cocos2d::CCArray *)cocos2d::CCArray::create(v12);
v14 = cocos2d::CCString::createWithFormat("%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v14);
v17 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v16);
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, CString);
cocos2d::CCArray::addObject(v13, v18);
v19 = cocos2d::CCString::createWithFormat("%s_01_002.png", "secretCoin");
v20 = cocos2d::CCString::getCString(v19);
v22 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v21);
v23 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v22, v20);
cocos2d::CCArray::addObject(v13, v23);
v24 = cocos2d::CCString::createWithFormat("%s_01_003.png", "secretCoin");
v25 = cocos2d::CCString::getCString(v24);
v27 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v26);
v28 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v27, v25);
cocos2d::CCArray::addObject(v13, v28);
v29 = cocos2d::CCString::createWithFormat("%s_01_004.png", "secretCoin");
v30 = cocos2d::CCString::getCString(v29);
v32 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v31);
v33 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v32, v30);
cocos2d::CCArray::addObject(v13, v33);
v34 = cocos2d::CCAnimation::createWithSpriteFrames(v13, 0.050000001);
v35 = cocos2d::CCAnimate::create(v34);
v36 = cocos2d::CCRepeatForever::create(v35);
cocos2d::CCNode::runAction(v11, (cocos2d::CCPoint)v36, v37, v2, v54);
v38 = cocos2d::CCPoint::CCPoint(&v61);
v39 = rand();
cocos2d::CCPoint::CCPoint(
*(float *)&v38,
(float)((float)((float)((float)((float)v39 / 32767.0) + (float)((float)v39 / 32767.0)) - 1.0) * 50.0) + v60);
cocos2d::CCPoint::CCPoint(&v57);
cocos2d::CCPoint::CCPoint(&v58);
v40 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59);
cocos2d::CCPoint::CCPoint(*(float *)&v40, v61.x);
v42 = cocos2d::CCPoint::operator=(&v58, v41);
cocos2d::CCPoint::CCPoint(*(float *)&v42, v62);
v44 = cocos2d::CCPoint::operator=(&v59, v43);
cocos2d::CCPoint::CCPoint(*(float *)&v44, v62);
cocos2d::CCPoint::operator=(&v57, v45);
v46 = cocos2d::CCBezierTo::create(0.75, (const struct cocos2d::_ccBezierConfig *)&v57);
v47 = cocos2d::CCCallFunc::create(v11, sub_14003BE70);
v48 = cocos2d::CCSequence::create(v46, v47, 0);
cocos2d::CCNode::runAction(v11, (cocos2d::CCPoint)v48, v49, v2, v55);
v50 = cocos2d::CCDelayTime::create(0.5);
v51 = cocos2d::CCFadeOut::create(0.30000001);
v52 = cocos2d::CCSequence::create(v50, v51, 0);
cocos2d::CCNode::runAction(v11, (cocos2d::CCPoint)v52, v53, v2, v56);
}