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

Disassembly:
mov byte [rsp + 0x20], r9b
mov word [rsp + 0x18], r8w
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x290
lea rdi, [rsp + 0x40]
mov ecx, reloc.OLEAUT32.dll_SysStringByteLen
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x2a0]
mov rax, qword [0x14031eae8]
xor rax, rsp
mov qword [rsp + 0x288], rax
mov byte [rsp + 0x40], 0
mov rax, qword [0x140321728]
mov qword [rsp + 0x48], rax
jmp 0x1400265a8
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 8]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x14002676e
mov rcx, qword [rsp + 0x48]
call fcn.140006730
movzx eax, al
test eax, eax
je 0x140026769
mov rdx, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x48]
call fcn.140028220
movzx eax, al
test eax, eax
je 0x140026769
movzx eax, byte [rsp + 0x2b8]
test eax, eax
je 0x1400266a4
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x10], 0
je 0x1400266a4
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x10]
cmp qword [rax + 0x3b0], 0
je 0x1400266a4
movzx eax, word [rsp + 0x2b0]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x174]
movzx ecx, byte [rsp + 0x2a8]
mov rdx, qword [rsp + 0x48]
movzx ecx, byte [rdx + rcx + 0x74]
or eax, ecx
and eax, 0x20
test eax, eax
jne 0x140026673
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax + 0x62]
test eax, eax
je 0x1400266a4
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x74]
and eax, 0x40
test eax, eax
jne 0x1400266a4
movzx eax, word [rsp + 0x2b0]
shl eax, 0x10
movzx ecx, byte [rsp + 0x2a8]
or eax, ecx
cdqe
mov r9, rax
mov r8, qword [rsp + 0x48]
mov edx, 0x41e
mov rcx, qword [0x1403213e8]
call qword [sym.imp.USER32.dll_PostMessageW]
movzx eax, byte [rsp + 0x2b8]
test eax, eax
je 0x140026702
movzx eax, word [rsp + 0x2b0]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x174]
and eax, 0x80
test eax, eax
je 0x140026702
movzx eax, word [rsp + 0x2b0]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x174]
btr eax, 7
movzx ecx, word [rsp + 0x2b0]
mov rdx, qword [rsp + 0x48]
mov byte [rdx + rcx + 0x174], al
xor al, al
jmp 0x1400270c2
movzx eax, byte [rsp + 0x2b8]
test eax, eax
je 0x140026757
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x74]
and eax, 0x80
test eax, eax
je 0x140026757
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rcx + rax + 0x74]
btr eax, 7
movzx ecx, byte [rsp + 0x2a8]
mov rdx, qword [rsp + 0x48]
mov byte [rdx + rcx + 0x74], al
xor al, al
jmp 0x1400270c2
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax + 0x5f]
test eax, eax
je 0x140026769
mov byte [rsp + 0x40], 1
jmp 0x14002659a
movzx eax, byte [rsp + 0x2b8]
test eax, eax
je 0x140026781
mov al, 1
jmp 0x1400270c2
mov byte [rsp + 0x50], 1
movzx eax, byte [0x1403213bd]
and eax, 0xffffffcf
test eax, eax
je 0x1400267be
movzx eax, byte [rsp + 0x40]
test eax, eax
jne 0x1400267be
movzx eax, byte [0x1403213bd]
and eax, 0xc
test eax, eax
je 0x1400267b9
movzx eax, byte [0x1403213bd]
and eax, 3
test eax, eax
jne 0x1400267be
mov byte [rsp + 0x50], 0
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [rsp + 0x58], rax
mov rdx, qword [rsp + 0x58]
xor ecx, ecx
call fcn.140037200
mov ecx, eax
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x58]
cmp qword [0x1403222a0], rax
je 0x14002684d
mov rax, qword [rsp + 0x58]
mov qword [0x1403222a0], rax
mov r8d, 0x1c
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.USER32.dll_GetClassNameW]
lea rdx, str.ApplicationFrameWindow
lea rcx, [rsp + 0x78]
call fcn.1401a7920
test eax, eax
jne 0x140026834
mov dword [rsp + 0x250], 1
jmp 0x14002683f
mov dword [rsp + 0x250], 0
movzx eax, byte [rsp + 0x250]
mov byte [0x140322298], al
lea rax, [rsp + 0xc4]
mov rdi, rax
xor eax, eax
mov ecx, 6
rep stosb byte [rdi], al
mov r8d, 0x100
lea rdx, [0x140321420]
lea rcx, [rsp + 0xf0]
call fcn.140188cc0
movzx eax, byte [0x140322290]
test eax, eax
je 0x14002699f
movzx eax, byte [0x140322298]
test eax, eax
je 0x14002699f
movzx eax, byte [rsp + 0x2a8]
cmp eax, 0xe7
je 0x14002699f
movzx eax, byte [0x140322297]
test eax, eax
je 0x1400268c4
mov dword [rsp + 0x254], 9
jmp 0x1400268cf
mov dword [rsp + 0x254], 0
movzx eax, byte [0x140322296]
test eax, eax
je 0x1400268e7
mov dword [rsp + 0x258], SafeArrayAllocDescriptor
jmp 0x1400268f2
mov dword [rsp + 0x258], 0
mov eax, dword [rsp + 0x258]
mov ecx, dword [rsp + 0x254]
or ecx, eax
mov eax, ecx
movzx edx, al
lea rcx, [rsp + 0xf0]
call fcn.140036520
movzx eax, word [0x140322294]
movzx ecx, byte [0x140322290]
mov rdx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0xc4]
lea r8, [rsp + 0xf0]
mov edx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test eax, eax
jle 0x140026998
movzx eax, word [0x140322294]
movzx ecx, byte [0x140322290]
mov rdx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0xc4]
lea r8, [rsp + 0xf0]
mov edx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov byte [0x140322290], 0
movzx edx, byte [0x1403213bd]
lea rcx, [rsp + 0xf0]
call fcn.140036520
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.USER32.dll_GetKeyState]
cwde
and eax, 1
test eax, eax
je 0x1400269ec
mov eax, 1
imul rax, rax, 0x14
movzx eax, byte [rsp + rax + 0xf0]
or eax, 1
mov ecx, 1
imul rcx, rcx, 0x14
mov byte [rsp + rcx + 0xf0], al
jmp 0x140026a10
mov eax, 1
imul rax, rax, 0x14
movzx eax, byte [rsp + rax + 0xf0]
and eax, 0xfffffffe
mov ecx, 1
imul rcx, rcx, 0x14
mov byte [rsp + rcx + 0xf0], al
movzx eax, byte [rsp + 0x2a8]
cmp eax, 0xe7
jne 0x140026a4c
mov dword [rsp + 0xb4], 1
mov eax, 2
imul rax, rax, 0
mov rcx, qword [rsp + 0x2a0]
movzx ecx, word [rcx + 4]
mov word [rsp + rax + 0xc4], cx
jmp 0x140026b3e
movzx eax, byte [rsp + 0x50]
test eax, eax
je 0x140026b33
movzx eax, byte [0x140321552]
test eax, eax
je 0x140026a71
mov dword [rsp + 0x25c], 1
jmp 0x140026a7c
mov dword [rsp + 0x25c], 0
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0x25c]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0xc4]
lea r8, [rsp + 0xf0]
mov rcx, qword [rsp + 0x2a0]
mov edx, dword [rcx + 4]
mov ecx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [rsp + 0xb4], eax
movzx eax, byte [0x1403213bd]
and eax, 3
test eax, eax
jne 0x140026b31
mov eax, 2
imul rax, rax, 0
movzx eax, word [rsp + rax + 0xc4]
cmp eax, 0xd
jne 0x140026b05
mov eax, 2
imul rax, rax, 0
mov ecx, 0xa
mov word [rsp + rax + 0xc4], cx
mov eax, 2
imul rax, rax, 1
movzx eax, word [rsp + rax + 0xc4]
cmp eax, 0xd
jne 0x140026b31
mov eax, 2
imul rax, rax, 1
mov ecx, 0xa
mov word [rsp + rax + 0xc4], cx
jmp 0x140026b3e
mov dword [rsp + 0xb4], 0
movzx eax, byte [rsp + 0x2a8]
cmp eax, 8
jne 0x140026b84
cmp dword [rsp + 0xb4], 0
je 0x140026b84
movzx eax, byte [0x140322298]
test eax, eax
je 0x140026b74
mov dword [rsp + 0xb4], 0
mov byte [0x140322290], 0
jmp 0x140026b84
mov eax, dword [rsp + 0xb4]
dec eax
mov dword [rsp + 0xb4], eax
movzx eax, byte [rsp + 0x2c0]
mov byte [rsp + 0x28], al
mov eax, dword [rsp + 0xb4]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xc4]
movzx r8d, word [rsp + 0x2b0]
movzx edx, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x2a0]
call fcn.140027140
movzx eax, al
test eax, eax
jne 0x140026bcf
xor al, al
jmp 0x1400270c2
movzx eax, byte [0x140322290]
test eax, eax
je 0x140026bf1
cmp dword [rsp + 0xb4], 0
jle 0x140026bf1
mov dword [rsp + 0x260], 1
jmp 0x140026bfc
mov dword [rsp + 0x260], 0
movzx eax, byte [rsp + 0x260]
mov byte [rsp + 0x1f4], al
cmp dword [rsp + 0xb4], 0
jge 0x140026d18
movzx eax, byte [rsp + 0x2a8]
mov byte [0x140322290], al
movzx eax, word [rsp + 0x2b0]
mov word [0x140322294], ax
movzx eax, byte [0x1403213bd]
and eax, 0x30
test eax, eax
je 0x140026c4e
mov byte [rsp + 0x264], 1
jmp 0x140026c56
mov byte [rsp + 0x264], 0
movzx eax, byte [rsp + 0x264]
mov byte [0x140322296], al
movzx eax, byte [0x1403213bd]
and eax, 3
test eax, eax
je 0x140026c8d
movzx eax, byte [0x1403213bd]
and eax, 0xc
test eax, eax
je 0x140026c8d
mov dword [rsp + 0x268], 1
jmp 0x140026c98
mov dword [rsp + 0x268], 0
movzx eax, byte [rsp + 0x268]
mov byte [0x140322297], al
movzx eax, byte [0x140321552]
test eax, eax
je 0x140026cbe
mov dword [rsp + 0x26c], 1
jmp 0x140026cc9
mov dword [rsp + 0x26c], 0
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0x26c]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0xc4]
lea r8, [rsp + 0xf0]
mov rcx, qword [rsp + 0x2a0]
mov edx, dword [rcx + 4]
mov ecx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov al, 1
jmp 0x1400270c2
cmp dword [0x1403222e8], 0
je 0x140026e9c
movzx eax, byte [rsp + 0x2c0]
test eax, eax
jne 0x140026e9c
movzx eax, byte [rsp + 0x2a8]
mov dword [rsp + 0x270], eax
mov eax, dword [rsp + 0x270]
sub eax, 8
mov dword [rsp + 0x270], eax
cmp dword [rsp + 0x270], 0x20
ja case.0x140026d84.9
movsxd rax, dword [rsp + 0x270]
lea rcx, [0x140000000]
movzx eax, byte [rcx + rax + 0x27118]
mov eax, dword [rcx + rax*4 + 0x270f0]
add rax, rcx
jmp rax
cmp dword [0x140321654], 0
je 0x140026dd4
mov eax, 2
imul rax, rax, 0
mov qword [rsp + 0x240], rax
cmp qword [rsp + 0x240], 0xb4
jae 0x140026db0
jmp 0x140026db5
call fcn.1401357e0
lea rax, [0x140321660]
xor ecx, ecx
mov rdx, qword [rsp + 0x240]
mov word [rax + rdx], cx
mov dword [0x140321654], 0
jmp case.0x140026d84.9
movzx eax, byte [0x1403213bd]
test eax, eax
jne case.0x140026d84.9
cmp dword [0x140321654], 0
je case.0x140026d84.9
mov eax, dword [0x140321654]
dec eax
mov dword [0x140321654], eax
movsxd rax, dword [0x140321654]
shl rax, 1
mov qword [rsp + 0x248], rax
cmp qword [rsp + 0x248], 0xb4
jae 0x140026e1a
jmp 0x140026e1f
call fcn.1401357e0
lea rax, [0x140321660]
xor ecx, ecx
mov rdx, qword [rsp + 0x248]
mov word [rax + rdx], cx
cmp dword [rsp + 0xb4], 0
jle 0x140026e9c
mov rax, qword [rsp + 0x2d8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x2d0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x2c8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x58]
mov r8d, dword [rsp + 0xb4]
lea rdx, [rsp + 0xc4]
mov rcx, qword [rsp + 0x2a0]
call fcn.140025e10
movzx eax, al
test eax, eax
jne 0x140026e9c
mov byte [0x140322290], 0
xor al, al
jmp 0x1400270c2
movzx eax, byte [rsp + 0x1f4]
test eax, eax
je 0x1400270c0
movzx eax, byte [0x140321552]
test eax, eax
je 0x140026ec4
mov dword [rsp + 0x274], 1
jmp 0x140026ecf
mov dword [rsp + 0x274], 0
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0x274]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0x204]
lea r8, [rsp + 0xf0]
mov rcx, qword [rsp + 0x2a0]
mov edx, dword [rcx + 4]
mov ecx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [rsp + 0x214], eax
cmp dword [rsp + 0x214], 0
jge 0x140026f93
movzx eax, byte [0x140321552]
test eax, eax
je 0x140026f40
mov dword [rsp + 0x278], 1
jmp 0x140026f4b
mov dword [rsp + 0x278], 0
movzx eax, byte [rsp + 0x2a8]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0x278]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0x204]
lea r8, [rsp + 0xf0]
mov rcx, qword [rsp + 0x2a0]
mov edx, dword [rcx + 4]
mov ecx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov eax, dword [rsp + 0xb4]
cmp dword [rsp + 0x214], eax
jne 0x140026ffc
mov eax, 2
imul rax, rax, 0
movzx eax, word [rsp + rax + 0x204]
cmp eax, 0xd
jne 0x140026fc6
mov dword [rsp + 0x27c], 0xa
jmp 0x140026fde
mov eax, 2
imul rax, rax, 0
movzx eax, word [rsp + rax + 0x204]
mov dword [rsp + 0x27c], eax
mov eax, 2
imul rax, rax, 0
movzx eax, word [rsp + rax + 0xc4]
cmp eax, dword [rsp + 0x27c]
je 0x1400270c0
mov r8d, 0x100
xor edx, edx
lea rcx, [rsp + 0xf0]
call fcn.140189370
movzx eax, byte [0x140322297]
test eax, eax
je 0x140027029
mov dword [rsp + 0x280], 9
jmp 0x140027034
mov dword [rsp + 0x280], 0
movzx eax, byte [0x140322296]
test eax, eax
je 0x14002704c
mov dword [rsp + 0x284], SafeArrayAllocDescriptor
jmp 0x140027057
mov dword [rsp + 0x284], 0
mov eax, dword [rsp + 0x284]
mov ecx, dword [rsp + 0x280]
or ecx, eax
mov eax, ecx
movzx edx, al
lea rcx, [rsp + 0xf0]
call fcn.140036520
movzx eax, word [0x140322294]
movzx ecx, byte [0x140322290]
mov rdx, qword [rsp + 0x60]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
lea r9, [rsp + 0x224]
lea r8, [rsp + 0xf0]
mov edx, eax
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov byte [0x140322290], 0
mov al, 1
mov rdi, rax
mov rcx, rsp
lea rdx, [0x140271420]
call fcn.140134a00
mov rax, rdi
mov rcx, qword [rsp + 0x288]
xor rcx, rsp
call fcn.140135520
add rsp, 0x290
pop rdi
ret