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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x160
mov rax, qword [0x14025e510]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov eax, dword [rdx + 8]
mov rsi, rdx
mov rbp, rcx
cmp eax, 0x100
jb 0x140048711
cmp eax, 0x108
ja 0x140048711
test rcx, rcx
je 0x140048711
mov rcx, qword [rcx + 0x40]
test rcx, rcx
je 0x140048711
mov rdx, qword [rdx]
cmp rdx, rcx
je 0x1400483b0
call qword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x140048711
mov rcx, rbp
call fcn.14000a5c4
and eax, 0x18000000
cmp eax, 0x10000000
jne 0x140048711
cmp qword [rsi + 0x10], 9
jne 0x14004852d
test byte [rbp + 0x240], 2
je 0x140048582
cmp dword [rsi + 8], 0x100
jne 0x140048523
call qword [sym.imp.USER32.dll_GetFocus]
mov rdi, rax
test rax, rax
je 0x140048523
xor r9d, r9d
mov edx, 0x87
mov rcx, rax
lea r8d, [r9 + 9]
call qword [sym.imp.USER32.dll_SendMessageW]
shr al, 1
and al, 1
je 0x140048441
mov rcx, rdi
call fcn.1400125b0
test rax, rax
je 0x14004843a
lea rdx, str.CDialog
mov rcx, rax
call fcn.14001b150
test eax, eax
jne 0x140048441
xor eax, eax
jmp 0x14004874a
mov rbx, qword [rbp + 0x40]
mov edx, 0xfffffff0
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetWindowLongPtrW]
bt rax, 0x1e
jae 0x140048467
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.USER32.dll_GetParent]
mov rbx, rax
mov edx, 0xfffffff0
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetWindowLongPtrW]
bt rax, 0x1e
jae 0x1400484a1
nop dword [rax]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetParent]
mov edx, 0xfffffff0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.USER32.dll_GetWindowLongPtrW]
bt rax, 0x1e
jb 0x140048480
test rbx, rbx
je 0x140048523
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
mov rdx, qword [rbp + 0x40]
mov r8, rdi
movzx r12d, ax
mov rcx, rbx
shr r12d, 0xf
mov r9d, r12d
call fcn.140047a70
mov rbx, rax
test rax, rax
je 0x140048523
test r12d, r12d
mov rcx, rax
mov byte [0x140272680], 1
setne byte [0x140272681]
call qword [sym.imp.USER32.dll_SetFocus]
mov edx, 0x87
lea r8d, [rdx - 0x7e]
mov r9, rsi
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
test rax, rax
je 0x14004851c
or r9, 0xffffffffffffffff
xor r8d, r8d
mov edx, 0xb1
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
mov byte [0x140272680], 0
mov eax, 1
jmp 0x14004874a
mov rcx, rbp
call fcn.14000a5c4
and eax, 0x50000000
cmp eax, 0x50000000
jne 0x140048582
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.USER32.dll_GetParent]
mov rcx, rax
call fcn.1400125b0
mov rbx, rax
test rax, rax
je 0x140048582
lea rdx, str.CExtControlBar
mov rcx, rax
call fcn.14001b150
test eax, eax
je 0x140048582
mov r8, qword [rbx]
mov rdx, rsi
mov rcx, rbx
call qword [r8 + 0x210]
test eax, eax
jne 0x140048523
call qword [sym.imp.USER32.dll_GetFocus]
mov r12, rax
test rax, rax
je 0x140048711
mov rcx, rax
call qword [sym.imp.USER32.dll_GetParent]
cmp rax, qword [rbp + 0x40]
jne 0x140048711
movzx ebx, word [rsi + 0x1a]
mov r8, qword [rsi + 0x10]
xor r9d, r9d
mov edx, 0x87
mov rcx, r12
and ebx, 0x2000
call qword [sym.imp.USER32.dll_SendMessageW]
test al, 4
jne 0x140048711
test al, al
jns 0x1400485da
test ebx, ebx
je 0x140048711
mov ecx, 0x11
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x10
movsx ebx, ax
call qword [sym.imp.USER32.dll_GetKeyState]
movsx ecx, ax
and ecx, 0x80000000
and ebx, 0x80000000
jne 0x140048711
test ecx, ecx
jne 0x140048711
movzx ebx, word [rsi + 0x10]
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_GetKeyboardState]
xor edx, edx
mov ecx, ebx
mov r13d, ebx
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov ebx, eax
call fcn.14000d854
mov ecx, dword [rax + 0x60]
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor ecx, ecx
lea r9, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov word [rsp + 0x40], cx
mov word [rsp + 0x42], cx
lea r8, [rsp + 0x50]
mov edx, ebx
mov ecx, r13d
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 1
call qword [sym.imp.USER32.dll_ToUnicodeEx]
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_CharUpperW]
cmp word [rsp + 0x40], 0
je 0x140048711
mov rcx, qword [rbp + 0x40]
mov edx, 5
call qword [sym.imp.USER32.dll_GetWindow]
mov rdi, rax
test rax, rax
je 0x140048711
mov rcx, rdi
call fcn.1400125b0
mov rbx, rax
test rax, rax
je 0x1400486fb
mov rcx, rax
call fcn.14000a5c4
and eax, 0x18000000
cmp eax, 0x10000000
jne 0x1400486fb
lea rcx, str.CExtButton
mov rdx, rbx
call fcn.14001b184
mov rbx, rax
test rax, rax
je 0x1400486fb
test byte [rax + 0x1f0], 1
je 0x1400486fb
mov r9, qword [rax]
mov r8b, 1
mov edx, r13d
mov rcx, rax
call qword [r9 + 0x2c0]
test al, al
jne 0x140048771
mov edx, 2
mov rcx, rdi
call qword [sym.imp.USER32.dll_GetWindow]
mov rdi, rax
test rax, rax
jne 0x1400486a0
mov rcx, rbp
call fcn.14000a5c4
bt eax, 0x1c
jae 0x140048732
mov rdx, rsi
mov rcx, rbp
call fcn.140062320
test eax, eax
jne 0x140048523
cmp dword [rsi + 8], 0x201
je 0x14004843a
mov rdx, rsi
mov rcx, rbp
call fcn.140048230
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14002f990
mov rbx, qword [rsp + 0x1a0]
add rsp, 0x160
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [rsi + 8]
cmp eax, 0x100
je 0x140048782
cmp eax, 0x104
jne 0x140048790
cmp r12, qword [rbx + 0x40]
je 0x140048790
mov rcx, rbx
call fcn.14000a83c
mov eax, dword [rsi + 8]
cmp eax, 0x101
je 0x1400487a5
cmp eax, 0x105
jne 0x140048523
mov rax, qword [rbx]
mov rdx, rsi
mov rcx, rbx
call qword [rax + 0x210]
mov eax, 1
jmp 0x14004874a