//
// RetryLevelLayer::onMenu from 0x1405616b0 to 0x1405617c5 (277 bytes)
//
// 4 xrefs:
// > RetryLevelLayer::keyDown @ 0x1405616a2
// > RetryLevelLayer::keyBackClicked @ 0x1405617e9
// > RetryLevelLayer::customSetup @ 0x140560eca
// > ??> @ 0x14092c468
//
// 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:34:15 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall RetryLevelLayer::onMenu(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // r8
__int64 v4; // r9
int v5; // ecx
__int128 v7; // [rsp+30h] [rbp-28h] BYREF
__int64 v8; // [rsp+40h] [rbp-18h]
__int64 v9; // [rsp+48h] [rbp-10h]
void *v10; // [rsp+60h] [rbp+8h]
void *v11; // [rsp+70h] [rbp+18h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
PlayLayer::onQuit(*(_QWORD *)(v2 + 560));
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
v7 = 0;
*(_QWORD *)&v7 = sub_14003D460(0x20u);
v8 = 16;
v9 = 31;
strcpy((char *)v7, "quitSound_01.ogg");
v5 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v11 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v5 = qword_14090BF60;
}
return FMODAudioEngine::playEffect(v5, (__int64)&v7, v3, v4, 1060320051);
}