Function at 0x140051678
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
mov rax, qword [0x1401d00c0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov r13, rcx
mov qword [rbp - 1], r8
mov rcx, qword [0x1401d1478]
xor r14d, r14d
mov r12, r9
mov ebx, edx
test rcx, rcx
je 0x140051e3c
mov r15, qword [rcx + 0x90]
lea rsi, [rcx + 8]
mov eax, 0x204
cmp edx, eax
ja 0x140051c0b
je 0x140051d28
mov edx, 0x100
lea edi, [r14 + 1]
lea eax, [rdx + 2]
lea r9d, [rdx + 4]
cmp ebx, eax
ja 0x140051a54
je 0x140051915
mov eax, ebx
sub eax, 7
je 0x14005187d
sub eax, edi
je 0x14005187d
sub eax, 0x18
je 0x14005185e
sub eax, 0x80
je 0x140051a8b
sub eax, 0x60
je 0x14005172e
cmp eax, edi
jne 0x140051e3c
cmp ebx, edx
je 0x14005173a
mov sil, r14b
cmp ebx, r9d
jne 0x14005173d
mov sil, dil
cmp r8, rdx
jae 0x140051e3c
lea rbx, [rcx + 8]
mov ecx, reloc.WS2_32.dll_recvfrom
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov edx, 0x1000
and al, dil
mov rcx, rbx
mov r8b, al
call fcn.14002cb90
mov ecx, reloc.WS2_32.dll_recv
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov edx, 0x2000
and al, dil
mov rcx, rbx
mov r8b, al
call fcn.14002cb90
mov r14d, reloc.WS2_32.dll_select
mov ecx, r14d
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov edx, 0x4000
and al, dil
mov rcx, rbx
mov r8b, al
call fcn.14002cb90
lea ecx, [r14 + 0x4b]
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
mov edx, 0x8000
and al, dil
mov rcx, rbx
mov r8b, al
call fcn.14002cb90
mov rbx, qword [rbp - 1]
cmp rbx, 0xd
jne 0x1400517ed
shr r12, 0x10
mov eax, 0x10d
bt r12w, 8
cmovb ebx, eax
movsxd rcx, ebx
call fcn.1400510ac
test eax, eax
je 0x140051806
mov r8d, ebx
mov dl, sil
mov ecx, eax
call fcn.140050938
cmp ebx, 0x10
jne 0x140051b59
mov ecx, 0xa0
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051838
mov r8d, 0xa0
mov dl, sil
mov ecx, 0x210
call fcn.140050938
mov ebx, 0xa1
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051e3c
mov ecx, 0x214
jmp 0x140051bfb
cmp r12w, di
jne 0x140051e3c
call fcn.14005088c
test al, al
je 0x140051e3c
mov rax, rdi
jmp 0x140051e3e
mov rcx, qword [rsi + 0xdf0]
cmp ebx, 7
sete r8b
lea r9, [rcx + 0x3e50]
mov eax, dword [r9]
sub eax, edi
js 0x1400518b5
movsxd rdx, eax
imul rax, rdx, 0x1c
add rax, qword [rcx + 0x3e58]
cmp dword [rax], 6
je 0x14005190b
sub rax, 0x1c
sub rdx, rdi
jns 0x1400518a7
cmp byte [rcx + 0x37b0], r14b
sete dl
cmp dl, r8b
je 0x140051e3c
cmp byte [rsi + 0x72], r14b
je 0x1400518d7
cmp ebx, 7
jne 0x140051e3c
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rbp - 0x41], xmm0
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x29], eax
mov eax, dword [rcx + 0x3e74]
mov dword [rbp - 0x39], eax
inc eax
mov dword [rcx + 0x3e74], eax
mov rcx, r9
mov dword [rbp - 0x41], 6
mov byte [rbp - 0x35], r8b
jmp 0x140051a46
test rax, rax
je 0x1400518b5
mov dl, byte [rax + 0xc]
jmp 0x1400518bf
mov rcx, r13
call qword [sym.imp.USER32.dll_IsWindowUnicode]
test eax, eax
je 0x1400519cf
mov rbx, qword [rbp - 1]
lea rax, [rbx - 1]
cmp rax, 0xfffe
ja 0x140051e3c
test bx, bx
jne 0x14005194d
cmp word [rsi + 0x37ac], r14w
je 0x140051e3c
cmp byte [rsi + 0x37a9], r14b
je 0x140051e3c
mov ecx, 0xfc00
movzx eax, bx
and ax, cx
mov edx, 0xd800
movzx ecx, word [rsi + 0x37ac]
cmp ax, dx
jne 0x140051994
test cx, cx
je 0x140051988
mov edx, 0xfffd
mov rcx, rsi
call fcn.14002ca04
mov word [rsi + 0x37ac], bx
jmp 0x140051e3c
test cx, cx
je 0x1400519bf
mov ecx, 0xdc00
cmp ax, cx
je 0x1400519b2
mov edx, 0xfffd
mov rcx, rsi
call fcn.14002ca04
jmp 0x1400519b7
mov ebx, 0xfffd
mov word [rsi + 0x37ac], r14w
movzx edx, bx
mov rcx, rsi
call fcn.14002ca04
jmp 0x140051e3c
lea rax, [rbp - 9]
mov dword [rsp + 0x28], edi
mov r9d, edi
mov qword [rsp + 0x20], rax
lea r8, [rbp - 1]
mov word [rbp - 9], r14w
mov edx, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movzx edx, word [rbp - 9]
mov rcx, qword [rsi + 0xdf0]
test edx, edx
je 0x140051e3c
cmp byte [rsi + 0x37a9], r14b
je 0x140051e3c
mov eax, dword [rcx + 0x3e74]
mov dword [rbp - 0x39], eax
inc eax
mov qword [rbp - 0x31], r14
mov dword [rbp - 0x29], r14d
mov r14d, 2
mov dword [rcx + 0x3e74], eax
add rcx, 0x3e50
mov dword [rbp - 0x41], 5
mov dword [rbp - 0x3d], r14d
mov dword [rbp - 0x35], edx
lea rdx, [rbp - 0x41]
call fcn.140040d70
jmp 0x140051e3c
mov eax, ebx
sub eax, r9d
je 0x140051732
sub eax, edi
je 0x140051732
sub eax, 0xfb
je 0x140051a8b
sub eax, edi
je 0x140051d2d
sub eax, edi
je 0x140051dbf
cmp eax, edi
je 0x140051d2d
jmp 0x140051e3c
call fcn.140051640
xor ecx, ecx
mov dword [rbp - 0x49], eax
mov r14d, eax
mov qword [r15 + 8], r13
mov eax, ecx
mov edx, 0x200
cmp ebx, edx
setne al
add eax, edi
mov dword [rbp - 9], eax
cmp dword [r15 + 0x10], eax
je 0x140051b07
lea eax, [rcx + 0x18]
mov dword [rbp - 0x1d], 0x80000000
cmp ebx, edx
mov dword [rbp - 0x21], eax
mov dword [rbp - 0x41], eax
lea r14d, [rcx + 2]
lea eax, [rcx + 0x12]
mov qword [rbp - 0x19], r13
cmovne r14d, eax
mov dword [rbp - 0x11], ecx
mov dword [rbp - 0x3d], r14d
mov qword [rbp - 0x39], r13
mov dword [rbp - 0x31], ecx
cmp dword [r15 + 0x10], ecx
je 0x140051af2
lea rcx, [rbp - 0x21]
call qword [sym.imp.USER32.dll_TrackMouseEvent]
lea rcx, [rbp - 0x41]
call qword [sym.imp.USER32.dll_TrackMouseEvent]
mov eax, dword [rbp - 9]
mov r14d, dword [rbp - 0x49]
mov dword [r15 + 0x10], eax
movsx eax, r12w
shr r12, 0x10
mov dword [rbp + 7], eax
movsx eax, r12w
mov dword [rbp + 0xb], eax
cmp ebx, 0xa0
jne 0x140051b36
lea rdx, [rbp + 7]
mov rcx, r13
call qword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x140051e3c
mov rax, qword [rsi + 0xdf0]
mov dword [rax + 0x3e70], r14d
movd xmm2, dword [rbp + 0xb]
movd xmm1, dword [rbp + 7]
cvtdq2ps xmm2, xmm2
cvtdq2ps xmm1, xmm1
jmp 0x140051ce1
cmp ebx, 0x11
jne 0x140051ba9
mov ebx, 0xa2
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051b86
mov r8d, ebx
mov dl, sil
mov ecx, 0x20f
call fcn.140050938
mov ebx, 0xa3
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051e3c
mov ecx, 0x213
jmp 0x140051bfb
cmp ebx, r14d
jne 0x140051e3c
mov ebx, 0xa4
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051bda
mov r8d, ebx
mov dl, sil
mov ecx, 0x211
call fcn.140050938
mov ebx, 0xa5
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, dil
cmp al, sil
jne 0x140051e3c
mov ecx, 0x215
mov r8d, ebx
mov dl, sil
call fcn.140050938
jmp 0x140051e3c
mov eax, 0x20b
cmp ebx, eax
ja 0x140051c7b
je 0x140051d28
mov eax, ebx
sub eax, 0x205
je 0x140051dba
sub eax, 1
je 0x140051d28
sub eax, 1
je 0x140051d28
sub eax, 1
je 0x140051dba
sub eax, 1
je 0x140051d28
cmp eax, 1
jne 0x140051e3c
shr r8, 0x10
xorps xmm1, xmm1
movsx eax, r8w
movd xmm2, eax
cvtdq2ps xmm2, xmm2
divss xmm2, dword [0x1401ba5ec]
mov rcx, rsi
call fcn.14002cdb4
jmp 0x140051e3c
mov eax, ebx
sub eax, 0x20c
je 0x140051dba
sub eax, 1
je 0x140051d28
sub eax, 1
je 0x140051d02
sub eax, 0xb
je 0x140051cee
sub eax, 0x89
je 0x140051cab
cmp eax, 1
jne 0x140051e3c
cmp ebx, 0x2a3
mov eax, r14d
mov edi, 1
setne al
add eax, edi
cmp dword [r15 + 0x10], eax
jne 0x140051e3c
cmp qword [r15 + 8], r13
jne 0x140051cd2
mov qword [r15 + 8], r14
movss xmm1, dword [0x1401ba664]
movaps xmm2, xmm1
mov dword [r15 + 0x10], r14d
mov rcx, rsi
call fcn.14002cbbc
jmp 0x140051e3c
cmp r8d, 7
jne 0x140051e3c
mov byte [r15 + 0x2d], 1
jmp 0x140051e3c
shr r8, 0x10
xorps xmm2, xmm2
movsx eax, r8w
movd xmm1, eax
cvtdq2ps xmm1, xmm1
xorps xmm1, xmmword [0x1401baab0]
divss xmm1, dword [0x1401ba5ec]
jmp 0x140051c6e
mov edi, 1
call fcn.140051640
mov edx, 0xfffffffd
mov dword [rbp - 0x49], eax
lea ecx, [rbx - 0x204]
mov r12d, r14d
test edx, ecx
lea eax, [rbx - 0x20b]
lea ecx, [rbx - 0x207]
mov r14d, 2
cmove r12d, edi
test edx, ecx
cmove r12d, r14d
test edx, eax
jne 0x140051d7b
mov rax, qword [rbp - 1]
xor r12d, r12d
shr rax, 0x10
cmp ax, di
setne r12b
add r12d, 3
cmp dword [r15 + 0x14], 0
jne 0x140051d96
call qword [sym.imp.USER32.dll_GetCapture]
test rax, rax
jne 0x140051d96
mov rcx, r13
call qword [sym.imp.USER32.dll_SetCapture]
mov eax, dword [r15 + 0x14]
mov r8b, dil
mov ecx, dword [rbp - 0x49]
bts eax, r12d
mov dword [r15 + 0x14], eax
mov edx, r12d
mov rax, qword [rsi + 0xdf0]
mov dword [rax + 0x3e70], ecx
jmp 0x140051e34
mov edi, 1
call fcn.140051640
cmp ebx, 0x205
mov r12d, eax
sete r14b
cmp ebx, 0x208
jne 0x140051de1
mov r14d, 2
jmp 0x140051dff
cmp ebx, 0x20c
jne 0x140051dff
mov rax, qword [rbp - 1]
xor r14d, r14d
shr rax, 0x10
cmp ax, di
setne r14b
add r14d, 3
mov eax, dword [r15 + 0x14]
btr eax, r14d
mov dword [r15 + 0x14], eax
test eax, eax
jne 0x140051e20
call qword [sym.imp.USER32.dll_GetCapture]
cmp rax, r13
jne 0x140051e20
call qword [sym.imp.USER32.dll_ReleaseCapture]
mov rax, qword [rsi + 0xdf0]
xor r8d, r8d
mov edx, r14d
mov dword [rax + 0x3e70], r12d
mov rcx, rsi
call fcn.14002ccf4
xor eax, eax
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.140124910
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret