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

Disassembly:
mov r11, rsp
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [r11 - 0xc8]
sub rsp, 0x1a0
movzx ebx, dl
mov r14, r9
mov edx, dword [rbp + 0xf8]
movzx eax, bx
or ax, r8w
movzx edi, r8w
mov esi, ecx
je 0x140020005
mov qword [r11 + 8], r12
test edx, edx
mov eax, 0xffc3d44d
mov qword [r11 - 0x30], r13
cmovne eax, edx
mov qword [r11 - 0x38], r15
mov dword [rsp + 0x30], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x140122ee4]
sete r15b
cmp dword [0x140125094], 0
je 0x14001fbb3
test r15b, r15b
jne 0x14001fbb3
mov r13b, 1
jmp 0x14001fbb6
xor r13b, r13b
cmp dword [0x140125094], 1
mov byte [rbp + 0xd8], r13b
je 0x14001fbcb
test r15b, r15b
je 0x14001fbd2
mov byte [rbp + 0xf0], 0
test bl, bl
jne 0x14001fc1d
mov edx, edi
movzx ecx, di
sub edx, 0x45
je 0x14001fc19
mov eax, 0xff
sub edx, 0xf1
je 0x14001fbf2
cmp edx, 0xf
jne 0x14001fbf5
and cx, ax
bt cx, 8
jae 0x14001fc07
and cx, ax
mov eax, 0xe000
or cx, ax
movzx ecx, cx
mov edx, 3
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov ebx, eax
jmp 0x14001fc2f
mov bl, reloc.WSOCK32.dll_send
jmp 0x14001fc2f
test di, di
jne 0x14001fc2f
xor edx, edx
movzx ecx, bl
call fcn.140023e30
movzx edi, ax
xor r12d, r12d
lea rdx, [0x140000000]
movzx eax, di
shr ax, 8
test al, al
setne r12b
cmp dword [0x140125094], 2
jne case.default.0x14001fc68
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x14001fc68
cdqe
mov ecx, dword [rdx + rax*4 + 0x20014]
add rcx, rdx
jmp rcx
mov bl, reloc.OLEAUT32.dll_SafeArrayGetElemsize
jmp case.default.0x14001fc68
mov bl, reloc.WSOCK32.dll_recv
jmp case.default.0x14001fc68
mov bl, reloc.OLEAUT32.dll_SafeArrayGetUBound
test r14, r14
je 0x14001fda4
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140022940
test al, al
je 0x14001fd32
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetKeyboardState]
test esi, esi
jne 0x14001fcac
movzx eax, bl
or byte [rsp + rax + 0x40], 0x80
jmp 0x14001fcb9
cmp esi, 1
jne 0x14001fcb9
movzx eax, bl
and byte [rsp + rax + 0x40], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x14001fcd9
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x2002c]
add rcx, rdx
jmp rcx
test byte [rbp - 0x1e], 0x80
jne 0x14001fcee
test byte [rbp - 0x1d], 0x80
jne 0x14001fcee
and byte [rsp + 0x51], 0x7f
jmp case.default.0x14001fcd9
or byte [rsp + 0x51], 0x80
jmp case.default.0x14001fcd9
test byte [rbp - 0x20], 0x80
jne 0x14001fd08
test byte [rbp - 0x1f], 0x80
jne 0x14001fd08
and byte [rsp + 0x50], 0x7f
jmp case.default.0x14001fcd9
or byte [rsp + 0x50], 0x80
jmp case.default.0x14001fcd9
test byte [rbp - 0x1c], 0x80
jne 0x14001fd22
test byte [rbp - 0x1b], 0x80
jne 0x14001fd22
and byte [rsp + 0x52], 0x7f
jmp case.default.0x14001fcd9
or byte [rsp + 0x52], 0x80
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_SetKeyboardState]
movzx eax, di
shl eax, 0x10
movsxd rdi, eax
movzx ebx, bl
cmp esi, 1
je 0x14001fd5b
mov r9, rdi
mov r8d, ebx
or r9, 1
mov edx, 0x100
mov rcx, r14
call qword [sym.imp.USER32.dll_PostMessageW]
cmp byte [rbp + 0xf0], 0
je 0x14001fd7d
cmp esi, 2
jne 0x14001fd7d
mov rax, qword [0x14011c188]
mov ecx, dword [rax + 0xa0]
call fcn.140021920
jmp 0x14001fd85
test esi, esi
je 0x14001ffc1
mov r9d, 0xc0000001
mov r8, rbx
or r9, rdi
mov edx, 0x101
mov rcx, r14
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x14001ffc1
mov dword [0x140124fd0], esi
mov byte [0x140124fd4], bl
test r15b, r15b
je 0x14001fe0f
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor r14d, r14d
test rax, rax
je 0x14001fdfc
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rbp + 0x40]
mov dword [rbp + 0x40], 0x48
mov ecx, eax
mov r14d, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x14001fdfc
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14001fdfc
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov r14d, eax
mov ecx, r14d
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rcx, rax
call fcn.140022e60
jmp 0x14001fe15
mov eax, dword [0x140125080]
mov r10, qword [0x140122dd0]
mov dword [rsp + 0x34], eax
cmp bl, 0xa5
jne 0x14001fe5f
test eax, eax
je 0x14001fe5f
test r13b, r13b
jne 0x14001fe5f
test r10, r10
je 0x14001fe5f
mov r11b, 1
mov byte [rbp + 0xe0], r11b
xor r13b, r13b
test r15b, r15b
jne 0x14001fe82
mov eax, dword [0x140125094]
cmp eax, 2
je 0x14001fe82
test r10, r10
je 0x14001fe5a
cmp eax, 1
jne 0x14001fe82
mov r14b, 1
jmp 0x14001fe85
xor r11b, r11b
mov byte [rbp + 0xe0], r11b
test r13b, r13b
je 0x14001fe3d
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140022940
movzx r13d, al
jmp 0x14001fe40
xor r14b, r14b
movzx r15d, byte [rbp + 0xd8]
cmp esi, 1
je 0x14001fefa
test r15b, r15b
je 0x14001feb4
mov eax, dword [rsp + 0x30]
mov r9d, r12d
movzx r8d, di
mov dword [rsp + 0x20], eax
movzx edx, bl
movzx ecx, r13b
call fcn.140021360
jmp 0x14001fee7
mov ecx, dword [rsp + 0x30]
test r11b, r11b
mov eax, dword [0x140122dc4]
mov r9d, ecx
cmovne eax, ecx
mov r8d, r12d
movzx ecx, bl
mov dword [0x140122dc4], eax
movzx edx, dil
call qword [sym.imp.USER32.dll_keybd_event]
mov dword [0x140122dc4], 0
test r14b, r14b
je 0x14001fefa
movzx r8d, di
movzx edx, bl
xor ecx, ecx
call fcn.140021b30
cmp byte [rbp + 0xf0], 0
je 0x14001ff31
cmp esi, 2
jne 0x14001ff31
cmp dword [0x140125094], esi
mov rax, qword [0x14011c188]
jne 0x14001ff24
mov ecx, dword [rax + 0xa4]
call fcn.140021920
jmp 0x14001ff39
mov ecx, dword [rax + 0xa0]
call fcn.140021920
jmp 0x14001ff39
test esi, esi
je 0x14001ffc1
or r12d, 2
test r15b, r15b
je 0x14001ff5f
mov eax, dword [rsp + 0x30]
mov r9d, r12d
movzx r8d, di
mov dword [rsp + 0x20], eax
movzx edx, bl
movzx ecx, r13b
call fcn.140021360
jmp 0x14001ff96
mov ecx, dword [rsp + 0x30]
mov r8d, r12d
mov eax, dword [0x140122dc4]
mov r9d, ecx
cmp byte [rbp + 0xe0], 0
movzx edx, dil
cmovne eax, ecx
movzx ecx, bl
mov dword [0x140122dc4], eax
call qword [sym.imp.USER32.dll_keybd_event]
mov dword [0x140122dc4], 0
cmp dword [rsp + 0x34], 0
je 0x14001ffae
mov eax, 0x138
cmp di, ax
jne 0x14001ffae
and byte [0x140125090], 0xfe
test r14b, r14b
je 0x14001ffc1
movzx r8d, di
movzx edx, bl
mov cl, 1
call fcn.140021b30
cmp byte [rbp + 0xf0], 0
mov r15, qword [rsp + 0x190]
mov r13, qword [rsp + 0x198]
mov r12, qword [rsp + 0x1d0]
je 0x140020005
cmp dword [0x140125094], 2
mov rax, qword [0x14011c188]
jne 0x14001fffa
mov ecx, dword [rax + 0x9c]
jmp 0x140020000
mov ecx, dword [rax + 0x98]
call fcn.140021920
add rsp, 0x1a0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret