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

Disassembly:
push rbp
push r14
sub rsp, 0x198
mov rax, qword [0x140055040]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbp, qword [0x140071be0]
mov r14, r8
sub rdx, 0x100
je 0x1400362c1
sub rdx, 1
je 0x1400362a6
sub rdx, 3
je 0x1400362c1
cmp rdx, 1
jne 0x1400364df
mov eax, dword [r8]
cmp eax, 0x200
jae 0x1400364df
mov byte [rax + rbp + 0xb0c], 0
jmp 0x1400364df
mov eax, dword [r8]
cmp eax, 0x200
jae 0x1400362d3
mov byte [rax + rbp + 0xb0c], 1
mov ecx, dword [r8]
call qword [sym.imp.USER32.dll_GetKeyState]
lea rcx, [rsp + 0x70]
call qword [sym.imp.USER32.dll_GetKeyboardState]
test eax, eax
je 0x1400364df
mov qword [rsp + 0x1b0], rbx
mov qword [rsp + 0x1c8], rdi
xor edi, edi
cmp byte [0x140071bd9], dil
jne 0x14003643b
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.loading_keyboard_layouts_n
mov qword [rsp + 0x1b8], rsi
mov qword [rsp + 0x188], r13
mov qword [rsp + 0x180], r15
mov byte [0x140071bd9], 1
call fcn.14003c710
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
movsxd rbx, eax
mov r13, 0xffffffffffffffff
mov eax, 8
mov r15, rbx
mul rbx
cmovo rax, r13
mov rcx, rax
call fcn.140044d30
mov rdx, rax
mov ecx, ebx
mov rsi, rax
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov ebx, edi
test r15, r15
jle 0x14003641b
mov qword [rsp + 0x190], r12
lea r12, str.00000409
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rsi + rbx*8]
mov edx, 0x100
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rsp + 0x40]
mov rcx, r13
movzx eax, word [rdx + rcx*2 + 2]
cmp ax, word [r12 + rcx*2 + 2]
jne 0x14003640b
add rcx, 2
cmp rcx, 9
je 0x1400363e6
movzx eax, word [rdx + rcx*2]
cmp ax, word [r12 + rcx*2]
je 0x1400363c2
jmp 0x14003640b
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Found_english_layout_n
call fcn.14003c710
mov rax, qword [rsi + rbx*8]
mov qword [0x140071cd8], rax
mov byte [0x140071bdb], 1
inc rbx
cmp rbx, r15
jl 0x1400363a0
mov r12, qword [rsp + 0x190]
mov rcx, rsi
call fcn.1400448c0
mov r15, qword [rsp + 0x180]
mov r13, qword [rsp + 0x188]
mov rsi, qword [rsp + 0x1b8]
cmp byte [0x140071bdb], dil
je 0x140036465
mov rbx, qword [0x140071cd8]
test rbx, rbx
jne 0x140036470
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.custom_layout_is_null__n
call fcn.14003c710
jmp 0x140036470
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rbx, rax
mov edx, dword [r14 + 4]
lea r9, [rsp + 0x58]
mov ecx, dword [r14]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0xa
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rbx, qword [rsp + 0x1b0]
test eax, eax
je 0x1400364d7
lea rax, [rsp + 0x58]
nop dword [rax]
movzx edx, word [rax]
test dx, dx
jne 0x1400364c5
inc edi
add rax, 2
cmp edi, 0xa
jl 0x1400364b0
jmp 0x1400364d7
cmp byte [rbp + 0xd2], 0
je 0x1400364d7
lea rcx, [rbp + 8]
call fcn.1400029c0
mov rdi, qword [rsp + 0x1c8]
xor eax, eax
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1400447d0
add rsp, 0x198
pop r14
pop rbp
ret