Function at 0x18005ca20
Capabilities:
Log keystrokes via polling

Disassembly:
mov r11, rsp
push r14
sub rsp, 0x40
mov rax, qword [0x18009ce88]
mov r14, rcx
cmp byte [rax], 0
jne 0x18005ce9d
mov r8, qword [rcx + 0x45e8]
movabs rax, 0x6060606060606061
mov rdx, qword [rcx + 0x45f0]
sub rdx, r8
mov dword [rsp + 0x58], 0
imul rdx
sar rdx, 8
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x18005ce9d
mov qword [r11 + 0x20], rsi
mov qword [r11 - 0x10], rdi
xor edi, edi
mov qword [r11 - 0x18], r12
mov r12, qword gs:[0x58]
mov qword [r11 - 0x20], r13
mov r13d, dword [0x18009c9b4]
mov qword [r11 - 0x28], r15
xor r15d, r15d
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rbp
mov esi, 4
nop dword [rax]
mov ecx, dword [r15 + r8 + 4]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
je 0x18005ce28
mov rbx, qword [r14 + 0x45e8]
cmp byte [r15 + rbx + 8], 0
je 0x18005cbfb
cmp qword [r15 + rbx + 0x10], 0
je 0x18005cbd9
xor edx, edx
call fcn.180053df0
mov rbx, rax
test rax, rax
je 0x18005cb42
mov rcx, qword [r12 + r13*8]
mov edx, dword [rsi + rcx]
cmp dword [0x1800aee60], edx
jle 0x18005cb2f
lea rcx, [0x1800aee60]
call fcn.180061dc0
cmp dword [0x1800aee60], 0xffffffff
jne 0x18005cb2f
mov rax, qword [0x18009cda8]
lea rcx, [0x1800aee60]
mov qword [0x1800aee70], rax
call fcn.180061d60
mov rax, qword [0x1800aee70]
test rax, rax
je 0x18005cb42
mov rcx, rbx
call rax
jmp 0x18005cb44
xor eax, eax
cmp dword [r14 + 0x80], 1
jne 0x18005cbb7
mov edx, 1
call fcn.180053df0
mov rbx, rax
test rax, rax
je 0x18005ce28
mov rcx, qword [r12 + r13*8]
mov edx, dword [rsi + rcx]
cmp dword [0x1800aee60], edx
jle 0x18005cba2
lea rcx, [0x1800aee60]
call fcn.180061dc0
cmp dword [0x1800aee60], 0xffffffff
jne 0x18005cba2
mov rcx, qword [0x18009cda8]
mov qword [0x1800aee70], rcx
lea rcx, [0x1800aee60]
call fcn.180061d60
mov rax, qword [0x1800aee70]
test rax, rax
je 0x18005ce28
mov rcx, rbx
call rax
test rax, rax
je 0x18005ce28
mov rdx, qword [r14 + 0x45e8]
mov rcx, rax
mov rdx, qword [r15 + rdx + 0x10]
call fcn.180054740
jmp 0x18005ce28
mov rcx, qword [0x18009ce58]
lea rdx, str.Special_move_does_not_exist_
mov dword [rcx + 0x804], 0x40600000
call fcn.18004f570
jmp 0x18005ce28
mov rbp, qword [r12 + r13*8]
imul rdi, rdi, 0x2a8
mov eax, dword [rsi + rbp]
cmp dword [0x1800aeee8], eax
jle 0x18005cc40
lea rcx, [0x1800aeee8]
call fcn.180061dc0
cmp dword [0x1800aeee8], 0xffffffff
jne 0x18005cc40
mov rax, qword [0x18009cdc8]
lea rcx, [0x1800aeee8]
mov qword [0x1800aef00], rax
call fcn.180061d60
mov rax, qword [0x1800aef00]
test rax, rax
je 0x18005cdf5
lea rcx, [rbx + 0x220]
xor r8d, r8d
add rcx, rdi
xor edx, edx
call rax
mov rdx, qword [r14 + 0x45e8]
mov r12, rax
test rax, rax
je 0x18005cdfc
mov ecx, dword [rsi + rbp]
cmp dword [0x1800aeedc], ecx
mov ebx, dword [r15 + rdx + 0x2a0]
jle 0x18005ccb6
lea rcx, [0x1800aeedc]
call fcn.180061dc0
cmp dword [0x1800aeedc], 0xffffffff
jne 0x18005ccb6
mov rax, qword [0x18009cdd0]
lea rcx, [0x1800aeedc]
mov qword [0x1800aeee0], rax
call fcn.180061d60
mov rax, qword [0x1800aeee0]
test rax, rax
je 0x18005cdc7
mov edx, ebx
mov rcx, r12
call rax
test eax, eax
je 0x18005cdc7
xor edx, edx
call fcn.180053df0
mov rbx, rax
test rax, rax
je 0x18005cd31
mov ecx, dword [rsi + rbp]
cmp dword [0x1800aee60], ecx
jle 0x18005cd1e
lea rcx, [0x1800aee60]
call fcn.180061dc0
cmp dword [0x1800aee60], 0xffffffff
jne 0x18005cd1e
mov rcx, qword [0x18009cda8]
mov qword [0x1800aee70], rcx
lea rcx, [0x1800aee60]
call fcn.180061d60
mov rax, qword [0x1800aee70]
test rax, rax
je 0x18005cd31
mov rcx, rbx
call rax
jmp 0x18005cd33
xor eax, eax
mov rcx, qword [r14 + 0x45e8]
cmp dword [r15 + rcx], 1
jne 0x18005cdad
mov edx, 1
call fcn.180053df0
mov rbx, rax
test rax, rax
je 0x18005ce23
mov ecx, dword [rsi + rbp]
cmp dword [0x1800aee60], ecx
jle 0x18005cd91
lea rcx, [0x1800aee60]
call fcn.180061dc0
cmp dword [0x1800aee60], 0xffffffff
jne 0x18005cd91
mov rcx, qword [0x18009cda8]
mov qword [0x1800aee70], rcx
lea rcx, [0x1800aee60]
call fcn.180061d60
mov rax, qword [0x1800aee70]
test rax, rax
je 0x18005ce23
mov rcx, rbx
call rax
mov rcx, qword [r14 + 0x45e8]
test rax, rax
je 0x18005ce23
mov r8d, dword [r15 + rcx + 0x2a0]
mov rdx, r12
mov rcx, rax
call fcn.180054620
jmp 0x18005ce23
mov rcx, qword [0x18009ce58]
lea rdx, str.Function__x_does_not_exist_
mov rax, qword [r14 + 0x45e8]
mov dword [rcx + 0x804], 0x40600000
mov r8d, dword [r15 + rax + 0x2a0]
call fcn.18004f570
jmp 0x18005ce23
mov rdx, qword [r14 + 0x45e8]
mov rcx, qword [0x18009ce58]
lea r8, [rdx + 0x220]
add r8, rdi
lea rdx, str.Script__s_couldnt_be_loaded_
mov dword [rcx + 0x804], 0x40600000
call fcn.18004f570
mov esi, 4
mov eax, dword [rsp + 0x58]
add r15, 0x2a8
mov r8, qword [r14 + 0x45e8]
inc eax
mov rcx, qword [r14 + 0x45f0]
mov r12, qword gs:[0x58]
sub rcx, r8
movsxd rdi, eax
mov dword [rsp + 0x58], eax
movabs rax, 0x6060606060606061
imul rcx
sar rdx, 8
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jb 0x18005cab0
mov r15, qword [rsp + 0x20]
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop r14
ret