//
// RetryLevelLayer::keyDown from 0x1004f8570 to 0x1004f85fd (141 bytes)
//
// 2 xrefs:
// > sub_1004F8600 @ 0x1004f860c
// > ??> @ 0x100b63a08
//
// 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 12:31:27 +0000
//
void __fastcall RetryLevelLayer::keyDown(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 v4; // rax
if ( (int)a2 <= 1000 )
{
if ( (_DWORD)a2 != 27 )
{
if ( (_DWORD)a2 == 32 )
goto LABEL_5;
goto LABEL_10;
}
LABEL_11:
RetryLevelLayer::onMenu(a1, a2);
return;
}
if ( (_DWORD)a2 != 1009 )
{
if ( (_DWORD)a2 != 1003 )
{
if ( (_DWORD)a2 == 1001 )
goto LABEL_5;
LABEL_10:
cocos2d::CCLayer::keyDown(a1, a2);
return;
}
goto LABEL_11;
}
LABEL_5:
v3 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getGameVariable(v3, "0024") )
PlatformToolbox::hideCursor(v3);
v4 = GameManager::sharedState();
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v4 + 544) + 1608LL))(*(_QWORD *)(v4 + 544));
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 536LL))(a1);
}