Function at 0x14003f120
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 0x14003f729
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 r10d, dword [r15]
lea rcx, [rcx + rax*4]
dec r10d
mov qword [rsp + 8], rcx
test r10d, r10d
jle 0x14003f702
mov rdx, qword [r14]
add r15, 4
mov r8d, dword [rsi + 0xc]
xor ebp, ebp
add r8d, edi
mov eax, dword [rdx + 0xc]
mov r9d, dword [r15]
imul eax, r8d
sub r8d, dword [r14 + 0x18]
movsxd rcx, eax
mov eax, r8d
add rcx, qword [rdx]
cdq
mov qword [r14 + 0x20], rcx
mov rcx, qword [r14 + 8]
idiv dword [rcx + 0x18]
imul edx, dword [rcx + 0xc]
movsxd rax, edx
add rax, qword [rcx]
sub r10d, 1
mov qword [r14 + 0x28], rax
mov dword [rsp + 0x68], r10d
js 0x14003f53a
nop
mov r12d, dword [r15 + 4]
lea r15, [r15 + 8]
mov r13d, dword [r15]
mov edi, r9d
mov esi, r13d
sar edi, 8
sar esi, 8
cmp esi, edi
jne 0x14003f1fc
mov eax, r13d
sub eax, r9d
imul eax, r12d
add ebp, eax
jmp 0x14003f520
movzx eax, r9b
mov ebx, 0x100
sub ebx, eax
imul ebx, r12d
add ebx, ebp
sar ebx, 8
test ebx, ebx
jle 0x14003f3be
mov rcx, qword [r14]
mov eax, edi
imul eax, dword [rcx + 0x10]
mov rcx, qword [r14 + 8]
cmp ebx, 0xff
jl 0x14003f2f5
movsxd rbx, eax
mov eax, edi
sub eax, dword [r14 + 0x14]
add rbx, qword [r14 + 0x20]
cdq
idiv dword [rcx + 0x14]
movzx r11d, byte [rbx + 1]
imul edx, dword [rcx + 0x10]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx ecx, byte [r8 + 1]
movzx r9d, byte [r8 + 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 [r8]
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 0x14003f3be
imul ebx, dword [r14 + 0x10]
movsxd r11, eax
mov eax, edi
sub eax, dword [r14 + 0x14]
add r11, qword [r14 + 0x20]
cdq
idiv dword [rcx + 0x14]
movzx r10d, byte [r11 + 1]
imul edx, dword [rcx + 0x10]
sar ebx, 8
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx ecx, byte [r8 + 1]
movzx r9d, byte [r8 + 2]
or ecx, 0xff0000
imul ecx, ebx
shl r9d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r8]
or r9d, eax
imul r10d, edx
movzx eax, byte [r11]
imul r9d, ebx
shr r10d, 8
add r10d, ecx
movzx ecx, byte [r11 + 2]
shl ecx, 0x10
or ecx, eax
shr r9d, 8
imul ecx, edx
and r9d, 0xff00ff
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, r10d
shr eax, 8
or ecx, r9d
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 r12d, r12d
jle 0x14003f513
inc edi
sub esi, edi
test esi, esi
jle 0x14003f513
mov rax, qword [r14]
mov ebx, dword [r14 + 0x10]
imul ebx, r12d
movsxd rdx, dword [rax + 0x10]
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 0x14003f4d1
mov rbp, rdx
mov r8, qword [r14 + 8]
mov eax, edi
movzx r11d, byte [rcx + 1]
cdq
mov r9d, 0x100
inc edi
dec esi
idiv dword [r8 + 0x14]
mov eax, dword [r8 + 0x10]
imul eax, edx
movsxd r8, eax
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, rbp
test esi, esi
jg 0x14003f404
jmp 0x14003f513
mov r9, rdx
mov r8, qword [r14 + 8]
mov eax, edi
cdq
inc edi
dec esi
idiv dword [r8 + 0x14]
mov eax, dword [r8 + 0x10]
imul eax, edx
movsxd r8, eax
add r8, qword [r14 + 0x28]
movzx eax, word [r8]
movzx edx, byte [r8 + 2]
mov byte [rcx], al
mov word [rsp + 0x60], ax
movzx eax, byte [rsp + 0x61]
mov byte [rcx + 1], al
mov byte [rcx + 2], dl
add rcx, r9
test esi, esi
jg 0x14003f4d4
mov r10d, dword [rsp + 0x68]
movzx ebp, r13b
imul ebp, r12d
sub r10d, 1
mov r9d, r13d
mov dword [rsp + 0x68], r10d
jns 0x14003f1d0
mov edi, dword [rsp]
mov rsi, qword [rsp + 0x50]
sar ebp, 8
test ebp, ebp
jle 0x14003f6fd
mov rax, qword [r14]
sar r9d, 8
cmp ebp, 0xff
jl 0x14003f628
mov ecx, dword [rax + 0x10]
imul ecx, r9d
sub r9d, dword [r14 + 0x14]
mov eax, r9d
cdq
movsxd rbx, ecx
mov rcx, qword [r14 + 8]
add rbx, qword [r14 + 0x20]
idiv dword [rcx + 0x14]
movzx r11d, byte [rbx + 1]
imul edx, dword [rcx + 0x10]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx ecx, byte [r8 + 1]
movzx r9d, byte [r8 + 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 [r8]
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 0x14003f6fd
mov eax, dword [rax + 0x10]
mov rcx, qword [r14 + 8]
imul ebp, dword [r14 + 0x10]
imul eax, r9d
sub r9d, dword [r14 + 0x14]
sar ebp, 8
movsxd r11, eax
mov eax, r9d
add r11, qword [r14 + 0x20]
cdq
idiv dword [rcx + 0x14]
movzx r10d, byte [r11 + 1]
imul edx, dword [rcx + 0x10]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx ecx, byte [r8 + 1]
movzx r9d, byte [r8 + 2]
or ecx, 0xff0000
imul ecx, ebp
shl r9d, 0x10
shr ecx, 8
and ecx, 0xff00ff
mov eax, ecx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r8]
or r9d, eax
imul r10d, edx
movzx eax, byte [r11]
imul r9d, ebp
shr r10d, 8
add r10d, ecx
movzx ecx, byte [r11 + 2]
shl ecx, 0x10
or ecx, eax
shr r9d, 8
imul ecx, edx
and r9d, 0xff00ff
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, r10d
shr eax, 8
or ecx, r9d
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 0x14003f160
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