Function at 0x140042170
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
mov r14d, dword [0x14008ac30]
movsxd rax, dword [0x1400640fc]
xor edx, edx
cmp eax, 0x7b
ja 0x140041f2a
lea rdx, [0x140089d40]
mov rdx, qword [rdx + rax*8]
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], 0
mov edi, 0xf
mov qword [rbp - 8], rdi
mov byte [rbp - 0x20], 0
test rdx, rdx
jne 0x140041f70
mov qword [rbp - 0x10], 0xa
movsd xmm0, qword [str.Select_Key]
movsd qword [rbp - 0x20], xmm0
movzx eax, word [0x140059dd0]
mov word [rbp - 0x18], ax
mov byte [rbp - 0x16], dl
jmp 0x140041f97
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x140041f80
lea rcx, [rbp - 0x20]
call fcn.14004cbe0
mov rdi, qword [rbp - 8]
cmp r14d, 1
jne 0x1400420c6
cmp rdi, 0x11
jb 0x140041fda
lea rbx, [rbp - 0x20]
cmp rdi, 0xf
cmova rbx, qword [rbp - 0x20]
mov qword [rbp - 0x10], 0x11
mov r8d, 0x11
lea rdx, str.Press_key_to_bind
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + 0x11], 0
jmp 0x1400420c2
mov rcx, rdi
shr rcx, 1
movabs rsi, 0x7fffffffffffffff
mov rax, rsi
sub rax, rcx
cmp rdi, rax
jbe 0x140042022
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140050370
test rax, rax
je 0x1400420b2
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x14004205f
lea rax, [rcx + rdi]
mov esi, 0x1f
cmp rax, rsi
cmova rsi, rax
lea rcx, [rsi + 1]
test rcx, rcx
jne 0x14004203f
xor ebx, ebx
jmp 0x14004205f
cmp rcx, 0x1000
jb 0x140042057
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14004216a
jmp 0x140042003
call fcn.140050370
mov rbx, rax
mov qword [rbp - 0x10], 0x11
mov qword [rbp - 8], rsi
movups xmm0, xmmword [str.Press_key_to_bind]
movups xmmword [rbx], xmm0
movzx ecx, byte [0x140059de8]
mov byte [rbx + 0x10], cl
mov byte [rbx + 0x11], 0
cmp rdi, 0xf
jbe 0x1400420be
lea rdx, [rdi + 1]
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400420b9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400420b9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400500b8
mov qword [rbp - 0x20], rbx
mov rdi, qword [rbp - 8]
mov dword [rbp + 0x28], 0x42fa0000
mov dword [rbp + 0x2c], 0x41a00000
lea rcx, [rbp - 0x20]
cmp rdi, 0xf
cmova rcx, qword [rbp - 0x20]
lea rdx, [rbp + 0x28]
call fcn.14002d460
test al, al
je 0x140042116
test r14d, r14d
jne 0x140042116
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], r14d
xor r9d, r9d
lea r8, [0x140042170]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0xf
jbe 0x140042154
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004214f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004214f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400500b8
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x80]
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret
call fcn.14003fee0
nop
push rbx
sub rsp, 0x20
mov dword [0x14008ac30], 1
xor ebx, ebx
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x14004219b
inc ebx
cmp ebx, 0x87
jl 0x140042182
jmp 0x140042180
mov dword [0x1400640fc], ebx
mov dword [0x14008ac30], 0
add rsp, 0x20
pop rbx
ret