Function at 0x180002cf0
Capabilities:
Get keyboard layout

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r14
lea rbp, [r11 - 0x48]
sub rsp, 0x128
lea eax, [rdx - 1]
mov esi, edx
mov rdi, rcx
cmp eax, 1
jbe 0x180003101
mov qword [r11 + 0x18], rbx
lea rdx, [rsp + 0x38]
mov qword [r11 - 0x28], r15
lea rcx, [rsp + 0x20]
lea r15, [0x180000000]
lea rax, [r15 + 0x5ed68]
mov qword [rsp + 0x20], rax
lea rax, [0x18005ec80]
mov qword [rsp + 0x30], rax
lea rax, vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x48], rax
call fcn.180005730
mov rax, qword [rsp + 0x20]
movsxd rcx, dword [rax + 4]
lea rax, [0x18005ed20]
mov qword [rsp + rcx + 0x20], rax
mov rax, qword [rsp + 0x20]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x1c], edx
mov ecx, 0x10
mov qword [rsp + 0x38], rax
call fcn.180008ba4
mov cl, 1
mov rbx, rax
call fcn.18000a450
mov qword [rbx + 8], rax
xor r14d, r14d
lea rax, [rsp + 0x40]
mov qword [rbp - 0x68], rbx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x78], rax
lea rax, [rbp - 0x80]
mov qword [rbp - 0x78], rax
lea rax, [rbp - 0x7c]
mov qword [rbp - 0x70], rax
lea rax, [0x18005eca8]
mov qword [rsp + 0x38], rax
lea eax, [rsi - 8]
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x68], r14
mov qword [rbp - 0x80], r14
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x60], r14
mov qword [rbp - 0x60], r14
mov dword [rbp - 0x58], r14d
cmp eax, 0xb6
ja case.0x180002e30.31
cdqe
movzx eax, byte [r15 + rax + 0x3194]
mov ecx, dword [r15 + rax*4 + 0x3134]
add rcx, r15
jmp rcx
lea rdx, [0x18005eaac]
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Meta
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Backspace
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Enter
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Spacebar
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, [0x18005eadc]
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Shift
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Control
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Escape
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, [0x18005eaf8]
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Home
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.ArrowLeft
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.ArrowUp
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.ArrowRight
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.ArrowDown
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.CapsLock
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.PageUp
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.PageDown
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Delete
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.Insert
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, str.PrintScreen
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, [0x18005eb84]
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea rdx, [0x18005eb88]
lea rcx, [rsp + 0x30]
call fcn.180006d80
jmp 0x18000306e
lea eax, [rsi - 0x70]
cmp eax, 0x13
ja 0x180003049
lea rdx, [0x18005eb8c]
lea rcx, [rsp + 0x30]
call fcn.180006d80
mov rcx, rax
lea edx, [rsi - 0x6f]
call fcn.180003fb0
jmp 0x18000306e
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edx, 2
mov ecx, esi
mov r8, rax
call qword [sym.imp.USER32.dll_MapVirtualKeyExA]
movzx edx, al
lea rcx, [rsp + 0x30]
call fcn.180007030
mov ecx, dword [rbp - 0x58]
mov r15, qword [rsp + 0x120]
mov rbx, qword [rsp + 0x160]
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], 0xf
mov byte [rdi], r14b
test cl, 2
jne 0x1800030b8
mov rax, qword [rsp + 0x78]
mov r8, qword [rax]
test r8, r8
je 0x1800030b8
cmp r8, qword [rbp - 0x60]
mov rax, qword [rsp + 0x58]
cmovb r8, qword [rbp - 0x60]
mov rdx, qword [rax]
sub r8, rdx
jmp 0x1800030df
test cl, 4
jne 0x1800030e7
mov rax, qword [rsp + 0x70]
mov r9, qword [rax]
test r9, r9
je 0x1800030e7
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rcx]
mov rcx, qword [rbp - 0x78]
movsxd r8, dword [rcx]
sub r8, rdx
add r8, r9
mov rcx, rdi
call fcn.180005560
lea rcx, [rsp + 0x20]
call fcn.180003250
mov rax, rdi
add rsp, 0x128
pop r14
pop rdi
pop rsi
pop rbp
ret
xor r14d, r14d
mov qword [rcx + 0x18], 0xf
mov qword [rcx + 0x10], r14
lea rdx, [0x18005e7ef]
xor r8d, r8d
mov byte [rcx], r14b
call fcn.180005560
mov rax, rdi
add rsp, 0x128
pop r14
pop rdi
pop rsi
pop rbp
ret