Function at 0x18009d820
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x180394058]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r13, r9
mov r12, r8
mov rbp, rdx
mov rdi, rcx
mov r14, qword [rsp + 0xf0]
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x20], rax
mov ecx, dword [0x180396228]
mov rax, qword gs:[0x58]
mov edx, 4
mov rsi, qword [rax + rcx*8]
add rsi, rdx
xor ebx, ebx
mov eax, dword [rsi]
cmp dword [0x18039fdf0], eax
jle 0x18009d8c6
lea rcx, [0x18039fdf0]
call fcn.1800dd9c8
cmp dword [0x18039fdf0], 0xffffffff
jne 0x18009d8c6
movsxd rdx, dword [0x1803942e8]
mov qword [0x18039fdd8], rbx
lea rcx, [0x18039fdd8]
call fcn.1800cf710
lea rcx, [0x18039fdf0]
call fcn.1800dd95c
mov eax, dword [rsi]
cmp dword [0x18039fdec], eax
jle 0x18009d8fd
lea rcx, [0x18039fdec]
call fcn.1800dd9c8
cmp dword [0x18039fdec], 0xffffffff
jne 0x18009d8fd
mov eax, dword [0x1803942e8]
mov dword [0x18039fde8], eax
lea rcx, [0x18039fdec]
call fcn.1800dd95c
cmp byte [rdi + 8], bl
je 0x18009db95
mov esi, 1
cmp byte [0x1803942e6], bl
je 0x18009d93e
mov ecx, esi
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
js 0x18009d93e
cmp byte [0x1803942e7], bl
je 0x18009db95
lea ecx, [rsi + 0x52]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
js 0x18009db95
movzx eax, byte [rdi + 0x50]
test al, al
je 0x18009db5e
cmp qword [r14 + 8], rbx
je 0x18009dbb3
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov r15, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp r15, 0x989680
jne 0x18009d972
imul rcx, rax, 0x64
jmp 0x18009d98d
cqo
idiv r15
imul rcx, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
cqo
idiv r15
add rcx, rax
mov rdx, rcx
sub rdx, qword [0x18039fdd8]
movabs rax, 0x431bde82d7b634db
imul rdx
sar rdx, 0x12
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, qword [0x18039fde0]
je 0x18009db8e
mov r8d, 0xff
cmovl esi, r8d
test sil, sil
jns 0x18009db8e
cmp byte [0x1803942e5], bl
je 0x18009d9ed
mov r8, rbp
mov rdx, r14
call fcn.18009dd80
test al, al
jne 0x18009db95
mov r8, rbp
mov rdx, r14
mov rcx, rdi
call fcn.18009e190
mov rax, qword [rsp + 0x20]
mov byte [rax], 1
mov rdx, r12
lea rcx, [rsp + 0x28]
call fcn.18006bfb0
nop
mov rdx, r13
lea rcx, [rsp + 0x40]
call fcn.18006bfb0
nop
mov rdx, r14
lea rcx, [rsp + 0x58]
call fcn.18006bfb0
nop
lea rbx, [rdi + 0x60]
mov qword [rsp + 0x20], rbx
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll__Mtx_lock]
test eax, eax
je 0x18009da4f
mov ecx, 5
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
mov eax, dword [rbx + 0x4c]
cmp eax, 0x7fffffff
jne 0x18009da6a
dec eax
mov dword [rbx + 0x4c], eax
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
lea rcx, [rdi + 0xb0]
mov rsi, qword [rdi + 0xb8]
cmp rsi, qword [rdi + 0xc0]
je 0x18009dabc
mov qword [rsp + 0x70], rsi
lea rdx, [rsp + 0x28]
mov rcx, rsi
call fcn.18006bfb0
nop
lea rcx, [rsi + 0x18]
lea rdx, [rsp + 0x40]
call fcn.18006bfb0
nop
lea rcx, [rsi + 0x30]
lea rdx, [rsp + 0x58]
call fcn.18006bfb0
nop
add qword [rdi + 0xb8], 0x48
jmp 0x18009daca
lea r8, [rsp + 0x28]
mov rdx, rsi
call fcn.18009e8f0
nop
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll__Mtx_unlock]
nop
cmp byte [rsp + 0x68], 0
je 0x18009db02
cmp qword [0x180396240], 0
je 0x18009db02
mov rdx, qword [rsp + 0x60]
test rdx, rdx
je 0x18009db02
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb0]
call r8
nop
cmp byte [rsp + 0x50], 0
je 0x18009db30
cmp qword [0x180396240], 0
je 0x18009db30
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x18009db30
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb0]
call r8
nop
cmp byte [rsp + 0x38], 0
je 0x18009db5e
cmp qword [0x180396240], 0
je 0x18009db5e
mov rdx, qword [rsp + 0x30]
test rdx, rdx
je 0x18009db5e
mov rcx, qword [rsp + 0x28]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb0]
call r8
nop
movsxd rax, dword [0x1803942e8]
cmp dword [0x18039fde8], eax
je 0x18009dbb3
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rdi, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rdi, 0x989680
jne 0x18009dbd4
imul rax, rax, 0x64
jmp 0x18009dbf2
mov qword [0x18039fdd8], rcx
xchg byte [rdi + 0x50], bl
mov rax, qword [rdi + 0xb8]
cmp qword [rdi + 0xb0], rax
je 0x18009dbb3
mov rdx, rbp
mov rcx, rdi
call fcn.18009e7e0
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1800dd900
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cqo
idiv rdi
mov rcx, rax
imul rax, rdx, 0x3b9aca00
cqo
idiv rdi
imul rcx, rcx, 0x3b9aca00
add rax, rcx
mov qword [0x18039fdd8], rax
mov qword [0x18039fde0], rbx
mov eax, dword [0x1803942e8]
mov dword [0x18039fde8], eax
jmp 0x18009dbb3