Function at 0x140162920
Capabilities:
Log keystrokes via polling

Disassembly:
push rsi
sub rsp, 0x50
mov rax, qword [0x140237008]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r9d, edx
mov rsi, rcx
cmp edx, 0x28
ja 0x140162bb5
movabs rcx, 0x15e00000000
bt rcx, r9
jae 0x140162bb5
mov rax, qword [rsi + 0x130]
mov r8d, dword [rax]
test r8d, r8d
je 0x140162ba0
lea eax, ds:[r9 - 0x21]
mov qword [rsp + 0x78], rdi
cmp eax, 7
ja case.0x14016299a.37
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x162bcc]
add rcx, rdx
jmp rcx
mov rax, qword [rsi + 0xa0]
test rax, rax
je case.0x14016299a.36
mov edi, dword [rax + 0x2c]
test edi, edi
je case.0x14016299a.36
dec edi
jmp 0x140162a72
mov rax, qword [rsi + 0xa0]
test rax, rax
je case.0x14016299a.36
mov eax, dword [rax + 0x2c]
lea edi, [r8 - 1]
inc eax
cmp eax, r8d
cmovb edi, eax
jmp 0x140162a72
lea edi, [r8 - 1]
jmp 0x140162a72
mov rax, qword [rsi + 0xa0]
test rax, rax
je 0x1401629f8
mov edi, dword [rax + 0x2c]
jmp 0x1401629fa
xor edi, edi
test byte ds:[rsi + 0x40], 8
je 0x140162a0a
mov ecx, dword [rsi + 0x84]
jmp 0x140162a0c
xor ecx, ecx
mov eax, dword [rsi + 0x74]
sub eax, dword [rsi + 0x78]
sub eax, ecx
js 0x140162b9b
cdq
idiv dword [rsi + 0x7c]
mov ecx, eax
sub ecx, 1
js 0x140162b9b
mov eax, dword [rsi + 0x88]
cmp r9d, 0x21
jne 0x140162a4c
cmp edi, eax
jbe 0x140162a3d
mov edi, eax
jmp 0x140162a72
nop dword [rax]
cmp edi, ecx
jb case.0x14016299a.36
sub edi, ecx
jmp 0x140162a72
xor edi, edi
jmp 0x140162a72
add eax, ecx
lea r9d, [r8 - 1]
cmp eax, r8d
mov edx, r9d
cmovb edx, eax
cmp edi, edx
jae 0x140162a63
mov edi, edx
jmp 0x140162a72
add edi, ecx
cmp edi, r8d
cmovae edi, r9d
jmp 0x140162a72
mov edi, dword [rsp + 0x30]
mov qword [rsp + 0x68], rbx
mov ecx, 0x11
mov qword [rsp + 0x70], rbp
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
mov ecx, 0x10
sets bpl
call qword [sym.imp.USER32.dll_GetKeyState]
mov rcx, qword ds:[rsi + 0x130]
movzx ebx, ax
mov r8d, edi
mov rdx, qword [rcx + 8]
mov rcx, rsi
mov rdx, qword [rdx + r8*8]
xor r8d, r8d
mov qword [rsi + 0xa0], rdx
call fcn.140161f60
test bx, bx
mov rbx, qword [rsp + 0x68]
jns 0x140162ae8
mov edx, dword [rsi + 0xac]
cmp edx, 0xffffffff
je 0x140162ae8
cmp edi, edx
mov r8d, edi
cmovbe r8d, edx
cmovbe edx, edi
jmp 0x140162b02
test bpl, bpl
jne 0x140162b5a
mov rax, qword [rsi + 0xa0]
mov r8d, edi
mov edx, edi
mov ecx, dword [rax + 0x2c]
mov dword [rsi + 0xac], ecx
lea rax, ds:[rsp + 0x34]
mov r9d, 4
mov qword [rsp + 0x28], rax
mov rcx, rsi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call fcn.140161d80
mov r8d, dword ds:[rsp + 0x34]
lea rax, [rsp + 0x38]
mov edx, dword [rsp + 0x30]
mov r9b, 1
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140161a60
test al, al
je 0x140162b5a
mov rcx, qword [rsi]
lea rdx, [rsp + 0x38]
xor r8d, r8d
call qword [sym.imp.USER32.dll_InvalidateRect]
mov edx, edi
mov rcx, rsi
call fcn.1401623a0
mov rcx, qword [rsi + 0x38]
mov rbp, qword [rsp + 0x70]
test rcx, rcx
je 0x140162b9b
xor r9d, r9d
xor r8d, r8d
mov edx, 0x41c
call qword [sym.imp.USER32.dll_SendMessageW]
mov qword [rsi + 0x160], 0xffffffffffffffff
mov dword [rsi + 0x190], 0xffffffff
mov rdi, qword [rsp + 0x78]
mov al, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401848a0
add rsp, 0x50
pop rsi
ret
xor al, al
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401848a0
add rsp, 0x50
pop rsi
ret