Function at 0x140040870
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140083010]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbp, qword [0x1400ceb48]
xor ebx, ebx
test rbp, rbp
je 0x1400408aa
mov rsi, qword [rbp + 0x98]
jmp 0x1400408ad
mov rsi, rbx
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [rsp + 0x20], xmm0
mov rcx, qword [rsi]
lea rdx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rsp + 0x28]
lea rcx, [rsp + 0x40]
sub eax, dword [rsp + 0x20]
vxorps xmm1, xmm1, xmm1
vcvtsi2ss xmm1, xmm1, eax
mov eax, dword [rsp + 0x2c]
sub eax, dword [rsp + 0x24]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vmovss dword [rbp + 0x14], xmm0
vmovss dword [rbp + 0x10], xmm1
mov qword [rsp + 0x40], rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x40]
mov rdi, qword [0x1400ceb48]
mov rax, rcx
sub rax, qword [rsi + 0x18]
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, qword [rsi + 0x20]
vcvtsi2ss xmm1, xmm1, rax
vdivss xmm1, xmm1, xmm0
vmovss dword [rbp + 0x18], xmm1
mov qword [rsi + 0x18], rcx
test rdi, rdi
je 0x14004093e
mov rbx, qword [rdi + 0x98]
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, qword [rbx]
cmp rax, rcx
jne 0x1400409db
cmp byte [rdi + 0xdb], 0
je 0x140040997
vcvttss2si eax, dword [rdi + 0xe08]
mov dword [rsp + 0x30], eax
lea rdx, [rsp + 0x30]
vcvttss2si eax, dword [rdi + 0xe0c]
mov dword [rsp + 0x34], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
test eax, eax
je 0x14004098e
mov edx, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.USER32.dll_SetCursorPos]
cmp byte [rdi + 0xdb], 0
jne 0x1400409db
cmp dword [rbx + 0x10], 0
jne 0x1400409db
lea rcx, [rsp + 0x38]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x1400409db
mov rcx, qword [rbx]
lea rdx, [rsp + 0x38]
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x1400409db
vxorps xmm2, xmm2, xmm2
vcvtsi2ss xmm2, xmm2, dword [rsp + 0x3c]
vxorps xmm1, xmm1, xmm1
vcvtsi2ss xmm1, xmm1, dword [rsp + 0x38]
lea rcx, [rdi + 8]
call fcn.140013db0
mov r9, qword [0x1400ceb48]
mov edx, 0x210
mov rcx, r9
call fcn.140021610
cmp byte [rax], 0
je 0x140040a53
cmp byte [r9 + 0x4040], 0
jne 0x140040a53
mov ecx, 0xa0
call qword [sym.imp.USER32.dll_GetKeyState]
mov r9, qword [0x1400ceb48]
shr eax, 0xf
test al, 1
jne 0x140040a53
lea rbx, [r9 + 8]
cmp byte [rbx + 0x37b1], 0
je 0x140040a3f
vxorps xmm3, xmm3, xmm3
xor r8d, r8d
mov edx, 0x210
mov rcx, rbx
call fcn.140013c00
mov r9, qword [0x1400ceb48]
mov dword [rbx + 0x378], 0x210
mov dword [rbx + 0x938], 0xa0
mov edx, 0x214
mov rcx, r9
call fcn.140021610
cmp byte [rax], 0
je 0x140040ac4
cmp byte [r9 + 0x4070], 0
jne 0x140040ac4
mov ecx, 0xa1
call qword [sym.imp.USER32.dll_GetKeyState]
mov r9, qword [0x1400ceb48]
shr eax, 0xf
test al, 1
jne 0x140040ac4
lea rbx, [r9 + 8]
cmp byte [rbx + 0x37b1], 0
je 0x140040ab0
vxorps xmm3, xmm3, xmm3
xor r8d, r8d
mov edx, 0x214
mov rcx, rbx
call fcn.140013c00
mov r9, qword [0x1400ceb48]
mov dword [rbx + 0x37c], 0x214
mov dword [rbx + 0x948], 0xa1
mov edx, 0x212
mov rcx, r9
call fcn.140021610
cmp byte [rax], 0
je 0x140040b35
cmp byte [r9 + 0x4058], 0
jne 0x140040b35
mov ecx, 0x5b
call qword [sym.imp.USER32.dll_GetKeyState]
mov r9, qword [0x1400ceb48]
shr eax, 0xf
test al, 1
jne 0x140040b35
lea rbx, [r9 + 8]
cmp byte [rbx + 0x37b1], 0
je 0x140040b21
vxorps xmm3, xmm3, xmm3
xor r8d, r8d
mov edx, 0x212
mov rcx, rbx
call fcn.140013c00
mov r9, qword [0x1400ceb48]
mov dword [rbx + 0x264], 0x212
mov dword [rbx + 0x940], 0x5b
mov edx, 0x216
mov rcx, r9
call fcn.140021610
cmp byte [rax], 0
je 0x140040ba6
cmp byte [r9 + 0x4088], 0
jne 0x140040ba6
mov ecx, 0x5c
call qword [sym.imp.USER32.dll_GetKeyState]
mov r9, qword [0x1400ceb48]
shr eax, 0xf
test al, 1
jne 0x140040ba6
lea rbx, [r9 + 8]
cmp byte [rbx + 0x37b1], 0
je 0x140040b92
vxorps xmm3, xmm3, xmm3
xor r8d, r8d
mov edx, 0x216
mov rcx, rbx
call fcn.140013c00
mov r9, qword [0x1400ceb48]
mov dword [rbx + 0x268], 0x216
mov dword [rbx + 0x950], 0x5c
cmp byte [rbp + 0x78], 0
mov eax, 0xffffffff
jne 0x140040bb8
mov eax, dword [r9 + 0x4a70]
cmp dword [rsi + 0x28], eax
je 0x140040bc5
mov dword [rsi + 0x28], eax
call fcn.140040000
call fcn.140040170
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140064a50
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret