//
// EndLevelLayer::playEndEffect from 0x8fb6d8 to 0x8fb90c (564 bytes)
//
// 4 xrefs:
// > EndLevelLayer::starEnterFinished @ 0x8fba30
// > EndLevelLayer::currencyEnterFinished @ 0x8fbb64
// > EndLevelLayer::diamondEnterFinished @ 0x8fbc90
// > ??> @ 0xe4c10
//
// This function is hookable on this platform (idp: arm, 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:57:03 +0000
//
__int64 __fastcall EndLevelLayer::playEndEffect(EndLevelLayer *this)
{
__int64 v3; // x22
FMODAudioEngine *v4; // x0
__int64 v5; // x22
int v6; // w21
__int64 v7; // x4
unsigned int v8; // w22
__int64 v9; // x0
__int64 v10; // x22
__int64 v11; // [xsp+50h] [xbp+40h]
_BOOL8 v12; // [xsp+58h] [xbp+48h]
__int64 v13; // [xsp+60h] [xbp+50h]
__int64 v14; // [xsp+68h] [xbp+58h]
_BYTE v15[8]; // [xsp+70h] [xbp+60h] BYREF
_BYTE v16[8]; // [xsp+78h] [xbp+68h] BYREF
__int64 v17; // [xsp+80h] [xbp+70h] BYREF
__int64 v18; // [xsp+88h] [xbp+78h]
void *v19; // [xsp+90h] [xbp+80h]
if ( *((_BYTE *)this + 621) )
return _stack_chk_guard;
*((_BYTE *)this + 621) = (unsigned __int8)&dword_0 + 1;
v3 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)((char *)&dword_0 + 1));
v17 = 0;
v18 = 0;
v19 = nullptr;
std::string::__init(&v17, "gold02.ogg", 0xAu);
FMODAudioEngine::playEffect(v3, (char *)&v17);
if ( (v17 & 1) != 0 )
operator delete(v19);
if ( *((_BYTE *)this + 680) )
{
v10 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)*((unsigned __int8 *)this + 680));
v17 = 0;
v18 = 0;
v19 = nullptr;
std::string::__init(&v17, "secretKey.ogg", 0xDu);
FMODAudioEngine::playEffect(v10, (char *)&v17);
LABEL_8:
if ( (v17 & 1) != 0 )
operator delete(v19);
goto LABEL_10;
}
v4 = (FMODAudioEngine *)*((unsigned int *)this + 166);
if ( (int)v4 > 0 )
{
v5 = FMODAudioEngine::sharedEngine(v4);
v17 = 0;
v18 = 0;
v19 = nullptr;
std::string::__init(&v17, "magicExplosion.ogg", 0x12u);
FMODAudioEngine::playEffect(v5, (char *)&v17);
goto LABEL_8;
}
LABEL_10:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, (EndLevelLayer *)((char *)this + 648));
v6 = *((_DWORD *)this + 166);
if ( v6 <= 0 )
{
cocos2d::CCPoint::operator=(v15, (char *)this + 640);
v6 = *((_DWORD *)this + 166);
}
if ( *((_BYTE *)this + 680) )
v7 = 9;
else
v7 = 0;
v11 = v7;
v12 = *((_BYTE *)this + 680) != 0;
v8 = *((_DWORD *)this + 167);
v13 = *((unsigned int *)this + 168);
v14 = *((unsigned int *)this + 169);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (const cocos2d::CCPoint *)v15);
v9 = CurrencyRewardLayer::create((unsigned int)v6, v8, v13, v14, v11, v12, 0, 0, 0.0, 1.0, v16, 0);
(*(void (__fastcall **)(EndLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v9, 100);
return _stack_chk_guard;
}