Function at 0x100039778
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 [0x1000aac18]
mov ecx, 0x1d
movzx ebp, dx
call fcn.10004ce88
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 0x1000397ea
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 0x10003987f
add r12d, r13d
add rsi, 8
cmp r12d, dword [rbx + 0x60]
jb 0x1000397c3
mov rax, qword [rdi]
mov edx, r13d
mov rcx, rdi
call qword [rax]
or r14d, 0xffffffff
cmp bp, 9
jne 0x100039a5e
cmp dword [rbx + 0x10], r15d
jbe 0x100039c1e
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.100041058
cmp al, r15b
je 0x10003988a
mov r12, qword [rsp + 0x70]
cmp byte [r12 + 0x4b], r13b
jne 0x10003988a
mov ecx, 0x16
call fcn.10004ce88
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 0x1000398db
mov rax, qword [rdi]
mov rcx, rdi
jmp 0x100039c19
cmp esi, r14d
jne 0x100039917
cmp qword [rbx + 0xa8], r15
je 0x10003990a
mov ecx, 0x16
call fcn.10004ce88
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 0x1000398fa
lea r8, [rsp + 0x60]
mov rcx, rbx
call fcn.100041058
neg al
sbb rdi, rdi
and rdi, qword [rsp + 0x60]
mov rax, qword [rsi]
mov edx, r13d
mov rcx, rsi
call qword [rax]
jmp 0x100039a40
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.10004ce88
mov ecx, 0x10
mov r14, rax
call qword [sym.imp.USER32.dll_GetKeyState]
mov r12d, 0x8000
test r12w, ax
jne 0x10003995b
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x68], r15d
call qword [sym.imp.USER32.dll_GetProcessDefaultLayout]
test byte [rsp + 0x68], 1
je 0x100039983
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
test r12w, ax
je 0x1000399d4
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x68], r15d
call qword [sym.imp.USER32.dll_GetProcessDefaultLayout]
test byte [rsp + 0x68], 1
je 0x1000399d4
mov r12d, r15d
cmp r13d, r15d
jbe 0x100039a2b
lea r15d, [rsi + 1]
xor edx, edx
mov eax, r15d
lea r8, [rsp + 0x60]
div r13d
mov rcx, rbx
call fcn.100041058
cmp al, 1
jne 0x1000399c7
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 0x100039a25
inc r12d
inc r15d
cmp r12d, r13d
jae 0x100039a28
jmp 0x100039993
lea r12d, [r13 - 1]
cmp r12d, r13d
jae 0x100039a2b
lea r15d, [r12 + rsi]
xor edx, edx
mov eax, r15d
lea r8, [rsp + 0x60]
div r13d
mov rcx, rbx
call fcn.100041058
cmp al, 1
jne 0x100039a15
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 0x100039a25
or eax, 0xffffffff
add r12d, eax
add r15d, eax
cmp r12d, r13d
jae 0x100039a28
jmp 0x1000399e1
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 0x100039c1e
cmp byte [rdi + 0x48], r15b
je 0x100039c1e
mov rdx, rdi
mov rcx, rbx
call fcn.10003afdc
cmp bp, 0x28
jne 0x100039aad
xor edx, edx
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100039364
cmp eax, r14d
je 0x100039c1e
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100041058
cmp al, r15b
je 0x100039c1e
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100039c1e
mov rcx, rbx
call fcn.10003afdc
cmp bp, 0x26
jne 0x100039afd
mov edx, r13d
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100039364
cmp eax, r14d
je 0x100039c1e
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100041058
cmp al, r15b
je 0x100039c1e
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100039c1e
mov rcx, rbx
call fcn.10003afdc
cmp bp, 0x25
jne 0x100039b4f
mov edx, 2
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100039364
cmp eax, r14d
je 0x100039c1e
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100041058
cmp al, r15b
je 0x100039c1e
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100039c1e
mov rcx, rbx
call fcn.10003afdc
cmp bp, 0x27
jne 0x100039ba1
mov edx, 3
mov rcx, rbx
mov byte [rbx + 0x12c], r13b
call fcn.100039364
cmp eax, r14d
je 0x100039c1e
lea r8, [rsp + 0x60]
mov edx, eax
mov rcx, rbx
call fcn.100041058
cmp al, r15b
je 0x100039c1e
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + 0x48], r15b
je 0x100039c1e
mov rcx, rbx
call fcn.10003afdc
cmp bp, 0x20
je 0x100039bad
cmp bp, 0xd
jne 0x100039c1e
mov byte [rbx + 0x12c], r13b
cmp dword [rbx + 0xd0], r14d
jne 0x100039c1e
cmp dword [rbx + 0x18], r14d
je 0x100039c1e
mov ecx, 0x13
call fcn.10004ce88
mov edx, dword [rbx + 0x18]
lea r8, [rsp + 0x60]
mov rcx, rbx
mov rsi, rax
call fcn.100041058
cmp al, r15b
jne 0x100039beb
mov dword [rbx + 0x18], r14d
jmp 0x100039c0e
mov rdi, qword [rsp + 0x60]
cmp byte [rdi + 0x48], r15b
je 0x100039c02
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 0x100039c1e
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