Function at 0x140049790
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 [0x1401385c0]
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 0x140049877
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 0x140049842
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049810
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 0x140049830
jmp 0x14004985e
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049842
mov eax, dword [str.Ctrl]
mov dword [rcx], eax
movzx eax, byte [0x1400c5aa0]
mov byte [rcx + 4], al
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049865
mov eax, dword [0x1400c5aa4]
mov dword [rcx], eax
test bl, 4
je 0x140049922
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 0x1400498f2
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400498c0
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 0x1400498e0
jmp 0x140049904
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400498f2
mov eax, dword [0x1400c5aa8]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049910
mov eax, dword [0x1400c5aa4]
mov dword [rcx], eax
test bl, 1
je 0x1400499c8
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 0x140049992
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049963
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 0x140049980
jmp 0x1400499af
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049992
mov eax, dword [str.Shift]
mov dword [rcx], eax
movzx eax, word [reloc.WS2_32.dll_WSACleanup]
mov word [rcx + 4], ax
lea rcx, [rbp + 0x30]
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400499b6
mov eax, dword [0x1400c5aa4]
mov dword [rcx], eax
test bl, 8
je 0x140049a72
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 0x140049a42
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049a10
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 0x140049a30
jmp 0x140049a54
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049a42
mov eax, dword [0x1400c5ab4]
mov dword [rcx], eax
lea rcx, [rbp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140049a60
mov eax, dword [0x1400c5aa4]
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 0x140049ab0
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 0x140049ad0
mov r8, r14
lea rdx, [rbp + 0x30]
mov rcx, rsi
call fcn.140049060
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.14005f0d0
add rsp, 0x250
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret