Function at 0x180161980
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x30
call fcn.180170be0
mov rdi, rax
lea r14, [0x1804f5e30]
mov qword [rsp + 0x60], r14
mov rcx, r14
call fcn.18027bd70
test eax, eax
jne 0x180161d02
cmp dword [0x1804f5e7c], 0x7fffffff
je 0x180161ced
cmp qword [0x1804f5ea0], 0
je 0x180161ad2
mov rcx, qword [0x1804f5e90]
dec rcx
and rcx, qword [0x1804f5e98]
mov rax, qword [0x1804f5e88]
mov rsi, qword [rax + rcx*8]
mov rbp, qword [rsi + 8]
mov rbx, qword [rsi]
cmp rbx, rbp
je 0x180161a18
nop word [rax + rax]
movzx r8d, byte [rbx + 8]
mov edx, dword [rbx]
mov rcx, rdi
call fcn.180168f90
add rbx, 0x10
cmp rbx, rbp
jne 0x180161a00
mov rbp, qword [rsi + 0x20]
mov rbx, qword [rsi + 0x18]
cmp rbx, rbp
je 0x180161a48
nop word [rax + rax]
movzx r8d, byte [rbx + 4]
mov edx, dword [rbx]
mov rcx, rdi
call fcn.180168fc0
add rbx, 8
cmp rbx, rbp
jne 0x180161a30
mov rbp, qword [rsi + 0x38]
mov rbx, qword [rsi + 0x30]
cmp rbx, rbp
je 0x180161a69
movzx edx, word [rbx]
mov rcx, rdi
call fcn.180168d30
add rbx, 2
cmp rbx, rbp
jne 0x180161a55
movss xmm0, dword [rsi + 0x48]
addss xmm0, dword [rdi + 0xe08]
movss dword [rdi + 0xe08], xmm0
movss xmm1, dword [rsi + 0x4c]
addss xmm1, dword [rdi + 0xe0c]
movss dword [rdi + 0xe0c], xmm1
mov rcx, qword [0x1804f5e90]
dec rcx
and rcx, qword [0x1804f5e98]
mov rax, qword [0x1804f5e88]
mov rcx, qword [rax + rcx*8]
call fcn.180161720
sub qword [0x1804f5ea0], 1
jne 0x180161acb
mov qword [0x1804f5e98], 0
jmp 0x180161ad2
inc qword [0x1804f5e98]
mov rcx, r14
call fcn.18027bdb4
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
mov rcx, qword [0x1804f5ea8]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rsp + 0x28]
sub eax, dword [rsp + 0x20]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mov eax, dword [rsp + 0x2c]
sub eax, dword [rsp + 0x24]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [rdi + 8], xmm1
movss dword [rdi + 0xc], xmm0
mov qword [rsp + 0x68], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x68]
sub rax, qword [0x1804f5eb0]
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [0x1804f5eb8]
divss xmm1, xmm0
movss dword [rdi + 0x10], xmm1
mov rax, qword [rsp + 0x68]
mov qword [0x1804f5eb0], rax
mov ecx, 0x11
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
movzx r8d, al
mov edx, 0x1000
mov rcx, rdi
call fcn.180168f90
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
movzx r8d, al
mov edx, 0x2000
mov rcx, rdi
call fcn.180168f90
mov ecx, 0x12
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
movzx r8d, al
mov edx, 0x4000
mov rcx, rdi
call fcn.180168f90
mov ecx, 0x5d
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
movzx r8d, al
mov edx, 0x8000
mov rcx, rdi
call fcn.180168f90
call fcn.180170be0
mov rbx, rax
cmp byte [rax + 0xcf], 0
je 0x180161c37
cvttss2si ecx, dword [rax + 0xdf8]
mov dword [rsp + 0x60], ecx
cvttss2si ecx, dword [rax + 0xdfc]
mov dword [rsp + 0x64], ecx
lea rdx, [rsp + 0x60]
mov rcx, qword [0x1804f5ea8]
call qword [sym.imp.USER32.dll_ClientToScreen]
test eax, eax
je 0x180161c37
mov edx, dword [rsp + 0x64]
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.USER32.dll_SetCursorPos]
mov dword [rbx + 0xdf8], 0xff7fffff
mov dword [rbx + 0xdfc], 0xff7fffff
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x180161cb6
mov rdx, qword [0x1804f5ea8]
cmp rax, rdx
je 0x180161c6f
mov rcx, rax
call qword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x180161cb6
lea rcx, [rsp + 0x70]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x180161cb6
lea rdx, [rsp + 0x70]
mov rcx, qword [0x1804f5ea8]
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x180161cb6
movd xmm0, dword [rsp + 0x70]
cvtdq2ps xmm0, xmm0
movd xmm1, dword [rsp + 0x74]
cvtdq2ps xmm1, xmm1
movss dword [rbx + 0xdf8], xmm0
movss dword [rbx + 0xdfc], xmm1
cmp byte [rdi + 0x50], 0
je 0x180161cc3
mov eax, 0xffffffff
jmp 0x180161cc8
call fcn.180170fa0
cmp dword [0x1804dcc68], eax
je 0x180161cdb
mov dword [0x1804dcc68], eax
call fcn.180161d40
inc qword [0x1804f5e20]
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov dword [0x1804f5e7c], 0x7ffffffe
mov ecx, 6
call fcn.18027c200
int3
mov ecx, 5
call fcn.18027c200
int3