Function at 0x140009234
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x50], xmm7
mov rax, qword [0x1402ccee0]
xor rax, rsp
mov qword [rbp - 0x30], rax
mov eax, 4
mov r13, r9
mov r12, r8
mov ebx, edx
mov r14, rcx
cmp edx, eax
jge 0x14000927e
xor eax, eax
jmp 0x1400098b9
mov r8, r13
mov rdx, r12
xor ecx, ecx
call fcn.140008fb0
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 - 0x40], edi
mov esi, edi
cmp edi, ebx
jg 0x140009277
movzx ecx, r15w
cmp ecx, 0xb
ja 0x14000969f
je 0x14000968f
sub ecx, 1
je 0x14000966e
sub ecx, 1
je 0x1400094e0
sub ecx, 3
je 0x140009410
cmp ecx, 1
jne 0x1400098b6
lea ebx, [rcx + 3]
cmp di, bx
jne 0x1400098b6
lea ecx, [rbx + 3]
call qword [sym.imp.WS2_32.dll_htons]
lea esi, [rbx + 4]
mov word [rbp - 0x38], ax
mov ecx, esi
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [0x1402cfb84]
mov word [rbp - 0x36], ax
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [0x1402cfbc8]
mov word [rbp - 0x34], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r8, r13
lea rcx, [rbp - 0x38]
mov edx, esi
mov word [rbp - 0x32], ax
call r12
mov rdx, r13
mov rcx, r12
call fcn.140008e00
mov rcx, qword [0x1402cfba0]
lea r15d, [rbx - 3]
xor ebx, ebx
test rcx, rcx
jne 0x1400093c7
movsxd rcx, dword [0x1402cfbbc]
shl rcx, 3
call fcn.1401ae494
mov qword [0x1402cfba0], rax
mov rcx, rax
test rax, rax
je 0x1400098e7
mov eax, dword [0x1402cfbbc]
mov r14d, ebx
test eax, eax
jle 0x1400098b6
mov edi, ebx
movsxd rcx, dword [0x1402cfbc4]
shl rcx, 3
call fcn.1401ae494
mov rcx, qword [0x1402cfba0]
mov qword [rdi + rcx], rax
test rax, rax
je 0x14000992d
mov eax, dword [0x1402cfbbc]
add r14d, r15d
add rdi, rsi
cmp r14d, eax
jl 0x140009390
jmp 0x1400093cd
mov eax, dword [0x1402cfbbc]
test eax, eax
jle 0x1400098b6
mov r9d, dword [0x1402cfbc4]
mov r8d, eax
test r9d, r9d
jle 0x140009403
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 0x1400093ea
add rcx, rsi
sub r8, r15
jne 0x1400093df
jmp 0x1400098b6
cmp di, 0xa
jb 0x14000943b
movzx ecx, word [r14 + 8]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x1402cfba8]
movzx edx, ax
lea eax, [rdx - 0x14]
cmp eax, 0x1374
cmovbe ecx, edx
mov dword [0x1402cfba8], ecx
mov esi, 8
cmp di, si
jb 0x14000946a
movzx ecx, word [r14 + 6]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x1402cda80]
movzx edx, ax
lea eax, [rdx - 0x40]
cmp eax, 0xfc0
cmovbe ecx, edx
mov dword [0x1402cda80], ecx
mov esi, 6
cmp di, si
jb 0x1400098b6
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 [0x1402cfbd8], rbx
mov dword [0x1402cda8c], eax
je 0x1400098b6
sub ecx, r15d
je 0x1400094cf
sub ecx, r15d
je 0x1400094c6
cmp ecx, r15d
jne 0x1400098b6
lea rcx, str.image_tiff
jmp 0x1400094d6
lea rcx, str.image_png
jmp 0x1400094d6
lea rcx, str.image_jpeg
call fcn.14000a774
jmp 0x1400098b6
xor ebx, ebx
lea eax, [rdi - 0xa]
mov ecx, 0xfffd
test cx, ax
jne 0x1400098b6
movzx ecx, word [r14 + 6]
call qword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x1402cda84]
movzx ecx, word [r14 + 8]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm7, eax
cvtdq2pd xmm7, xmm7
mulsd xmm7, qword [0x1402acaf8]
divsd xmm7, xmm0
call qword [sym.imp.WS2_32.dll_ntohs]
movd xmm0, dword [0x1402cda84]
mov ecx, dword [0x1402cfbb4]
mov edx, dword [0x1402cfb90]
movzx eax, ax
cvtdq2pd xmm0, xmm0
movd xmm4, eax
mov eax, dword [0x1402cfbb0]
sub eax, dword [0x1402cfb70]
cvtdq2pd xmm4, xmm4
movd xmm6, eax
mulsd xmm4, qword [0x1402acaf8]
mov eax, dword [0x1402cfb9c]
sub eax, dword [0x1402cfbcc]
cvtdq2pd xmm6, xmm6
divsd xmm4, xmm0
movd xmm0, dword [0x1402cfb98]
andps xmm6, xmmword [0x1402acc40]
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 [0x1402cfb88]
mulsd xmm6, xmm1
movd xmm1, edx
cvtdq2pd xmm7, xmm7
mulsd xmm6, qword [0x1402acb18]
andps xmm7, xmmword [0x1402acc40]
addsd xmm7, xmm4
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm7, xmm1
mulsd xmm7, qword [0x1402acb18]
cmp di, ax
jne 0x140009603
movzx ecx, word [r14 + 0xa]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x1402cfbb4]
movzx ebx, ax
mov edx, dword [0x1402cfb90]
movzx r8d, byte [r14 + 5]
movzx r9d, bx
movd xmm2, edx
movd xmm3, ecx
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm3, xmm3
divsd xmm7, xmm2
divsd xmm6, xmm3
movaps xmm1, xmm7
movaps xmm0, xmm6
call fcn.140008534
mov ebx, eax
cmp eax, 0xffffffff
je 0x1400098b6
mov ecx, 0x58
call qword [sym.imp.WS2_32.dll_htons]
mov edi, 5
mov word [rbp - 0x38], ax
mov ecx, edi
call qword [sym.imp.WS2_32.dll_htons]
mov edx, edi
mov byte [rbp - 0x34], bl
lea rcx, [rbp - 0x38]
mov word [rbp - 0x36], ax
mov r8, r13
call r12
jmp 0x1400098b6
mov esi, 6
cmp di, si
jne 0x1400098b6
movsx edx, byte [r14 + 4]
mov cl, byte [r14 + 5]
call fcn.1400086d0
jmp 0x1400098b6
mov rdx, r13
mov rcx, r12
call fcn.140008e00
jmp 0x1400098b6
sub ecx, 0xc
je 0x14000988d
sub ecx, 1
je 0x14000986d
sub ecx, 1
je 0x14000982e
cmp ecx, 1
jne 0x1400098b6
mov r15d, ecx
cmp byte [r14 + 4], r15b
jne 0x1400097e0
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 [0x1402cda84]
movzx edi, ax
shl edi, 0xa
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [0x1402cfbb0]
xor edx, edx
sub ecx, dword [0x1402cfb70]
movd xmm1, dword [0x1402cfbb4]
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 [0x1402acc40]
cvttsd2si rcx, xmm0
movd xmm0, dword [0x1402cfb98]
add cx, ax
cvtdq2pd xmm0, xmm0
movzx eax, cx
mov ecx, dword [0x1402cfb9c]
sub ecx, dword [0x1402cfbcc]
movd xmm2, eax
mov eax, r10d
divsd xmm1, xmm0
cvtdq2pd xmm2, xmm2
movd xmm0, ecx
movzx ecx, word [0x1402cda84]
mulsd xmm2, xmm1
movd xmm1, dword [0x1402cfb90]
div ecx
mov cl, byte [r14 + 5]
mov edx, esi
mulsd xmm2, qword [0x1402acb18]
cvtdq2pd xmm0, xmm0
cvttsd2si r8, xmm2
andps xmm0, xmmword [0x1402acc40]
cvttsd2si r9, xmm0
movd xmm0, dword [0x1402cfb88]
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 [0x1402acb18]
cvttsd2si r9, xmm2
call fcn.140008814
jmp 0x1400097fe
cmp byte [r14 + 4], 2
jne 0x1400098b6
mov r8d, dword [0x1402cda84]
lea edx, [rsi - 5]
lea rcx, [r14 + 5]
call fcn.140008910
cmp eax, r15d
jne 0x1400098b6
mov ecx, reloc.WS2_32.dll_ntohs
call qword [sym.imp.WS2_32.dll_htons]
mov ebx, 4
mov word [rbp - 0x38], ax
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov edx, ebx
lea rcx, [rbp - 0x38]
jmp 0x14000965f
call fcn.140008770
mov ecx, reloc.WS2_32.dll_ntohl
mov ebx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov esi, 6
mov word [rbp - 0x38], ax
mov ecx, esi
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, bx
mov word [rbp - 0x36], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x34], ax
mov edx, esi
lea rcx, [rbp - 0x38]
jmp 0x140009663
movzx ecx, word [r14 + 4]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
lea eax, [rcx - 0x14]
cmp eax, 0x1374
ja 0x1400098b6
mov dword [0x1402cfba8], ecx
jmp 0x1400098b6
mov esi, 6
cmp di, si
jb 0x1400098b6
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 [0x1402cfb74], ecx
mov eax, dword [rbp - 0x40]
mov rcx, qword [rbp - 0x30]
xor rcx, rsp
call fcn.1401a5d00
mov rbx, qword [rsp + 0xb8]
movaps xmm6, xmmword [rsp + 0x60]
movaps xmm7, xmmword [rsp + 0x50]
add rsp, 0x70
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, 0x225
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, edi
xor ecx, ecx
call fcn.14007f3d4
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.1401a83f8
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 0xfe
lea rdx, str...meshcoreKVMWindowskvm.c
mov edi, 0x226
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, edi
xor ecx, ecx
call fcn.14007f3d4
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.1401a83f8
int3