Function at 0x14003d490
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, rcx
xor esi, esi
mov rcx, qword [rcx]
mov r14, rdx
mov dword [rsp], esi
cmp dword [rbp + 0x14], esi
jle 0x14003da88
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x18], r13
mov qword [rsp + 0x10], r15
nop dword [rax]
movsxd rax, dword [rbp + 0x1c]
mov r15, rcx
mov r13d, dword [r15]
lea rcx, [rcx + rax*4]
dec r13d
mov qword [rsp + 8], rcx
test r13d, r13d
jle 0x14003da61
mov edx, dword [rbp + 0xc]
add r15, 4
mov r11, qword [r14 + 8]
add edx, esi
mov rdi, qword [r14]
xor r8d, r8d
movsxd rax, edx
sub edx, dword [r14 + 0x18]
mov r9d, dword [r15]
movsxd rcx, dword [rdi + 0x14]
imul rcx, rax
mov eax, edx
add rcx, qword [rdi]
cdq
mov qword [r14 + 0x20], rcx
idiv dword [r11 + 0x20]
movsxd rax, dword [r11 + 0x14]
movsxd rcx, edx
imul rcx, rax
add rcx, qword [r11]
sub r13d, 1
mov qword [r14 + 0x28], rcx
mov dword [rsp + 0x68], r13d
js 0x14003d8be
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 0x14003d58a
mov eax, r12d
sub eax, r9d
imul eax, ebp
add r8d, eax
jmp 0x14003d89d
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 0x14003d732
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]
movsxd r9, edx
mov edx, 0x100
add r9, qword [r14 + 0x28]
movzx r8d, byte [r9 + 2]
shl r8d, 0x10
cmp ebx, 0xff
jl 0x14003d68c
movsxd rbx, ecx
add rbx, qword [r14 + 0x20]
movzx ecx, byte [r9 + 1]
or ecx, 0xff0000
imul ecx, dword [r14 + 0x10]
movzx r11d, byte [rbx + 1]
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r9]
or r8d, eax
imul r11d, edx
imul r8d, dword [r14 + 0x10]
movzx eax, byte [rbx]
shr r11d, 8
add r11d, ecx
shr r8d, 8
movzx ecx, byte [rbx + 2]
and r8d, 0xff00ff
shl ecx, 0x10
or ecx, eax
imul ecx, edx
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, r11d
shr eax, 8
or ecx, r8d
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 0x14003d732
imul ebx, dword [r14 + 0x10]
movsxd r11, ecx
add r11, qword [r14 + 0x20]
movzx ecx, byte [r9 + 1]
or ecx, 0xff0000
sar ebx, 8
movzx r10d, byte [r11 + 1]
imul ecx, ebx
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 0x14003d895
inc edi
sub esi, edi
test esi, esi
jle 0x14003d895
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 0x14003d850
mov r13, rdx
nop word [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 0x14003d780
mov r13d, dword [rsp + 0x68]
jmp 0x14003d895
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 0x14003d853
movzx r8d, r12b
imul r8d, ebp
sub r13d, 1
mov r9d, r12d
mov dword [rsp + 0x68], r13d
jns 0x14003d550
mov rdi, qword [r14]
mov r11, qword [r14 + 8]
mov esi, dword [rsp]
mov rbp, qword [rsp + 0x50]
mov eax, r8d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
test eax, eax
jle 0x14003da5c
mov eax, r9d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ecx, eax
sub eax, dword [r14 + 0x14]
imul ecx, dword [rdi + 0x18]
cdq
idiv dword [r11 + 0x1c]
imul edx, dword [r11 + 0x18]
movsxd r9, edx
mov edx, 0x100
add r9, qword [r14 + 0x28]
movzx r8d, byte [r9 + 2]
shl r8d, 0x10
cmp ebx, 0xff
jl 0x14003d9b6
movsxd rbx, ecx
add rbx, qword [r14 + 0x20]
movzx ecx, byte [r9 + 1]
or ecx, 0xff0000
imul ecx, dword [r14 + 0x10]
movzx r11d, byte [rbx + 1]
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r9]
or r8d, eax
imul r11d, edx
imul r8d, dword [r14 + 0x10]
movzx eax, byte [rbx]
shr r11d, 8
add r11d, ecx
shr r8d, 8
movzx ecx, byte [rbx + 2]
and r8d, 0xff00ff
shl ecx, 0x10
or ecx, eax
imul ecx, edx
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, r11d
shr eax, 8
or ecx, r8d
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 0x14003da5c
imul ebx, dword [r14 + 0x10]
movsxd r11, ecx
add r11, qword [r14 + 0x20]
movzx ecx, byte [r9 + 1]
or ecx, 0xff0000
sar ebx, 8
movzx r10d, byte [r11 + 1]
imul ecx, ebx
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 esi
mov dword [rsp], esi
cmp esi, dword [rbp + 0x14]
jl 0x14003d4d0
mov r15, qword [rsp + 0x10]
mov r13, qword [rsp + 0x18]
mov r12, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret