Function at 0x18000e8a0
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x678
mov rax, qword [0x180127050]
xor rax, rsp
mov qword [rsp + 0x660], rax
mov dword [rsp + 0x40], 0
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov qword [rsp + 0x58], rax
mov byte [rsp + 0x60], 0
lea rax, [rsp + 0x61]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_GetKeyboardState]
mov r8, qword [rsp + 0x58]
xor edx, edx
mov ecx, dword [rsp + 0x6a0]
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov dword [rsp + 0x48], eax
xor eax, eax
mov word [rsp + 0x160], ax
lea rax, [rsp + 0x162]
mov rdi, rax
xor eax, eax
mov ecx, 0x1fe
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x100
lea r9, [rsp + 0x160]
lea r8, [rsp + 0x60]
mov edx, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x6a0]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x160]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
lea rax, str.ret:__d___s
mov qword [rsp + 0x20], rax
mov r9d, 1
mov r8d, 0xba
lea rdx, [0x1801103d0]
lea rcx, str.CVirtualKeyManager::GetUnicodeVal
call fcn.1800f8eb0
cmp dword [rsp + 0x44], 0xffffffff
jne 0x18000ea23
mov dword [rsp + 0x50], 0
mov byte [rsp + 0x360], 0
lea rax, [rsp + 0x361]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x100
lea r9, [rsp + 0x160]
lea r8, [rsp + 0x360]
mov edx, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x6a0]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x18000e9c1
mov rax, qword [rsp + 0x690]
cmp dword [rax + 0x18], 0
je 0x18000eb23
mov rax, qword [rsp + 0x690]
movzx eax, byte [rax + 0x11]
test eax, eax
je 0x18000eb23
xor eax, eax
mov word [rsp + 0x460], ax
lea rax, [rsp + 0x462]
mov rdi, rax
xor eax, eax
mov ecx, 0x1fe
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x690]
add rax, 0x1c
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x100
lea r9, [rsp + 0x460]
mov r8, rax
mov rax, qword [rsp + 0x690]
mov edx, dword [rax + 0x14]
mov rax, qword [rsp + 0x690]
mov ecx, dword [rax + 0x18]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rax, qword [rsp + 0x690]
mov dword [rax + 0x18], 0
mov rax, qword [rsp + 0x690]
mov byte [rax + 0x11], 0
mov rax, qword [rsp + 0x690]
mov dword [rax + 0x14], 0
mov rax, qword [rsp + 0x690]
add rax, 0x1c
mov rdi, rax
xor eax, eax
mov ecx, 0x100
rep stosb byte [rdi], al
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x698]
call fcn.180003320
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x698]
jmp 0x18000ebe0
cmp dword [rsp + 0x44], 0xffffffff
jne 0x18000eb34
mov dword [rsp + 0x4c], 1
jmp 0x18000eb3c
mov dword [rsp + 0x4c], 0
mov rax, qword [rsp + 0x690]
movzx ecx, byte [rsp + 0x4c]
mov byte [rax + 0x11], cl
mov rax, qword [rsp + 0x690]
mov ecx, dword [rsp + 0x48]
mov dword [rax + 0x14], ecx
mov rax, qword [rsp + 0x690]
mov ecx, dword [rsp + 0x6a0]
mov dword [rax + 0x18], ecx
mov rax, qword [rsp + 0x690]
lea rcx, [rsp + 0x60]
lea rdi, [rax + 0x1c]
mov rsi, rcx
mov ecx, 0x100
rep movsb byte [rdi], byte [rsi]
cmp dword [rsp + 0x44], 0xffffffff
jne 0x18000ebb8
lea rdx, [0x18010e954]
mov rcx, qword [rsp + 0x698]
call fcn.180003320
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x698]
jmp 0x18000ebe0
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x698]
call fcn.180003320
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x698]
mov rcx, qword [rsp + 0x660]
xor rcx, rsp
call fcn.1801068d0
add rsp, 0x678
pop rdi
pop rsi
ret