//
// EndLevelLayer::playCurrencyEffect from 0x1004bba50 to 0x1004bbda6 (854 bytes)
//
// 1 xrefs:
// > EndLevelLayer::showLayer @ 0x1004bb52d
//
// 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 12:31:03 +0000
//
__int64 __fastcall EndLevelLayer::playCurrencyEffect(__int64 a1, float a2)
{
__int64 result; // rax
__int64 v4; // rax
void *v5; // r15
__int64 v6; // rdi
double v7; // xmm0_8
char *v8; // rbx
__int64 v9; // rax
__int64 CString; // rax
_DWORD *v11; // r14
unsigned __int64 *v12; // r13
__int64 v13; // rbx
__int64 v14; // r12
_OWORD *v15; // rax
__int64 v16; // rbx
_OWORD *v17; // rax
__int64 v18; // rax
__m128 v19; // xmm0
_OWORD *v20; // rax
__int64 v21; // rax
__int64 v22; // r13
_OWORD *v23; // rbx
_OWORD *v24; // rax
__int64 v25; // r15
_OWORD *v26; // rbx
_OWORD *v27; // rax
__int64 v28; // rbx
_OWORD *v29; // r12
_OWORD *v30; // rax
char v31; // [rsp-68h] [rbp-68h]
__int64 v32; // [rsp-60h] [rbp-60h] BYREF
unsigned __int64 v33; // [rsp-58h] [rbp-58h] BYREF
char *v34; // [rsp-50h] [rbp-50h]
__int64 v35; // [rsp-48h] [rbp-48h]
double v36; // [rsp-3Ch] [rbp-3Ch] BYREF
unsigned int v37; // [rsp-34h] [rbp-34h]
result = *(_QWORD *)(a1 + 608);
if ( result )
{
result = *(unsigned int *)(result + 14648);
*(_DWORD *)(a1 + 664) = result;
if ( (int)result > 0 )
{
*(float *)&v37 = a2;
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v32, v4);
v5 = cocos2d::CCNode::create();
v6 = *(_QWORD *)(a1 + 576);
v35 = a1;
v7 = (*(double (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v6 + 464LL))(v6, v5, 10);
v8 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"currencyOrbIcon_001.png", v7);
(*(void (__fastcall **)(void *, char *))(*(_QWORD *)v5 + 456LL))(v5, v8);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v8 + 160LL))(v8, 1.25);
sub_100278250((float *)&v36, 15.0, 0.0);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v8 + 184LL))(v8, &v36);
v9 = sub_10088E820("+%i", v31);
CString = cocos2d::CCString::getCString(v9);
v11 = (_DWORD *)cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
sub_100278250((float *)&v36, 1.0, 0.5);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v11 + 296LL))(v11, &v36);
(*(void (__fastcall **)(void *, _DWORD *))(*(_QWORD *)v5 + 456LL))(v5, v11);
sub_100278250((float *)&v36, -2.0, -16.0);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v11 + 184LL))(v11, &v36);
v34 = v8;
v12 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v8 + 192LL))(v8);
sub_100278250((float *)&v33, -20.0, 0.0);
sub_100278350(&v36, v12, &v33);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v11 + 184LL))(v11, &v36);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v11 + 160LL))(v11, 0.69999999);
v11[7] = 4;
cocos2d::CCLabelBMFont::limitLabelWidth(v11, 40.0, 0.69999999, 0.0);
v13 = v35;
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v5 + 184LL))(v5, v35 + 648);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v5 + 160LL))(v5, 3.0);
v14 = cocos2d::CCCallFunc::create(v13, EndLevelLayer::currencyEnterFinished, 0);
v15 = cocos2d::CCScaleTo::create_1((__m128)0x3E99999Au, 1.0);
v16 = cocos2d::CCEaseBounceOut::create(v15);
v17 = cocos2d::CCDelayTime::create((__m128)v37);
v18 = sub_10039EB60((__int64)v17, v16, 0);
cocos2d::CCNode::runAction((__int64)v5, v18);
v19 = (__m128)0x3E4CCCCDu;
v19.f32[0] = *(float *)&v37 + 0.2;
v20 = cocos2d::CCDelayTime::create(v19);
v21 = sub_10039EB60((__int64)v20, v14, 0);
cocos2d::CCNode::runAction((__int64)v5, v21);
v22 = (__int64)v34;
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v34 + 912LL))(v34, 0);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v11 + 1024LL))(v11, 0);
v23 = cocos2d::CCDelayTime::create((__m128)v37);
v24 = cocos2d::CCFadeIn::create((__m128)0x3E99999Au);
v25 = sub_10039EB60((__int64)v23, v24, 0);
v26 = cocos2d::CCDelayTime::create((__m128)v37);
v27 = cocos2d::CCFadeIn::create((__m128)0x3E99999Au);
v28 = sub_10039EB60((__int64)v26, v27, 0);
v29 = cocos2d::CCDelayTime::create((__m128)v37);
v30 = cocos2d::CCFadeIn::create((__m128)0x3E99999Au);
sub_10039EB60((__int64)v29, v30, 0);
cocos2d::CCNode::runAction(v22, v25);
return cocos2d::CCNode::runAction((__int64)v11, v28);
}
}
return result;
}