Function at 0x140010ec0
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 0x1400114f5
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 [0x1400ffda0]
sete r14b
cmp dword [0x140101d4c], 0
je 0x140010f31
test r14b, r14b
jne 0x140010f31
mov r12b, 1
jmp 0x140010f34
xor r12b, r12b
cmp dword [0x140101d4c], 1
mov byte [rsp + 0x30], r12b
je 0x140010f47
test r14b, r14b
je 0x140010f4e
mov byte [rbp + 0xc0], 0
test bl, bl
jne 0x140010f5f
movzx ecx, di
call fcn.140014d20
movzx ebx, al
jmp 0x140010f71
test di, di
jne 0x140010f71
xor edx, edx
movzx ecx, bl
call fcn.140014a40
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 [0x140101d4c], 2
mov dword [rsp + 0x48], ecx
jne case.default.0x140010fb0
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x140010fb0
cdqe
mov ecx, dword [rdx + rax*4 + 0x11504]
add rcx, rdx
jmp rcx
mov bl, reloc.OLEAUT32.dll_SafeArrayGetElemsize
jmp case.default.0x140010fb0
mov bl, reloc.OLEAUT32.dll_SafeArrayGetDim
jmp case.default.0x140010fb0
mov bl, reloc.OLEAUT32.dll_SafeArrayGetUBound
test r15, r15
je 0x1400110eb
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140013c20
test al, al
je 0x14001107a
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_GetKeyboardState]
test esi, esi
jne 0x140010ff4
movzx eax, bl
or byte [rsp + rax + 0x60], 0x80
jmp 0x140011001
cmp esi, 1
jne 0x140011001
movzx eax, bl
and byte [rsp + rax + 0x60], 0x7f
movzx eax, bl
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x140011021
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x1151c]
add rcx, rdx
jmp rcx
test byte [rbp + 2], 0x80
jne 0x140011036
test byte [rbp + 3], 0x80
jne 0x140011036
and byte [rsp + 0x71], 0x7f
jmp case.default.0x140011021
or byte [rsp + 0x71], 0x80
jmp case.default.0x140011021
test byte [rbp], 0x80
jne 0x140011050
test byte [rbp + 1], 0x80
jne 0x140011050
and byte [rsp + 0x70], 0x7f
jmp case.default.0x140011021
or byte [rsp + 0x70], 0x80
jmp case.default.0x140011021
test byte [rbp + 4], 0x80
jne 0x14001106a
test byte [rbp + 5], 0x80
jne 0x14001106a
and byte [rsp + 0x72], 0x7f
jmp case.default.0x140011021
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 0x1400110a1
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 0x1400110c3
cmp esi, 2
jne 0x1400110c3
mov rax, qword [0x1400faa58]
mov ecx, dword [rax + 0x84]
call fcn.140012d70
jmp 0x1400110cb
test esi, esi
je 0x1400114b4
mov r9d, 0xc0000001
movzx r8d, bl
or r9, rdi
mov edx, 0x101
mov rcx, r15
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1400114b4
cmp byte [0x1400feec7], r13b
mov dword [0x1401041b0], esi
mov byte [0x140101d58], bl
je 0x14001111f
cmp bl, 0x12
je 0x14001110c
lea eax, [rbx + 0x5c]
cmp al, 1
ja 0x14001111f
test r14b, r14b
jne 0x14001111f
xor ecx, ecx
mov byte [rsp + 0x34], 1
call fcn.140035220
jmp 0x140011124
mov byte [rsp + 0x34], r13b
test r14b, r14b
lea rax, [0x1401041b4]
lea r15, [rsp + 0x4c]
cmove r15, rax
cmp bl, 0xa5
jne 0x1400111ee
test r12b, r12b
jne 0x1400111ee
cmp qword [0x1400feed8], r13
je 0x1400111ee
mov al, 1
mov byte [rsp + 0x33], al
mov byte [rbp + 0xa8], al
test r14b, r14b
jne 0x140011175
mov rax, qword [0x1401041b8]
mov qword [rsp + 0x40], rax
jmp 0x1400111ad
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x14001118d
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x140011190
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.140014030
mov dword [r15], eax
cmp dword [r15], r13d
je 0x1400111c1
mov byte [rbp + 0xa8], r13b
mov r10b, 1
jmp 0x140011242
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 [0x1400ffc6c], eax
jmp 0x140011257
xor r10b, r10b
mov byte [rsp + 0x33], r10b
mov byte [rbp + 0xa8], r10b
test r12b, r12b
je 0x140011238
xor r8d, r8d
movzx edx, di
movzx ecx, bl
call fcn.140013c20
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 0x14001125d
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 0x140011282
mov eax, dword [0x140101d4c]
cmp eax, 2
je 0x140011282
cmp qword [0x1400feed8], r13
je 0x14001127b
cmp eax, 1
jne 0x140011282
mov byte [rsp + 0x31], 1
jmp 0x140011287
mov byte [rsp + 0x31], r13b
mov r14d, 0x8000
cmp esi, 1
je 0x140011382
cmp byte [rsp + 0x30], r13b
je 0x1400112d9
mov eax, dword [rsp + 0x38]
movzx r8d, di
mov r9d, dword [rsp + 0x48]
movzx edx, bl
mov dword [rsp + 0x20], eax
call fcn.1400127e0
mov r14, qword [rsp + 0x40]
cmp byte [rsp + 0x31], r13b
je 0x140011387
movzx r8d, di
movzx edx, bl
xor ecx, ecx
call fcn.140012f80
jmp 0x140011387
test r10b, r10b
je 0x1400112f3
mov eax, dword [0x1400ffc68]
cmp dword [r15], 3
cmove eax, dword [rsp + 0x38]
mov dword [0x1400ffc68], 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 [0x1400ffc68], r13d
cmp byte [rbp + 0xa8], r13b
je 0x1400112b6
cmp dword [0x1400ffc6c], r13d
mov byte [rbp + 0xa8], r13b
je 0x14001134b
mov r14, qword [rsp + 0x40]
mov edx, 4
mov rcx, r14
mov dword [0x1400ffc6c], r13d
call fcn.140014030
mov dword [r15], eax
jmp 0x1400112bb
test r12b, r12b
jne 0x1400112b6
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.140014030
mov dword [r15], eax
jmp 0x1400112bb
mov r14, qword [rsp + 0x40]
cmp byte [rbp + 0xc0], r13b
je 0x1400113be
cmp esi, 2
jne 0x1400113be
cmp dword [0x140101d4c], esi
mov rax, qword [0x1400faa58]
jne 0x1400113b1
mov ecx, dword [rax + 0x88]
call fcn.140012d70
jmp 0x1400113c6
mov ecx, dword [rax + 0x84]
call fcn.140012d70
jmp 0x1400113c6
test esi, esi
je 0x1400114a6
mov ecx, dword [rsp + 0x48]
or ecx, 2
cmp byte [rsp + 0x30], r13b
je 0x1400113f5
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.1400127e0
jmp 0x14001147a
cmp byte [rsp + 0x33], r13b
je 0x140011411
mov eax, dword [0x1400ffc64]
cmp dword [r15], 3
cmove eax, dword [rsp + 0x38]
mov dword [0x1400ffc64], 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 [0x1400ffc64], r13d
cmp byte [rbp + 0xa8], r13b
je 0x14001147a
cmp dword [0x1400ffc6c], r13d
je 0x14001144d
mov dword [0x1400ffc6c], r13d
mov edx, 4
jmp 0x14001146f
test r12b, r12b
je 0x14001147a
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.140014030
mov dword [r15], eax
cmp dword [r15], 0
je 0x140011491
mov eax, 0x138
cmp di, ax
jne 0x140011491
and byte [0x140104196], 0xfe
cmp byte [rsp + 0x31], 0
je 0x1400114a6
movzx r8d, di
movzx edx, bl
mov cl, 1
call fcn.140012f80
cmp byte [rsp + 0x34], 0
je 0x1400114b4
mov cl, 1
call fcn.140035220
cmp byte [rbp + 0xc0], 0
mov r14, qword [rsp + 0x160]
mov r13, qword [rsp + 0x168]
mov r12, qword [rsp + 0x1a0]
je 0x1400114f5
cmp dword [0x140101d4c], 2
mov rax, qword [0x1400faa58]
jne 0x1400114ed
mov ecx, dword [rax + 0x80]
jmp 0x1400114f0
mov ecx, dword [rax + 0x7c]
call fcn.140012d70
add rsp, 0x170
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret