Function at 0x18015c860
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rdi, rcx
xor ebx, ebx
nop dword [rax]
mov r9d, dword [rdi + 0x64]
mov edx, dword [rdi + 0x3c]
mov ecx, dword [rdi + 0x48]
lea eax, [rdx + r9]
cmp eax, ecx
jbe 0x18015c8da
mov r9d, ecx
sub r9d, edx
cmp r9d, 3
jae 0x18015c8da
inc dword [rdi + 0x5c]
mov eax, dword [rdi + 0x5c]
mov ecx, eax
cmp eax, dword [rdi + 0x60]
cmove ecx, ebx
mov dword [rdi + 0x5c], ecx
lea rcx, [rdi + 8]
call fcn.18015bb70
test eax, eax
jne 0x18015cab2
cmp dword [rdi + 0x3c], 0x7fffffff
jne 0x18015caa5
mov rcx, rdi
call fcn.18015bc00
jmp 0x18015caa5
mov r13d, edx
mov r11, rdx
sub r13d, dword [rdi + 0x60]
mov ebp, 2
cmp edx, dword [rdi + 0x60]
mov r12d, ebp
cmovbe r13d, ebx
add r11, qword [rdi + 0x30]
movzx eax, byte [r11]
movzx ecx, byte [r11 + 1]
shl rcx, 8
xor rcx, rax
mov rax, qword [rdi + 0x68]
mov ebx, dword [rax + rcx*4]
mov dword [rax + rcx*4], edx
mov eax, dword [rdi + 0x5c]
mov rdx, qword [rdi + 0x70]
add eax, eax
mov esi, dword [rdi + 0x78]
mov qword [rsp + 0x60], rdx
lea r14, [rdx + rax*4]
lea r15, [r14 + 4]
cmp ebx, r13d
jbe 0x18015c9d7
mov eax, esi
dec esi
test eax, eax
je 0x18015c9d7
mov ecx, dword [rdi + 0x3c]
mov eax, dword [rdi + 0x5c]
sub ecx, ebx
cmp ecx, eax
ja 0x18015c94f
sub eax, ecx
jmp 0x18015c954
sub eax, ecx
add eax, dword [rdi + 0x60]
add eax, eax
mov r8d, ebx
add r8, qword [rdi + 0x30]
cmp ebp, r12d
lea r10, [rdx + rax*4]
mov eax, r12d
cmovb eax, ebp
movzx ecx, byte [rax + r11]
cmp byte [rax + r8], cl
jne 0x18015c9a3
inc eax
cmp eax, r9d
je 0x18015c992
nop dword [rax]
movzx ecx, byte [rax + r11]
cmp byte [rax + r8], cl
jne 0x18015c9a3
inc eax
cmp eax, r9d
jne 0x18015c980
mov eax, dword [r10]
xor ebx, ebx
mov dword [r14], eax
mov eax, dword [r10 + 4]
mov dword [r15], eax
jmp 0x18015c9df
movzx ecx, byte [rax + r11]
cmp byte [rax + r8], cl
jae 0x18015c9bd
mov dword [r14], ebx
mov r12d, eax
lea r14, [r10 + 4]
mov r10, r14
jmp 0x18015c9c5
mov dword [r15], ebx
mov ebp, eax
mov r15, r10
mov ebx, dword [r10]
cmp ebx, r13d
jbe 0x18015c9d7
mov rdx, qword [rsp + 0x60]
jmp 0x18015c933
xor ebx, ebx
mov dword [r14], ebx
mov dword [r15], ebx
inc dword [rdi + 0x5c]
mov eax, dword [rdi + 0x5c]
mov ecx, eax
cmp eax, dword [rdi + 0x60]
cmove ecx, ebx
mov dword [rdi + 0x5c], ecx
inc dword [rdi + 0x3c]
mov ecx, dword [rdi + 0x3c]
cmp ecx, dword [rdi + 0x20]
jbe 0x18015ca42
mov r8, qword [rdi + 0x30]
lea rax, [r8 + rcx]
cmp rax, qword [rdi + 0x28]
jbe 0x18015ca35
sub ecx, dword [rdi + 0x40]
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0x48]
add ecx, r8d
lea ebx, [rcx - 1]
cmove ebx, ecx
mov rcx, qword [rdi + 0x10]
sub eax, ecx
sub eax, ebx
add r8d, eax
lea rdx, [rcx + rbx]
call fcn.180280e70
sub qword [rdi + 0x30], rbx
xor ebx, ebx
lea rcx, [rdi + 8]
call fcn.18015bed0
test eax, eax
jne 0x18015cab2
mov edx, dword [rdi + 0x3c]
cmp edx, 0x7fffffff
jne 0x18015caa5
mov ecx, dword [rdi + 0x60]
mov r9d, edx
mov eax, dword [rdi + 0x7c]
sub r9d, ecx
mov r8, qword [rdi + 0x68]
lea r10d, [rax + rcx*2]
test r10d, r10d
je 0x18015ca90
nop word [rax + rax]
mov ecx, dword [r8]
lea r8, [r8 + 4]
sub ecx, r9d
mov eax, ebx
cmp dword [r8 - 4], r9d
cmova eax, ecx
mov dword [r8 - 4], eax
sub r10, 1
jne 0x18015ca70
mov edx, dword [rdi + 0x3c]
sub dword [rdi + 0x20], r9d
sub edx, r9d
movsxd rax, r9d
add qword [rdi + 0x30], rax
sub dword [rdi + 0x48], r9d
mov dword [rdi + 0x3c], edx
add dword [rsp + 0x68], 0xffffffff
jne 0x18015c880
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret