Function at 0x140145790
Capabilities:
Log keystrokes via polling

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x14020a008]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r9d, edx
mov rdi, rcx
cmp edx, 0x28
ja 0x140145d05
movabs rcx, 0x15e00000000
bt rcx, r9
jae 0x140145d05
mov rax, qword [rdi + 0x130]
mov r8d, dword [rax]
test r8d, r8d
je 0x140145cf0
mov qword [rsp + 0x80], rbp
lea eax, [r9 - 0x21]
mov qword [rsp + 0x58], r14
xor r14d, r14d
cmp eax, 7
ja case.0x140145810.37
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x145d1c]
add rcx, rdx
jmp rcx
mov rax, qword [rdi + 0xa0]
test rax, rax
je case.0x140145810.36
mov ebp, dword [rax + 0x2c]
test ebp, ebp
je case.0x140145810.36
dec ebp
jmp 0x1401458f1
mov rax, qword [rdi + 0xa0]
test rax, rax
je case.0x140145810.36
mov eax, dword [rax + 0x2c]
lea ebp, [r8 - 1]
inc eax
cmp eax, r8d
cmovb ebp, eax
jmp 0x1401458f1
lea ebp, [r8 - 1]
jmp 0x1401458f1
mov rax, qword [rdi + 0xa0]
test rax, rax
je 0x140145873
mov ebp, dword [rax + 0x2c]
jmp 0x140145876
mov ebp, r14d
test byte [rdi + 0x40], 8
je 0x140145884
mov ecx, dword [rdi + 0x84]
jmp 0x140145887
mov ecx, r14d
mov eax, dword ds:[rdi + 0x74]
sub eax, dword [rdi + 0x78]
sub eax, ecx
js 0x140145ce3
cdq
idiv dword [rdi + 0x7c]
mov ecx, eax
sub ecx, 1
js 0x140145ce3
mov eax, dword ds:[rdi + 0x88]
cmp r9d, 0x21
jne 0x1401458cb
cmp ebp, eax
jbe 0x1401458be
mov ebp, eax
jmp 0x1401458f1
cmp ebp, ecx
jb case.0x140145810.36
sub ebp, ecx
jmp 0x1401458f1
mov ebp, r14d
jmp 0x1401458f1
add eax, ecx
lea r9d, [r8 - 1]
cmp eax, r8d
mov edx, r9d
cmovb edx, eax
cmp ebp, edx
jae 0x1401458e2
mov ebp, edx
jmp 0x1401458f1
add ebp, ecx
cmp ebp, r8d
cmovae ebp, r9d
jmp 0x1401458f1
mov ebp, dword [rsp + 0x30]
mov qword [rsp + 0x78], rbx
mov ecx, 0x11
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x50], r15
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
mov ecx, 0x10
sets sil
call qword [sym.imp.USER32.dll_GetKeyState]
mov rcx, qword [rdi + 0x130]
movzx ebx, ax
mov r8d, ebp
mov rdx, qword [rcx + 8]
mov rcx, rdi
mov rdx, qword [rdx + r8*8]
xor r8d, r8d
mov qword [rdi + 0xa0], rdx
call fcn.140144a60
nop word [rax + rax]
test bx, bx
jns 0x140145aaa
mov ecx, dword [rdi + 0xac]
cmp ecx, 0xffffffff
je 0x140145aaa
mov rax, qword [rdi + 0x130]
cmp ebp, ecx
mov edx, ebp
cmovbe edx, ecx
cmovbe ecx, ebp
mov r8d, dword [rax]
test r8d, r8d
je 0x140145c03
lea r15d, [r8 - 1]
mov r11d, r14d
cmp edx, r15d
mov eax, r15d
mov ebx, r15d
mov esi, r14d
cmovbe eax, edx
mov edx, r14d
cmp ecx, eax
cmovbe r8d, ecx
cmovbe r11d, eax
test r8d, r8d
je 0x1401459e6
mov r9, r14
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r10, qword [r9 + rcx]
mov eax, dword [r10]
test al, 2
je 0x1401459db
and eax, 0xfffffffd
cmp ebx, edx
mov dword [r10], eax
mov eax, edx
cmovbe eax, ebx
mov ebx, eax
cmp esi, edx
jae 0x1401459db
mov esi, edx
inc edx
add r9, 8
cmp edx, r8d
jb 0x1401459b0
cmp r8d, r11d
ja 0x140145a35
nop dword [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov ecx, dword [r9]
test cl, 0x20
jne 0x140145a2d
test cl, 2
jne 0x140145a2d
mov eax, ecx
not eax
xor eax, ecx
and eax, 2
xor eax, ecx
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x140145a2d
mov esi, r8d
inc r8d
cmp r8d, r11d
jbe 0x1401459f0
lea r8d, [r11 + 1]
cmp r8d, r15d
ja 0x140145a77
nop
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov eax, dword [r9]
test al, 2
je 0x140145a6f
and eax, 0xfffffffd
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x140145a6f
mov esi, r8d
inc r8d
cmp r8d, r15d
jbe 0x140145a40
cmp ebx, esi
ja 0x140145c0b
mov rcx, qword [rdi + 0xc8]
xor r9d, r9d
mov rax, qword [rdi + 0xc0]
xor r8d, r8d
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi]
lea edx, [r9 + 0xb]
call qword [case.0x140101f48.0]
jmp 0x140145c0b
nop word [rax + rax]
test sil, sil
jne 0x140145c98
mov rax, qword [rdi + 0xa0]
mov ecx, dword [rax + 0x2c]
mov rax, qword [rdi + 0x130]
mov dword [rdi + 0xac], ecx
mov r8d, dword [rax]
test r8d, r8d
je 0x140145c03
lea r15d, [r8 - 1]
mov r11d, r14d
cmp ebp, r15d
mov eax, r15d
mov ebx, r15d
mov esi, r14d
cmovbe eax, ebp
mov edx, r14d
cmp ebp, eax
cmovbe r8d, ebp
cmovbe r11d, eax
test r8d, r8d
je 0x140145b46
mov r9, r14
nop word [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r10, qword [r9 + rcx]
mov eax, dword [r10]
test al, 2
je 0x140145b3b
and eax, 0xfffffffd
cmp ebx, edx
mov dword [r10], eax
mov eax, edx
cmovbe eax, ebx
mov ebx, eax
cmp esi, edx
jae 0x140145b3b
mov esi, edx
inc edx
add r9, 8
cmp edx, r8d
jb 0x140145b10
cmp r8d, r11d
ja 0x140145b95
nop dword [rax + rax]
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov ecx, dword [r9]
test cl, 0x20
jne 0x140145b8d
test cl, 2
jne 0x140145b8d
mov eax, ecx
not eax
xor eax, ecx
and eax, 2
xor eax, ecx
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x140145b8d
mov esi, r8d
inc r8d
cmp r8d, r11d
jbe 0x140145b50
lea r8d, [r11 + 1]
cmp r8d, r15d
ja 0x140145bd7
nop
mov rax, qword [rdi + 0x130]
mov rcx, qword [rax + 8]
mov r9, qword [rcx + r8*8]
mov eax, dword [r9]
test al, 2
je 0x140145bcf
and eax, 0xfffffffd
cmp ebx, r8d
mov dword [r9], eax
mov eax, r8d
cmovbe eax, ebx
mov ebx, eax
cmp esi, r8d
jae 0x140145bcf
mov esi, r8d
inc r8d
cmp r8d, r15d
jbe 0x140145ba0
cmp ebx, esi
ja 0x140145c0b
mov rcx, qword [rdi + 0xc8]
xor r9d, r9d
mov rax, qword [rdi + 0xc0]
xor r8d, r8d
mov qword [rsp + 0x20], rcx
mov rcx, qword [rdi]
lea edx, [r9 + 0xb]
call qword [case.0x140101f48.0]
jmp 0x140145c0b
mov esi, dword [rsp + 0x30]
mov ebx, dword [rsp + 0x30]
mov rax, qword [rdi + 0x130]
cmp esi, dword [rax]
jae 0x140145c98
cmp ebx, esi
ja 0x140145c98
mov eax, dword [rdi + 0x88]
sub esi, eax
mov r9d, dword [rdi + 0x78]
inc esi
imul esi, dword [rdi + 0x7c]
sub ebx, eax
imul ebx, dword [rdi + 0x7c]
mov edx, dword [rdi + 0xf8]
sub edx, dword [rdi + 0x8c]
add edx, dword [rdi + 0x98]
add esi, r9d
mov dword [rsp + 0x38], r14d
test byte [rdi + 0x40], 4
lea r8d, [rbx + r9]
je 0x140145c61
mov r14d, dword [rdi + 0x80]
mov eax, dword [rdi + 0x70]
mov rcx, qword [rdi]
sub eax, r14d
cmp edx, eax
cmovg edx, eax
cmp r8d, r9d
mov dword [rsp + 0x40], edx
lea rdx, [rsp + 0x38]
cmovl r8d, r9d
cmp esi, dword [rdi + 0x74]
mov dword [rsp + 0x3c], r8d
cmovg esi, dword [rdi + 0x74]
xor r8d, r8d
mov dword [rsp + 0x44], esi
call qword [sym.imp.USER32.dll_InvalidateRect]
mov edx, ebp
mov rcx, rdi
call fcn.140145240
mov rcx, qword [rdi + 0x38]
mov r15, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x78]
test rcx, rcx
je 0x140145ce3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x41c
call qword [sym.imp.USER32.dll_SendMessageW]
mov qword [rdi + 0x160], 0xffffffffffffffff
mov dword [rdi + 0x190], 0xffffffff
mov rbp, qword [rsp + 0x80]
mov r14, qword [rsp + 0x58]
mov al, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140161390
add rsp, 0x60
pop rdi
ret
xor al, al
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140161390
add rsp, 0x60
pop rdi
ret