Function at 0x140040858
Capabilities:
Log keystrokes via polling

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push rbp
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x1400f7040]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r14, qword [0x1400f80d0]
test r14, r14
je 0x140040896
mov rsi, qword [r14 + 0x90]
jmp 0x140040898
xor esi, esi
xorps xmm0, xmm0
lea rdx, [rbp - 0x20]
movdqu xmmword [rbp - 0x20], xmm0
mov rcx, qword [rsi]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rbp - 0x18]
lea rcx, [rbp - 0x28]
sub eax, dword [rbp - 0x20]
and qword [rbp - 0x28], 0
movd xmm1, eax
mov eax, dword [rbp - 0x14]
sub eax, dword [rbp - 0x1c]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [r14 + 0x10], xmm1
movss dword [r14 + 0x14], xmm0
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rbp - 0x28]
xorps xmm1, xmm1
mov rbx, qword [0x1400f80d0]
mov rax, rcx
sub rax, qword [rsi + 0x18]
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [rsi + 0x20]
cvtsi2ss xmm1, rax
divss xmm1, xmm0
movss dword [r14 + 0x18], xmm1
mov qword [rsi + 0x18], rcx
test rbx, rbx
je 0x140040921
mov rdi, qword [rbx + 0x90]
jmp 0x140040923
xor edi, edi
call qword [sym.imp.USER32.dll_GetForegroundWindow]
cmp rax, qword [rdi]
jne 0x1400409b5
cmp byte [rbx + 0xcd], 0
je 0x140040977
cvttss2si eax, dword [rbx + 0xe48]
mov rcx, qword [rdi]
lea rdx, [rbp - 0x30]
mov dword [rbp - 0x30], eax
cvttss2si eax, dword [rbx + 0xe4c]
mov dword [rbp - 0x2c], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
test eax, eax
je 0x14004096e
mov edx, dword [rbp - 0x2c]
mov ecx, dword [rbp - 0x30]
call qword [sym.imp.USER32.dll_SetCursorPos]
cmp byte [rbx + 0xcd], 0
jne 0x1400409b5
cmp dword [rdi + 0x10], 0
jne 0x1400409b5
lea rcx, [rbp - 0x30]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x1400409b5
mov rcx, qword [rdi]
lea rdx, [rbp - 0x30]
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x1400409b5
movd xmm2, dword [rbp - 0x2c]
lea rcx, [rbx + 8]
movd xmm1, dword [rbp - 0x30]
cvtdq2ps xmm2, xmm2
cvtdq2ps xmm1, xmm1
call fcn.14001a988
mov edi, 0x210
mov ecx, edi
call fcn.140026700
mov bl, 1
test al, al
je 0x1400409e8
mov ecx, 0xa0
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
test bl, al
jne 0x1400409e8
xor edx, edx
mov r8d, 0xa0
mov ecx, edi
call fcn.140040354
mov edi, 0x214
mov ecx, edi
call fcn.140026700
test al, al
je 0x140040a19
mov ecx, 0xa1
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
test bl, al
jne 0x140040a19
xor edx, edx
mov r8d, 0xa1
mov ecx, edi
call fcn.140040354
mov edi, 0x212
mov ecx, edi
call fcn.140026700
test al, al
je 0x140040a48
mov ecx, 0x5b
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
test bl, al
jne 0x140040a48
xor edx, edx
mov ecx, edi
lea r8d, [rdx + 0x5b]
call fcn.140040354
mov edi, 0x216
mov ecx, edi
call fcn.140026700
test al, al
je 0x140040a77
mov ecx, 0x5c
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
test bl, al
jne 0x140040a77
xor edx, edx
mov ecx, edi
lea r8d, [rdx + 0x5c]
call fcn.140040354
cmp byte [r14 + 0x58], 0
je 0x140040a83
or eax, 0xffffffff
jmp 0x140040a90
mov rax, qword [0x1400f80d0]
mov eax, dword [rax + 0x4ea8]
cmp dword [rsi + 0x28], eax
je 0x140040a9d
mov dword [rsi + 0x28], eax
call fcn.1400402a8
call fcn.1400403a8
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400b68c0
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
add rsp, 0x50
pop rbp
ret