//
// EndLevelLayer::playStarEffect from 0x1004bb550 to 0x1004bb8a3 (851 bytes)
//
// 2 xrefs:
// > EndLevelLayer::showLayer @ 0x1004bb447
// > EndLevelLayer::showLayer @ 0x1004bb520
//
// 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::playStarEffect(__int64 a1, double a2)
{
__int64 result; // rax
__int64 v4; // rax
void *v5; // r14
__int64 v6; // rcx
_DWORD *v7; // rdx
int v8; // eax
int v9; // ecx
const char *v10; // rdi
char *v11; // rbx
__int64 v12; // rax
__int64 CString; // rax
_DWORD *v14; // r12
unsigned __int64 *v15; // r13
__int64 v16; // r15
_OWORD *v17; // rax
__int64 v18; // rbx
_OWORD *v19; // rax
__int64 v20; // rax
__m128 v21; // xmm0
_OWORD *v22; // rax
__int64 v23; // rax
__int64 v24; // r15
_OWORD *v25; // rbx
_OWORD *v26; // rax
__int64 v27; // rbx
_OWORD *v28; // r14
_OWORD *v29; // rax
__int64 v30; // r14
__int64 v31; // [rsp-58h] [rbp-58h] BYREF
unsigned __int64 v32; // [rsp-50h] [rbp-50h] BYREF
char *v33; // [rsp-48h] [rbp-48h]
double v34; // [rsp-3Ch] [rbp-3Ch] BYREF
unsigned int v35; // [rsp-34h] [rbp-34h]
result = *(_QWORD *)(a1 + 608);
if ( result && *(_BYTE *)(result + 14644) == 1 )
{
v35 = LODWORD(a2);
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v31, v4);
v5 = cocos2d::CCNode::create();
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v5, 10);
v6 = *(_QWORD *)(a1 + 608);
v7 = *(_DWORD **)(v6 + 1936);
v8 = v7[225];
if ( *(_BYTE *)(v6 + 14644) == 1 )
{
v9 = v7[237] - v7[238];
if ( v8 == 5 )
*(_DWORD *)(a1 + 672) = v9;
else
*(_DWORD *)(a1 + 668) = v9;
}
v10 = "GJ_bigStar_001.png";
if ( v8 == 5 )
v10 = "GJ_bigMoon_001.png";
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v10, a2);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v11 + 160LL))(v11, 0.80000001);
(*(void (__fastcall **)(void *, char *))(*(_QWORD *)v5 + 456LL))(v5, v11);
sub_100278250((float *)&v34, 15.0, 0.0);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v11 + 184LL))(v11, &v34);
v12 = sub_10088E820("+%i", v31);
CString = cocos2d::CCString::getCString(v12);
v14 = (_DWORD *)cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
sub_100278250((float *)&v34, 1.0, 0.5);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v14 + 296LL))(v14, &v34);
(*(void (__fastcall **)(void *, _DWORD *))(*(_QWORD *)v5 + 456LL))(v5, v14);
sub_100278250((float *)&v34, -2.0, -16.0);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v14 + 184LL))(v14, &v34);
v33 = v11;
v15 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v11 + 192LL))(v11);
sub_100278250((float *)&v32, -20.0, 0.0);
sub_100278350(&v34, v15, &v32);
(*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v14 + 184LL))(v14, &v34);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v14 + 160LL))(v14, 0.69999999);
v14[7] = 4;
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v5 + 184LL))(v5, a1 + 640);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v5 + 160LL))(v5, 3.0);
v16 = cocos2d::CCCallFunc::create(a1, EndLevelLayer::starEnterFinished, 0);
v17 = cocos2d::CCScaleTo::create_1((__m128)0x3E99999Au, 1.0);
v18 = cocos2d::CCEaseBounceOut::create(v17);
v19 = cocos2d::CCDelayTime::create((__m128)v35);
v20 = sub_10039EB60((__int64)v19, v18, 0);
cocos2d::CCNode::runAction((__int64)v5, v20);
v21 = (__m128)0x3E4CCCCDu;
v21.f32[0] = *(float *)&v35 + 0.2;
v22 = cocos2d::CCDelayTime::create(v21);
v23 = sub_10039EB60((__int64)v22, v16, 0);
cocos2d::CCNode::runAction((__int64)v5, v23);
v24 = (__int64)v33;
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v33 + 912LL))(v33, 0);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v14 + 1024LL))(v14, 0);
v25 = cocos2d::CCDelayTime::create((__m128)v35);
v26 = cocos2d::CCFadeIn::create((__m128)0x3E99999Au);
v27 = sub_10039EB60((__int64)v25, v26, 0);
v28 = cocos2d::CCDelayTime::create((__m128)v35);
v29 = cocos2d::CCFadeIn::create((__m128)0x3E99999Au);
v30 = sub_10039EB60((__int64)v28, v29, 0);
cocos2d::CCNode::runAction(v24, v27);
return cocos2d::CCNode::runAction((__int64)v14, v30);
}
return result;
}