//
// LevelPage::playCoinEffect from 0x14031c5e0 to 0x14031caa1 (1217 bytes)
//
// 2 xrefs:
// > LevelPage::ccTouchBegan @ 0x14031e351
// > ??> @ 0x1406d4b14
//
// 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 LevelPage::playCoinEffect(LevelPage *a1)
{
float v1; // xmm3_4
struct cocos2d::CCParticleSystemQuad *v3; // rax
_BOOL8 v4; // rdx
cocos2d::CCNode *v5; // rdi
cocos2d::CCNode_vtbl *v6; // rbx
const cocos2d::CCPoint *v7; // rax
CCCircleWave *v8; // rdi
CCCircleWave_vtbl *v9; // rbx
const cocos2d::CCPoint *v10; // rax
CCCircleWave *v11; // rdi
CCCircleWave_vtbl *v12; // rbx
const cocos2d::CCPoint *v13; // rax
CCLightFlash *v14; // rsi
CCLightFlash_vtbl *v15; // rbx
const cocos2d::CCPoint *v16; // rax
__int64 v17; // rcx
cocos2d::CCArray *v18; // rdi
cocos2d::CCString *v19; // rax
const char *CString; // 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
cocos2d::CCString *v34; // rax
const char *v35; // rbx
__int64 v36; // rcx
cocos2d::CCSpriteFrameCache *v37; // rax
struct cocos2d::CCSpriteFrame *v38; // rax
struct cocos2d::CCAnimation *v39; // rax
struct cocos2d::CCAnimate *v40; // rax
struct cocos2d::CCRepeatForever *v41; // rax
cocos2d::ccColor3B *v42; // r8
double v43; // xmm0_8
const cocos2d::CCPoint *v44; // rbx
int v45; // eax
double v46; // xmm0_8
__int64 v47; // rax
double v48; // xmm0_8
__int64 v49; // rax
double v50; // xmm0_8
__int64 v51; // rax
struct cocos2d::CCBezierTo *v52; // rbx
__int64 v53; // rax
struct cocos2d::CCSequence *v54; // rax
cocos2d::ccColor3B *v55; // r8
struct cocos2d::CCDelayTime *v56; // rbx
struct cocos2d::CCFadeOut *v57; // rax
struct cocos2d::CCSequence *v58; // rax
cocos2d::ccColor3B *v59; // r8
float v60; // [rsp+20h] [rbp-68h]
float v61; // [rsp+20h] [rbp-68h]
float v62; // [rsp+20h] [rbp-68h]
cocos2d::CCPoint v63; // [rsp+30h] [rbp-58h] BYREF
cocos2d::CCPoint v64; // [rsp+38h] [rbp-50h] BYREF
cocos2d::CCPoint v65[2]; // [rsp+40h] [rbp-48h] BYREF
cocos2d::CCPoint v66; // [rsp+90h] [rbp+8h] BYREF
float v67; // [rsp+98h] [rbp+10h]
a1->m_coinObject->setVisible(a1->m_coinObject, 0);
v3 = cocos2d::CCParticleSystemQuad::create("coinPickupEffect.plist", 0);
LOBYTE(v4) = 1;
v5 = v3;
v3->setAutoRemoveOnFinish(v3, v4);
a1->addChild_0(a1, v5, 1);
v6 = v5->__vftable;
v7 = a1->m_coinObject->getPosition_0(a1->m_coinObject);
v6->setPosition_0(v5, v7);
v8 = CCCircleWave::create(25.0, 5.0, 0.30000001, 0, 0);
*(_WORD *)&v8->m_color.r = -14081;
v8->m_color.b = 0;
v9 = v8->__vftable;
v10 = a1->m_coinObject->getPosition_0(a1->m_coinObject);
v9->setPosition_0(v8, v10);
a1->addChild_0(a1, v8, 0);
v11 = CCCircleWave::create(5.0, 60.0, 0.30000001, 0, 1);
v12 = v11->__vftable;
*(_WORD *)&v11->m_color.r = -1;
v11->m_color.b = 0;
v13 = a1->m_coinObject->getPosition_0(a1->m_coinObject);
v12->setPosition_0(v11, v13);
a1->addChild_0(a1, v11, 0);
v11->m_circleMode = Outline;
v11->m_lineWidth = 4;
v14 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("secretCoin_01_001.png");
a1->addChild_0(a1, v14, 2);
v15 = v14->__vftable;
v16 = a1->m_coinObject->getPosition_0(a1->m_coinObject);
v15->setPosition_0(v14, v16);
v18 = (cocos2d::CCArray *)cocos2d::CCArray::create(v17);
v19 = cocos2d::CCString::createWithFormat("%s_01_001.png", "secretCoin");
CString = cocos2d::CCString::getCString(v19);
v22 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v21);
v23 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v22, CString);
cocos2d::CCArray::addObject(v18, v23);
v24 = cocos2d::CCString::createWithFormat("%s_01_002.png", "secretCoin");
v25 = cocos2d::CCString::getCString(v24);
v27 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v26);
v28 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v27, v25);
cocos2d::CCArray::addObject(v18, v28);
v29 = cocos2d::CCString::createWithFormat("%s_01_003.png", "secretCoin");
v30 = cocos2d::CCString::getCString(v29);
v32 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v31);
v33 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v32, v30);
cocos2d::CCArray::addObject(v18, v33);
v34 = cocos2d::CCString::createWithFormat("%s_01_004.png", "secretCoin");
v35 = cocos2d::CCString::getCString(v34);
v37 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v36);
v38 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v37, v35);
cocos2d::CCArray::addObject(v18, v38);
v39 = cocos2d::CCAnimation::createWithSpriteFrames(v18, 0.050000001);
v40 = cocos2d::CCAnimate::create(v39);
v41 = cocos2d::CCRepeatForever::create(v40);
cocos2d::CCNode::runAction(v14, (cocos2d::CCPoint)v41, v42, v1, v60);
a1->m_coinObject->getPosition_0(a1->m_coinObject);
v43 = cocos2d::CCPoint::CCPoint(&v66);
v44 = a1->m_coinObject->getPosition_0(a1->m_coinObject);
v45 = rand();
cocos2d::CCPoint::CCPoint(
*(float *)&v43,
(float)((float)((float)((float)((float)v45 / 32767.0) + (float)((float)v45 / 32767.0)) - 1.0) * 50.0) + v44->x);
cocos2d::CCPoint::CCPoint(&v63);
cocos2d::CCPoint::CCPoint(&v64);
v46 = cocos2d::CCPoint::CCPoint(v65);
cocos2d::CCPoint::CCPoint(*(float *)&v46, v66.x);
v48 = cocos2d::CCPoint::operator=(&v64, v47);
cocos2d::CCPoint::CCPoint(*(float *)&v48, v67);
v50 = cocos2d::CCPoint::operator=(v65, v49);
cocos2d::CCPoint::CCPoint(*(float *)&v50, v67);
cocos2d::CCPoint::operator=(&v63, v51);
v52 = cocos2d::CCBezierTo::create(0.75, (const struct cocos2d::_ccBezierConfig *)&v63);
v53 = cocos2d::CCCallFunc::create(v14, sub_14003BE70);
v54 = cocos2d::CCSequence::create(v52, v53, 0);
cocos2d::CCNode::runAction(v14, (cocos2d::CCPoint)v54, v55, v1, v61);
v56 = cocos2d::CCDelayTime::create(0.5);
v57 = cocos2d::CCFadeOut::create(0.30000001);
v58 = cocos2d::CCSequence::create(v56, v57, 0);
cocos2d::CCNode::runAction(v14, (cocos2d::CCPoint)v58, v59, v1, v62);
}