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

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push r12
push r15
lea rbp, [rsp - 0xa8]
sub rsp, 0x1a8
mov r10d, dword [0x1401052e0]
movzx ebx, dl
mov rdx, qword [0x140101da0]
movzx r11d, r9b
movzx r15d, r8w
cmp r10d, 1
jne 0x1400080b8
cmp byte [0x140105328], 0
jne 0x1400080b8
movzx eax, bl
imul r9, rax, 0x128
cmp qword [r9 + rdx], 0
jne 0x1400080b8
xor r12b, r12b
jmp 0x1400080bb
mov r12b, 1
mov byte [rbp + 0xe8], r12b
test r11b, r11b
je 0x1400080f2
movzx eax, bl
mov r8d, 1
imul rcx, rax, 0x128
movzx eax, r12b
cmp byte [rcx + rdx + 8], 0
cmovne eax, r8d
add rsp, 0x1a8
pop r15
pop r12
pop rbx
pop rbp
ret
cmp qword [0x140101de0], 0
movzx eax, byte [rbp + 0xf0]
mov qword [rsp + 0x1d8], rsi
mov qword [rsp + 0x190], r14
je 0x140008121
test al, al
jne 0x140008121
test r12b, r12b
je 0x140008121
mov r14b, 1
jmp 0x140008124
xor r14b, r14b
movzx r8d, byte [0x140101c6a]
xor esi, esi
cmp r10d, 1
jne 0x14000823a
cmp byte [0x140105326], sil
je 0x140008149
test al, al
jne 0x14000823a
mov r9b, 1
mov byte [rsp + 0x41], r9b
cmp bl, 0xe7
je 0x14000819d
mov rax, qword [0x1401052e8]
mov r9, qword [0x1401052f0]
movzx ecx, bl
movzx edx, byte [rcx + rax]
test dl, dl
jne 0x14000817c
movzx eax, r15w
movzx edx, byte [rax + r9]
test dl, dl
je 0x14000819a
movzx ecx, dl
shr dl, 2
and dl, 1
shr cl, 1
and cl, 1
je 0x1400081d5
test dl, dl
jne 0x1400081df
test r8b, 0x30
jne 0x1400081df
test dl, dl
jne 0x1400081d9
mov r9b, 1
mov qword [rsp + 0x198], r13
movzx r13d, bl
lea eax, [r13 - 0x21]
cmp eax, 0x84
ja case.0x1400081d3.41
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x8cf8]
mov ecx, dword [rdx + rax*4 + 0x8cec]
add rcx, rdx
jmp rcx
test dl, dl
je 0x1400081df
test r8b, 0x30
jne 0x14000819a
movzx eax, r15w
mov r10d, 4
mov dword [0x1401052e0], r10d
cmp byte [rax + r9], sil
mov byte [0x140105300], bl
setne byte [0x140105306]
mov word [0x140105302], r15w
mov word [0x140105304], si
test cl, cl
je 0x140008221
mov byte [0x140105307], 1
test r8b, 0x30
jne 0x140008228
mov byte [0x140105307], sil
test r14b, r14b
jne 0x14000819a
movzx eax, r12b
jmp 0x140008bb3
xor r9b, r9b
mov byte [rsp + 0x41], r9b
jmp 0x14000819d
mov al, 1
jmp 0x140008bab
test r14b, r14b
je case.0x1400081d3.41
mov edx, dword [0x1401010a0]
test edx, edx
je 0x140008274
mov edx, esi
mov word [0x1401010b0], si
mov dword [0x1401010a0], edx
jmp 0x140008274
mov edx, dword [0x1401010a0]
test r8b, r8b
je 0x1400082a2
cmp r10d, 1
jne 0x140008288
cmp byte [0x140105327], sil
jne 0x1400082a2
lea eax, [r8 - 0x10]
test al, 0xef
je 0x1400082a2
test r8b, 0xc
setne cl
test r8b, 3
setne al
test al, cl
je 0x140008306
cmp bl, 8
jne 0x14000830f
test r8b, r8b
jne 0x14000830f
test r9b, r9b
je 0x1400082e0
cmp r10d, 1
jne 0x1400082e0
cmp byte [0x140105324], sil
je 0x1400082e0
mov eax, dword [0x140105338]
test eax, eax
je 0x1400082e0
dec eax
mov dword [0x140105338], eax
movsxd rcx, eax
mov rax, qword [0x140105330]
mov word [rax + rcx*2], si
test r14b, r14b
je 0x1400082ff
test edx, edx
je 0x1400082ff
dec edx
lea rcx, [0x1401010b0]
movsxd rax, edx
mov dword [0x1401010a0], edx
mov word [rcx + rax*2], si
mov byte [0x140106bb6], sil
movzx eax, r12b
jmp 0x140008bab
mov qword [rsp + 0x1a0], rdi
lea rax, [rbp - 0x70]
lea rcx, [0x140101c70]
mov edx, 2
nop word [rax + rax]
lea rax, [rax + 0x80]
movups xmm0, xmmword [rcx]
movups xmm1, xmmword [rcx + 0x10]
lea rcx, [rcx + 0x80]
movups xmmword [rax - 0x80], xmm0
movups xmm0, xmmword [rcx - 0x60]
movups xmmword [rax - 0x70], xmm1
movups xmm1, xmmword [rcx - 0x50]
movups xmmword [rax - 0x60], xmm0
movups xmm0, xmmword [rcx - 0x40]
movups xmmword [rax - 0x50], xmm1
movups xmm1, xmmword [rcx - 0x30]
movups xmmword [rax - 0x40], xmm0
movups xmm0, xmmword [rcx - 0x20]
movups xmmword [rax - 0x30], xmm1
movups xmm1, xmmword [rcx - 0x10]
movups xmmword [rax - 0x20], xmm0
movups xmmword [rax - 0x10], xmm1
sub rdx, 1
jne 0x140008330
movzx edx, r8b
lea rcx, [rbp - 0x70]
call fcn.140013bd0
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x1400083a5
or byte [rbp - 0x5c], 1
jmp 0x1400083a9
and byte [rbp - 0x5c], 0xfe
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rdi, rax
test rax, rax
je 0x1400083c4
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x1400083c6
mov eax, esi
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov qword [rsp + 0x68], rax
mov r8, rax
cmp bl, 0xe7
jne 0x1400083ef
mov eax, 1
movzx ecx, r15w
mov dword [rsp + 0x44], eax
mov word [rsp + 0x48], cx
jmp 0x14000843d
mov eax, esi
mov qword [rsp + 0x30], r8
cmp dword [0x140100af4], eax
lea r9, [rsp + 0x48]
lea r8, [rbp - 0x70]
mov ecx, r13d
setne al
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0xd0]
mov dword [rsp + 0x20], 2
mov edx, dword [rax + 4]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [rsp + 0x44], eax
test eax, eax
je 0x1400084cb
movzx ecx, word [rsp + 0x48]
mov r8, qword [rsp + 0x68]
cmp byte [0x140106bb6], sil
je 0x140008455
cmp bl, 9
je 0x140008455
mov byte [rsp + 0x40], 1
cmp bl, 0x1b
jne 0x14000845a
mov byte [rsp + 0x40], sil
test eax, eax
jns 0x1400084d4
test r12b, r12b
je 0x1400084cb
movzx eax, byte [0x140101c6a]
lea r9, [rsp + 0x48]
test al, 0x30
mov qword [rsp + 0x30], r8
lea r8, [rbp - 0x70]
mov byte [0x140106bb6], bl
setne byte [0x140106bb1]
mov word [0x140106bb4], r15w
test al, 0xc
mov ecx, r13d
setne dl
test al, 3
setne al
test al, dl
mov rax, qword [rbp + 0xd0]
setne byte [0x140106bb0]
cmp dword [0x140100af4], esi
mov edx, dword [rax + 4]
setne sil
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movzx eax, r12b
jmp 0x140008ba3
test byte [0x140101c6a], 3
jne 0x1400084fc
mov eax, 0xa
cmp cx, 0xd
jne 0x1400084ef
mov ecx, eax
mov word [rsp + 0x48], ax
cmp word [rsp + 0x4a], 0xd
jne 0x1400084fc
mov word [rsp + 0x4a], ax
test r14b, r14b
je 0x140008734
cmp rdi, qword [0x140101098]
lea r12, [0x1401010b0]
je 0x140008527
mov qword [0x140101098], rdi
mov edx, esi
mov word [0x1401010b0], si
jmp 0x14000856e
mov edx, dword [0x1401010a0]
mov eax, 0x5a
sub eax, edx
cmp eax, 3
jge 0x14000856e
lea rdx, [0x14010110a]
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], si
jne 0x140008544
mov dword [0x1401010a0], eax
mov rcx, r12
inc eax
movsxd r8, eax
add r8, r8
call fcn.1400a5660
movzx ecx, word [rsp + 0x48]
mov edx, dword [0x1401010a0]
mov edi, dword [rsp + 0x44]
movsxd rax, edx
inc edx
mov dword [0x1401010a0], edx
mov word [r12 + rax*2], cx
cmp edi, 1
jle 0x14000859c
movzx eax, word [rsp + 0x4a]
movsxd rcx, edx
inc edx
mov dword [0x1401010a0], edx
mov word [r12 + rcx*2], ax
movsxd rax, edx
mov word [r12 + rax*2], si
test edx, edx
je 0x140008738
cmp dword [0x140101de8], esi
mov r13d, esi
mov dword [rsp + 0x50], esi
jbe 0x140008738
nop
mov rax, qword [0x140101de0]
mov ecx, r13d
mov r15, qword [rax + rcx*8]
mov qword [rsp + 0x78], r15
cmp byte [r15 + 0x2e], sil
jne 0x14000871f
movzx eax, byte [r15 + 0x2d]
cmp byte [r15 + 0x36], sil
je 0x14000861d
cmp edx, eax
jle 0x14000871f
lea eax, [rdx - 1]
movsxd rcx, eax
movzx edx, word [r12 + rcx*2]
lea rcx, str._____:____.___n__t
call fcn.1400a5a98
test rax, rax
je 0x140008719
movsxd rdx, dword [0x1401010a0]
lea r14, [rdx - 2]
jmp 0x14000862b
cmp edx, eax
jl 0x14000871f
movsxd r14, edx
dec r14
lea r14, [r12 + r14*2]
movzx eax, byte [r15 + 0x2d]
mov rcx, qword [r15 + 8]
lea rbx, [rax - 1]
lea rbx, [rcx + rbx*2]
cmp byte [r15 + 0x31], sil
je 0x140008668
cmp rbx, rcx
jb 0x14000869f
nop dword [rax + rax]
movzx eax, word [rbx]
cmp word [r14], ax
jne 0x14000869f
sub r14, 2
sub rbx, 2
cmp rbx, rcx
jae 0x140008650
jmp 0x14000869f
cmp rbx, rcx
jb 0x14000869f
nop dword [rax]
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, word [r14]
mov rdi, rax
call qword [sym.imp.USER32.dll_CharLowerW]
cmp ax, di
jne 0x140008699
sub r14, 2
sub rbx, 2
cmp rbx, qword [r15 + 8]
jae 0x140008670
mov edx, dword [0x1401010a0]
cmp rbx, qword [r15 + 8]
jae 0x14000871f
cmp byte [r15 + 0x37], sil
jne 0x1400086f2
cmp r14, r12
jb 0x1400086f2
movzx ecx, word [r14]
mov word [rsp + 0x58], cx
call qword [sym.imp.USER32.dll_IsCharAlphaNumericW]
test eax, eax
jne 0x140008719
mov r9d, 1
lea rax, [rsp + 0x60]
lea r8, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov ecx, 0x400
lea edx, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_GetStringTypeExW]
test eax, eax
je 0x1400086f2
test byte [rsp + 0x60], 1
jne 0x140008719
mov rax, qword [r15]
test rax, rax
je 0x140008700
mov rdx, qword [rax + 8]
jmp 0x140008707
lea rdx, [0x1400cbf2c]
mov rcx, qword [r15 + 0x18]
call fcn.14000b1a0
test rax, rax
jne 0x14000882e
mov edx, dword [0x1401010a0]
inc r13d
cmp r13d, dword [0x140101de8]
mov dword [rsp + 0x50], r13d
jb 0x1400085c0
mov edi, dword [rsp + 0x44]
xor r14b, r14b
cmp byte [rsp + 0x40], 0
movzx eax, byte [rbp + 0xe8]
je 0x1400087cd
movzx ebx, byte [0x140106bb6]
mov byte [0x140106bb6], 0
test al, al
je 0x1400087cd
xor edx, edx
lea rcx, [rbp - 0x70]
mov r8d, 0x100
call fcn.1400a64b0
movzx eax, byte [0x140106bb1]
neg al
movzx eax, byte [0x140106bb0]
sbb dl, dl
and dl, 0x20
neg al
sbb cl, cl
and cl, 9
or dl, cl
lea rcx, [rbp - 0x70]
call fcn.140013bd0
mov rax, qword [rsp + 0x68]
lea r9, [rsp + 0x50]
movzx edx, word [0x140106bb4]
lea r8, [rbp - 0x70]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], esi
movzx ecx, bl
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movzx eax, byte [rbp + 0xe8]
cmp byte [rsp + 0x41], 0
je 0x140008ba3
cmp dword [0x1401052e0], 1
jne 0x140008ba3
test r14b, r14b
jne 0x140008ba3
movsxd r13, edi
mov r12d, esi
mov r14, rsi
test edi, edi
jle 0x140008b25
nop
cmp byte [0x140105325], 0
lea r15, [rsp + 0x48]
lea r15, [r15 + r14*2]
je 0x140008a91
movzx edx, word [r15]
mov rcx, qword [0x1401052f8]
call fcn.1400a5a98
mov rbx, rax
jmp 0x140008ad0
mov rax, qword [rbp + 0xd0]
mov rdx, qword [rbp + 0xf8]
add rdx, 4
mov r8, qword [rax + 0x10]
movabs rax, 0xffffffff003c2c17
add rax, r8
cmp rax, 0x66
ja 0x140008885
movzx ecx, byte [r15 + 0x2c]
mov eax, 0xffc3d44d
sub eax, r8d
cmp eax, ecx
jg 0x140008885
mov edi, dword [rsp + 0x44]
xor r14b, r14b
test rdx, rdx
je 0x14000873b
mov eax, 0x69
mov word [rdx], ax
jmp 0x14000873b
cmp byte [r15 + 0x32], sil
jne 0x140008896
mov edx, dword [0x1401010a0]
jmp 0x1400089cf
cmp byte [r15 + 0x36], sil
mov r14, rsi
movsxd rdx, dword [0x1401010a0]
movzx eax, byte [r15 + 0x2d]
lea rcx, [r12 + rdx*2]
mov r12d, esi
lea r8, [rcx - 2]
cmove r8, rcx
add rax, rax
xor r13b, r13b
mov qword [rbp - 0x80], r8
xor dil, dil
mov rbx, r8
sub rbx, rax
inc rax
shr rax, 1
cmp rbx, r8
cmova rax, rsi
test rax, rax
je 0x1400089c3
mov rsi, rax
mov r15d, 1
nop word [rax + rax]
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x14000890a
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharUpperW]
test eax, eax
je 0x140008929
test r13b, r13b
jne 0x140008926
movzx ecx, word [rbx]
movzx r13d, r15b
call qword [sym.imp.USER32.dll_IsCharUpperW]
test eax, eax
movzx edi, dil
cmovne edi, r15d
inc r12d
add rbx, 2
inc r14
cmp r14, rsi
jb 0x1400088f0
mov r15, qword [rsp + 0x78]
mov esi, 0
test r12d, r12d
je 0x1400089bd
cmp r12d, 1
jne 0x140008966
mov edx, dword [0x1401010a0]
lea r12, [0x1401010b0]
mov r13d, dword [rsp + 0x50]
neg dil
sbb edi, edi
and edi, 2
jmp 0x1400089d1
test dil, dil
je 0x1400089bd
mov r14, qword [rbp - 0x80]
mov edi, 2
movzx eax, byte [r15 + 0x2d]
mov rbx, r14
add rax, rax
sub rbx, rax
cmp rbx, r14
jae 0x14000899f
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x14000899c
add rbx, rdi
cmp rbx, r14
jb 0x140008987
cmp rbx, r14
mov edx, dword [0x1401010a0]
lea r12, [0x1401010b0]
mov r13d, dword [rsp + 0x50]
mov r10d, 1
cmove edi, r10d
jmp 0x1400089d7
mov edx, dword [0x1401010a0]
mov r13d, dword [rsp + 0x50]
lea r12, [0x1401010b0]
mov edi, esi
mov r10d, 1
movzx r9d, byte [r15 + 0x33]
test r9b, r9b
jne 0x1400089e7
cmp byte [r15 + 0x34], r9b
je 0x1400089f4
xor al, al
mov r14b, 1
mov byte [rbp + 0xe8], al
jmp 0x1400089f7
xor r14b, r14b
mov rax, qword [rbp + 0x100]
movzx r8d, byte [r15 + 0x36]
mov ecx, r13d
mov qword [rax], rcx
test r8b, r8b
je 0x140008a1b
lea eax, [rdx - 1]
movsxd rcx, eax
movzx eax, word [r12 + rcx*2]
jmp 0x140008a1d
mov eax, esi
movzx eax, ax
movzx ecx, di
shl ecx, 0x10
or ecx, eax
mov rax, qword [rbp + 0x108]
movsxd rcx, ecx
mov qword [rax], rcx
mov rax, qword [r15 + 0x10]
cmp word [rax], 0
je 0x140008a5f
test r8b, r8b
je 0x140008a5b
lea eax, [rdx - 1]
mov edx, r10d
movsxd rcx, eax
movzx eax, word [r12 + rcx*2]
mov word [0x1401010b0], ax
jmp 0x140008a72
mov edx, esi
jmp 0x140008a72
test r9b, r9b
je 0x140008a72
movzx eax, byte [r15 + 0x2d]
sub edx, eax
test r8b, r8b
je 0x140008a72
dec edx
cmp byte [r15 + 0x38], 0
mov edi, dword [rsp + 0x44]
cmovne edx, esi
movsxd rax, edx
mov dword [0x1401010a0], edx
mov word [r12 + rax*2], si
jmp 0x14000873b
movzx ecx, word [r15]
mov rbx, qword [0x1401052f8]
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, word [rbx]
movzx edi, ax
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, ax
cmp ecx, edi
je 0x140008ad0
cmp word [rbx], 0
je 0x140008ad9
movzx ecx, word [rbx + 2]
add rbx, 2
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, ax
cmp ecx, edi
jne 0x140008ab5
test rbx, rbx
jne 0x140008bd1
movsxd rax, dword [0x140105338]
cmp eax, dword [0x14010533c]
je 0x140008b25
movzx ecx, word [r15]
mov rdx, rax
mov rax, qword [0x140105330]
inc r12d
inc r14
mov word [rax + rdx*2], cx
mov eax, dword [0x140105338]
inc eax
mov dword [0x140105338], eax
movsxd rcx, eax
mov rax, qword [0x140105330]
mov word [rax + rcx*2], si
cmp r14, r13
jl 0x140008800
cmp byte [0x140105329], 0
je 0x140008c31
cmp byte [0x140105325], 0
je 0x140008bec
cmp dword [0x140105310], 0
jbe 0x140008b7c
nop dword [rax + rax]
mov rax, qword [0x140105308]
mov ecx, esi
mov rdx, qword [rax + rcx*8]
mov rcx, qword [0x140105330]
call fcn.1400a5b2c
test rax, rax
jne 0x140008cdd
inc esi
cmp esi, dword [0x140105310]
jb 0x140008b50
mov ecx, dword [0x1401052e0]
mov edx, 5
mov eax, dword [0x14010533c]
cmp dword [0x140105338], eax
cmovge ecx, edx
mov dword [0x1401052e0], ecx
movzx eax, byte [rbp + 0xe8]
mov rdi, qword [rsp + 0x1a0]
mov r13, qword [rsp + 0x198]
mov rsi, qword [rsp + 0x1d8]
mov r14, qword [rsp + 0x190]
add rsp, 0x1a8
pop r15
pop r12
pop rbx
pop rbp
ret
movsxd rax, r12d
mov dword [0x1401052e0], 4
movzx ecx, word [rsp + rax*2 + 0x48]
mov word [0x140105304], cx
jmp 0x140008b9c
cmp dword [0x140105310], 0
jbe 0x140008b7c
nop word [rax + rax]
mov rdx, qword [0x140105308]
mov rcx, qword [0x140105330]
mov eax, esi
mov rdx, qword [rdx + rax*8]
call fcn.140087d30
test rax, rax
jne 0x140008cdd
inc esi
cmp esi, dword [0x140105310]
jb 0x140008c00
jmp 0x140008b7c
cmp byte [0x140105325], 0
je 0x140008c98
mov r10d, dword [0x140105310]
test r10d, r10d
je 0x140008b7c
mov r9, qword [0x140105308]
mov r11, qword [0x140105330]
nop dword [rax + rax]
mov r8, qword [r9]
mov rax, r11
sub r8, r11
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140008c84
add rax, 2
test ecx, ecx
jne 0x140008c70
test edx, edx
je 0x140008cdd
inc esi
add r9, 8
cmp esi, r10d
jb 0x140008c60
jmp 0x140008b7c
cmp dword [0x140105310], 0
jbe 0x140008b7c
nop word [rax + rax]
mov rdx, qword [0x140105308]
mov rcx, qword [0x140105330]
mov eax, esi
mov rdx, qword [rdx + rax*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140008cdd
inc esi
cmp esi, dword [0x140105310]
jb 0x140008cb0
jmp 0x140008b7c
mov dword [0x1401052e0], 3
jmp 0x140008b9c