//
// LevelPage::playCoinEffect from 0x100404ef4 to 0x100405324 (1072 bytes)
//
// 1 xrefs:
// > LevelPage::ccTouchBegan @ 0x100405bb8
//
// 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 LevelPage::playCoinEffect(LevelPage *a1)
{
cocos2d::CCParticleSystemQuad *v2; // x19
__int64 v3; // x0
CCCircleWave *v4; // x19
__int64 v5; // x0
CCCircleWave *v6; // x19
__int64 v7; // x0
cocos2d::CCSprite *v8; // x19
__int64 v9; // x0
cocos2d::CCArray *v10; // x21
cocos2d::CCSpriteFrameCache *v11; // x22
cocos2d::CCString *v12; // x0
const char *CString; // x0
cocos2d::CCSpriteFrameCache *v14; // x22
cocos2d::CCString *v15; // x0
const char *v16; // x0
cocos2d::CCSpriteFrameCache *v17; // x22
cocos2d::CCString *v18; // x0
const char *v19; // x0
cocos2d::CCSpriteFrameCache *v20; // x22
cocos2d::CCString *v21; // x0
const char *v22; // x0
cocos2d::CCAnimation *v23; // x0
cocos2d::CCAnimate *v24; // x0
cocos2d::CCRepeatForever *v25; // x0
__int64 *v26; // x0
float v27; // s0
float v28; // s9
__n128 v29; // q0
__n128 v30; // q1
__n128 v31; // q0
__n128 v32; // q1
__n128 v33; // q0
__n128 v34; // q1
__n128 v35; // q0
__n128 v36; // q1
cocos2d::CCFiniteTimeAction *v37; // x20
char v38; // w0
__int64 v39; // x1
__int64 v40; // x2
__int64 v41; // x3
__int64 v42; // x4
__int64 v43; // x5
__int64 v44; // x6
__int64 v45; // x7
cocos2d::CCSequence *v46; // x0
cocos2d::CCDelayTime *v47; // x20
char v48; // w0
__int64 v49; // x1
__int64 v50; // x2
__int64 v51; // x3
__int64 v52; // x4
__int64 v53; // x5
__int64 v54; // x6
__int64 v55; // x7
cocos2d::CCSequence *v56; // x0
double v57; // [xsp+10h] [xbp-70h] BYREF
__int64 v58; // [xsp+18h] [xbp-68h] BYREF
__int64 v59; // [xsp+20h] [xbp-60h] BYREF
__int64 v60; // [xsp+28h] [xbp-58h] BYREF
_DWORD v61[2]; // [xsp+30h] [xbp-50h] BYREF
__int64 v62; // [xsp+38h] [xbp-48h] BYREF
cocos2d::SEL_CallFunc v63; // 0:x1.16
((void (__fastcall *)(GameObject *, _QWORD))a1->m_coinObject->setVisible)(a1->m_coinObject, 0);
v2 = cocos2d::CCParticleSystemQuad::create("coinPickupEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v2->setAutoRemoveOnFinish)(v2, 1);
((void (__fastcall *)(LevelPage *, cocos2d::CCParticleSystemQuad *, __int64))a1->addChild_0)(a1, v2, 1);
v3 = ((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v2->setPosition)(v2, v3);
v4 = CCCircleWave::create(25.0, 5.0, 0.3, 0, 0);
v4->m_color.b = 0;
*(_WORD *)&v4->m_color.r = -14081;
v5 = ((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
((void (__fastcall *)(CCCircleWave *, __int64))v4->setPosition)(v4, v5);
((void (__fastcall *)(LevelPage *, CCCircleWave *, _QWORD))a1->addChild_0)(a1, v4, 0);
v6 = CCCircleWave::create_1(5.0, 60.0, 0.3, 0);
v6->m_color.b = 0;
*(_WORD *)&v6->m_color.r = -1;
v7 = ((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
((void (__fastcall *)(CCCircleWave *, __int64))v6->setPosition)(v6, v7);
((void (__fastcall *)(LevelPage *, CCCircleWave *, _QWORD))a1->addChild_0)(a1, v6, 0);
*(_QWORD *)&v6->m_circleMode = 0x400000001LL;
v8 = cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
((void (__fastcall *)(LevelPage *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v8, 2);
v9 = ((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v8->setPosition)(v8, v9);
v10 = (cocos2d::CCArray *)sub_10024A15C();
v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v12 = (cocos2d::CCString *)sub_100268F4C("%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v12);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, CString);
sub_10024A2D0((__int64)v10);
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v15 = (cocos2d::CCString *)sub_100268F4C("%s_01_002.png", "secretCoin");
v16 = cocos2d::CCString::getCString(v15);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, v16);
sub_10024A2D0((__int64)v10);
v17 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v18 = (cocos2d::CCString *)sub_100268F4C("%s_01_003.png", "secretCoin");
v19 = cocos2d::CCString::getCString(v18);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, v19);
sub_10024A2D0((__int64)v10);
v20 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v21 = (cocos2d::CCString *)sub_100268F4C("%s_01_004.png", "secretCoin");
v22 = cocos2d::CCString::getCString(v21);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v20, v22);
sub_10024A2D0((__int64)v10);
v23 = cocos2d::CCAnimation::createWithSpriteFrames(v10, 0.05);
v24 = cocos2d::CCAnimate::create(v23);
v25 = cocos2d::CCRepeatForever::create(v24);
cocos2d::CCNode::runAction(v8, v25);
v26 = (__int64 *)((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
v27 = sub_1000229B8(&v62, v26);
v28 = *(float *)((__int64 (__fastcall *)(GameObject *, float))a1->m_coinObject->getPosition)(a1->m_coinObject, v27);
v29.n128_f32[0] = v28 + (float)((float)((float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 2.0) + -1.0) * 50.0);
v30.n128_f32[0] = *((float *)&v62 + 1) + -60.0;
sub_100022980(v29, v30, v61);
sub_1000229B0(&v58);
sub_1000229B0(&v59);
sub_1000229B0(&v60);
v31.n128_u32[0] = v62;
v32.n128_f32[0] = *((float *)&v62 + 1) + 90.0;
sub_100022980(v31, v32, &v57);
v33.n128_f64[0] = sub_1000229D0(&v59, &v57);
v33.n128_u32[0] = v61[0];
v34.n128_f32[0] = *((float *)&v62 + 1) + 180.0;
sub_100022980(v33, v34, &v57);
v35.n128_f64[0] = sub_1000229D0(&v60, &v57);
v35.n128_u32[0] = v61[0];
v36.n128_f32[0] = *(float *)&v61[1] + -20.0;
sub_100022980(v35, v36, &v57);
sub_1000229D0(&v58, &v57);
v37 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCBezierTo::create((__int64)&v58, 0.75);
v63.ptr = (void (*)(void))520;
v63.adj = 1;
v38 = (unsigned __int8)cocos2d::CCCallFunc::create(v8, v63);
v46 = sub_10018A494(v37, v39, v40, v41, v42, v43, v44, v45, v38);
cocos2d::CCNode::runAction(v8, v46);
v47 = cocos2d::CCDelayTime::create(0.5);
v48 = (unsigned __int8)cocos2d::CCFadeOut::create(0.3);
v56 = sub_10018A494(v47, v49, v50, v51, v52, v53, v54, v55, v48);
cocos2d::CCNode::runAction(v8, v56);
}