//
// MapPackCell::playCompleteEffect from 0x14014e4a0 to 0x14014e79d (765 bytes)
//
// 2 xrefs:
// > MapPackCell::onClaimReward @ 0x14014e493
// > ??> @ 0x1409176c0
//
// 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:27:16 +0000
//
// Hidden C++ exception states: #wind=2
unsigned int __fastcall MapPackCell::playCompleteEffect(__int64 a1)
{
__int64 v2; // rax
const struct cocos2d::CCPoint *v3; // rax
struct cocos2d::CCParticleSystemQuad *v4; // rbx
__int64 v5; // rdx
unsigned int v6; // esi
int v7; // ecx
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v10; // r8
cocos2d::CCObject *v11; // rbx
unsigned int i; // r14d
cocos2d::CCNode *v13; // rdi
struct cocos2d::CCFiniteTimeAction *v14; // rbx
struct cocos2d::CCActionInterval *v15; // rax
struct cocos2d::CCEaseBounceOut *v16; // rax
struct cocos2d::CCAction *v17; // rax
unsigned int result; // eax
struct cocos2d::CCObject *v19; // rax
__int128 v20; // [rsp+30h] [rbp-88h] BYREF
__int64 v21; // [rsp+40h] [rbp-78h]
__int64 v22; // [rsp+48h] [rbp-70h]
__int128 *v23; // [rsp+C0h] [rbp+8h] BYREF
char v24; // [rsp+C8h] [rbp+10h] BYREF
void *v25; // [rsp+D0h] [rbp+18h]
v2 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 504LL))(*(_QWORD *)(a1 + 576));
v3 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 200LL))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, v3);
v4 = cocos2d::CCParticleSystemQuad::create("starEffect.plist", 0);
LOBYTE(v5) = 1;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v4 + 1544LL))(v4, v5);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCParticleSystemQuad *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v4,
9);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, char *))(*(_QWORD *)v4 + 184LL))(v4, &v24);
v23 = &v20;
v20 = 0;
v6 = 0;
v21 = 0;
v22 = 0;
*(_QWORD *)&v20 = sub_14003D460(0x20u);
v21 = 18;
v22 = 31;
strcpy((char *)v20, "highscoreGet02.ogg");
v7 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v25 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v25);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v7 = qword_14090BF60;
}
FMODAudioEngine::playEffect_1(v7, (__int64)&v20);
v11 = CCCircleWave::create(v9, v8, v10, 0, 1);
*((_WORD *)v11 + 170) = -1;
*((_BYTE *)v11 + 342) = 0;
(*(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_QWORD *)v11 + 184LL))(v11, &v24);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v11,
9);
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 592)); ++i )
{
v13 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 592), i);
v14 = cocos2d::CCScaleTo::create(0.1, 1.8);
v15 = cocos2d::CCScaleTo::create(0.30000001, 1.0);
v16 = cocos2d::CCEaseBounceOut::create(v15);
v17 = cocos2d::CCSequence::create(v14, v16, 0);
cocos2d::CCNode::runAction(v13, v17);
}
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 584));
if ( result )
{
LOWORD(v23) = -1;
do
{
v19 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 584), v6);
LOWORD(v23) = -1;
BYTE2(v23) = 50;
(**((void (__fastcall ***)(__int64, __int128 **))v19 + 46))((__int64)v19 + 368, &v23);
++v6;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 584));
}
while ( v6 < result );
}
return result;
}