Function at 0x140021de0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x48
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov rsi, r9
mov r15d, r8d
mov r13, rdx
mov rbx, rcx
mov r12, qword [rbp + 0x68]
cmp r8d, 0x111
ja 0x14002201b
je 0x140021fe3
mov eax, r8d
sub eax, 0xf
je 0x140021fd9
sub eax, 5
je 0x140021fcf
sub eax, 7
je 0x140021fc0
sub eax, 0xe6
je 0x140021ed1
cmp eax, 1
jne 0x1400221e9
lea ecx, [rax + 0x10]
call qword [sym.imp.USER32.dll_GetKeyState]
movzx edi, ax
and edi, 0x8000
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
cmp rsi, 0x1b
je 0x140021ff7
cmp dword [0x140188208], 0
je 0x140021eae
test edi, edi
je 0x140021eae
cmp rsi, 0x11
jne 0x140021eae
xor edx, edx
lea r8d, [rsi - 0x10]
mov rcx, qword [rbx + 0x1c8]
call fcn.14004b8d0
mov rcx, qword [0x1401a1610]
call fcn.1400388a0
jmp 0x1400221e9
cmp rsi, 0xd
je 0x14002200e
test edi, edi
jne 0x140021ec5
movzx eax, si
mov dword [rbx + 0x250], eax
mov dword [rbx + 0x154], 1
jmp 0x140021f0f
xor edi, edi
mov qword [rbp - 0x28], rdi
movzx edx, r12w
mov dword [rbp - 0x28], edx
mov rax, r12
shr rax, 0x10
movzx ecx, ax
mov dword [rbp - 0x24], ecx
cmp rsi, 0x2e
ja 0x140021f40
movabs rax, 0x400000001100
bt rax, rsi
jae 0x140021f40
mov rcx, qword [rbx]
call fcn.140022400
mov dword [rbx + 0x250], edi
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, qword [rbx + 0x1a0]
call qword [sym.imp.USER32.dll_InvalidateRect]
mov dword [0x1401a1120], eax
mov rcx, qword [rbx + 0x1a0]
call qword [sym.imp.USER32.dll_UpdateWindow]
mov dword [0x1401a1120], eax
jmp 0x1400221e9
mov dword [rbp - 0x20], 0xf
mov dword [rbp - 0x1c], 0xf
mov r8d, dword [rbx + 0x21c]
add r8d, 0xfffffff2
mov dword [rbp - 0x18], r8d
mov eax, dword [rbx + 0x240]
sub eax, 0x12
mov dword [rbp - 0x14], eax
cmp edx, 0xf
jb 0x1400221e9
cmp r8d, edx
jl 0x1400221e9
mov rax, qword [rbp - 0x20]
shr rax, 0x20
cmp eax, ecx
jg 0x1400221e9
mov rax, qword [rbp - 0x18]
shr rax, 0x20
cmp eax, ecx
jl 0x1400221e9
mov dword [rbx + 0x20], edx
mov dword [rbx + 0x24], ecx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140021fb3
mov rdx, qword [rbp - 0x28]
call fcn.140022600
mov rcx, rbx
call fcn.140021da0
jmp 0x1400221e9
mov edx, 1
call fcn.14001f330
jmp 0x1400221e9
mov eax, 1
jmp 0x1400221fb
call fcn.140020800
jmp 0x1400221e9
movzx ecx, si
sub ecx, 0x4c6
je 0x14002200e
cmp ecx, 1
jne 0x1400221e9
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, qword [rbx + 0x1c8]
call fcn.14004b8d0
jmp 0x1400221e9
mov rcx, rbx
call fcn.14001fb10
jmp 0x1400221e9
mov eax, r15d
sub eax, 0x200
je 0x1400221de
sub eax, 1
je 0x140022112
sub eax, 1
je 0x14002206e
cmp eax, 0xa1
jne 0x1400221e9
xor edi, edi
mov dword [rcx + 0x268], edi
mov dword [rcx + 0x248], edi
mov rdx, qword [rcx + 8]
test rdx, rdx
je 0x1400221e9
mov rcx, qword [rcx]
call fcn.140022310
mov qword [rbx + 8], rdi
jmp 0x1400221e9
mov rcx, qword [rbp + 0x68]
movzx eax, cx
mov dword [rbp - 0x28], eax
shr rcx, 0x10
movzx eax, cx
mov dword [rbp - 0x24], eax
xor edi, edi
mov dword [rbx + 0x248], edi
mov rdx, qword [rbx + 8]
test rdx, rdx
jne 0x1400220d1
mov rdx, qword [rbp - 0x28]
mov rcx, rbx
call fcn.140021210
cmp eax, 1
jne 0x1400220b3
mov rcx, rbx
call fcn.14001f790
xor eax, eax
jmp 0x1400221fb
cmp eax, 2
jne 0x1400220c2
mov rcx, qword [rbx]
call fcn.140022500
jmp 0x1400220dd
cmp eax, 3
jne 0x14002210b
mov rcx, qword [rbx]
call fcn.1400224f0
jmp 0x1400220dd
mov rcx, qword [rbx]
call fcn.140022310
mov qword [rbx + 8], rdi
mov r8d, 1
xor edx, edx
mov rcx, qword [rbx + 0x1a0]
call qword [sym.imp.USER32.dll_InvalidateRect]
mov dword [0x1401a1120], eax
mov rcx, qword [rbx + 0x1a0]
call qword [sym.imp.USER32.dll_UpdateWindow]
mov dword [0x1401a1120], eax
xor eax, eax
jmp 0x1400221fb
movzx r14d, r12w
mov dword [rbp - 0x28], r14d
mov rax, r12
shr rax, 0x10
movzx edi, ax
mov dword [rbp - 0x24], edi
mov dword [rcx + 0x248], 1
mov rdx, qword [rbp - 0x28]
call fcn.140021210
test eax, eax
jne 0x1400221e9
mov dword [rbp - 0x20], 0xf
mov dword [rbp - 0x1c], 0xf
mov ecx, dword [rbx + 0x21c]
add ecx, 0xfffffff2
mov dword [rbp - 0x18], ecx
mov eax, dword [rbx + 0x240]
sub eax, 0x12
mov dword [rbp - 0x14], eax
cmp r14d, 0xf
jb 0x1400221e9
cmp ecx, r14d
jl 0x1400221e9
mov rax, qword [rbp - 0x20]
shr rax, 0x20
cmp eax, edi
jg 0x1400221e9
mov rax, qword [rbp - 0x18]
shr rax, 0x20
cmp eax, edi
jl 0x1400221e9
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x1400221a9
mov rcx, rdi
call fcn.140022560
mov edx, 0x18
mov rcx, rdi
call fcn.14005d560
mov ecx, 0x18
call fcn.14005d524
mov qword [rbp - 0x28], rax
test rax, rax
je 0x1400221d6
xor ecx, ecx
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov rcx, rax
call fcn.140022510
mov rdi, rax
jmp 0x1400221d8
xor edi, edi
mov qword [rbx + 8], rdi
jmp 0x1400221e9
mov r8, r12
mov rdx, rsi
call fcn.14001fdd0
mov r9, r12
mov r8, rsi
mov edx, r15d
mov rcx, r13
call qword [sym.imp.USER32.dll_DefWindowProcW]
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret