Function at 0x140008324
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
mov rax, qword [0x14021c510]
xor rax, rsp
mov qword [rbp - 1], rax
mov eax, 4
mov r13, r9
mov r12, r8
mov ebx, edx
mov r14, rcx
cmp edx, eax
jge 0x140008372
xor eax, eax
jmp 0x1400089c2
mov r8, r13
mov rdx, r12
xor ecx, ecx
call fcn.1400080a0
movzx ecx, word [r14]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [r14 + 2]
movzx r15d, ax
call qword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
mov dword [rbp - 0x39], edi
mov esi, edi
cmp edi, ebx
jg 0x14000836b
movzx ecx, r15w
cmp ecx, 0xb
ja 0x1400087a4
je 0x140008794
sub ecx, 1
je 0x140008773
sub ecx, 1
je 0x1400085d4
sub ecx, 3
je 0x140008504
cmp ecx, 1
jne 0x1400089bf
lea ebx, [rcx + 3]
cmp di, bx
jne 0x1400089bf
lea ecx, [rbx + 3]
call qword [sym.imp.WS2_32.dll_htons]
lea esi, [rbx + 4]
mov word [rbp - 9], ax
mov ecx, esi
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [0x14021fd40]
mov word [rbp - 7], ax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [0x14021fd84]
mov word [rbp - 5], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r8, r13
lea rcx, [rbp - 9]
mov edx, esi
mov word [rbp - 3], ax
call r12
mov rdx, r13
mov rcx, r12
call fcn.140007ef0
mov rcx, qword [0x14021fd60]
lea r15d, [rbx - 3]
xor ebx, ebx
test rcx, rcx
jne 0x1400084bb
movsxd rcx, dword [0x14021fd78]
shl rcx, 3
call fcn.1401707f0
mov qword [0x14021fd60], rax
mov rcx, rax
test rax, rax
je 0x1400089f3
mov eax, dword [0x14021fd78]
mov r14d, ebx
test eax, eax
jle 0x1400089bf
mov edi, ebx
movsxd rcx, dword [0x14021fd80]
shl rcx, 3
call fcn.1401707f0
mov rcx, qword [0x14021fd60]
mov qword [rcx + rdi], rax
test rax, rax
je 0x140008a39
mov eax, dword [0x14021fd78]
add r14d, r15d
add rdi, rsi
cmp r14d, eax
jl 0x140008484
jmp 0x1400084c1
mov eax, dword [0x14021fd78]
test eax, eax
jle 0x1400089bf
mov r9d, dword [0x14021fd80]
mov r8d, eax
test r9d, r9d
jle 0x1400084f7
mov rdx, rbx
mov r10, r9
mov rax, qword [rcx]
mov dword [rdx + rax], 0xff
mov rax, qword [rcx]
mov byte [rax + rdx + 4], bl
add rdx, rsi
sub r10, r15
jne 0x1400084de
add rcx, rsi
sub r8, r15
jne 0x1400084d3
jmp 0x1400089bf
cmp di, 0xa
jb 0x14000852f
movzx ecx, word [r14 + 8]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x14021fd5c]
movzx edx, ax
lea eax, [rdx - 0x14]
cmp eax, 0x1374
cmovbe ecx, edx
mov dword [0x14021fd5c], ecx
mov esi, 8
cmp di, si
jb 0x14000855e
movzx ecx, word [r14 + 6]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x14021d130]
movzx edx, ax
lea eax, [rdx - 0x40]
cmp eax, 0xfc0
cmovbe ecx, edx
mov dword [0x14021d130], ecx
mov esi, 6
cmp di, si
jb 0x1400089bf
movsx eax, byte [r14 + 5]
lea r15d, [rsi - 5]
movsx ecx, byte [r14 + 4]
lea edx, [rsi + 0x54]
cmp eax, r15d
cmovb eax, r15d
cmp eax, edx
cmova eax, edx
xor ebx, ebx
cmp qword [0x14021fd98], rbx
mov dword [0x14021d13c], eax
je 0x1400089bf
sub ecx, r15d
je 0x1400085c3
sub ecx, r15d
je 0x1400085ba
cmp ecx, r15d
jne 0x1400089bf
lea rcx, str.image_tiff
jmp 0x1400085ca
lea rcx, str.image_png
jmp 0x1400085ca
lea rcx, str.image_jpeg
call fcn.140009704
jmp 0x1400089bf
xor ebx, ebx
lea eax, [rdi - 0xa]
mov ecx, 0xfffd
movzx esi, bx
test cx, ax
jne 0x1400089bf
movzx ecx, word [r14 + 6]
call qword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x14021d134]
movzx ecx, word [r14 + 8]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm7, eax
cvtdq2pd xmm7, xmm7
mulsd xmm7, qword [0x1402000f8]
divsd xmm7, xmm0
call qword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x14021d134]
mov ecx, dword [0x14021fd70]
mov r8d, dword [0x14021fd4c]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm4, eax
mov eax, dword [0x14021fd6c]
sub eax, dword [0x14021fd1c]
cvtdq2pd xmm4, xmm4
movd xmm6, eax
mulsd xmm4, qword [0x1402000f8]
mov eax, dword [0x14021fd58]
sub eax, dword [0x14021fd88]
cvtdq2pd xmm6, xmm6
divsd xmm4, xmm0
movd xmm0, dword [0x14021fd54]
andps xmm6, xmmword [0x140200220]
addsd xmm6, xmm7
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
movd xmm7, eax
lea eax, [rbx + 0xc]
divsd xmm1, xmm0
movd xmm0, dword [0x14021fd44]
mulsd xmm6, xmm1
movd xmm1, r8d
cvtdq2pd xmm7, xmm7
mulsd xmm6, qword [0x140200118]
andps xmm7, xmmword [0x140200220]
addsd xmm7, xmm4
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm7, xmm1
mulsd xmm7, qword [0x140200118]
cmp di, ax
jne 0x1400086fd
movzx ecx, word [r14 + 0xa]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x14021fd70]
movzx esi, ax
mov r8d, dword [0x14021fd4c]
movzx edx, byte [r14 + 5]
cmp edx, 0x88
je 0x1400089bf
movd xmm0, ecx
or edx, 0xc001
mov dword [rbp - 0x31], ebx
mov dword [rbp - 0x1d], edx
cvtdq2pd xmm0, xmm0
divsd xmm6, xmm0
movd xmm0, r8d
cvtdq2pd xmm0, xmm0
cvttsd2si ecx, xmm6
divsd xmm7, xmm0
mov dword [rbp - 0x29], ecx
cvttsd2si eax, xmm7
mov dword [rbp - 0x25], eax
movsx eax, si
mov dword [rbp - 0x21], eax
test si, si
je 0x140008753
bts edx, 0xb
mov dword [rbp - 0x1d], edx
mov r8d, 0x28
mov dword [rbp - 0x19], ebx
lea rdx, [rbp - 0x31]
mov qword [rbp - 0x11], rbx
lea ecx, [r8 - 0x27]
call qword [sym.imp.USER32.dll_SendInput]
jmp 0x1400089bf
mov esi, 6
cmp di, si
jne 0x1400089bf
movsx edx, byte [r14 + 4]
mov cl, byte [r14 + 5]
call fcn.1400077c0
jmp 0x1400089bf
mov rdx, r13
mov rcx, r12
call fcn.140007ef0
jmp 0x1400089bf
sub ecx, 0xc
je 0x140008996
sub ecx, 1
je 0x140008976
sub ecx, 1
je 0x140008934
cmp ecx, 1
jne 0x1400089bf
mov r15d, ecx
cmp byte [r14 + 4], r15b
jne 0x1400088e5
mov ecx, dword [r14 + 6]
call qword [sym.imp.WS2_32.dll_ntohl]
movzx ecx, word [r14 + 0xa]
mov esi, eax
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [r14 + 0xc]
movzx ebx, word [0x14021d134]
movzx edi, ax
shl edi, 0xa
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x14021fd6c]
xor edx, edx
sub ecx, dword [0x14021fd1c]
movd xmm1, dword [0x14021fd70]
movzx r10d, ax
mov eax, edi
div ebx
movd xmm0, ecx
xor edx, edx
cvtdq2pd xmm0, xmm0
shl r10d, 0xa
cvtdq2pd xmm1, xmm1
andps xmm0, xmmword [0x140200220]
cvttsd2si rcx, xmm0
movd xmm0, dword [0x14021fd54]
add cx, ax
cvtdq2pd xmm0, xmm0
movzx eax, cx
mov ecx, dword [0x14021fd58]
sub ecx, dword [0x14021fd88]
movd xmm2, eax
mov eax, r10d
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
movd xmm0, ecx
movzx ecx, word [0x14021d134]
mulsd xmm2, xmm1
movd xmm1, dword [0x14021fd4c]
div ecx
mov cl, byte [r14 + 5]
mov edx, esi
mulsd xmm2, qword [0x140200118]
cvtdq2pd xmm0, xmm0
cvttsd2si r8, xmm2
andps xmm0, xmmword [0x140200220]
cvttsd2si r9, xmm0
movd xmm0, dword [0x14021fd44]
cvtdq2pd xmm1, xmm1
add r9w, ax
movzx eax, r9w
cvtdq2pd xmm0, xmm0
movd xmm2, eax
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
mulsd xmm2, xmm1
mulsd xmm2, qword [0x140200118]
cvttsd2si r9, xmm2
call fcn.140007904
jmp 0x140008903
cmp byte [r14 + 4], 2
jne 0x1400089bf
mov r8d, dword [0x14021d134]
lea edx, [rsi - 5]
lea rcx, [r14 + 5]
call fcn.140007a00
cmp eax, r15d
jne 0x1400089bf
mov ecx, reloc.WS2_32.dll_ntohs
call qword [sym.imp.WS2_32.dll_htons]
mov ebx, 4
mov word [rbp - 9], ax
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 7], ax
mov edx, ebx
lea rcx, [rbp - 9]
jmp 0x14000896e
call fcn.140007860
mov ecx, reloc.WS2_32.dll_ntohl
mov ebx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov esi, 6
mov word [rbp - 9], ax
mov ecx, esi
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, bx
mov word [rbp - 7], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 5], ax
mov edx, esi
lea rcx, [rbp - 9]
mov r8, r13
call r12
jmp 0x1400089bf
movzx ecx, word [r14 + 4]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
lea eax, [rcx - 0x14]
cmp eax, 0x1374
ja 0x1400089bf
mov dword [0x14021fd5c], ecx
jmp 0x1400089bf
mov esi, 6
cmp di, si
jb 0x1400089bf
movzx ecx, word [r14 + 4]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
xor ebx, ebx
cmp ecx, 0xffff
cmove ecx, ebx
mov dword [0x14021fd30], ecx
mov eax, dword [rbp - 0x39]
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.140168070
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [rsp + 0x70]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 0xfe
lea rdx, str...meshcoreKVMWindowskvm.c
mov edi, 0x21b
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, edi
xor ecx, ecx
call fcn.140078e6c
mov r8d, edi
lea rdx, str...meshcoreKVMWindowskvm.c
lea rcx, str.CRITICALEXIT__FILE:__s__LINE:__d_r_n
call fcn.140001090
mov ecx, ebx
call fcn.14016a768
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 0xfe
lea rdx, str...meshcoreKVMWindowskvm.c
mov edi, 0x21c
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, edi
xor ecx, ecx
call fcn.140078e6c
mov r8d, edi
lea rdx, str...meshcoreKVMWindowskvm.c
lea rcx, str.CRITICALEXIT__FILE:__s__LINE:__d_r_n
call fcn.140001090
mov ecx, ebx
call fcn.14016a768
int3