//
// PauseLayer::keyDown from 0x1404db900 to 0x1404db9fb (251 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407d27d8
// > ??> @ 0x140929a14
//
// 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:33:04 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall PauseLayer::keyDown(__int64 a1, int a2)
{
int v3; // edx
int v4; // edx
int v5; // edx
int v6; // edx
__int64 v7; // rax
__int64 v8; // rcx
void *v9; // [rsp+30h] [rbp+8h]
if ( *(_BYTE *)(a1 + 242) && (a2 == 32 || a2 == 1007 || a2 == 1009) )
{
PauseLayer::onToggleUI(a1 - 344);
return;
}
v3 = a2 - 27;
if ( !v3 )
goto LABEL_17;
v4 = v3 - 5;
if ( !v4 )
{
LABEL_11:
PauseLayer::onResume((struct cocos2d::CCObject *)(a1 - 344));
return;
}
v5 = v4 - 971;
if ( v5 )
{
v6 = v5 - 4;
if ( v6 )
{
if ( v6 != 2 )
return;
goto LABEL_11;
}
v7 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v9 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v7 = qword_14090BFD0;
}
v8 = a1 - 344;
if ( *(_BYTE *)(*(_QWORD *)(v7 + 560) + 13024LL) )
PauseLayer::onNormalMode(v8);
else
PauseLayer::onPracticeMode(v8);
}
else
{
LABEL_17:
PauseLayer::tryQuit(a1 - 344);
}
}