Function at 0x140065960
Capabilities:
Get keyboard layout
Log keystrokes
Log keystrokes via polling

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x150]
sub rsp, 0x250
mov rax, qword [0x1400e44d0]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov ebx, ecx
mov r14d, r8d
shr ebx, 0x10
mov rsi, rdx
mov byte [rbp + 0x30], 0
mov edi, ecx
test bl, 2
je 0x140065a47
xor edx, edx
lea ecx, [rdx + 0x11]
call qword [sym.imp.USER32.dll_MapVirtualKeyA]
mov r8d, 0x104
mov byte [rsp + 0x20], 0
bts eax, 9
lea rdx, [rsp + 0x20]
shl eax, 0x10
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rsp + 0x20], 0
je 0x140065a12
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400659e0
lea r8, [rsp + 0x20]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140065a00
jmp 0x140065a2e
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065a12
mov eax, dword [str.Ctrl]
mov dword [rcx], eax
movzx eax, byte [0x1400bf3c4]
mov byte [rcx + 4], al
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065a35
mov eax, dword [0x1400bf3c8]
mov dword [rcx], eax
test bl, 4
je 0x140065af2
xor edx, edx
lea ecx, [rdx + 0x12]
call qword [sym.imp.USER32.dll_MapVirtualKeyA]
mov r8d, 0x104
mov byte [rsp + 0x20], 0
bts eax, 9
lea rdx, [rsp + 0x20]
shl eax, 0x10
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rsp + 0x20], 0
je 0x140065ac2
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065a90
lea r8, [rsp + 0x20]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140065ab0
jmp 0x140065ad4
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065ac2
mov eax, dword [0x1400bf3cc]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065ae0
mov eax, dword [0x1400bf3c8]
mov dword [rcx], eax
test bl, 1
je 0x140065b98
xor edx, edx
lea ecx, [rdx + 0x10]
call qword [sym.imp.USER32.dll_MapVirtualKeyA]
mov r8d, 0x104
mov byte [rsp + 0x20], 0
bts eax, 9
lea rdx, [rsp + 0x20]
shl eax, 0x10
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rsp + 0x20], 0
je 0x140065b62
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065b33
lea r8, [rsp + 0x20]
xor edx, edx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140065b50
jmp 0x140065b7f
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065b62
mov eax, dword [str.Shift]
mov dword [rcx], eax
movzx eax, word [0x1400bf3d4]
mov word [rcx + 4], ax
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065b86
mov eax, dword [0x1400bf3c8]
mov dword [rcx], eax
test bl, 8
je 0x140065c42
xor edx, edx
lea ecx, [rdx + 0x5b]
call qword [sym.imp.USER32.dll_MapVirtualKeyA]
mov r8d, 0x104
mov byte [rsp + 0x20], 0
bts eax, 9
lea rdx, [rsp + 0x20]
shl eax, 0x10
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rsp + 0x20], 0
je 0x140065c12
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065be0
lea r8, [rsp + 0x20]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140065c00
jmp 0x140065c24
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065c12
mov eax, dword [0x1400bf3d8]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140065c30
mov eax, dword [0x1400bf3c8]
mov dword [rcx], eax
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, di
xor edx, edx
mov r8, rax
call qword [sym.imp.USER32.dll_MapVirtualKeyExA]
mov r8d, 0x104
lea rdx, [rsp + 0x20]
bts eax, 9
shl eax, 0x10
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
lea rdx, [rbp + 0x30]
dec rdx
nop dword [rax]
cmp byte [rdx + 1], 0
lea rdx, [rdx + 1]
jne 0x140065c80
lea rcx, [rsp + 0x20]
xor r8d, r8d
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx + r8]
mov byte [rdx + r8], al
lea r8, [r8 + 1]
test al, al
jne 0x140065ca0
mov r8, r14
lea rdx, [rbp + 0x30]
mov rcx, rsi
call fcn.1400655d0
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.140035b70
add rsp, 0x250
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret