//
// EndLevelLayer::playEndEffect from 0x535700 to 0x53584a (330 bytes)
//
// 3 xrefs:
// > EndLevelLayer::starEnterFinished @ 0x535910
// > EndLevelLayer::currencyEnterFinished @ 0x5359d0
// > EndLevelLayer::diamondEnterFinished @ 0x535a8a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:07 +0000
//
unsigned __int8 *__fastcall EndLevelLayer::playEndEffect(unsigned __int8 *this)
{
int v1; // r5
unsigned __int8 *v2; // r4
FMODAudioEngine *v3; // r6
FMODAudioEngine *v4; // r0
int v5; // r6
int v6; // r0
FMODAudioEngine *v7; // r6
int v8; // r0
FMODAudioEngine *v9; // r8
int v10; // r5
int v11; // r2
int v12; // r11
int v13; // r10
int v14; // r9
int v15; // r0
int v16; // [sp+20h] [bp-2Ch]
int v17; // [sp+24h] [bp-28h]
_BYTE v18[8]; // [sp+28h] [bp-24h] BYREF
_BYTE v19[8]; // [sp+30h] [bp-1Ch] BYREF
int v20; // [sp+38h] [bp-14h] BYREF
int v21; // [sp+3Ch] [bp-10h]
int v22; // [sp+40h] [bp-Ch]
v1 = *(this + 489);
v2 = this;
if ( *(this + 489) )
return this;
*(this + 489) = 1;
v20 = v1;
v21 = v1;
v22 = v1;
v3 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)this);
std::string::__init(&v20, "gold02.ogg", 0xAu);
FMODAudioEngine::playEffect(v3, (int)&v20);
v4 = (FMODAudioEngine *)std::string::~string((int)&v20);
v5 = v2[540];
if ( v2[540] )
{
v6 = FMODAudioEngine::sharedEngine(v4);
v20 = 0;
v21 = 0;
v22 = 0;
v7 = (FMODAudioEngine *)v6;
std::string::__init(&v20, "secretKey.ogg", 0xDu);
FMODAudioEngine::playEffect(v7, (int)&v20);
LABEL_6:
std::string::~string((int)&v20);
goto LABEL_7;
}
if ( *((int *)v2 + 131) > 0 )
{
v8 = FMODAudioEngine::sharedEngine(v4);
v20 = v5;
v21 = v5;
v22 = v5;
v9 = (FMODAudioEngine *)v8;
std::string::__init(&v20, "magicExplosion.ogg", 0x12u);
FMODAudioEngine::playEffect(v9, (int)&v20);
goto LABEL_6;
}
LABEL_7:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)(v2 + 508));
if ( *((int *)v2 + 131) <= 0 )
cocos2d::CCPoint::operator=(v18, v2 + 500);
v10 = v2[540];
if ( v2[540] )
{
v10 = 9;
v11 = 1;
}
else
{
v11 = v2[540];
}
v17 = v11;
v12 = *((_DWORD *)v2 + 132);
v16 = *((_DWORD *)v2 + 131);
v13 = *((_DWORD *)v2 + 133);
v14 = *((_DWORD *)v2 + 134);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, (const cocos2d::CCPoint *)v18);
v15 = CurrencyRewardLayer::create(v16, v12, v13, v14, v10, v17, 0, 0, (int)v19, 0, 0.0, 1.0);
return (unsigned __int8 *)(*(int (__fastcall **)(unsigned __int8 *, int, int))(*(_DWORD *)v2 + 232))(v2, v15, 100);
}