Function at 0x140140f10
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov rax, qword [0x14020a008]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov dword ds:[rsp + 0x30], r9d
mov r14d, r9d
mov qword [rsp + 0x68], rcx
mov esi, r8d
mov rdi, rdx
mov r15, rcx
cmp r8d, 0x201
je 0x140140f62
cmp r8d, 0x204
jne 0x140140f68
call qword [sym.imp.USER32.dll_SetFocus]
xor r12b, r12b
mov qword [rsp + 0x158], rbx
mov eax, esi
mov r13d, 1
sub eax, 0x201
je 0x140141095
sub eax, r13d
je 0x140141085
nop
cmp eax, 2
jne 0x140140fae
test byte [rdi + 0x40], al
je 0x140140fae
mov edx, dword [rdi + 0x128]
mov rcx, rdi
call fcn.140143030
call qword [sym.imp.USER32.dll_ReleaseCapture]
mov ebx, dword [rbp + 0xc0]
test byte [rdi + 0x40], 2
jne 0x1401418af
mov eax, dword [rbp + 0xc8]
lea rdx, [rsp + 0x48]
mov rcx, rdi
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x50], 3
call fcn.140144670
mov r15d, dword [rsp + 0x54]
mov eax, r14d
and eax, 8
mov r13d, r15d
mov dword [rsp + 0x34], eax
mov eax, r14d
and eax, 4
xor r14d, r14d
mov dword [rsp + 0x38], eax
and r13d, 0x20
je 0x140141106
nop word [rax + rax]
cmp esi, 0x201
jne 0x140141118
mov rbx, qword [rsp + 0x58]
mov rcx, rdi
mov rdx, rbx
mov r8d, dword [rbx]
shr r8d, 2
not r8b
and r8b, 1
call fcn.140144270
mov r12, qword [rsp + 0x60]
mov eax, dword [rdi + 0xb0]
mov edx, 0xffffffff
test eax, eax
je 0x140141062
nop
cmp eax, esi
je 0x140141062
cmp eax, 0x201
mov edx, r14d
setne dl
add edx, 0xd
mov eax, dword [rbp + 0xc0]
mov ecx, dword [rbp + 0xc8]
mov dword [rdi + 0xb4], eax
mov dword [rdi + 0xb8], ecx
mov dword [rdi + 0xb0], esi
jmp 0x1401412c9
test byte [rdi + 0x40], 2
je 0x140140fae
nop
jmp 0x140140fa8
mov ecx, dword [rdi + 0x40]
mov ebx, dword [rbp + 0xc0]
test cl, 0x20
je 0x140140fb4
mov edx, dword [rdi + 0x90]
lea eax, [rdx - 8]
cmp ebx, eax
jl 0x140140fb4
lea eax, [rdx + 8]
cmp ebx, eax
jge 0x140140fb4
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 0x140140fbe
cmp esi, 0x201
je 0x140141122
nop
cmp esi, 0x204
je 0x140141122
mov rbx, qword [rsp + 0x58]
jmp 0x14014125c
mov rcx, qword ds:[rdi + 0x38]
mov r14d, 0xffffffff
test rcx, rcx
je 0x140141158
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], r14d
mov rax, qword ds:[rsp + 0x60]
mov ecx, r15d
mov rbx, qword [rsp + 0x58]
and ecx, 0x10
mov dword [rsp + 0x40], ecx
je 0x140141380
xor r14d, r14d
mov qword [rdi + 0xa0], rbx
test byte [rdi + 0x4c], 1
je 0x140141224
test byte ds:[rbx], 2
jne 0x140141224
test r12b, r12b
jne 0x140141224
mov edx, dword [rbx + 0x2c]
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x20], rcx
mov r8, rax
mov rcx, rdi
call fcn.1401443b0
test al, al
je 0x140141224
mov eax, dword [rbp - 0x60]
mov r14d, 1
mov ecx, dword [rbp + 0xc0]
test al, 4
je 0x1401411e7
nop dword [rax]
cmp ecx, dword [rbp - 0x2c]
jl 0x1401411e7
cmp ecx, dword [rbp - 0x24]
mov ecx, 0
cmovl r14d, ecx
mov ecx, dword [rbp + 0xc0]
and eax, 0x18
cmp al, 0x18
jne 0x140141224
nop
cmp ecx, dword [rbp - 0xc]
jl 0x140141224
cmp ecx, dword [rbp - 4]
jge 0x140141224
mov r9d, dword [rsp + 0x38]
xor r14d, r14d
mov r8d, dword [rsp + 0x34]
mov eax, r14d
cmp esi, 0x204
mov rdx, rbx
mov rcx, rdi
sete al
mov dword [rsp + 0x20], eax
call fcn.140144c70
jmp 0x14014125c
mov r9d, dword [rsp + 0x38]
xor eax, eax
mov r8d, dword [rsp + 0x34]
cmp esi, 0x204
mov rdx, rbx
mov rcx, rdi
sete al
mov dword [rsp + 0x20], eax
call fcn.140144c70
nop dword [rax + rax]
test r14d, r14d
jne 0x140141375
xor r14d, r14d
mov r12, qword ds:[rsp + 0x60]
mov edx, 0xffffffff
cmp esi, 0x201
je 0x14014103f
cmp esi, 0x204
je 0x14014103f
nop dword [rax + rax]
cmp esi, 0x202
je 0x140141334
cmp esi, 0x205
je 0x140141334
nop dword [rax + rax]
cmp esi, 0x203
jne 0x140141325
mov edx, 0xf
mov ecx, dword [rbp + 0xc8]
mov eax, dword [rbp + 0xc0]
nop dword [rax]
test r13d, r13d
jne 0x1401418af
cmp edx, 0xffffffff
je 0x1401418af
mov dword [rsp + 0x4c], ecx
lea r8, [rsp + 0x48]
mov rcx, qword [rdi + 0xc8]
xor r9d, r9d
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x30]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi]
mov dword [rsp + 0x60], eax
mov rax, qword [rdi + 0xc0]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], r12
call qword [case.0x140101f48.0]
jmp 0x1401418af
cmp esi, 0x206
jne 0x1401412bd
mov edx, 0x10
jmp 0x1401412bd
mov eax, dword [rdi + 0xb0]
test eax, eax
je 0x140141368
mov ecx, dword [rbp + 0xc0]
cmp dword [rdi + 0xb4], ecx
jne 0x140141368
mov ecx, dword [rbp + 0xc8]
cmp dword [rdi + 0xb8], ecx
jne 0x140141368
cmp eax, 0x201
mov edx, r14d
setne dl
add edx, 0xd
mov dword ds:[rdi + 0xb0], r14d
jmp 0x1401412bd
mov rax, qword [rsp + 0x60]
mov r14d, 0xffffffff
xor r13b, r13b
mov byte [rsp + 0x3c], r13b
test r15b, 0xf
jne 0x140141664
test r12b, r12b
jne 0x140141664
test rbx, rbx
je 0x1401413ae
mov r15d, dword [rbx + 0x2c]
jmp 0x1401413b1
mov r15d, r14d
test rax, rax
je 0x1401413bc
mov r12d, dword [rax + 4]
jmp 0x1401413bf
mov r12d, r14d
mov edx, dword [rdi + 0x228]
mov r9d, dword [rbp + 0xc8]
mov ecx, dword [rdi + 0x22c]
mov r8d, dword [rbp + 0xc0]
mov eax, r8d
sub eax, edx
mov dword [rbp + 0x20], eax
mov eax, r9d
sub eax, ecx
mov dword [rbp + 0x24], eax
lea eax, [rdx + r8]
mov dword [rbp + 0x28], eax
lea r8, [rbp + 0x20]
lea eax, [rcx + r9]
xor edx, edx
mov rcx, qword [rdi]
mov r9d, 2
mov dword [rbp + 0x2c], eax
call qword [sym.imp.USER32.dll_MapWindowPoints]
mov rcx, qword ds:[rdi]
call qword [sym.imp.USER32.dll_SetCapture]
xor ebx, ebx
nop dword [rax + rax]
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rsp + 0x70]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x1401414b2
mov eax, dword [rsp + 0x78]
cmp eax, 0x200
je 0x140141485
jbe 0x14014146d
nop dword [rax]
cmp eax, 0x202
jbe 0x140141461
add eax, 0xfffffdfc
cmp eax, 1
ja 0x14014146d
call qword [sym.imp.USER32.dll_ReleaseCapture]
mov ebx, dword [rsp + 0x78]
jmp 0x1401414b8
lea rcx, [rsp + 0x70]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x70]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x1401414b8
mov eax, dword [rbp - 0x6c]
cmp eax, dword [rbp + 0x20]
jl 0x1401414a2
nop dword [rax]
cmp eax, dword [rbp + 0x28]
jge 0x1401414a2
mov eax, dword [rbp - 0x68]
cmp eax, dword [rbp + 0x24]
jl 0x1401414a2
cmp eax, dword [rbp + 0x2c]
jl 0x1401414b8
mov rcx, qword [rdi]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
setne dl
jmp 0x1401414db
call qword [sym.imp.USER32.dll_WaitMessage]
mov rcx, qword [rdi]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x1401414d9
call qword [sym.imp.USER32.dll_GetCapture]
nop dword [rax + rax]
cmp rax, qword [rdi]
je 0x140141420
xor dl, dl
cmp r15d, r14d
jne 0x1401414e5
xor r14d, r14d
jmp 0x140141504
mov rax, qword ds:[rdi + 0x130]
cmp r15d, dword [rax]
jae 0x1401418af
mov rax, qword [rax + 8]
mov ecx, r15d
mov r14, qword [rax + rcx*8]
mov r15d, 0xffffffff
cmp r12d, r15d
je 0x14014153b
nop
cmp r12d, dword [rdi + 0xdc]
jae 0x1401418af
mov rax, qword ds:[rdi + 0xd0]
mov ecx, r12d
mov r12, qword [rax + rcx*8]
test r12, r12
je 0x1401418af
jmp 0x140141540
mov r12, qword [rsp + 0x60]
test dl, dl
je 0x140141562
cmp dword [rsp + 0x40], 0
mov r13b, 1
je 0x14014155a
nop
test byte [rdi + 0x4c], r13b
je 0x14014155a
mov r15d, dword [r14 + 0x2c]
mov ecx, r15d
jmp 0x140141679
cmp esi, 0x201
jne 0x140141580
nop word [rax + rax]
cmp ebx, 0x202
je 0x14014159c
mov ecx, r15d
jmp 0x140141679
cmp esi, 0x204
jne 0x14014166a
nop dword [rax]
cmp ebx, 0x205
jne 0x14014166a
cmp dword [rsp + 0x40], 0
je 0x1401415b4
test byte [rdi + 0x4c], 1
mov eax, 1
movzx r13d, r13b
cmovne r13d, eax
mov rbx, qword [rdi]
call qword [sym.imp.USER32.dll_GetMessagePos]
movsx ecx, ax
lea rdx, [rsp + 0x40]
shr eax, 0x10
cwde
mov dword [rsp + 0x40], ecx
mov rcx, rbx
mov dword [rsp + 0x44], eax
call qword [sym.imp.USER32.dll_ScreenToClient]
mov ecx, dword [rbp + 0xc0]
cmp dword [rsp + 0x40], ecx
jne 0x140141649
mov rax, qword [rsp + 0x40]
mov edx, dword [rbp + 0xc8]
shr rax, 0x20
cmp eax, edx
jne 0x140141649
mov eax, dword [rsp + 0x30]
lea r8, [rsp + 0x48]
mov dword [rsp + 0x4c], edx
xor edx, edx
mov dword [rsp + 0x48], ecx
cmp esi, 0x201
mov rcx, qword [rdi + 0xc8]
setne dl
mov dword [rsp + 0x60], eax
mov rax, qword [rdi + 0xc0]
add edx, 0xd
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov rcx, qword [rdi]
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], r12
call qword [case.0x140101f48.0]
mov edx, dword [rsp + 0x3c]
cmp esi, 0x204
movzx edx, dl
mov eax, 1
cmove edx, eax
mov dword [rsp + 0x3c], edx
jmp 0x14014166a
mov r15d, 0xffffffff
mov ecx, r15d
test r13b, r13b
jne 0x14014188a
cmp dword [rsp + 0x34], 0
jne 0x14014186b
cmp dword [rsp + 0x38], 0
jne 0x14014186b
mov rax, qword [rdi + 0x130]
mov r8d, dword [rax]
test r8d, r8d
je 0x1401417d8
lea r14d, ds:[r8 - 1]
cmp r15d, r14d
mov eax, r14d
mov ebx, r14d
cmovbe eax, ecx
cmp r15d, eax
cmovbe r8d, ecx
xor r12d, r12d
cmp r15d, eax
mov r11d, r12d
mov esi, r12d
mov edx, r12d
cmovbe r11d, eax
test r8d, r8d
je 0x140141716
mov r9d, r12d
nop dword [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r10, qword [r9 + rcx]
mov eax, dword [r10]
test al, 2
je 0x14014170b
and eax, 0xfffffffd
cmp ebx, edx
mov dword [r10], eax
mov eax, edx
cmovbe eax, ebx
mov ebx, eax
cmp esi, edx
jae 0x14014170b
mov esi, edx
inc edx
add r9, 8
cmp edx, r8d
jb 0x1401416e0
cmp r8d, r11d
ja 0x140141765
nop dword [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov ecx, dword [r9]
test cl, 0x20
jne 0x14014175d
test cl, 2
jne 0x14014175d
mov eax, ecx
not eax
xor eax, ecx
and eax, 2
xor eax, ecx
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x14014175d
mov esi, r8d
inc r8d
cmp r8d, r11d
jbe 0x140141720
lea r8d, [r11 + 1]
cmp r8d, r14d
ja 0x1401417a7
nop
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov eax, dword [r9]
test al, 2
je 0x14014179f
and eax, 0xfffffffd
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x14014179f
mov esi, r8d
inc r8d
cmp r8d, r14d
jbe 0x140141770
cmp ebx, esi
ja 0x1401417e3
mov rcx, qword ds:[rdi + 0xc8]
xor r9d, r9d
mov rax, qword [rdi + 0xc0]
xor r8d, r8d
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi]
lea edx, [r9 + 0xb]
call qword [case.0x140101f48.0]
jmp 0x1401417e3
mov esi, dword [rsp + 0x30]
xor r12d, r12d
mov ebx, dword [rsp + 0x30]
mov rax, qword [rdi + 0x130]
cmp esi, dword [rax]
jae 0x14014186b
nop
cmp ebx, esi
ja 0x14014186b
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 [rbp + 0x30], r12d
add esi, r9d
test byte [rdi + 0x40], 4
lea r8d, [rbx + r9]
je 0x140141836
mov r12d, dword [rdi + 0x80]
mov eax, dword [rdi + 0x70]
mov rcx, qword [rsp + 0x68]
sub eax, r12d
cmp edx, eax
cmovg edx, eax
cmp r8d, r9d
mov dword [rbp + 0x38], edx
lea rdx, [rbp + 0x30]
cmovl r8d, r9d
cmp esi, dword [rdi + 0x74]
mov dword [rbp + 0x34], r8d
cmovg esi, dword [rdi + 0x74]
xor r8d, r8d
mov dword [rbp + 0x3c], esi
call qword [sym.imp.USER32.dll_InvalidateRect]
nop dword [rax + rax]
test r13b, r13b
je 0x14014188a
mov r8d, dword [rbp + 0xc8]
mov rcx, rdi
mov edx, dword [rbp + 0xc0]
call fcn.140148e00
cmp byte ds:[rsp + 0x3c], 0
je 0x1401418af
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 + 0x158]
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.140161390
add rsp, 0x160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret