Function at 0x140056780
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 [0x1400cd4d0]
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 0x140056867
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 0x140056832
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056800
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 0x140056820
jmp 0x14005684e
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056832
mov eax, dword [str.Ctrl]
mov dword [rcx], eax
movzx eax, byte [0x1400ae884]
mov byte [rcx + 4], al
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056855
mov eax, dword [0x1400ae888]
mov dword [rcx], eax
test bl, 4
je 0x140056912
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 0x1400568e2
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400568b0
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 0x1400568d0
jmp 0x1400568f4
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400568e2
mov eax, dword [0x1400ae88c]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056900
mov eax, dword [0x1400ae888]
mov dword [rcx], eax
test bl, 1
je 0x1400569b8
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 0x140056982
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056953
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 0x140056970
jmp 0x14005699f
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056982
mov eax, dword [str.Shift]
mov dword [rcx], eax
movzx eax, word [0x1400ae894]
mov word [rcx + 4], ax
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400569a6
mov eax, dword [0x1400ae888]
mov dword [rcx], eax
test bl, 8
je 0x140056a62
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 0x140056a32
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056a00
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 0x140056a20
jmp 0x140056a44
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056a32
mov eax, dword [0x1400ae898]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140056a50
mov eax, dword [0x1400ae888]
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 0x140056aa0
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 0x140056ac0
mov r8, r14
lea rdx, [rbp + 0x30]
mov rcx, rsi
call fcn.1400563f0
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.140026f00
add rsp, 0x250
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret