Function at 0x14003c730
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rdi
push r15
sub rsp, 0x20
mov rbp, rcx
xor r15d, r15d
mov rcx, qword [rcx]
mov rdi, rdx
mov dword [rsp + 0x50], r15d
cmp dword [rbp + 0x14], r15d
jle 0x14003cdce
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x10], r12
mov qword [rsp + 8], r13
mov qword [rsp], r14
movsxd rax, dword [rbp + 0x1c]
mov r14, rcx
mov r13d, dword [r14]
lea rcx, [rcx + rax*4]
dec r13d
mov qword [rsp + 0x58], rcx
test r13d, r13d
jle 0x14003cda4
mov edx, dword [rbp + 0xc]
add r14, 4
mov rbx, qword [rdi + 8]
add edx, r15d
mov rsi, qword [rdi]
xor r8d, r8d
movsxd rax, edx
sub edx, dword [rdi + 0x18]
mov r9d, dword [r14]
movsxd rcx, dword [rsi + 0x14]
imul rcx, rax
mov eax, edx
add rcx, qword [rsi]
cdq
mov qword [rdi + 0x20], rcx
idiv dword [rbx + 0x20]
movsxd rax, dword [rbx + 0x14]
movsxd rcx, edx
imul rcx, rax
add rcx, qword [rbx]
sub r13d, 1
mov qword [rdi + 0x28], rcx
js 0x14003cbde
nop dword [rax]
mov ebp, dword [r14 + 4]
lea r14, [r14 + 8]
mov r15d, dword [r14]
mov eax, r15d
cdq
movzx esi, dl
add esi, eax
mov eax, r9d
cdq
sar esi, 8
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
cmp esi, eax
jne 0x14003c81a
mov eax, r15d
sub eax, r9d
imul eax, ebp
add r8d, eax
jmp 0x14003cbc0
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 r11d, eax
test eax, eax
jle 0x14003c9e3
mov rcx, qword [rdi]
mov eax, ebx
mov r8, qword [rdi + 8]
imul eax, dword [rcx + 0x18]
cmp r11d, 0xff
jl 0x14003c91d
movsxd r11, eax
mov eax, ebx
sub eax, dword [rdi + 0x14]
add r11, qword [rdi + 0x20]
cdq
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
movzx r8d, byte [r11 + 1]
movsxd rcx, edx
mov r9d, dword [rcx + rax]
mov edx, r9d
shr edx, 8
and r9d, 0xff00ff
imul r9d, dword [rdi + 0x10]
and edx, 0xff00ff
imul edx, dword [rdi + 0x10]
mov ecx, 0x100
shr r9d, 8
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
mov eax, edx
shr eax, 0x10
sub ecx, eax
movzx eax, byte [r11]
imul r8d, ecx
shr r8d, 8
add r8d, edx
movzx edx, byte [r11 + 2]
shl edx, 0x10
or edx, eax
imul edx, ecx
mov ecx, 0x100
shr edx, 8
and edx, 0xff00ff
add edx, r9d
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r8d
shr eax, 8
or ecx, edx
neg al
and ecx, 0xff00ff
or al, r8b
mov byte [r11], cl
mov byte [r11 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r11 + 2], al
jmp 0x14003c9e3
imul r11d, dword [rdi + 0x10]
movsxd r10, eax
mov eax, ebx
sub eax, dword [rdi + 0x14]
add r10, qword [rdi + 0x20]
cdq
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
movzx r8d, byte [r10 + 1]
sar r11d, 8
movsxd rcx, edx
mov r9d, dword [rcx + rax]
mov edx, r9d
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
imul r9d, r11d
imul edx, r11d
mov ecx, 0x100
shr r9d, 8
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
mov eax, edx
shr eax, 0x10
sub ecx, eax
movzx eax, byte [r10]
imul r8d, ecx
shr r8d, 8
add r8d, edx
movzx edx, byte [r10 + 2]
shl edx, 0x10
or edx, eax
imul edx, ecx
mov ecx, 0x100
shr edx, 8
and edx, 0xff00ff
add edx, r9d
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r8d
shr eax, 8
or ecx, edx
neg al
and ecx, 0xff00ff
or al, r8b
mov byte [r10], cl
mov byte [r10 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r10 + 2], al
test ebp, ebp
jle 0x14003cbb8
inc ebx
sub esi, ebx
test esi, esi
jle 0x14003cbb8
mov rax, qword [rdi]
mov r11d, ebp
imul r11d, dword [rdi + 0x10]
movsxd rdx, dword [rax + 0x18]
mov eax, edx
imul eax, ebx
sub ebx, dword [rdi + 0x14]
sar r11d, 8
movsxd rcx, eax
add rcx, qword [rdi + 0x20]
cmp r11d, 0xfe
jge 0x14003cb03
mov r12, rdx
nop dword [rax]
mov r8, qword [rdi + 8]
mov eax, ebx
movzx r9d, byte [rcx + 1]
cdq
inc ebx
dec esi
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
movsxd rdx, edx
mov r10d, dword [rdx + rax]
mov r8d, r10d
shr r8d, 8
and r10d, 0xff00ff
and r8d, 0xff00ff
imul r10d, r11d
imul r8d, r11d
mov edx, 0x100
shr r10d, 8
shr r8d, 8
and r10d, 0xff00ff
and r8d, 0xff00ff
mov eax, r8d
shr eax, 0x10
sub edx, eax
movzx eax, byte [rcx]
imul r9d, edx
shr r9d, 8
add r9d, r8d
movzx r8d, byte [rcx + 2]
shl r8d, 0x10
or r8d, eax
imul r8d, edx
mov edx, 0x100
shr r8d, 8
and r8d, 0xff00ff
add r8d, r10d
mov eax, r8d
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, r9d
shr eax, 8
or edx, r8d
neg al
and edx, 0xff00ff
or al, r9b
mov byte [rcx], dl
mov byte [rcx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [rcx + 2], al
add rcx, r12
test esi, esi
jg 0x14003ca30
jmp 0x14003cbb8
mov r11, rdx
nop word [rax + rax]
mov r8, qword [rdi + 8]
mov eax, ebx
cdq
mov r9d, 0x100
inc ebx
dec esi
idiv dword [r8 + 0x1c]
imul edx, dword [r8 + 0x18]
movsxd r8, edx
add r8, qword [rdi + 0x28]
movzx edx, byte [rcx + 2]
shl edx, 0x10
movzx eax, byte [r8 + 3]
mov r10d, dword [r8]
sub r9d, eax
movzx eax, byte [rcx]
mov r8d, 0x100
or edx, eax
mov eax, r10d
and eax, 0xff00ff
imul edx, r9d
shr r10d, 8
and r10d, 0xff00ff
shr edx, 8
and edx, 0xff00ff
add edx, eax
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
or r8d, edx
movzx edx, byte [rcx + 1]
imul edx, r9d
and r8d, 0xff00ff
mov byte [rcx], r8b
shr edx, 8
add edx, r10d
mov eax, edx
shr eax, 8
neg al
or al, dl
mov byte [rcx + 1], al
mov eax, r8d
shr eax, 0x10
mov byte [rcx + 2], al
add rcx, r11
test esi, esi
jg 0x14003cb10
movzx r8d, r15b
imul r8d, ebp
sub r13d, 1
mov r9d, r15d
jns 0x14003c7e0
mov rsi, qword [rdi]
mov rbx, qword [rdi + 8]
mov r15d, dword [rsp + 0x50]
mov rbp, qword [rsp + 0x40]
mov eax, r8d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov r11d, eax
test eax, eax
jle 0x14003cd9f
mov eax, r9d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov edx, eax
cmp r11d, 0xff
jl 0x14003ccd7
sub edx, dword [rdi + 0x14]
mov ecx, eax
imul ecx, dword [rsi + 0x18]
mov eax, edx
cdq
idiv dword [rbx + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [rbx + 0x18]
movsxd r11, ecx
add r11, qword [rdi + 0x20]
movsxd rcx, edx
movzx r8d, byte [r11 + 1]
mov r9d, dword [rcx + rax]
mov edx, r9d
shr edx, 8
and r9d, 0xff00ff
imul r9d, dword [rdi + 0x10]
and edx, 0xff00ff
imul edx, dword [rdi + 0x10]
mov ecx, 0x100
shr r9d, 8
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
mov eax, edx
shr eax, 0x10
sub ecx, eax
movzx eax, byte [r11]
imul r8d, ecx
shr r8d, 8
add r8d, edx
movzx edx, byte [r11 + 2]
shl edx, 0x10
or edx, eax
imul edx, ecx
mov ecx, 0x100
shr edx, 8
and edx, 0xff00ff
add edx, r9d
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r8d
shr eax, 8
or ecx, edx
neg al
and ecx, 0xff00ff
or al, r8b
mov byte [r11], cl
mov byte [r11 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r11 + 2], al
jmp 0x14003cd9f
sub edx, dword [rdi + 0x14]
imul eax, dword [rsi + 0x18]
imul r11d, dword [rdi + 0x10]
movsxd r10, eax
mov eax, edx
add r10, qword [rdi + 0x20]
cdq
idiv dword [rbx + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [rbx + 0x18]
movzx r8d, byte [r10 + 1]
sar r11d, 8
movsxd rcx, edx
mov r9d, dword [rcx + rax]
mov edx, r9d
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
imul r9d, r11d
imul edx, r11d
mov ecx, 0x100
shr r9d, 8
shr edx, 8
and r9d, 0xff00ff
and edx, 0xff00ff
mov eax, edx
shr eax, 0x10
sub ecx, eax
movzx eax, byte [r10]
imul r8d, ecx
shr r8d, 8
add r8d, edx
movzx edx, byte [r10 + 2]
shl edx, 0x10
or edx, eax
imul edx, ecx
mov ecx, 0x100
shr edx, 8
and edx, 0xff00ff
add edx, r9d
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r8d
shr eax, 8
or ecx, edx
neg al
and ecx, 0xff00ff
or al, r8b
mov byte [r10], cl
mov byte [r10 + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [r10 + 2], al
mov rcx, qword [rsp + 0x58]
inc r15d
mov dword [rsp + 0x50], r15d
cmp r15d, dword [rbp + 0x14]
jl 0x14003c770
mov r14, qword [rsp]
mov r13, qword [rsp + 8]
mov r12, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbp
ret