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

Disassembly:
mov qword [rsp + 0x10], rdx
push rdi
push r14
sub rsp, 0x158
movzx edi, cl
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea edx, [rdi - 0x41]
mov r14, rax
cmp dl, 0x19
ja 0x14002521c
mov qword [rsp + 0x180], rbx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x150], rbp
xor edx, edx
mov r8d, 0x100
mov qword [rsp + 0x140], r15
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x30], r14
lea r9, [rsp + 0x178]
xor ebp, ebp
lea r8, [rsp + 0x40]
mov dword [rsp + 0x28], ebp
xor edx, edx
mov ecx, WSAGetLastError
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov qword [rsp + 0x30], r14
lea r9, [rsp + 0x178]
cmp eax, 2
mov dword [rsp + 0x28], ebp
movzx ebx, bp
mov dword [rsp + 0x20], 2
cmove bx, word [rsp + 0x178]
lea r8, [rsp + 0x40]
xor edx, edx
mov ecx, edi
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov r15d, eax
test eax, eax
jns 0x140025009
mov qword [rsp + 0x30], r14
lea r9, [rsp + 0x170]
mov dword [rsp + 0x28], ebp
lea r8, [rsp + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 2
mov ecx, WSAGetLastError
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test bx, bx
je 0x1400251e9
mov qword [rsp + 0x148], rsi
cmp bx, 0xa
jne 0x140025030
movzx edx, byte [rsp + 0x170]
mov dil, ntohs
jmp 0x1400250f8
mov rdx, r14
movzx ecx, bx
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rdi, ax
mov rcx, rdi
shr rcx, 8
cmp cl, 0xff
jne 0x1400250a9
cmp dil, 0xff
jne 0x1400250a9
movzx esi, bx
test esi, 0xffffff80
jne 0x1400251e1
mov edx, 0x103
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
je 0x1400251e1
mov edx, 2
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
movzx r9d, bl
mov ecx, esi
movzx edx, r9b
and dl, 0xdf
movzx edi, dl
test eax, eax
mov edx, 1
cmove edi, r9d
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, eax
setne cl
test cl, 0x38
jne 0x1400251e1
movzx edx, byte [rsp + 0x170]
movzx eax, cl
and al, 6
cmp al, 6
jne 0x1400250c8
or dl, 8
jmp 0x1400250e2
test cl, 2
je 0x1400250d5
test dl, 3
jne 0x1400250d5
or dl, 1
test cl, 4
je 0x1400250e2
test dl, 0xc
jne 0x1400250e2
or dl, 4
test cl, 1
je 0x1400250ef
test dl, 0x30
jne 0x1400250ef
or dl, 0x10
test dil, dil
je 0x1400251e1
movzx ecx, dl
movzx r8d, dl
movzx r9d, dl
movzx r11d, dl
movzx r10d, dl
movzx eax, dl
and cl, 0xf0
and r8b, 0xe0
and r9b, 0xfe
shl cl, 3
and r11b, 0xfc
shl r8b, 2
and r10b, 0xf8
shl r9b, 6
and al, 0xc0
shl r11b, 5
movzx ebx, dl
shl r10b, 4
add al, al
shl bl, 7
and dl, 0x80
mov byte [rsp + 0xe0], cl
mov byte [rsp + 0xe1], r8b
mov byte [rsp + 0xe2], bl
mov byte [rsp + 0xe3], r9b
mov byte [rsp + 0xe4], r11b
mov byte [rsp + 0xe5], r10b
mov byte [rsp + 0x9b], al
mov byte [rsp + 0x9c], dl
test cl, cl
jne 0x14002518a
test r8b, r8b
jne 0x14002518a
xor al, al
jmp 0x14002518c
mov al, 0x80
mov byte [rsp + 0x50], al
test bl, bl
jne 0x14002519d
test r9b, r9b
jne 0x14002519d
xor al, al
jmp 0x14002519f
mov al, 0x80
mov byte [rsp + 0x51], al
test r11b, r11b
jne 0x1400251b1
test r10b, r10b
jne 0x1400251b1
xor al, al
jmp 0x1400251b3
mov al, 0x80
mov qword [rsp + 0x30], r14
lea r9, [rsp + 0x170]
mov dword [rsp + 0x28], ebp
lea r8, [rsp + 0x40]
movzx ecx, dil
xor edx, edx
mov dword [rsp + 0x20], 2
mov byte [rsp + 0x52], al
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rsi, qword [rsp + 0x148]
mov rbx, qword [rsp + 0x180]
test r15d, r15d
mov r15, qword [rsp + 0x140]
je 0x140025206
movzx ebp, word [rsp + 0x178]
movzx eax, bp
mov rbp, qword [rsp + 0x150]
add rsp, 0x158
pop r14
pop rdi
ret
mov ecx, edi
mov r8, r14
mov edx, 2
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
add rsp, 0x158
pop r14
pop rdi
ret