//
// EndLevelLayer::showLayer from 0x140205fe0 to 0x1402061a8 (456 bytes)
//
// 4 xrefs:
// > PlayLayer::showEndLayer @ 0x14050b1ed
// > PlayLayer::showEndLayer @ 0x14050b1cd
// > ??> @ 0x140753710
// > ??> @ 0x14091b164
//
// 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:28:15 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EndLevelLayer::showLayer(cocos2d::CCNode *a1, char a2)
{
__int64 v4; // rcx
char v5; // bl
const struct cocos2d::CCPoint *v6; // rdx
__int64 v7; // rdx
struct cocos2d::CCActionInterval *v8; // rax
struct cocos2d::CCFiniteTimeAction *v9; // rbx
__int64 v10; // rax
struct cocos2d::CCAction *v11; // rax
struct cocos2d::CCAction *v12; // rax
cocos2d::CCArray *v13; // rcx
void *v15; // [rsp+40h] [rbp+8h]
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v15 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
v5 = 1;
if ( !(unsigned __int8)GameManager::getGameVariable(v4, "0168") )
v5 = a2;
cocos2d::CCNode::stopAllActions(*((cocos2d::CCNode **)a1 + 72));
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a1 + 1096LL))(a1);
v6 = (cocos2d::CCNode *)((char *)a1 + 544);
if ( v5 )
{
(*(void (__fastcall **)(_QWORD, const struct cocos2d::CCPoint *))(**((_QWORD **)a1 + 72) + 184LL))(
*((_QWORD *)a1 + 72),
v6);
LOBYTE(v7) = 100;
(*(void (__fastcall **)(_QWORD *, __int64))(*((_QWORD *)a1 + 51) + 40LL))((_QWORD *)a1 + 51, v7);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a1 + 1112LL))(a1);
EndLevelLayer::playStarEffect(a1);
EndLevelLayer::playCoinEffect(a1);
}
else
{
v8 = cocos2d::CCMoveTo::create(1.0, v6);
v9 = cocos2d::CCEaseBounceOut::create(v8);
v10 = cocos2d::CCCallFunc::create(a1, sub_1401353DC);
v11 = cocos2d::CCSequence::create(v9, v10, 0);
cocos2d::CCNode::runAction(*((cocos2d::CCNode **)a1 + 72), v11);
(*(void (__fastcall **)(_QWORD *, _QWORD))(*((_QWORD *)a1 + 51) + 40LL))((_QWORD *)a1 + 51, 0);
v12 = cocos2d::CCFadeTo::create(1.0, 0x64u);
cocos2d::CCNode::runAction(a1, v12);
EndLevelLayer::playCoinEffect(a1);
v13 = *((cocos2d::CCArray **)a1 + 79);
if ( v13 )
cocos2d::CCArray::count(v13);
EndLevelLayer::playStarEffect(a1);
}
EndLevelLayer::playCurrencyEffect(a1);
return EndLevelLayer::playDiamondEffect(a1);
}