Function at 0x100040aac
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rbx, qword [0x1000b10d8]
mov ecx, 0x1d
movzx ebp, dx
call fcn.100047e78
xor r15d, r15d
mov qword [rax + 8], r15
mov word [rax + 0x18], bp
mov rdi, rax
mov r12d, r15d
lea r13d, [r15 + 1]
cmp dword [rbx + 0x60], r15d
jbe 0x100040b1e
mov rsi, r15
mov rax, qword [rbx + 0x70]
mov rdx, rdi
mov rcx, qword [rsi + rax]
mov rax, qword [rcx]
call qword [rax]
cmp byte [rdi + 0x1a], r15b
jne 0x100040bb3
add r12d, r13d
add rsi, 8
cmp r12d, dword [rbx + 0x60]
jb 0x100040af7
mov rax, qword [rdi]
mov edx, r13d
mov rcx, rdi
call qword [rax]
or r14d, 0xffffffff
cmp bp, 9
jne 0x100040d92
cmp dword [rbx + 0x10], r15d
jbe 0x100040f52
mov esi, dword [rbx + 0x18]
lea r8, [rsp + 0x70]
mov rcx, rbx
mov edx, esi
mov byte [rbx + 0x12c], r13b
mov rdi, r15
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x70], r15
call fcn.100042754
cmp al, r15b
je 0x100040bbe
mov r12, qword [rsp + 0x70]
cmp byte [r12 + 0x4b], r13b
jne 0x100040bbe
mov ecx, 0x16
call fcn.100047e78
mov ecx, 0x10
or dword [rax + 0x18], 0xffffffff
mov rsi, rax
call qword [sym.imp.USER32.dll_GetKeyState]
mov r11w, ax
mov rdx, rsi
mov rcx, r12
shr r11d, 0xf
and r11b, r13b
mov byte [rsi + 0x1c], r11b
mov r8, qword [r12]
call qword [r8 + 0x10]
jmp 0x100040c0f
mov rax, qword [rdi]
mov rcx, rdi
jmp 0x100040f4d
cmp esi, r14d
jne 0x100040c4b
cmp qword [rbx + 0xa8], r15
je 0x100040c3e
mov ecx, 0x16
call fcn.100047e78
mov ecx, 0x10
or dword [rax + 0x18], 0xffffffff
mov rsi, rax
call qword [sym.imp.USER32.dll_GetKeyState]
mov qword [rsi + 8], r15
mov r11w, ax
mov rdx, rsi
shr r11d, 0xf
and r11b, r13b
mov byte [rsi + 0x1c], r11b
mov rcx, qword [rbx + 0xa8]
mov r8, qword [rcx]
call qword [r8]
mov edx, dword [rsi + 0x18]
cmp edx, r14d
je 0x100040c2e
lea r8, [rsp + 0x60]
mov rcx, rbx
call fcn.100042754
neg al
sbb rdi, rdi
and rdi, qword [rsp + 0x60]
mov rax, qword [rsi]
mov edx, r13d
mov rcx, rsi
call qword [rax]
jmp 0x100040d74
mov esi, dword [rbx + 0xe4]
cmp esi, r14d
cmove esi, r15d
mov rax, qword [rbx]
mov ecx, 0x10
mov r13d, dword [rax]
inc r13d
call fcn.100047e78
mov ecx, 0x10
mov r14, rax
call qword [sym.imp.USER32.dll_GetKeyState]
mov r12d, 0x8000
test r12w, ax
jne 0x100040c8f
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x68], r15d
call qword [sym.imp.USER32.dll_GetProcessDefaultLayout]
test byte [rsp + 0x68], 1
je 0x100040cb7
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
test r12w, ax
je 0x100040d08
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x68], r15d
call qword [sym.imp.USER32.dll_GetProcessDefaultLayout]
test byte [rsp + 0x68], 1
je 0x100040d08
mov r12d, r15d
cmp r13d, r15d
jbe 0x100040d5f
lea r15d, [rsi + 1]
xor edx, edx
mov eax, r15d
lea r8, [rsp + 0x60]
div r13d
mov rcx, rbx
call fcn.100042754
cmp al, 1
jne 0x100040cfb
mov rsi, qword [rsp + 0x60]
mov byte [r14 + 0x18], dil
mov rdx, r14
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
cmp byte [r14 + 0x18], dil
jne 0x100040d59
inc r12d
inc r15d
cmp r12d, r13d
jae 0x100040d5c
jmp 0x100040cc7
lea r12d, [r13 - 1]
cmp r12d, r13d
jae 0x100040d5f
lea r15d, [r12 + rsi]
xor edx, edx
mov eax, r15d
lea r8, [rsp + 0x60]
div r13d
mov rcx, rbx
call fcn.100042754
cmp al, 1
jne 0x100040d49
mov rsi, qword [rsp + 0x60]
mov byte [r14 + 0x18], dil
mov rdx, r14
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
cmp byte [r14 + 0x18], dil
jne 0x100040d59
or eax, 0xffffffff
add r12d, eax
add r15d, eax
cmp r12d, r13d
jae 0x100040d5c
jmp 0x100040d15
mov rdi, rsi
xor r15d, r15d
mov rax, qword [r14]
mov r13d, 1
mov rcx, r14
mov edx, r13d
call qword [rax]
or r14d, 0xffffffff
cmp rdi, r15
je 0x100040f52
cmp byte [rdi + 0x48], r15b
je 0x100040f52
mov rdx, rdi
mov rcx, rbx
call fcn.100042310
cmp bp, 0x28
jne 0x100040de1
xor edx, edx
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100040698
cmp eax, r14d
je 0x100040f52
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100042754
cmp al, r15b
je 0x100040f52
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100040f52
mov rcx, rbx
call fcn.100042310
cmp bp, 0x26
jne 0x100040e31
mov edx, r13d
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100040698
cmp eax, r14d
je 0x100040f52
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100042754
cmp al, r15b
je 0x100040f52
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100040f52
mov rcx, rbx
call fcn.100042310
cmp bp, 0x25
jne 0x100040e83
mov edx, 2
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100040698
cmp eax, r14d
je 0x100040f52
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100042754
cmp al, r15b
je 0x100040f52
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100040f52
mov rcx, rbx
call fcn.100042310
cmp bp, 0x27
jne 0x100040ed5
mov edx, 3
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100040698
cmp eax, r14d
je 0x100040f52
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100042754
cmp al, r15b
je 0x100040f52
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100040f52
mov rcx, rbx
call fcn.100042310
cmp bp, 0x20
je 0x100040ee1
cmp bp, 0xd
jne 0x100040f52
mov byte [rbx + 0x12c], r13b
cmp dword [rbx + 0xd0], r14d
jne 0x100040f52
cmp dword [rbx + 0x18], r14d
je 0x100040f52
mov ecx, 0x13
call fcn.100047e78
mov edx, dword [rbx + 0x18]
lea r8, [rsp + 0x60]
mov rcx, rbx
mov rsi, rax
call fcn.100042754
cmp al, r15b
jne 0x100040f1f
mov dword [rbx + 0x18], r14d
jmp 0x100040f42
mov rdi, qword [rsp + 0x60]
cmp byte [rdi + 0x48], r15b
je 0x100040f36
mov rax, qword [rdi]
mov rdx, rsi
mov rcx, rdi
call qword [rax + 0x10]
mov eax, dword [rdi + 0xe0]
mov dword [rbx + 0xd0], eax
cmp rsi, r15
je 0x100040f52
mov rax, qword [rsi]
mov rcx, rsi
mov edx, r13d
call qword [rax]
mov rbx, qword [rsp + 0x78]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret