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

Disassembly:
mov r11, rsp
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
movzx ebx, dl
mov r15, r9
movzx eax, bx
movzx edi, r8w
or ax, r8w
mov esi, ecx
je 0x140011585
mov eax, dword [rbp + 0xc8]
mov ecx, 0xffc3d44d
mov qword [r11 + 8], r12
test eax, eax
mov qword [r11 - 0x30], r13
cmovne ecx, eax
mov qword [r11 - 0x38], r14
mov dword [rsp + 0x38], ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x140101c6c]
sete r14b
cmp dword [0x140103d44], 0
je 0x140010fc1
test r14b, r14b
jne 0x140010fc1
mov r12b, 1
jmp 0x140010fc4
xor r12b, r12b
cmp dword [0x140103d44], 1
mov byte [rsp + 0x30], r12b
je 0x140010fd7
test r14b, r14b
je 0x140010fde
mov byte [rbp + 0xc0], 0
test bl, bl
jne 0x140010fef
movzx ecx, di
call fcn.140014e30
movzx ebx, al
jmp 0x140011001
test di, di
jne 0x140011001
xor edx, edx
movzx ecx, bl
call fcn.140014ad0
movzx edi, ax
xor r13d, r13d
lea rdx, [0x140000000]
mov ecx, r13d
movzx eax, di
shr ax, 8
test al, al
setne cl
cmp dword [0x140103d44], 2
mov dword [rsp + 0x48], ecx
jne case.default.0x140011040
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x140011040
cdqe
mov ecx, dword [rdx + rax*4 + 0x11594]
add rcx, rdx
jmp rcx
mov bl, reloc.OLEAUT32.dll_SafeArrayGetElemsize
jmp case.default.0x140011040
mov bl, reloc.OLEAUT32.dll_SafeArrayGetDim
jmp case.default.0x140011040
mov bl, reloc.OLEAUT32.dll_SafeArrayGetUBound
test r15, r15
je 0x14001117b
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140013cb0
test al, al
je 0x14001110a
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_GetKeyboardState]
test esi, esi
jne 0x140011084
movzx eax, bl
or byte [rsp + rax + 0x60], 0x80
jmp 0x140011091
cmp esi, 1
jne 0x140011091
movzx eax, bl
and byte [rsp + rax + 0x60], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x1400110b1
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x115ac]
add rcx, rdx
jmp rcx
test byte [rbp + 2], 0x80
jne 0x1400110c6
test byte [rbp + 3], 0x80
jne 0x1400110c6
and byte [rsp + 0x71], 0x7f
jmp case.default.0x1400110b1
or byte [rsp + 0x71], 0x80
jmp case.default.0x1400110b1
test byte [rbp], 0x80
jne 0x1400110e0
test byte [rbp + 1], 0x80
jne 0x1400110e0
and byte [rsp + 0x70], 0x7f
jmp case.default.0x1400110b1
or byte [rsp + 0x70], 0x80
jmp case.default.0x1400110b1
test byte [rbp + 4], 0x80
jne 0x1400110fa
test byte [rbp + 5], 0x80
jne 0x1400110fa
and byte [rsp + 0x72], 0x7f
jmp case.default.0x1400110b1
or byte [rsp + 0x72], 0x80
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_SetKeyboardState]
movzx eax, di
shl eax, 0x10
movsxd rdi, eax
cmp esi, 1
je 0x140011131
mov r9, rdi
movzx r8d, bl
or r9, 1
mov edx, 0x100
mov rcx, r15
call qword [sym.imp.USER32.dll_PostMessageW]
cmp byte [rbp + 0xc0], r13b
je 0x140011153
cmp esi, 2
jne 0x140011153
mov rax, qword [0x1400fca58]
mov ecx, dword [rax + 0x84]
call fcn.140012e00
jmp 0x14001115b
test esi, esi
je 0x140011544
mov r9d, 0xc0000001
movzx r8d, bl
or r9, rdi
mov edx, 0x101
mov rcx, r15
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x140011544
cmp byte [0x140100eb7], r13b
mov dword [0x1401061a0], esi
mov byte [0x140103d3b], bl
je 0x1400111af
cmp bl, 0x12
je 0x14001119c
lea eax, [rbx + 0x5c]
cmp al, 1
ja 0x1400111af
test r14b, r14b
jne 0x1400111af
xor ecx, ecx
mov byte [rsp + 0x34], 1
call fcn.1400353f0
jmp 0x1400111b4
mov byte [rsp + 0x34], r13b
test r14b, r14b
lea rax, [0x1401061a4]
lea r15, [rsp + 0x4c]
cmove r15, rax
cmp bl, 0xa5
jne 0x14001127e
test r12b, r12b
jne 0x14001127e
cmp qword [0x140100ec8], r13
je 0x14001127e
mov al, 1
mov byte [rsp + 0x33], al
mov byte [rbp + 0xa8], al
test r14b, r14b
jne 0x140011205
mov rax, qword [0x1401061a8]
mov qword [rsp + 0x40], rax
jmp 0x14001123d
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x14001121d
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x140011220
mov eax, r13d
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov rcx, rax
mov qword [rsp + 0x40], rax
xor edx, edx
mov r12, rax
call fcn.1400140c0
mov dword [r15], eax
cmp dword [r15], r13d
je 0x140011251
mov byte [rbp + 0xa8], r13b
mov r10b, 1
jmp 0x1400112d2
mov ecx, 0xa2
mov byte [rbp + 0xb0], 0xa2
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx r12d, ax
mov r10b, 1
mov eax, dword [rsp + 0x38]
shr r12d, 0xf
and r12b, 1
mov dword [0x140101c64], eax
jmp 0x1400112e7
xor r10b, r10b
mov byte [rsp + 0x33], r10b
mov byte [rbp + 0xa8], r10b
test r12b, r12b
je 0x1400112c8
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140013cb0
movzx r12d, byte [rbp + 0xa8]
movzx ecx, al
mov byte [rsp + 0x32], al
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rax
movzx eax, byte [rbp + 0xa8]
mov byte [rbp + 0xb0], al
jmp 0x1400112ed
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rax
movzx eax, byte [rbp + 0xa8]
movzx r12d, byte [rbp + 0xa8]
mov byte [rbp + 0xb0], al
xor cl, cl
mov byte [rsp + 0x32], cl
test r14b, r14b
jne 0x140011312
mov eax, dword [0x140103d44]
cmp eax, 2
je 0x140011312
cmp qword [0x140100ec8], r13
je 0x14001130b
cmp eax, 1
jne 0x140011312
mov byte [rsp + 0x31], 1
jmp 0x140011317
mov byte [rsp + 0x31], r13b
mov r14d, 0x8000
cmp esi, 1
je 0x140011412
cmp byte [rsp + 0x30], r13b
je 0x140011369
mov eax, dword [rsp + 0x38]
movzx r8d, di
mov r9d, dword [rsp + 0x48]
movzx edx, bl
mov dword [rsp + 0x20], eax
call fcn.140012870
mov r14, qword [rsp + 0x40]
cmp byte [rsp + 0x31], r13b
je 0x140011417
movzx r8d, di
movzx edx, bl
xor ecx, ecx
call fcn.140013010
jmp 0x140011417
test r10b, r10b
je 0x140011383
mov eax, dword [0x140101c60]
cmp dword [r15], 3
cmove eax, dword [rsp + 0x38]
mov dword [0x140101c60], eax
mov r9d, dword [rsp + 0x38]
movzx edx, dil
mov r8d, dword [rsp + 0x48]
movzx ecx, bl
call qword [sym.imp.USER32.dll_keybd_event]
mov dword [0x140101c60], r13d
cmp byte [rbp + 0xa8], r13b
je 0x140011346
cmp dword [0x140101c64], r13d
mov byte [rbp + 0xa8], r13b
je 0x1400113db
mov r14, qword [rsp + 0x40]
mov edx, 4
mov rcx, r14
mov dword [0x140101c64], r13d
call fcn.1400140c0
mov dword [r15], eax
jmp 0x14001134b
test r12b, r12b
jne 0x140011346
movzx ecx, byte [rbp + 0xb0]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
and ax, r14w
mov r14, qword [rsp + 0x40]
neg ax
mov rcx, r14
sbb edx, edx
add edx, 4
call fcn.1400140c0
mov dword [r15], eax
jmp 0x14001134b
mov r14, qword [rsp + 0x40]
cmp byte [rbp + 0xc0], r13b
je 0x14001144e
cmp esi, 2
jne 0x14001144e
cmp dword [0x140103d44], esi
mov rax, qword [0x1400fca58]
jne 0x140011441
mov ecx, dword [rax + 0x88]
call fcn.140012e00
jmp 0x140011456
mov ecx, dword [rax + 0x84]
call fcn.140012e00
jmp 0x140011456
test esi, esi
je 0x140011536
mov ecx, dword [rsp + 0x48]
or ecx, 2
cmp byte [rsp + 0x30], r13b
je 0x140011485
mov eax, dword [rsp + 0x38]
mov r9d, ecx
movzx ecx, byte [rsp + 0x32]
movzx r8d, di
movzx edx, bl
mov dword [rsp + 0x20], eax
call fcn.140012870
jmp 0x14001150a
cmp byte [rsp + 0x33], r13b
je 0x1400114a1
mov eax, dword [0x140101c5c]
cmp dword [r15], 3
cmove eax, dword [rsp + 0x38]
mov dword [0x140101c5c], eax
mov r9d, dword [rsp + 0x38]
mov r8d, ecx
movzx ecx, bl
movzx edx, dil
call qword [sym.imp.USER32.dll_keybd_event]
mov dword [0x140101c5c], r13d
cmp byte [rbp + 0xa8], r13b
je 0x14001150a
cmp dword [0x140101c64], r13d
je 0x1400114dd
mov dword [0x140101c64], r13d
mov edx, 4
jmp 0x1400114ff
test r12b, r12b
je 0x14001150a
movzx ecx, byte [rbp + 0xb0]
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
test cx, ax
setne r13b
lea edx, [r13 + 3]
mov rcx, r14
call fcn.1400140c0
mov dword [r15], eax
cmp dword [r15], 0
je 0x140011521
mov eax, 0x138
cmp di, ax
jne 0x140011521
and byte [0x140106186], 0xfe
cmp byte [rsp + 0x31], 0
je 0x140011536
movzx r8d, di
movzx edx, bl
mov cl, 1
call fcn.140013010
cmp byte [rsp + 0x34], 0
je 0x140011544
mov cl, 1
call fcn.1400353f0
cmp byte [rbp + 0xc0], 0
mov r14, qword [rsp + 0x160]
mov r13, qword [rsp + 0x168]
mov r12, qword [rsp + 0x1a0]
je 0x140011585
cmp dword [0x140103d44], 2
mov rax, qword [0x1400fca58]
jne 0x14001157d
mov ecx, dword [rax + 0x80]
jmp 0x140011580
mov ecx, dword [rax + 0x7c]
call fcn.140012e00
add rsp, 0x170
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret