//
// EndLevelLayer::onReplay from 0x535210 to 0x5352d2 (194 bytes)
//
// 1 xrefs:
// > EndLevelLayer::keyDown @ 0x5353e4
//
// 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:06 +0000
//
PlayLayer **__fastcall EndLevelLayer::onReplay(PlayLayer **this, cocos2d::CCObject *a2)
{
PlayLayer **v2; // r4
GameManager *v3; // r0
FMODAudioEngine *GameVariable; // r0
FMOD::ChannelControl **v5; // r0
FMODAudioEngine *v6; // r0
FMODAudioEngine *v7; // r7
float v8; // r1
int v9[3]; // [sp+8h] [bp-14h] BYREF
v2 = this;
if ( !*((_BYTE *)this + 487) )
{
*((_BYTE *)this + 487) = 1;
v3 = (GameManager *)GameManager::sharedState((GameManager *)this);
GameVariable = (FMODAudioEngine *)GameManager::getGameVariable(v3, "0024");
if ( !GameVariable )
PlatformToolbox::hideCursor(nullptr);
v5 = (FMOD::ChannelControl **)FMODAudioEngine::sharedEngine(GameVariable);
v6 = (FMODAudioEngine *)FMODAudioEngine::clearAllAudio(v5);
memset(v9, 0, sizeof(v9));
v7 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v6);
std::string::__init(v9, "playSound_01.ogg", 0x10u);
FMODAudioEngine::playEffect(v7, (int)v9, 1065353216, 0, 1050253722);
std::string::~string((int)v9);
(*((void (__fastcall **)(PlayLayer **, _DWORD))*v2 + 165))(v2, 0);
(*((void (__fastcall **)(PlayLayer **, _DWORD))*v2 + 125))(v2, 0);
(*((void (__fastcall **)(PlayLayer **, _DWORD))*v2 + 136))(v2, 0);
(*((void (__fastcall **)(PlayLayer **, _DWORD))*v2 + 134))(v2, 0);
return (PlayLayer **)PlayLayer::delayedFullReset(v2[120], v8);
}
return this;
}