Function at 0x140140018
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov r14, rdx
mov rdi, rcx
mov eax, dword [rdx + 8]
mov r15d, 1
cmp eax, 0x14
je 0x1401402b2
xor esi, esi
cmp dword [rcx + 0xf8], esi
je 0x140140057
call fcn.140029c78
jmp 0x1401402b5
cmp eax, 0x201
jne 0x1401400a0
mov rcx, qword [rcx + 0xe8]
cmp dword [rcx + 0x290], esi
je 0x1401401f8
cmp dword [rcx + 0x140], esi
jne 0x1401401f8
mov rax, qword [rdi + 0x40]
cmp qword [rdx], rax
je 0x1401401f8
mov rax, qword [rcx]
xor edx, edx
mov rax, qword [rax + 0x448]
call qword [case.0x1400495f6.0]
mov eax, dword [r14 + 8]
cmp eax, 0x200
jne 0x1401401f8
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1b8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x1401401f8
lea ecx, [rax + 0x17]
call qword [sym.imp.USER32.dll_GetSystemMetrics]
neg eax
sbb ecx, ecx
neg ecx
add ecx, r15d
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
jae 0x140140100
call qword [sym.imp.USER32.dll_GetFocus]
mov rcx, rax
call fcn.140026e90
cmp rax, rdi
jne 0x1401402b2
mov ebx, 0x105
cmp dword [rdi + 0xf0], esi
jne 0x140140146
mov dword [rdi + 0xf0], r15d
mov dword [rbp - 0x20], 0x18
mov dword [rbp - 0x1c], 2
mov rax, qword [rdi + 0x40]
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x20]
call qword [sym.imp.USER32.dll_TrackMouseEvent]
mov r9d, ebx
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.USER32.dll_RedrawWindow]
cmp dword [rdi + 0xf4], esi
jne 0x1401401f8
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x148]
call qword [case.0x1400495f6.0]
test rax, rax
je 0x1401401f8
mov qword [rbp + 0x38], rsi
lea rcx, [rbp + 0x38]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov dword [rdi + 0xf4], r15d
mov r9d, ebx
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.USER32.dll_RedrawWindow]
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x148]
call qword [case.0x1400495f6.0]
lea rdx, [rbp + 0x38]
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_ScreenToClient]
movzx ebx, word [rbp + 0x3c]
shl ebx, 0x10
movzx eax, word [rbp + 0x38]
or rbx, rax
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x148]
call qword [case.0x1400495f6.0]
mov r9, rbx
xor r8d, r8d
mov edx, 0x200
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov ebx, 0x100
cmp dword [r14 + 8], ebx
jne 0x140140572
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1b8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x140140572
mov edx, dword [r14 + 0x10]
mov rcx, rdi
call fcn.140140588
test eax, eax
jne 0x1401402b2
mov rax, qword [r14 + 0x10]
cmp rax, 9
je 0x140140553
cmp rax, 0xd
je 0x1401403d8
cmp rax, 0x1b
je 0x14014030a
cmp rax, 0x20
jbe 0x140140572
cmp rax, 0x22
jbe 0x1401402c6
cmp rax, 0x26
je 0x1401402c6
cmp rax, 0x28
jne 0x140140572
mov rcx, qword [rdi + 0xe8]
cmp dword [rcx + 0x288], esi
je 0x1401402c6
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x1401402c6
mov rcx, qword [rdi + 0xe8]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x530]
call qword [case.0x1400495f6.0]
mov eax, r15d
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
je 0x140140572
mov rax, qword [0x140279c00]
test rax, rax
je 0x1401402f5
mov rsi, qword [rax + 0x40]
mov r9, qword [r14 + 0x18]
mov r8, qword [r14 + 0x10]
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SendMessageW]
jmp 0x1401402b2
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
je 0x140140341
mov rcx, qword [0x140279c00]
test rcx, rcx
je 0x140140341
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x10]
mov rcx, qword [rcx + 0x40]
jmp 0x140140302
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x140140393
mov rdx, qword [rdi + 0x100]
mov rcx, rdi
call fcn.1400681f0
mov rcx, qword [rdi + 0x100]
sub rcx, 0x18
call fcn.140016d50
add rax, 0x18
mov qword [rbp + 0x38], rax
lea rdx, [rbp + 0x38]
mov rcx, qword [rdi + 0xe8]
call fcn.140140ad0
mov rcx, rdi
call fcn.140027470
test rax, rax
je 0x140140572
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x140140572
mov rcx, rdi
call fcn.140027470
mov rcx, rax
call fcn.1400680f0
jmp 0x1401402b2
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1c8]
call qword [case.0x1400495f6.0]
test eax, eax
jne 0x140140572
call fcn.140023e34
mov rcx, rax
test rax, rax
je 0x14014057d
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [case.0x1400495f6.0]
add rax, 0x18
mov qword [rbp + 0x40], rax
lea rdx, [rbp + 0x40]
mov rcx, rdi
call fcn.14002757c
mov rcx, qword [rbp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.140016d50
add rax, 0x18
mov qword [rbp + 0x48], rax
lea rdx, [rbp + 0x48]
mov rcx, qword [rdi + 0xe8]
call fcn.140140ad0
mov edx, r15d
mov rcx, qword [rdi + 0xe8]
call fcn.1400900c8
mov rax, qword [rdi + 0xe8]
mov rcx, qword [rax + 0xf8]
test rcx, rcx
je 0x1401404d3
mov rcx, qword [rcx + 0x40]
call qword [sym.imp.USER32.dll_GetParent]
mov rcx, rax
call fcn.140026e90
test rax, rax
mov rcx, rsi
je 0x14014048e
mov rcx, qword [rax + 0x40]
mov rax, qword [0x140279c00]
test rax, rax
jne 0x14014049f
mov rax, rsi
jmp 0x1401404a3
mov rax, qword [rax + 0x40]
cmp rcx, rax
jne 0x1401404d3
mov rcx, qword [rdi + 0xe8]
mov rcx, qword [rcx + 0xf8]
call fcn.140034274
mov rdx, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0xc0]
mov rcx, rdx
call qword [case.0x1400495f6.0]
jmp 0x1401404fe
mov rcx, rdi
call fcn.140027470
test rax, rax
je 0x14014052c
mov rax, qword [rdi + 0xe8]
mov dword [rax + 0x294], esi
mov rcx, rdi
call fcn.140027470
mov rcx, rax
call fcn.1400680f0
nop
mov rdx, qword [rbp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1401402b2
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x1400495f6.0]
jmp 0x1401402b2
mov rdx, qword [rbp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140140572
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x1400495f6.0]
jmp 0x140140572
mov rcx, qword [rdi + 0xe8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x1a8]
call qword [case.0x1400495f6.0]
test eax, eax
je 0x1401402b2
mov rdx, r14
mov rcx, rdi
jmp 0x14014004d
mov ecx, 0x80004005
call fcn.140016c60
int3