//
// EmotePickerPopup::keyDown from 0x140124a30 to 0x140124afa (202 bytes)
//
// 2 xrefs:
// > ??> @ 0x140733318
// > ??> @ 0x140916928
//
// 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:26:57 +0000
//
void __fastcall EmotePickerPopup::keyDown(__int64 a1, unsigned int a2)
{
__int64 v2; // rbx
__int64 v5; // rcx
__int64 v6; // rcx
__int64 v7; // rcx
v2 = a1 - 344;
if ( a2 == 27 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2 + 1104LL))(a1 - 344, 0);
return;
}
v5 = *(_QWORD *)(v2 + 1168);
if ( v5 )
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v5 + 16LL))(v5, v2, a2);
if ( !*(_BYTE *)(v2 + 1079) )
{
v6 = qword_140909788;
if ( !qword_140909788 )
{
LABEL_9:
v7 = *(_QWORD *)(a1 + 656);
if ( v7 )
(**(void (__fastcall ***)(__int64, _QWORD))(v7 + 344))(v7 + 344, a2);
return;
}
while ( v6 != v2 )
{
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 504LL))(v6);
if ( !v6 )
goto LABEL_9;
}
}
*(_BYTE *)(a1 + 735) = 0;
if ( a2 == 13 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 1216LL))(v2);
}