Function at 0x14003d1a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
push r14
sub rsp, 0x30
mov rsi, rcx
xor edi, edi
mov rcx, qword [rcx]
mov r14, rdx
mov dword [rsp], edi
cmp dword [rsi + 0x14], edi
jle 0x14003d7be
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x18], r13
mov qword [rsp + 0x10], r15
nop dword [rax]
movsxd rax, dword [rsi + 0x1c]
mov r15, rcx
mov r13d, dword [r15]
lea rcx, [rcx + rax*4]
dec r13d
mov qword [rsp + 8], rcx
test r13d, r13d
jle 0x14003d797
mov edx, dword [rsi + 0xc]
add r15, 4
mov r10, qword [r14 + 8]
add edx, edi
mov r11, qword [r14]
xor r8d, r8d
movsxd rax, edx
sub edx, dword [r14 + 0x18]
mov r9d, dword [r15]
movsxd rcx, dword [r11 + 0x14]
imul rcx, rax
mov eax, edx
add rcx, qword [r11]
cdq
mov qword [r14 + 0x20], rcx
idiv dword [r10 + 0x20]
movsxd rax, dword [r10 + 0x14]
movsxd rcx, edx
imul rcx, rax
add rcx, qword [r10]
sub r13d, 1
mov qword [r14 + 0x28], rcx
mov dword [rsp + 0x68], r13d
js 0x14003d5de
nop dword [rax]
nop word [rax + rax]
mov ebp, dword [r15 + 4]
lea r15, [r15 + 8]
mov r12d, dword [r15]
mov eax, r12d
cdq
movzx esi, dl
add esi, eax
mov eax, r9d
cdq
sar esi, 8
movzx edx, dl
add eax, edx
sar eax, 8
mov edi, eax
cmp esi, eax
jne 0x14003d29a
mov eax, r12d
sub eax, r9d
imul eax, ebp
add r8d, eax
jmp 0x14003d5bd
movzx eax, r9b
mov ecx, 0x100
sub ecx, eax
imul ecx, ebp
lea eax, [r8 + rcx]
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
test eax, eax
jle 0x14003d457
mov rcx, qword [r14 + 8]
mov eax, edi
sub eax, dword [r14 + 0x14]
cdq
idiv dword [rcx + 0x1c]
mov rax, qword [r14]
imul edx, dword [rcx + 0x18]
mov ecx, edi
imul ecx, dword [rax + 0x18]
cmp ebx, 0xff
jl 0x14003d39c
movsxd rbx, ecx
add rbx, qword [r14 + 0x20]
movsxd r10, edx
mov edx, 0x100
add r10, qword [r14 + 0x28]
movzx r11d, byte [rbx + 1]
movzx ecx, byte [r10 + 1]
movzx r9d, byte [r10 + 2]
or ecx, 0xff0000
imul ecx, dword [r14 + 0x10]
shl r9d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r10]
or r9d, eax
imul r11d, edx
imul r9d, dword [r14 + 0x10]
movzx eax, byte [rbx]
shr r11d, 8
add r11d, ecx
shr r9d, 8
movzx ecx, byte [rbx + 2]
and r9d, 0xff00ff
shl ecx, 0x10
or ecx, eax
imul ecx, edx
shr ecx, 8
and ecx, 0xff00ff
add r9d, ecx
mov ecx, 0x100
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r11d
shr eax, 8
or ecx, r9d
neg al
and ecx, 0xff00ff
or al, r11b
mov byte [rbx], cl
mov byte [rbx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [rbx + 2], al
jmp 0x14003d457
imul ebx, dword [r14 + 0x10]
movsxd r11, ecx
add r11, qword [r14 + 0x20]
movsxd r9, edx
mov edx, 0x100
add r9, qword [r14 + 0x28]
sar ebx, 8
movzx r10d, byte [r11 + 1]
movzx ecx, byte [r9 + 1]
movzx r8d, byte [r9 + 2]
or ecx, 0xff0000
imul ecx, ebx
shl r8d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r9]
or r8d, eax
imul r10d, edx
movzx eax, byte [r11]
imul r8d, ebx
shr r10d, 8
add r10d, ecx
movzx ecx, byte [r11 + 2]
shl ecx, 0x10
or ecx, eax
shr r8d, 8
imul ecx, edx
and r8d, 0xff00ff
shr ecx, 8
and ecx, 0xff00ff
add r8d, ecx
mov ecx, 0x100
mov eax, r8d
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r10d
shr eax, 8
or ecx, r8d
neg al
and ecx, 0xff00ff
or al, r10b
mov byte [r11], cl
mov byte [r11 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r11 + 2], al
test ebp, ebp
jle 0x14003d5b5
inc edi
sub esi, edi
test esi, esi
jle 0x14003d5b5
mov rax, qword [r14]
mov ebx, ebp
imul ebx, dword [r14 + 0x10]
movsxd rdx, dword [rax + 0x18]
mov eax, edx
imul eax, edi
sub edi, dword [r14 + 0x14]
sar ebx, 8
movsxd rcx, eax
add rcx, qword [r14 + 0x20]
cmp ebx, 0xfe
jge 0x14003d570
mov r13, rdx
nop dword [rax + rax]
mov r8, qword [r14 + 8]
mov eax, edi
movzx r11d, byte [rcx + 1]
cdq
mov r9d, 0x100
inc edi
dec esi
idiv dword [r8 + 0x1c]
imul edx, dword [r8 + 0x18]
movsxd r8, edx
add r8, qword [r14 + 0x28]
movzx edx, byte [r8 + 1]
movzx r10d, byte [r8 + 2]
or edx, 0xff0000
imul edx, ebx
shl r10d, 0x10
shr edx, 8
and edx, 0xff00ff
mov eax, edx
shr eax, 0x10
sub r9d, eax
movzx eax, byte [r8]
or r10d, eax
imul r11d, r9d
movzx eax, byte [rcx]
imul r10d, ebx
shr r11d, 8
add r11d, edx
movzx edx, byte [rcx + 2]
shl edx, 0x10
or edx, eax
shr r10d, 8
imul edx, r9d
and r10d, 0xff00ff
shr edx, 8
and edx, 0xff00ff
add r10d, edx
mov edx, 0x100
mov eax, r10d
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, r11d
shr eax, 8
or edx, r10d
neg al
and edx, 0xff00ff
or al, r11b
mov byte [rcx], dl
mov byte [rcx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [rcx + 2], al
add rcx, r13
test esi, esi
jg 0x14003d4a0
mov r13d, dword [rsp + 0x68]
jmp 0x14003d5b5
mov r10, rdx
mov r8, qword [r14 + 8]
mov eax, edi
cdq
inc edi
dec esi
idiv dword [r8 + 0x1c]
mov rax, qword [r14 + 0x28]
imul edx, dword [r8 + 0x18]
movsxd rdx, edx
movzx r8d, word [rdx + rax]
movzx r9d, byte [rdx + rax + 2]
mov word [rsp + 0x60], r8w
movzx eax, byte [rsp + 0x61]
mov byte [rcx + 1], al
mov byte [rcx], r8b
mov byte [rcx + 2], r9b
add rcx, r10
test esi, esi
jg 0x14003d573
movzx r8d, r12b
imul r8d, ebp
sub r13d, 1
mov r9d, r12d
mov dword [rsp + 0x68], r13d
jns 0x14003d260
mov r11, qword [r14]
mov r10, qword [r14 + 8]
mov edi, dword [rsp]
mov rsi, qword [rsp + 0x50]
mov eax, r8d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
test eax, eax
jle 0x14003d792
mov eax, r9d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ecx, eax
sub eax, dword [r14 + 0x14]
imul ecx, dword [r11 + 0x18]
cdq
idiv dword [r10 + 0x1c]
imul edx, dword [r10 + 0x18]
cmp ebx, 0xff
jl 0x14003d6d7
movsxd rbx, ecx
add rbx, qword [r14 + 0x20]
movsxd r10, edx
mov edx, 0x100
add r10, qword [r14 + 0x28]
movzx r11d, byte [rbx + 1]
movzx ecx, byte [r10 + 1]
movzx r9d, byte [r10 + 2]
or ecx, 0xff0000
imul ecx, dword [r14 + 0x10]
shl r9d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r10]
or r9d, eax
imul r11d, edx
imul r9d, dword [r14 + 0x10]
movzx eax, byte [rbx]
shr r11d, 8
add r11d, ecx
shr r9d, 8
movzx ecx, byte [rbx + 2]
and r9d, 0xff00ff
shl ecx, 0x10
or ecx, eax
imul ecx, edx
shr ecx, 8
and ecx, 0xff00ff
add r9d, ecx
mov ecx, 0x100
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r11d
shr eax, 8
or ecx, r9d
neg al
and ecx, 0xff00ff
or al, r11b
mov byte [rbx], cl
mov byte [rbx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [rbx + 2], al
jmp 0x14003d792
imul ebx, dword [r14 + 0x10]
movsxd r11, ecx
add r11, qword [r14 + 0x20]
movsxd r9, edx
mov edx, 0x100
add r9, qword [r14 + 0x28]
sar ebx, 8
movzx r10d, byte [r11 + 1]
movzx ecx, byte [r9 + 1]
movzx r8d, byte [r9 + 2]
or ecx, 0xff0000
imul ecx, ebx
shl r8d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r9]
or r8d, eax
imul r10d, edx
movzx eax, byte [r11]
imul r8d, ebx
shr r10d, 8
add r10d, ecx
movzx ecx, byte [r11 + 2]
shl ecx, 0x10
or ecx, eax
shr r8d, 8
imul ecx, edx
and r8d, 0xff00ff
shr ecx, 8
and ecx, 0xff00ff
add r8d, ecx
mov ecx, 0x100
mov eax, r8d
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r10d
shr eax, 8
or ecx, r8d
neg al
and ecx, 0xff00ff
or al, r10b
mov byte [r11], cl
mov byte [r11 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r11 + 2], al
mov rcx, qword [rsp + 8]
inc edi
mov dword [rsp], edi
cmp edi, dword [rsi + 0x14]
jl 0x14003d1e0
mov r15, qword [rsp + 0x10]
mov r13, qword [rsp + 0x18]
mov r12, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret