Function at 0x5b8160
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
mov rbp, rsp
mov rbx, rcx
mov rsi, rdx
movzx rax, word [rbx + 0x34]
test ax, 0x10
je 0x5b81b8
mov rcx, rbx
xor rdx, rdx
call fcn.006aaee0
test rax, rax
je 0x5b81b8
cmp qword [rax + 0x4e0], 0
je 0x5b81b8
mov rax, qword [rax + 0x4e0]
mov rcx, rax
mov rdx, rbx
mov r8, rsi
mov rax, qword [rax]
call qword [rax + 0x48]
test al, al
jne 0x5b84e6
cmp dword [rsi], 0x100
jb 0x5b81fa
cmp dword [rsi], 0x109
ja 0x5b81fa
mov rcx, rbx
mov dl, 1
call fcn.006aaee0
test rax, rax
je 0x5b84da
mov rcx, rax
mov rdx, rbx
mov r8, rsi
mov rax, qword [rax]
call qword [rax + 0x258]
test al, al
jne 0x5b84e6
jmp 0x5b84da
cmp dword [rsi], 0x200
jb 0x5b84c0
cmp dword [rsi], 0x20e
ja 0x5b84c0
mov eax, dword [rbx + 0x90]
test eax, 0x80
jne 0x5b823d
mov eax, dword [rsi]
sub eax, 0x203
test eax, eax
je 0x5b823a
sub eax, 3
test eax, eax
je 0x5b823a
sub eax, 3
test eax, eax
jne 0x5b823d
sub dword [rsi], 2
mov eax, dword [rsi]
cmp eax, 0x202
jg 0x5b826d
cmp eax, 0x202
je 0x5b8429
sub eax, 0x200
test eax, eax
je 0x5b8288
sub eax, 1
test eax, eax
jne 0x5b8438
jmp 0x5b83f8
sub eax, 0x203
test eax, eax
je 0x5b83f8
sub eax, 4
test eax, eax
jne 0x5b8438
jmp 0x5b82a2
mov rax, qword [0x00786498]
mov rcx, qword [rax]
mov rdx, rbx
mov r8, rsi
call fcn.006bf620
jmp 0x5b84da
mov eax, dword [rbx + 0x90]
test eax, 0x80000
je 0x5b84da
mov eax, dword [rbx + 0x94]
and eax, dword [0x005b84f4]
cmp eax, dword [0x005b84f8]
jne 0x5b84da
mov rcx, qword [0x00790800]
call fcn.005cde30
test al, al
jne 0x5b84da
mov rcx, qword [0x00790800]
call fcn.005cdd50
xor rdi, rdi
mov rax, qword [0x00790800]
cmp qword [rax + 0x38], 0
je 0x5b83b1
mov rcx, rbx
mov rdx, qword [0x005a95b8]
call fcn.0040ab20
test al, al
je 0x5b8341
mov rcx, rbx
call fcn.005c4560
mov rcx, qword [0x00790800]
mov rcx, qword [rcx + 0x38]
mov rdx, rcx
mov r8, rbx
mov rdi, qword [rcx]
mov rcx, rdx
mov rdx, rax
call qword [rdi + 0x210]
mov edi, eax
jmp 0x5b83b1
cmp qword [rbx + 0x68], 0
je 0x5b8376
mov rcx, qword [rbx + 0x68]
call fcn.005c4560
mov rcx, qword [0x00790800]
mov rcx, qword [rcx + 0x38]
mov rdx, rcx
mov r8, rbx
mov rdi, qword [rcx]
mov rcx, rdx
mov rdx, rax
call qword [rdi + 0x210]
mov edi, eax
jmp 0x5b83b1
mov rcx, rbx
xor rdx, rdx
call fcn.006aaee0
test rax, rax
je 0x5b83b1
mov rcx, rax
call fcn.005c4560
mov rcx, qword [0x00790800]
mov rcx, qword [rcx + 0x38]
mov rdx, rcx
mov r8, rbx
mov rdi, qword [rcx]
mov rcx, rdx
mov rdx, rax
call qword [rdi + 0x210]
mov edi, eax
test dil, dil
je 0x5b83d2
mov qword [rsi + 0x18], 1
mov rax, qword [0x00786498]
mov rcx, qword [rax]
call fcn.006bf7d0
jmp 0x5b84da
mov rax, qword [0x00790800]
cmp qword [rax + 0x38], 0
je 0x5b84da
mov rcx, qword [0x00790800]
xor rdx, rdx
call fcn.005cdf70
jmp 0x5b84da
cmp byte [rbx + 0x9f], 1
jne 0x5b841a
mov rcx, rbx
mov dx, 0xffee
call fcn.0040ac00
mov rsi, rax
mov rcx, rbx
call rsi
jmp 0x5b84e6
lea rax, [rbx + 0x94]
or dword [rax], 1
jmp 0x5b84da
lea rax, [rbx + 0x94]
and dword [rax], 0xfffffffe
jmp 0x5b84da
mov rax, qword [0x00790800]
cmp byte [rax + 0x2c], 0
je 0x5b84da
mov rax, qword [0x00790800]
cmp dword [rax + 0x28], 0
je 0x5b84da
mov rax, qword [0x00790800]
mov ecx, dword [rsi]
cmp ecx, dword [rax + 0x28]
jne 0x5b84da
lea rcx, [rbp + 0x20]
call sub.user32.dll_GetKeyboardState
mov eax, dword [rsi]
mov dword [rbp + 0x120], eax
lea rcx, [rbp + 0x20]
call fcn.006aad70
mov word [rbp + 0x128], ax
movzx rax, word [rsi + 8]
mov word [rbp + 0x12a], ax
mov ecx, dword [rsi + 0x10]
call fcn.004179d0
mov dword [rbp + 0x130], eax
mov rcx, rbx
mov dx, 0xffc9
call fcn.0040ac00
mov rsi, rax
mov rcx, rbx
lea rdx, [rbp + 0x120]
call rsi
jmp 0x5b84e6
cmp dword [rsi], 0xb00b
jne 0x5b84da
mov rcx, rbx
mov edx, dword [rsi]
mov r8, qword [rsi + 8]
mov r9, qword [rsi + 0x10]
call fcn.005b5720
mov rcx, rbx
mov rdx, rsi
mov rbx, qword [rbx]
call qword [rbx - 0x40]
lea rsp, [rbp + 0x148]
pop rbx
pop rsi
pop rdi
pop rbp
ret