Function at 0x1400167e0
Capabilities:
Log keystrokes via polling

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov r14d, r9d
mov esi, r8d
mov rdi, rdx
mov r15, rcx
cmp r8d, 0x201
je 0x14001681f
cmp r8d, 0x204
jne 0x140016825
call qword [sym.imp.USER32.dll_SetFocus]
xor r12b, r12b
mov qword [rsp + 0x178], rbx
mov eax, esi
mov r13d, 1
sub eax, 0x201
je 0x140016943
sub eax, r13d
je 0x14001692e
cmp eax, 2
jne 0x14001685e
test byte [rdi + 0x40], al
je 0x14001685e
mov rcx, rdi
call fcn.140018a70
mov ebx, dword [rbp + 0x90]
test byte [rdi + 0x40], 2
jne 0x1400170ce
mov eax, dword [rbp + 0x98]
lea rdx, [rsp + 0x40]
mov rcx, rdi
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x48], 3
call fcn.14001ab70
mov r15d, dword [rsp + 0x4c]
mov eax, r14d
and eax, 8
mov r13d, r15d
mov dword [rsp + 0x30], eax
mov eax, r14d
and eax, 4
xor r14d, r14d
mov dword [rsp + 0x34], eax
and r13d, 0x20
je 0x1400169b3
cmp esi, 0x201
jne 0x1400169c3
mov rbx, qword [rsp + 0x50]
mov rcx, rdi
mov rdx, rbx
mov r8d, dword [rbx]
shr r8d, 2
not r8b
and r8b, 1
call fcn.14001a610
mov rcx, qword [rsp + 0x58]
lea edx, [r14 - 1]
mov eax, dword [rdi + 0xb0]
test eax, eax
je 0x140016909
cmp eax, esi
je 0x140016909
cmp eax, 0x201
mov edx, r14d
setne dl
add edx, 0xd
mov eax, dword [rbp + 0x90]
mov r8d, dword [rbp + 0x98]
mov dword [rdi + 0xb4], eax
mov dword [rdi + 0xb8], r8d
mov dword [rdi + 0xb0], esi
jmp 0x140016b38
test byte [rdi + 0x40], 2
je 0x14001685e
call qword [sym.imp.USER32.dll_ReleaseCapture]
jmp 0x14001685e
mov ecx, dword [rdi + 0x40]
mov ebx, dword [rbp + 0x90]
test cl, 0x20
je 0x140016864
mov edx, dword [rdi + 0x90]
lea eax, [rdx - 8]
cmp ebx, eax
jl 0x140016864
lea eax, [rdx + 8]
cmp ebx, eax
jge 0x140016864
or ecx, 2
mov dword [rdi + 0x124], ebx
mov dword [rdi + 0x40], ecx
movzx r12d, r13b
mov rcx, r15
mov dword [rdi + 0x128], edx
call qword [sym.imp.USER32.dll_SetCapture]
xor r9d, r9d
mov rdx, r13
mov rcx, r15
lea r8d, [r9 + 0x64]
call qword [sym.imp.USER32.dll_SetTimer]
mov ecx, 0x1b
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
jmp 0x14001686e
cmp esi, 0x201
je 0x1400169cd
cmp esi, 0x204
je 0x1400169cd
mov rbx, qword [rsp + 0x50]
jmp 0x140016ae8
mov rcx, qword [rdi + 0x38]
mov ebx, 0xffffffff
test rcx, rcx
je 0x1400169fd
xor r9d, r9d
xor r8d, r8d
mov edx, 0x41c
call qword [sym.imp.USER32.dll_SendMessageW]
mov qword [rdi + 0x160], 0xffffffffffffffff
mov dword [rdi + 0x190], ebx
mov rax, qword [rsp + 0x58]
mov ecx, r15d
mov rbx, qword [rsp + 0x50]
and ecx, 0x10
mov dword [rbp + 0x80], ecx
je 0x140016be1
test byte [rdi + 0x4c], 1
mov qword [rdi + 0xa0], rbx
je 0x140016ab6
test byte [rbx], 2
jne 0x140016ab6
test r12b, r12b
jne 0x140016ab6
mov edx, dword [rbx + 0x2c]
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x20], rcx
mov r8, rax
mov rcx, rdi
call fcn.14001a740
test al, al
je 0x140016ab6
mov eax, dword [rbp - 0x50]
mov r14d, 1
mov edx, dword [rbp + 0x90]
test al, 4
je 0x140016a79
cmp edx, dword [rbp - 0x1c]
jl 0x140016a79
cmp edx, dword [rbp - 0x14]
mov ecx, 0
cmovl r14d, ecx
jmp 0x140016a7b
xor ecx, ecx
and eax, 0x18
cmp al, 0x18
jne 0x140016ab8
cmp edx, dword [rbp + 4]
jl 0x140016ab8
cmp edx, dword [rbp + 0xc]
jge 0x140016ab8
mov r9d, dword [rsp + 0x34]
xor r14d, r14d
mov r8d, dword [rsp + 0x30]
mov eax, r14d
cmp esi, 0x204
mov rdx, rbx
mov rcx, rdi
sete al
mov dword [rsp + 0x20], eax
call fcn.14001b130
jmp 0x140016ae8
xor ecx, ecx
mov r9d, dword [rsp + 0x34]
mov eax, ecx
mov r8d, dword [rsp + 0x30]
cmp esi, 0x204
mov rdx, rbx
mov rcx, rdi
sete al
mov dword [rsp + 0x20], eax
call fcn.14001b130
test r14d, r14d
jne 0x140016bdc
xor r14d, r14d
mov rcx, qword [rsp + 0x58]
mov edx, 0xffffffff
cmp esi, 0x201
je 0x1400168ed
cmp esi, 0x204
je 0x1400168ed
cmp esi, 0x202
je 0x140016b98
cmp esi, 0x205
je 0x140016b98
cmp esi, 0x203
jne 0x140016b89
mov edx, 0xf
mov r8d, dword [rbp + 0x98]
mov eax, dword [rbp + 0x90]
test r13d, r13d
jne 0x1400170ce
cmp edx, 0xffffffff
je 0x1400170ce
mov dword [rsp + 0x40], eax
xor r9d, r9d
mov eax, dword [rbp + 0x88]
mov dword [rsp + 0x58], eax
mov rax, qword [rdi + 0xc8]
mov dword [rsp + 0x44], r8d
lea r8, [rsp + 0x40]
mov qword [rsp + 0x50], rcx
mov rcx, qword [rdi]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], rbx
call qword [rdi + 0xc0]
jmp 0x1400170ce
cmp esi, 0x206
jne 0x140016b2b
mov edx, 0x10
jmp 0x140016b2b
mov eax, dword [rdi + 0xb0]
test eax, eax
je 0x140016bd0
mov r9d, dword [rbp + 0x90]
cmp dword [rdi + 0xb4], r9d
jne 0x140016bd0
mov r8d, dword [rbp + 0x98]
cmp dword [rdi + 0xb8], r8d
jne 0x140016bd0
cmp eax, 0x201
mov edx, r14d
setne dl
add edx, 0xd
mov dword [rdi + 0xb0], r14d
jmp 0x140016b2b
mov rax, qword [rsp + 0x58]
xor r13b, r13b
mov byte [rsp + 0x38], 0
test r15b, 0xf
jne 0x140016eaa
test r12b, r12b
jne 0x140016eaa
test rbx, rbx
je 0x140016c0c
mov r14d, dword [rbx + 0x2c]
mov ebx, 0xffffffff
jmp 0x140016c14
mov ebx, 0xffffffff
mov r14d, ebx
test rax, rax
je 0x140016c1f
mov r13d, dword [rax + 4]
jmp 0x140016c22
mov r13d, ebx
mov edx, dword [rdi + 0x228]
mov r9d, dword [rbp + 0x98]
mov ecx, dword [rdi + 0x22c]
mov r8d, dword [rbp + 0x90]
mov eax, r8d
sub eax, edx
mov dword [rsp + 0x60], eax
mov eax, r9d
sub eax, ecx
mov dword [rsp + 0x64], eax
lea eax, [rdx + r8]
mov dword [rsp + 0x68], eax
lea r8, [rsp + 0x60]
lea eax, [rcx + r9]
xor edx, edx
mov rcx, qword [rdi]
mov r9d, 2
mov dword [rsp + 0x6c], eax
call qword [sym.imp.USER32.dll_MapWindowPoints]
mov rcx, qword [rdi]
call qword [sym.imp.USER32.dll_SetCapture]
xor r12d, r12d
mov r15d, r12d
nop dword [rax]
nop word [rax + rax]
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rbp - 0x80]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140016d1c
mov eax, dword [rbp - 0x78]
sub eax, 0x200
je 0x140016cee
sub eax, 1
je 0x140016ce2
sub eax, 1
je 0x140016ce2
sub eax, 2
je 0x140016ce2
cmp eax, 1
je 0x140016ce2
lea rcx, [rbp - 0x80]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp - 0x80]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x140016d22
call qword [sym.imp.USER32.dll_ReleaseCapture]
mov r15d, dword [rbp - 0x78]
jmp 0x140016d22
mov eax, dword [rbp - 0x5c]
cmp eax, dword [rsp + 0x60]
jl 0x140016d0c
cmp eax, dword [rsp + 0x68]
jge 0x140016d0c
mov eax, dword [rbp - 0x58]
cmp eax, dword [rsp + 0x64]
jl 0x140016d0c
cmp eax, dword [rsp + 0x6c]
jl 0x140016d22
mov rcx, qword [rdi]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
setne dl
jmp 0x140016d40
call qword [sym.imp.USER32.dll_WaitMessage]
mov rcx, qword [rdi]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x140016d3e
call qword [sym.imp.USER32.dll_GetCapture]
cmp rax, qword [rdi]
je 0x140016c90
xor dl, dl
cmp r14d, ebx
jne 0x140016d4a
mov r14, r12
jmp 0x140016d65
mov rax, qword [rdi + 0x130]
cmp r14d, dword [rax]
jae 0x1400170ce
mov rax, qword [rax + 8]
mov ecx, r14d
mov r14, qword [rax + rcx*8]
cmp r13d, ebx
je 0x140016d90
cmp r13d, dword [rdi + 0xdc]
jae 0x1400170ce
mov rax, qword [rdi + 0xd0]
mov ecx, r13d
mov r13, qword [rax + rcx*8]
test r13, r13
je 0x1400170ce
jmp 0x140016d95
mov r13, qword [rsp + 0x58]
test dl, dl
je 0x140016dbf
xor r13b, r13b
mov r15b, 1
cmp dword [rbp + 0x80], r12d
je 0x140016eb5
test byte [rdi + 0x4c], r15b
je 0x140016eb5
mov ebx, dword [r14 + 0x2c]
jmp 0x140016eb5
cmp esi, 0x201
jne 0x140016dd8
cmp r15d, 0x202
je 0x140016de9
xor r13b, r13b
jmp 0x140016eb2
cmp esi, 0x204
jne 0x140016dd0
cmp r15d, 0x205
jne 0x140016dd0
mov r15d, dword [rsp + 0x38]
cmp dword [rbp + 0x80], r12d
je 0x140016e08
test byte [rdi + 0x4c], 1
mov eax, 1
movzx r15d, r15b
cmovne r15d, eax
mov rbx, qword [rdi]
call qword [sym.imp.USER32.dll_GetMessagePos]
movsx edx, ax
mov rcx, rbx
shr eax, 0x10
cwde
mov dword [rsp + 0x38], edx
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x3c], eax
call qword [sym.imp.USER32.dll_ScreenToClient]
mov ecx, dword [rbp + 0x90]
cmp dword [rsp + 0x38], ecx
jne 0x140016e95
mov rax, qword [rsp + 0x38]
mov edx, dword [rbp + 0x98]
shr rax, 0x20
cmp eax, edx
jne 0x140016e95
mov eax, dword [rbp + 0x88]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x44], edx
cmp esi, 0x201
mov edx, r12d
mov dword [rsp + 0x58], eax
mov rax, qword [rdi + 0xc8]
setne dl
mov dword [rsp + 0x40], ecx
add edx, 0xd
mov rcx, qword [rdi]
xor r9d, r9d
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x20], rax
call qword [rdi + 0xc0]
cmp esi, 0x204
sete r13b
test r15b, r15b
jne 0x1400170ac
jmp 0x140016ead
xor r12d, r12d
mov ebx, 0xffffffff
xor r15b, r15b
cmp dword [rsp + 0x30], 0
jne 0x140017092
cmp dword [rsp + 0x34], 0
jne 0x140017092
mov rax, qword [rdi + 0x130]
mov r8d, ebx
mov ecx, dword [rax]
test ecx, ecx
je 0x140016ffc
lea r11d, [rcx - 1]
cmp ebx, r11d
jbe 0x140016ef3
mov r8d, ecx
mov eax, r11d
mov ecx, r11d
jmp 0x140016ef7
mov ecx, ebx
mov eax, ebx
cmp ebx, eax
mov r14d, r12d
mov ebx, r11d
mov esi, r12d
cmovbe r14d, ecx
mov edx, r12d
test r8d, r8d
je 0x140016f47
mov r9, r12
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r10, qword [r9 + rcx]
mov eax, dword [r10]
test al, 2
je 0x140016f3c
and eax, 0xfffffffd
cmp ebx, edx
mov dword [r10], eax
mov eax, edx
cmovbe eax, ebx
mov ebx, eax
cmp esi, edx
jae 0x140016f3c
mov esi, edx
inc edx
add r9, 8
cmp edx, r8d
jb 0x140016f11
cmp r8d, r14d
ja 0x140016f89
nop dword [rax]
mov rax, qword [rdi + 0x130]
mov edx, r8d
mov rcx, qword [rax + 8]
mov r9, qword [rcx + rdx*8]
mov eax, dword [r9]
test al, 0x20
jne 0x140016f81
test al, 2
jne 0x140016f81
xor eax, 2
cmp ebx, r8d
mov dword [r9], eax
cmova ebx, r8d
cmp esi, r8d
cmovb esi, r8d
inc r8d
cmp r8d, r14d
jbe 0x140016f50
lea r8d, [r14 + 1]
cmp r8d, r11d
ja 0x140016fd7
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov eax, dword [r9]
test al, 2
je 0x140016fcf
and eax, 0xfffffffd
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x140016fcf
mov esi, r8d
inc r8d
cmp r8d, r11d
jbe 0x140016fa0
cmp ebx, esi
ja 0x140017008
mov rax, qword [rdi + 0xc8]
xor r9d, r9d
mov rcx, qword [rdi]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea edx, [r9 + 0xb]
call qword [rdi + 0xc0]
jmp 0x140017008
mov esi, dword [rbp + 0x80]
mov ebx, dword [rbp + 0x80]
mov rax, qword [rdi + 0x130]
cmp esi, dword [rax]
jae 0x140017092
cmp ebx, esi
ja 0x140017092
mov eax, dword [rdi + 0x88]
sub ebx, eax
imul ebx, dword [rdi + 0x7c]
sub esi, eax
mov r9d, dword [rdi + 0x78]
inc esi
imul esi, dword [rdi + 0x7c]
mov edx, dword [rdi + 0xf8]
sub edx, dword [rdi + 0x8c]
add edx, dword [rdi + 0x98]
mov dword [rsp + 0x70], r12d
add esi, r9d
test byte [rdi + 0x40], 4
lea r8d, [rbx + r9]
je 0x14001705a
mov r12d, dword [rdi + 0x80]
mov eax, dword [rdi + 0x70]
mov rcx, qword [rbp + 0x70]
sub eax, r12d
cmp edx, eax
cmovg edx, eax
cmp r8d, r9d
mov dword [rsp + 0x78], edx
lea rdx, [rsp + 0x70]
cmovl r8d, r9d
cmp esi, dword [rdi + 0x74]
mov dword [rsp + 0x74], r8d
cmovg esi, dword [rdi + 0x74]
xor r8d, r8d
mov dword [rsp + 0x7c], esi
call qword [sym.imp.USER32.dll_InvalidateRect]
test r15b, r15b
je 0x1400170ac
mov r8d, dword [rbp + 0x98]
mov rcx, rdi
mov edx, dword [rbp + 0x90]
call fcn.14001fc40
test r13b, r13b
je 0x1400170ce
mov rbx, qword [rdi]
call qword [sym.imp.USER32.dll_GetMessagePos]
mov r9d, eax
mov r8, rbx
mov edx, 0x7b
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
mov rbx, qword [rsp + 0x178]
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret