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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
mov qword [rsp + 8], rcx
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf0]
sub rsp, 0x1f0
mov rbx, qword [0x1401703d8]
xor dil, dil
movzx r13d, r9b
movzx r14d, r8w
movzx esi, dl
mov rax, rcx
mov r12d, 1
test rbx, rbx
je 0x1400087be
movabs r15, 0xffffffff003c2c17
nop dword [rax]
cmp dword [rbx], r12d
jne 0x1400087b1
movzx ecx, byte [rbx + 0x5c]
test cl, cl
je 0x140008723
mov rdx, qword [rax + 0x10]
lea rax, [rdx + r15]
cmp rax, 0x66
ja 0x140008723
dec cl
mov eax, 0xffc3d44d
movzx ecx, cl
sub eax, edx
cmp eax, ecx
jle 0x1400087aa
test r13b, r13b
je 0x14000879e
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140008785
cmp qword [rax + 0x3a0], 0
je 0x140008785
movzx r8d, sil
movzx eax, r14w
movzx edx, byte [r8 + rbx + 0x74]
movzx ecx, byte [rax + rbx + 0x174]
or cl, dl
test cl, 0x20
jne 0x140008763
cmp byte [rbx + 0x62], 0
je 0x140008785
test dl, 0x40
jne 0x140008785
mov rcx, qword [0x14016f860]
movzx eax, r14w
mov edx, 0x41e
shl eax, 0x10
movsxd r9, eax
or r9, r8
mov r8, rbx
call qword [sym.imp.USER32.dll_PostMessageW]
movzx eax, r14w
test byte [rax + rbx + 0x174], 0x80
jne 0x1400087dc
movzx eax, sil
test byte [rax + rbx + 0x74], 0x80
jne 0x1400087cc
cmp byte [rbx + 0x5f], 0
movzx edi, dil
cmovne edi, r12d
mov rax, qword [rbp + 0x120]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1400086f0
test r13b, r13b
je 0x1400087ef
movzx eax, r12b
jmp 0x140008c4f
movzx eax, sil
and byte [rax + rbx + 0x74], 0x7f
xor al, al
jmp 0x140008c4f
movzx eax, r14w
and byte [rax + rbx + 0x174], 0x7f
xor al, al
jmp 0x140008c4f
movzx eax, byte [0x14016f85d]
movzx r13d, r12b
test al, 0xcf
je 0x14000880e
test dil, dil
jne 0x14000880e
test al, 0xc
je 0x14000880b
test al, 3
jne 0x14000880e
xor r13b, r13b
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor ebx, ebx
mov r15, rax
mov qword [rsp + 0x50], rax
mov edi, ebx
test rax, rax
je 0x14000885c
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rbp + 0x60]
mov dword [rbp + 0x60], 0x48
mov ecx, eax
mov edi, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x14000885c
mov rcx, qword [rbp + 0x70]
test rcx, rcx
je 0x14000885c
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
mov ecx, edi
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp qword [0x140174f40], r15
mov qword [rsp + 0x48], rax
je 0x1400088b9
lea rdx, [rbp + 0xb0]
mov r8d, 0x1c
mov rcx, r15
mov qword [0x140174f40], r15
call qword [sym.imp.USER32.dll_GetClassNameW]
lea rcx, str.e639_.354
call fcn.1400dd2e0
lea rcx, [rbp + 0xb0]
mov rdx, rax
call fcn.140108424
test eax, eax
sete dil
mov byte [0x140174f38], dil
jmp 0x1400088c0
movzx edi, byte [0x140174f38]
xor eax, eax
lea rcx, [rsp + 0x60]
lea rdx, [0x14016f8b0]
mov r8d, 0x100
mov word [rsp + 0x40], bx
mov dword [rsp + 0x42], eax
call fcn.140109100
movzx r15d, byte [0x140174f30]
test r15b, r15b
je 0x14000899a
test dil, dil
je 0x14000899a
cmp sil, 0xe7
je 0x14000899a
movzx eax, byte [0x140174f36]
neg al
movzx eax, byte [0x140174f37]
sbb dl, dl
and dl, 0x20
neg al
sbb cl, cl
and cl, 9
or dl, cl
lea rcx, [rsp + 0x60]
call fcn.140019290
movzx edx, word [0x140174f34]
movzx ecx, r15b
mov r15, qword [rsp + 0x48]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test eax, eax
jle 0x140008992
movzx edx, word [0x140174f34]
movzx ecx, byte [0x140174f30]
mov qword [rsp + 0x30], r15
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x60]
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov byte [0x140174f30], bl
jmp 0x14000899f
mov r15, qword [rsp + 0x48]
movzx edx, byte [0x14016f85d]
lea rcx, [rsp + 0x60]
call fcn.140019290
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.USER32.dll_GetKeyState]
test r12b, al
je 0x1400089c7
or byte [rsp + 0x74], r12b
jmp 0x1400089cc
and byte [rsp + 0x74], 0xfe
mov rdi, qword [rbp + 0x120]
cmp sil, 0xe7
jne 0x1400089e7
movzx eax, word [rdi + 4]
mov word [rsp + 0x40], ax
jmp 0x140008a70
test r13b, r13b
je 0x140008a4c
cmp dword [0x14016fa0c], ebx
mov edx, dword [rdi + 4]
mov eax, ebx
setne al
mov qword [rsp + 0x30], r15
lea r9, [rsp + 0x40]
mov dword [rsp + 0x28], eax
lea r8, [rsp + 0x60]
movzx ecx, sil
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test byte [0x14016f85d], 3
mov r12d, eax
jne 0x140008a4f
cmp word [rsp + 0x40], 0xd
mov eax, 0xa
jne 0x140008a3d
mov word [rsp + 0x40], ax
cmp word [rsp + 0x42], 0xd
jne 0x140008a4f
mov word [rsp + 0x42], ax
jmp 0x140008a4f
mov r12d, ebx
cmp sil, 8
jne 0x140008a70
test r12d, r12d
je 0x140008a70
cmp byte [0x140174f38], bl
je 0x140008a6d
mov r12d, ebx
mov byte [0x140174f30], bl
jmp 0x140008a70
dec r12d
lea r9, [rsp + 0x40]
movzx r8d, r14w
movzx edx, sil
mov rcx, rdi
mov dword [rsp + 0x20], r12d
call fcn.1400090f0
test al, al
je 0x1400087e8
movzx edi, byte [0x140174f30]
test dil, dil
je 0x140008aa8
test r12d, r12d
jle 0x140008aa8
mov r13b, 1
jmp 0x140008aab
xor r13b, r13b
test r12d, r12d
jns 0x140008b21
movzx eax, byte [0x14016f85d]
mov byte [0x140174f30], sil
mov word [0x140174f34], r14w
test al, 0x30
setne byte [0x140174f36]
test al, 3
je 0x140008ade
mov byte [0x140174f37], 1
test al, 0xc
jne 0x140008ae4
mov byte [0x140174f37], bl
mov rax, qword [rbp + 0x120]
cmp dword [0x14016fa0c], ebx
mov qword [rsp + 0x30], r15
mov edx, dword [rax + 4]
setne bl
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x60]
movzx ecx, sil
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
jmp 0x140008c4d
cmp dword [0x140170480], ebx
je 0x140008bda
cmp byte [rbp + 0x140], bl
jne 0x140008bda
cmp sil, 8
je 0x140008b62
cmp sil, 0x20
jbe 0x140008b89
cmp sil, 0x28
ja 0x140008b89
cmp dword [0x14016e18c], ebx
je 0x140008b89
mov word [0x14016e450], bx
mov dword [0x14016e18c], ebx
jmp 0x140008b89
cmp byte [0x14016f85d], bl
jne 0x140008b89
mov eax, dword [0x14016e18c]
test eax, eax
je 0x140008b89
dec eax
lea rcx, [0x14016e450]
mov dword [0x14016e18c], eax
cdqe
mov word [rcx + rax*2], bx
test r12d, r12d
jle 0x140008bda
mov rax, qword [rbp + 0x158]
mov r9, qword [rsp + 0x50]
mov rcx, qword [rbp + 0x120]
mov qword [rsp + 0x30], rax
mov rax, qword [rbp + 0x150]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rax, qword [rbp + 0x148]
mov r8d, r12d
mov qword [rsp + 0x20], rax
call fcn.140008c70
test al, al
je 0x1400087e8
movzx edi, byte [0x140174f30]
test r13b, r13b
je 0x140008c4d
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x100
call fcn.14010ec60
movzx r11d, byte [0x140174f36]
movzx eax, byte [0x140174f37]
neg r11b
sbb dl, dl
and dl, 0x20
neg al
sbb cl, cl
and cl, 9
or dl, cl
lea rcx, [rsp + 0x60]
call fcn.140019290
movzx edx, word [0x140174f34]
mov qword [rsp + 0x30], r15
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x60]
movzx ecx, dil
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov byte [0x140174f30], bl
mov al, 1
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret