Function at 0x1403935c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r15, 0xffffffffffffffc0
mov rbp, rcx
mov qword [rsp + 0x78], rdx
mov qword [rsp + 0x80], r8
test r15d, r15d
mov ebx, r15d
je 0x140393827
lea rax, [r15 + 0x40]
mov r14d, r15d
xor edx, edx
shr r14d, 0x1f
mov rdi, rax
mov qword [rsp + 8], rax
mov eax, r15d
sar eax, 0x1f
add rdi, qword [rsp + 0x80]
mov dword [rsp + 0x10], eax
mov eax, r15d
and eax, 0xfff
mov dword [rsp + 0x14], eax
mov rax, rdx
mov rsi, qword [rsp + 0x78]
lea r8, [rbp + 0x20]
shl rax, 7
add rax, qword [rsp + 8]
mov dword [rsp + 4], edx
mov qword [rsp + 0x18], rdi
lea r11, [rsi + rax*4]
mov rax, rdi
xor esi, esi
mov byte [rax], 0x64
mov rcx, qword [r8]
mov edi, dword [rbp]
mov r9d, dword [rsp + 0x10]
movzx r12d, byte [rcx + rdx]
xor r9d, ebx
sub r9d, dword [rsp + 0x10]
mov ecx, edi
cmp r12d, edi
jge 0x140393686
mov rcx, qword [r8 + 0x10]
lea r12d, [r9 + r12 - 1]
movsx r10d, byte [rcx + rdx]
mov ecx, edi
cmp r9d, r10d
cmovle ecx, r12d
mov r10, qword [rbp + 8]
movsxd r12, ecx
lea r12, [r10 + r12*4]
movzx r10d, word [r12 + 2]
inc r10d
cmp edi, ecx
je 0x1403936b3
cmp r10d, 0x63
jg 0x1403936b3
movzx ecx, word [r12]
lea ecx, [r14 + rcx*2]
mov dword [r11], ecx
mov byte [rax], r10b
mov rcx, qword [r8 + 0x10]
mov r10d, r9d
movsx r12d, byte [rcx + rdx]
sub r10d, r12d
test r10d, r10d
jle 0x140393727
mov rdi, qword [r8]
cmp r12d, r10d
movsxd rcx, dword [rbp]
movzx edi, byte [rdi + rdx]
jl 0x140393727
cmp ecx, edi
jle 0x140393727
lea edi, [r10 + rdi - 1]
cmp ecx, edi
je 0x140393727
mov r12, qword [rbp + 8]
movsxd rdi, edi
movzx r13d, byte [rax]
lea r10, [r12 + rcx*4]
lea r12, [r12 + rdi*4]
movzx edi, word [r10 + 2]
movzx ecx, word [r12 + 2]
lea edi, [rdi + rcx + 2]
cmp edi, r13d
jge 0x140393727
movzx r10d, word [r10]
add r10d, r10d
shl r10d, cl
movzx ecx, word [r12]
add r10d, ecx
lea ecx, [r14 + r10*2]
mov dword [r11], ecx
mov byte [rax], dil
mov r10, qword [r8 + 0x20]
movsxd rcx, r9d
mov edi, dword [rsp + 4]
movsx ecx, byte [r10 + rcx]
sub edi, ecx
mov ecx, edi
dec ecx
js 0x1403937b4
mov r10, qword [r8]
movsxd rcx, ecx
mov edi, dword [rbp]
movzx r10d, byte [r10 + rcx]
cmp edi, r10d
jle 0x1403937b4
mov r12, qword [r8 + 0x10]
movsx ecx, byte [r12 + rcx]
cmp r9d, ecx
jg 0x1403937b4
lea r9d, [r9 + r10 - 1]
cmp edi, r9d
je 0x1403937b4
mov r10, qword [rbp + 8]
movsxd rcx, edi
movsxd r9, r9d
lea r12, [r10 + rcx*4]
lea rdi, [r10 + r9*4]
movzx r9d, word [r12 + 2]
movzx ecx, word [rdi + 2]
lea r10d, [r9 + rcx + 3]
movzx r9d, byte [rax]
cmp r10d, r9d
jge 0x1403937b4
movzx r9d, word [r12]
lea r9d, [r9*4 + 2]
shl r9d, cl
movzx ecx, word [rdi]
add r9d, ecx
lea ecx, [r14 + r9*2]
mov dword [r11], ecx
mov byte [rax], r10b
movsxd r9, dword [rbp]
mov rcx, qword [rbp + 8]
movzx r10d, byte [rax]
lea rcx, [rcx + r9*4]
movzx r9d, word [rcx + 2]
add r9d, 0x17
cmp r9d, r10d
jge 0x1403937f5
movzx ecx, word [rcx]
lea ecx, [rsi + rcx*8 + 6]
shl ecx, 6
add ecx, dword [rsp + 4]
lea ecx, [rcx + rcx + 1]
shl ecx, 0xc
add ecx, dword [rsp + 0x14]
lea ecx, [rcx + rcx + 1]
mov dword [r11], ecx
mov byte [rax], r9b
inc esi
add rax, 0x2000
add r8, 8
add r11, 0x8000
cmp esi, 2
jne 0x14039364d
mov rdi, qword [rsp + 0x18]
inc rdx
sub rdi, 0xffffffffffffff80
cmp rdx, 0x40
jne 0x140393626
inc r15
cmp r15, 0x40
jne 0x1403935e7
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret