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

Disassembly:
mov word [rsp + 0x18], r8w
mov qword [rsp + 8], rcx
push rbp
push r13
push r14
push r15
lea rbp, [rsp - 0xe8]
sub rsp, 0x1e8
mov r15, qword [rbp + 0x138]
mov r14, rcx
movzx r13d, dl
mov word [r15], 1
mov dword [r15 + 8], 0
test r9b, r9b
je 0x140015183
mov r9b, 1
movzx edx, r13b
call fcn.140015000
jmp 0x1400155c2
movzx eax, byte [0x140133037]
mov qword [rsp + 0x218], rbx
mov qword [rsp + 0x1e0], rsi
mov qword [rsp + 0x1d8], rdi
mov qword [rsp + 0x1d0], r12
mov r12b, 1
test al, 0xcf
je 0x140015221
test al, 0xc
setne cl
test al, 3
setne al
test al, cl
jne 0x140015221
mov r9, qword [0x140132ee8]
test r9, r9
je 0x14001521e
movabs r11, 0xffffffff003c2c17
cmp byte [r9 + 0x5f], 0
je 0x140015215
cmp dword [r9], 1
jne 0x140015215
movzx r10d, byte [r9 + 0x5c]
test r10b, r10b
je 0x140015221
mov rax, qword [r14 + 0x10]
dec r10b
mov r8d, 0xffc3d44d
mov ecx, reloc.WSOCK32.dll_WSAAsyncSelect
sub r8d, eax
lea rdx, [rax + r11]
movzx eax, r10b
cmp rdx, 0x66
cmovbe ecx, r8d
cmp ecx, eax
jg 0x140015221
mov r9, qword [r9 + 8]
test r9, r9
jne 0x1400151d5
xor r12b, r12b
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor edi, edi
mov rbx, rax
test rax, rax
je 0x140015268
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rbp + 0x40]
mov dword [rbp + 0x40], 0x48
mov ecx, eax
mov edi, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x140015268
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x140015268
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
mov ecx, edi
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp qword [0x140135648], rbx
mov rsi, rax
mov qword [r15 + 0x18], rax
mov qword [r15 + 0x10], rbx
je 0x1400152bd
mov r8d, 0x1c
mov qword [0x140135648], rbx
lea rdx, [rbp + 0x90]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetClassNameW]
lea rdx, str.ApplicationFrameWindow
lea rcx, [rbp + 0x90]
call fcn.1400ca01c
test eax, eax
sete byte [0x140135643]
xor eax, eax
mov dword [rbp + 0x138], eax
mov word [rbp + 0x13c], ax
cmp r13b, 0xe7
jne 0x1400152e6
lea ebx, [rax + 1]
movzx eax, word [r14 + 4]
mov word [rbp + 0x138], ax
jmp 0x140015562
test r12b, r12b
je 0x140015541
cmp r13b, 0x12
je 0x140015541
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x100
call fcn.1400e7f60
mov eax, dword [0x14013554c]
test eax, eax
je 0x140015391
cmp byte [0x140134a1b], 0
jne 0x140015327
cmp byte [0x140135643], 0
je 0x140015391
xor r12d, r12d
mov r14b, 1
mov edi, r12d
test eax, eax
jle 0x140015394
lea rbx, [0x14013553d]
nop dword [rax + rax]
movzx edx, byte [rbx - 1]
lea rcx, [rsp + 0x40]
call fcn.1400235d0
movzx ecx, byte [rbx]
lea r9, [rbp + 0x138]
movzx edx, word [rbx - 3]
lea r8, [rsp + 0x40]
mov byte [rsp + 0x54], cl
movzx ecx, byte [rbx - 5]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
inc edi
lea rbx, [rbx + 6]
cmp edi, dword [0x14013554c]
jl 0x140015340
jmp 0x140015394
xor r14d, r14d
mov rax, qword [rbp + 0x110]
lea rcx, [rsp + 0x40]
movzx edx, byte [0x140133037]
movzx r12d, r14b
xor r12d, 1
lea edi, [r12*2 + 1]
shl r12d, 0xf
or r12d, dword [rax + 4]
call fcn.1400235d0
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.USER32.dll_GetKeyState]
mov qword [rsp + 0x30], rsi
lea r9, [rbp + 0x138]
and al, 1
mov dword [rsp + 0x28], edi
mov ecx, r13d
mov byte [rsp + 0x54], al
lea r8, [rsp + 0x40]
mov dword [rsp + 0x20], 2
mov edx, r12d
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov ebx, eax
test eax, eax
jne 0x14001544d
movzx r8d, byte [0x140133037]
test r8b, 0xc
je 0x14001545d
test r8b, 3
jne 0x14001545d
test r14b, r14b
jne 0x140015462
mov qword [rsp + 0x30], rsi
lea r9, [rbp + 0x138]
mov dword [rsp + 0x28], edi
lea r8, [rsp + 0x40]
mov edx, r12d
mov dword [rsp + 0x20], 2
mov ecx, r13d
mov byte [rsp + 0x52], r14b
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov ebx, eax
movzx r8d, byte [0x140133037]
test ebx, ebx
jg 0x1400154e2
test r14b, r14b
je 0x140015497
xor edx, edx
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], edi
lea r9, [rbp + 0x128]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x20], 2
lea ecx, [rdx + 0x6e]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
cmp eax, 0xffffffff
je 0x140015462
movzx r8d, byte [0x140133037]
test ebx, ebx
jg 0x1400154e2
jns 0x14001550b
movsxd rdx, dword [0x14013554c]
mov r14, qword [rbp + 0x110]
cmp rdx, 3
jae 0x140015512
lea rax, [rdx + rdx*2]
inc edx
lea rcx, [0x140135538]
mov dword [0x14013554c], edx
lea rcx, [rcx + rax*2]
mov byte [rcx], r13b
movzx eax, word [r14 + 4]
mov word [rcx + 2], ax
movzx eax, byte [rsp + 0x54]
mov byte [rcx + 5], al
mov byte [rcx + 4], r8b
jmp 0x140015512
cmp dword [0x14013554c], 0
je 0x1400154f4
test r14b, r14b
jne 0x1400154f4
mov al, 1
jmp 0x1400154f6
xor al, al
mov byte [r15 + 1], al
mov dword [0x14013554c], 0
mov byte [0x140134a1b], 0
mov r14, qword [rbp + 0x110]
test r8b, 3
jne 0x140015543
cmp word [rbp + 0x138], 0xd
mov eax, 0xa
jne 0x14001552e
mov word [rbp + 0x138], ax
cmp word [rbp + 0x13a], 0xd
jne 0x140015543
mov word [rbp + 0x13a], ax
jmp 0x140015543
xor ebx, ebx
cmp r13b, 8
jne 0x140015562
test ebx, ebx
jle 0x140015562
cmp byte [0x140135643], 0
je 0x140015560
xor ebx, ebx
mov dword [0x14013554c], ebx
jmp 0x140015562
dec ebx
movzx eax, word [rbp + 0x138]
lea r9, [rbp + 0x138]
movzx r8d, word [rbp + 0x120]
movzx edx, r13b
mov word [r15 + 2], ax
mov rcx, r14
movzx eax, word [rbp + 0x13a]
mov byte [rsp + 0x30], 1
mov word [r15 + 4], ax
mov dword [r15 + 8], ebx
mov dword [rsp + 0x20], ebx
call fcn.140015ad0
mov r12, qword [rsp + 0x1d0]
mov rdi, qword [rsp + 0x1d8]
mov rsi, qword [rsp + 0x1e0]
mov rbx, qword [rsp + 0x218]
test al, al
setne al
add rsp, 0x1e8
pop r15
pop r14
pop r13
pop rbp
ret