Function at 0x140008c48
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 - 0x98]
sub rsp, 0x198
mov r10d, dword [0x14018e2f0]
movzx ebx, dl
mov rdx, qword [0x14018adb0]
movzx r11d, r9b
movzx r15d, r8w
cmp r10d, 1
jne 0x140008caf
cmp byte [0x14018e338], 0
jne 0x140008caf
movzx eax, bl
imul r9, rax, 0x128
cmp qword [r9 + rdx], 0
jne 0x140008caf
xor r12b, r12b
jmp 0x140008cb2
mov r12b, 1
mov byte [rbp + 0xd8], r12b
test r11b, r11b
je 0x140008ced
movzx eax, bl
mov r8d, 1
imul rcx, rax, 0x128
movzx eax, r12b
cmp byte [rcx + rdx + 8], 0
cmovne eax, r8d
add rsp, 0x198
pop r15
pop r12
pop rbx
pop rbp
ret
cmp qword [0x14018adf0], 0
movzx eax, byte [rbp + 0xe0]
mov qword [rsp + 0x1c8], rsi
mov qword [rsp + 0x180], r14
je 0x140008d2b
test al, al
jne 0x140008d2b
test r12b, r12b
je 0x140008d2b
mov sil, 1
jmp 0x140008d2e
xor sil, sil
movzx r8d, byte [0x14018ac73]
xor r14d, r14d
cmp r10d, 1
jne 0x140008e76
cmp byte [0x14018e336], r14b
je 0x140008d58
test al, al
jne 0x140008e76
mov r9b, 1
mov byte [rsp + 0x41], r9b
cmp bl, 0xe7
je 0x140008dc8
mov rax, qword [0x14018e2f8]
mov r9, qword [0x14018e300]
movzx ecx, bl
movzx edx, byte [rcx + rax]
test dl, dl
jne 0x140008d97
movzx eax, r15w
movzx edx, byte [rax + r9]
test dl, dl
je 0x140008dc5
movzx ecx, dl
shr dl, 2
and dl, 1
shr cl, 1
and cl, 1
je 0x140008e00
test dl, dl
jne 0x140008e12
test r8b, 0x30
jne 0x140008e12
test dl, dl
jne 0x140008e08
mov r9b, 1
mov qword [rsp + 0x188], r13
movzx r13d, bl
lea eax, [r13 - 0x21]
cmp eax, 0x84
ja case.0x140008dfe.41
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x9a9f]
mov ecx, dword [rdx + rax*4 + 0x9a93]
add rcx, rdx
jmp rcx
test dl, dl
je 0x140008e12
test r8b, 0x30
jne 0x140008dc5
movzx eax, r15w
mov r10d, 4
mov dword [0x14018e2f0], r10d
cmp byte [rax + r9], r14b
mov byte [0x14018e310], bl
setne byte [0x14018e316]
mov word [0x14018e312], r15w
mov word [0x14018e314], r14w
test cl, cl
je 0x140008e5d
mov byte [0x14018e317], 1
test r8b, 0x30
jne 0x140008e64
mov byte [0x14018e317], r14b
test sil, sil
jne 0x140008dc5
movzx eax, r12b
jmp 0x140009932
xor r9b, r9b
mov byte [rsp + 0x41], r9b
jmp 0x140008dc8
mov al, 1
jmp 0x14000992a
test sil, sil
je case.0x140008dfe.41
mov edx, dword [0x14018a0b0]
test edx, edx
je 0x140008ebd
mov edx, r14d
mov word [0x14018a0c0], r14w
mov dword [0x14018a0b0], edx
jmp 0x140008ebd
mov edx, dword [0x14018a0b0]
test r8b, r8b
je 0x140008eff
cmp r10d, 1
jne 0x140008edd
cmp byte [0x14018e337], r14b
jne 0x140008eff
lea eax, [r8 - 0x10]
test al, 0xef
je 0x140008eff
test r8b, 0xc
setne cl
test r8b, 3
setne al
test al, cl
je 0x140008f85
cmp bl, 8
jne 0x140008f8e
test r8b, r8b
jne 0x140008f8e
test r9b, r9b
je 0x140008f56
cmp r10d, 1
jne 0x140008f56
cmp byte [0x14018e334], r14b
je 0x140008f56
mov eax, dword [0x14018e348]
test eax, eax
je 0x140008f56
dec eax
mov dword [0x14018e348], eax
movsxd rcx, eax
mov rax, qword [0x14018e340]
mov word [rax + rcx*2], r14w
test sil, sil
je 0x140008f7e
test edx, edx
je 0x140008f7e
dec edx
lea rcx, [0x14018a0c0]
movsxd rax, edx
mov dword [0x14018a0b0], edx
mov word [rcx + rax*2], r14w
mov byte [0x14018fbc6], r14b
movzx eax, r12b
jmp 0x14000992a
mov qword [rsp + 0x190], rdi
lea rax, [rbp - 0x80]
lea rcx, [0x14018ac80]
mov edx, 2
nop dword [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 0x140008fa9
movzx edx, r8b
lea rcx, [rbp - 0x80]
call fcn.140015f42
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x140009029
or byte [rbp - 0x6c], 1
jmp 0x14000902d
and byte [rbp - 0x6c], 0xfe
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rdi, rax
test rax, rax
je 0x14000904f
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x140009052
mov eax, r14d
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov qword [rsp + 0x58], rax
mov r8, rax
cmp bl, 0xe7
jne 0x140009082
mov eax, 1
movzx ecx, r15w
mov dword [rsp + 0x44], eax
mov word [rsp + 0x48], cx
jmp 0x1400090d1
mov eax, r14d
mov qword [rsp + 0x30], r8
cmp dword [0x140189b04], eax
lea r9, [rsp + 0x48]
lea r8, [rbp - 0x80]
mov ecx, r13d
setne al
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0xc0]
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 0x140009175
movzx ecx, word [rsp + 0x48]
mov r8, qword [rsp + 0x58]
cmp byte [0x14018fbc6], r14b
je 0x1400090f5
cmp bl, 9
je 0x1400090f5
mov byte [rsp + 0x40], 1
cmp bl, 0x1b
jne 0x1400090fa
mov byte [rsp + 0x40], r14b
test eax, eax
jns 0x14000917e
test r12b, r12b
je 0x140009175
movzx eax, byte [0x14018ac73]
lea r9, [rsp + 0x48]
test al, 0x30
mov qword [rsp + 0x30], r8
lea r8, [rbp - 0x80]
mov byte [0x14018fbc6], bl
setne byte [0x14018fbc1]
mov word [0x14018fbc4], r15w
test al, 0xc
mov ecx, r13d
setne dl
test al, 3
setne al
test al, dl
mov rax, qword [rbp + 0xc0]
setne byte [0x14018fbc0]
cmp dword [0x140189b04], r14d
mov edx, dword [rax + 4]
setne r14b
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movzx eax, r12b
jmp 0x140009922
test byte [0x14018ac73], 3
jne 0x1400091b2
mov eax, 0xa
cmp cx, 0xd
jne 0x1400091a1
mov ecx, eax
mov word [rsp + 0x48], ax
cmp word [rsp + 0x4a], 0xd
jne 0x1400091b2
mov word [rsp + 0x4a], ax
test sil, sil
je 0x140009422
cmp rdi, qword [0x14018a0a8]
lea r12, [0x14018a0c0]
je 0x1400091e6
mov qword [0x14018a0a8], rdi
mov edx, r14d
mov word [0x14018a0c0], r14w
jmp 0x14000923c
mov edx, dword [0x14018a0b0]
mov eax, 0x5a
sub eax, edx
cmp eax, 3
jge 0x14000923c
lea rdx, [0x14018a11a]
or rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rdx + rax*2], r14w
jne 0x14000920d
mov dword [0x14018a0b0], eax
mov rcx, r12
inc eax
movsxd r8, eax
add r8, r8
call fcn.1400b86f2
movzx ecx, word [rsp + 0x48]
mov edx, dword [0x14018a0b0]
mov edi, dword [rsp + 0x44]
movsxd rax, edx
inc edx
mov dword [0x14018a0b0], edx
mov word [r12 + rax*2], cx
cmp edi, 1
jle 0x14000926e
movzx eax, word [rsp + 0x4a]
movsxd rcx, edx
inc edx
mov dword [0x14018a0b0], edx
mov word [r12 + rcx*2], ax
movsxd rax, edx
mov word [r12 + rax*2], r14w
test edx, edx
je 0x140009426
cmp dword [0x14018ada4], r14d
mov r13d, r14d
mov dword [rsp + 0x50], r14d
jbe 0x140009426
nop
mov rax, qword [0x14018adf0]
mov ecx, r13d
mov r15, qword [rax + rcx*8]
mov qword [rsp + 0x68], r15
cmp byte [r15 + 0x3b], r14b
jne 0x14000940d
movzx eax, byte [r15 + 0x3a]
cmp byte [r15 + 0x43], r14b
je 0x1400092f9
cmp edx, eax
jle 0x14000940d
lea eax, [rdx - 1]
movsxd rcx, eax
movzx edx, word [r12 + rcx*2]
lea rcx, str._____:____.___n__t
call fcn.1400b8b6c
test rax, rax
je 0x140009407
movsxd rdx, dword [0x14018a0b0]
lea rsi, [rdx - 2]
jmp 0x140009307
cmp edx, eax
jl 0x14000940d
movsxd rsi, edx
dec rsi
lea rsi, [r12 + rsi*2]
movzx eax, byte [r15 + 0x3a]
mov rcx, qword [r15 + 8]
lea rbx, [rax - 1]
lea rbx, [rcx + rbx*2]
cmp byte [r15 + 0x3e], r14b
je 0x140009356
cmp rbx, rcx
jb 0x140009399
nop dword [rax + rax]
movzx eax, word [rbx]
cmp word [rsi], ax
jne 0x140009399
sub rsi, 2
sub rbx, 2
cmp rbx, rcx
jae 0x140009334
jmp 0x140009399
cmp rbx, rcx
jb 0x140009399
nop dword [rax]
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, word [rsi]
mov rdi, rax
call qword [sym.imp.USER32.dll_CharLowerW]
cmp ax, di
jne 0x140009393
sub rsi, 2
sub rbx, 2
cmp rbx, qword [r15 + 8]
jae 0x140009363
mov edx, dword [0x14018a0b0]
cmp rbx, qword [r15 + 8]
jae 0x14000940d
cmp byte [r15 + 0x44], r14b
jne 0x1400093c7
cmp rsi, r12
jb 0x1400093c7
movzx ecx, word [rsi]
call qword [sym.imp.USER32.dll_IsCharAlphaNumericW]
test eax, eax
jne 0x140009407
mov rax, qword [r15]
test rax, rax
je 0x1400093dc
mov rcx, qword [rax + 8]
jmp 0x1400093e3
lea rcx, [0x14010d0d8]
mov r9d, dword [r15 + 0x30]
mov r8, qword [r15 + 0x20]
mov rdx, qword [r15 + 0x18]
mov qword [rsp + 0x20], rcx
movzx ecx, byte [r15 + 0x38]
call fcn.14000c367
test rax, rax
jne 0x140009524
mov edx, dword [0x14018a0b0]
inc r13d
cmp r13d, dword [0x14018ada4]
mov dword [rsp + 0x50], r13d
jb 0x140009295
mov edi, dword [rsp + 0x44]
xor sil, sil
cmp byte [rsp + 0x40], 0
movzx eax, byte [rbp + 0xd8]
je 0x1400094c0
movzx ebx, byte [0x14018fbc6]
mov byte [0x14018fbc6], 0
test al, al
je 0x1400094c0
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, 0x100
call fcn.1400b970f
movzx eax, byte [0x14018fbc1]
neg al
movzx eax, byte [0x14018fbc0]
sbb dl, dl
and dl, 0x20
neg al
sbb cl, cl
and cl, 9
or dl, cl
lea rcx, [rbp - 0x80]
call fcn.140015f42
mov rax, qword [rsp + 0x58]
lea r9, [rsp + 0x50]
movzx edx, word [0x14018fbc4]
lea r8, [rbp - 0x80]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r14d
movzx ecx, bl
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
movzx eax, byte [rbp + 0xd8]
cmp byte [rsp + 0x41], 0
je 0x140009922
cmp dword [0x14018e2f0], 1
jne 0x140009922
test sil, sil
jne 0x140009922
movsxd r13, edi
mov r12d, r14d
mov rsi, r14
test edi, edi
jle 0x140009897
nop dword [rax]
cmp byte [0x14018e335], 0
lea r15, [rsp + 0x48]
lea r15, [r15 + rsi*2]
je 0x1400097f2
movzx edx, word [r15]
mov rcx, qword [0x14018e308]
call fcn.1400b8b6c
mov rbx, rax
jmp 0x14000983d
mov rax, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0xe8]
add rdx, 4
mov r8, qword [rax + 0x10]
movabs rax, 0xffffffff003c2c17
add rax, r8
cmp rax, 0x66
ja 0x140009583
movzx ecx, byte [r15 + 0x39]
mov eax, 0xffc3d44d
sub eax, r8d
cmp eax, ecx
jg 0x140009583
mov edi, dword [rsp + 0x44]
xor sil, sil
test rdx, rdx
je 0x140009429
mov eax, 0x69
mov word [rdx], ax
jmp 0x140009429
cmp byte [r15 + 0x3f], r14b
jne 0x140009598
mov edx, dword [0x14018a0b0]
jmp 0x140009704
cmp byte [r15 + 0x43], r14b
mov rsi, r14
movsxd rdx, dword [0x14018a0b0]
movzx eax, byte [r15 + 0x3a]
lea rcx, [r12 + rdx*2]
mov r12d, r14d
lea r8, [rcx - 2]
cmove r8, rcx
add rax, rax
xor r13b, r13b
mov qword [rsp + 0x70], r8
xor dil, dil
mov rbx, r8
sub rbx, rax
inc rax
shr rax, 1
cmp rbx, r8
cmova rax, r14
test rax, rax
je 0x1400096f8
mov r14, rax
mov r15d, 1
nop dword [rax + rax]
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x140009614
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharUpperW]
test eax, eax
je 0x140009637
test r13b, r13b
jne 0x140009634
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 rsi
cmp rsi, r14
jb 0x1400095f2
mov r15, qword [rsp + 0x68]
mov r14d, 0
test r12d, r12d
je 0x1400096f2
cmp r12d, 1
jne 0x140009684
mov edx, dword [0x14018a0b0]
lea r12, [0x14018a0c0]
mov r13d, dword [rsp + 0x50]
neg dil
sbb edi, edi
and edi, 2
jmp 0x140009707
test dil, dil
je 0x1400096f2
mov rsi, qword [rsp + 0x70]
mov edi, 2
movzx eax, byte [r15 + 0x3a]
mov rbx, rsi
add rax, rax
sub rbx, rax
cmp rbx, rsi
jae 0x1400096d1
nop dword [rax]
movzx ecx, word [rbx]
call qword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x1400096ce
add rbx, rdi
cmp rbx, rsi
jb 0x1400096b1
cmp rbx, rsi
mov edx, dword [0x14018a0b0]
lea r12, [0x14018a0c0]
mov r13d, dword [rsp + 0x50]
mov r10d, 1
cmove edi, r10d
jmp 0x14000970d
mov edx, dword [0x14018a0b0]
mov r13d, dword [rsp + 0x50]
lea r12, [0x14018a0c0]
mov edi, r14d
mov r10d, 1
movzx r9d, byte [r15 + 0x40]
test r9b, r9b
jne 0x140009725
cmp byte [r15 + 0x41], r9b
je 0x140009735
xor al, al
mov sil, 1
mov byte [rbp + 0xd8], al
jmp 0x140009738
xor sil, sil
mov rax, qword [rbp + 0xf0]
movzx r8d, byte [r15 + 0x43]
mov ecx, r13d
mov qword [rax], rcx
test r8b, r8b
je 0x140009763
lea eax, [rdx - 1]
movsxd rcx, eax
movzx eax, word [r12 + rcx*2]
jmp 0x140009766
mov eax, r14d
movzx eax, ax
movzx ecx, di
shl ecx, 0x10
or ecx, eax
mov rax, qword [rbp + 0xf8]
movsxd rcx, ecx
mov qword [rax], rcx
mov rax, qword [r15 + 0x10]
cmp word [rax], 0
je 0x1400097b7
test r8b, r8b
je 0x1400097af
lea eax, [rdx - 1]
mov edx, r10d
movsxd rcx, eax
movzx eax, word [r12 + rcx*2]
mov word [0x14018a0c0], ax
jmp 0x1400097d2
mov edx, r14d
jmp 0x1400097d2
test r9b, r9b
je 0x1400097d2
movzx eax, byte [r15 + 0x3a]
sub edx, eax
test r8b, r8b
je 0x1400097d2
dec edx
cmp byte [r15 + 0x45], 0
mov edi, dword [rsp + 0x44]
cmovne edx, r14d
movsxd rax, edx
mov dword [0x14018a0b0], edx
mov word [r12 + rax*2], r14w
jmp 0x140009429
movzx ecx, word [r15]
mov rbx, qword [0x14018e308]
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 0x14000983d
cmp word [rbx], 0
je 0x140009846
movzx ecx, word [rbx + 2]
add rbx, 2
call qword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, ax
cmp ecx, edi
jne 0x14000981a
test rbx, rbx
jne 0x140009950
movsxd rax, dword [0x14018e348]
cmp eax, dword [0x14018e34c]
je 0x140009897
movzx ecx, word [r15]
mov rdx, rax
mov rax, qword [0x14018e340]
inc r12d
inc rsi
mov word [rax + rdx*2], cx
mov eax, dword [0x14018e348]
inc eax
mov dword [0x14018e348], eax
movsxd rcx, eax
mov rax, qword [0x14018e340]
mov word [rax + rcx*2], r14w
cmp rsi, r13
jl 0x1400094f6
cmp byte [0x14018e339], 0
je 0x1400099bb
cmp byte [0x14018e335], 0
je 0x14000996e
cmp dword [0x14018e320], 0
jbe 0x1400098fb
nop word [rax + rax]
mov rax, qword [0x14018e318]
mov ecx, r14d
mov rdx, qword [rax + rcx*8]
mov rcx, qword [0x14018e340]
call fcn.1400b8c1c
test rax, rax
jne 0x140009a83
inc r14d
cmp r14d, dword [0x14018e320]
jb 0x1400098c8
mov ecx, dword [0x14018e2f0]
mov edx, 5
mov eax, dword [0x14018e34c]
cmp dword [0x14018e348], eax
cmovge ecx, edx
mov dword [0x14018e2f0], ecx
movzx eax, byte [rbp + 0xd8]
mov rdi, qword [rsp + 0x190]
mov r13, qword [rsp + 0x188]
mov rsi, qword [rsp + 0x1c8]
mov r14, qword [rsp + 0x180]
add rsp, 0x198
pop r15
pop r12
pop rbx
pop rbp
ret
movsxd rax, r12d
mov dword [0x14018e2f0], 4
movzx ecx, word [rsp + rax*2 + 0x48]
mov word [0x14018e314], cx
jmp 0x14000991b
cmp dword [0x14018e320], 0
jbe 0x1400098fb
nop dword [rax + rax]
mov rdx, qword [0x14018e318]
mov rcx, qword [0x14018e340]
mov eax, r14d
mov rdx, qword [rdx + rax*8]
call fcn.140097fa6
test rax, rax
jne 0x140009a83
inc r14d
cmp r14d, dword [0x14018e320]
jb 0x140009983
jmp 0x1400098fb
cmp byte [0x14018e335], 0
je 0x140009a34
mov r10d, dword [0x14018e320]
test r10d, r10d
je 0x1400098fb
mov r9, qword [0x14018e318]
mov r11, qword [0x14018e340]
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 0x140009a17
add rax, 2
test ecx, ecx
jne 0x1400099fb
test edx, edx
je 0x140009a83
inc r14d
add r9, 8
cmp r14d, r10d
jb 0x1400099eb
jmp 0x1400098fb
cmp dword [0x14018e320], 0
jbe 0x1400098fb
nop word [rax + rax]
mov rdx, qword [0x14018e318]
mov rcx, qword [0x14018e340]
mov eax, r14d
mov rdx, qword [rdx + rax*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140009a83
inc r14d
cmp r14d, dword [0x14018e320]
jb 0x140009a4b
jmp 0x1400098fb
mov dword [0x14018e2f0], 3
jmp 0x14000991b