//
// LevelPage::playCoinEffect from 0x100436740 to 0x100436b83 (1091 bytes)
//
// 1 xrefs:
// > LevelPage::ccTouchBegan @ 0x1004376df
//
// 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; // rbx
__int64 v3; // rax
CCCircleWave *v4; // rbx
__int64 v5; // rax
CCCircleWave *v6; // rbx
__int64 v7; // rax
cocos2d::CCSprite *v8; // rbx
__int64 v9; // rsi
cocos2d::CCArray *v10; // r15
cocos2d::CCSpriteFrameCache *v11; // r13
cocos2d::CCString *v12; // rax
const char *CString; // 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::CCSpriteFrameCache *v23; // r13
cocos2d::CCString *v24; // rax
const char *v25; // rax
cocos2d::CCSpriteFrame *v26; // rax
cocos2d::CCAnimation *v27; // rax
cocos2d::CCAnimate *v28; // rax
cocos2d::CCRepeatForever *v29; // rax
double *v30; // rsi
double v31; // xmm0_8
int v32; // eax
cocos2d::CCFiniteTimeAction *v33; // r14
cocos2d::CCCallFunc *v34; // rax
cocos2d::CCSequence *v35; // rax
cocos2d::CCDelayTime *v36; // r14
cocos2d::CCFadeOut *v37; // rax
cocos2d::CCSequence *v38; // rax
char v39; // [rsp+0h] [rbp-60h]
char v40; // [rsp+0h] [rbp-60h]
char v41; // [rsp+0h] [rbp-60h]
char v42; // [rsp+0h] [rbp-60h]
__int64 v43; // [rsp+4h] [rbp-5Ch] BYREF
__int64 v44; // [rsp+Ch] [rbp-54h] BYREF
__int64 v45; // [rsp+14h] [rbp-4Ch] BYREF
double v46; // [rsp+1Ch] [rbp-44h] BYREF
float v47[2]; // [rsp+24h] [rbp-3Ch] BYREF
float v48; // [rsp+2Ch] [rbp-34h]
__int64 v49; // [rsp+30h] [rbp-30h] BYREF
((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.30000001, 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.30000001, 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_10071F9E0(v8, v9);
v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v12 = (cocos2d::CCString *)sub_1007AB580("%s_01_001.png", v39);
CString = cocos2d::CCString::getCString(v12);
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, CString);
sub_10071FCD0(v10, v14);
v15 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v16 = (cocos2d::CCString *)sub_1007AB580("%s_01_002.png", v40);
v17 = cocos2d::CCString::getCString(v16);
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v15, v17);
sub_10071FCD0(v10, v18);
v19 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v20 = (cocos2d::CCString *)sub_1007AB580("%s_01_003.png", v41);
v21 = cocos2d::CCString::getCString(v20);
v22 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v21);
sub_10071FCD0(v10, v22);
v23 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v24 = (cocos2d::CCString *)sub_1007AB580("%s_01_004.png", v42);
v25 = cocos2d::CCString::getCString(v24);
v26 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v23, v25);
sub_10071FCD0(v10, v26);
v27 = cocos2d::CCAnimation::createWithSpriteFrames(v10, 0.050000001);
v28 = cocos2d::CCAnimate::create(v27);
v29 = cocos2d::CCRepeatForever::create(v28);
cocos2d::CCNode::runAction(v8, v29);
v30 = (double *)((__int64 (__fastcall *)(GameObject *))a1->m_coinObject->getPosition)(a1->m_coinObject);
v31 = sub_10028CC60(&v49, v30);
v48 = *(float *)((__int64 (__fastcall *)(GameObject *, double))a1->m_coinObject->getPosition)(a1->m_coinObject, v31);
v32 = rand();
sub_10028CBE0(
v47,
(float)((float)((float)((float)((float)v32 * 4.6566129e-10) + (float)((float)v32 * 4.6566129e-10)) + -1.0) * 50.0)
+ v48,
*((float *)&v49 + 1) + -60.0);
sub_10028CC30(&v43);
sub_10028CC30(&v44);
sub_10028CC30(&v45);
sub_10028CBE0((float *)&v46, *(float *)&v49, *((float *)&v49 + 1) + 90.0);
sub_10028CC90(&v44, &v46);
sub_10028CBE0((float *)&v46, v47[0], *((float *)&v49 + 1) + 180.0);
sub_10028CC90(&v45, &v46);
sub_10028CBE0((float *)&v46, v47[0], v47[1] + -20.0);
sub_10028CC90(&v43, &v46);
v33 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCBezierTo::create((double *)&v43, (__m128)0x3F400000u);
v34 = cocos2d::CCCallFunc::create(v8, (cocos2d::SEL_CallFunc)0x209uLL);
v35 = sub_1003B5760(v33, v34, 0);
cocos2d::CCNode::runAction(v8, v35);
v36 = cocos2d::CCDelayTime::create(0.5);
v37 = cocos2d::CCFadeOut::create(0.30000001);
v38 = sub_1003B5760(v36, v37, 0);
cocos2d::CCNode::runAction(v8, v38);
}