Function at 0x3001fe50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 0xc80
mov ebx, r9d
mov esi, edx
mov r10, rcx
mov r13d, dword [r10 + 0x8a0]
lea eax, [r13*8 + 0x100]
cmp eax, 0x320
jb 0x3001fe93
xor eax, eax
add rsp, 0xc80
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
movsxd rdx, eax
add rdx, rdx
lea rdi, [rsp]
xor eax, eax
mov rcx, rdx
rep stosb byte [rdi], al
lea rdi, [rsp + 0x640]
mov rcx, rdx
rep stosb byte [rdi], al
mov eax, dword [rsp + 0xcd8]
test eax, eax
jbe 0x300200a2
mov r12, qword [r10 + 0x50]
mov r9, qword [r10 + 0x48]
mov edi, eax
mov r11d, dword [rsp + 0xcd0]
mov eax, esi
and eax, 7
mov edx, 1
movzx ecx, al
shl edx, cl
mov eax, esi
shr eax, 3
mov eax, eax
and dl, byte [rax + r12]
mov eax, esi
jne 0x3001fefb
movzx eax, byte [rax + r9]
jmp 0x3001ffa5
mov dl, byte [rax + r9]
mov rax, qword [r10 + 0x40]
mov ecx, ebx
mov eax, dword [rax + rcx*4]
cmp dl, 7
jae 0x3001ff64
cmp eax, 0x400
jae 0x3001ff2b
mov eax, eax
movzx ecx, byte [rax + r10 + 0x47c]
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x3001ffa2
cmp eax, 0x80000
jae 0x3001ff4f
shr eax, 9
mov eax, eax
movzx ecx, byte [rax + r10 + 0x47c]
add ecx, 0x12
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x3001ffa2
shr eax, 0x11
movzx ecx, al
add ecx, 0x22
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x3001ffa2
cmp eax, 0x400
jae 0x3001ff78
mov eax, eax
movzx eax, byte [rax + r10 + 0x47c]
jmp 0x3001ff9b
cmp eax, 0x80000
jae 0x3001ff92
shr eax, 9
mov eax, eax
movzx eax, byte [rax + r10 + 0x47c]
add eax, 0x12
jmp 0x3001ff9b
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [rax*8 + 0x107]
add ebx, 1
add esi, 1
movsxd rax, eax
add word [rsp + rax*2], 1
mov eax, r8d
and eax, 7
mov edx, 1
movzx ecx, al
shl edx, cl
mov eax, r8d
shr eax, 3
mov eax, eax
and dl, byte [rax + r12]
mov eax, r8d
jne 0x3001ffdc
movzx eax, byte [rax + r9]
jmp 0x30020088
mov dl, byte [rax + r9]
mov rax, qword [r10 + 0x40]
mov ecx, r11d
mov eax, dword [rax + rcx*4]
cmp dl, 7
jae 0x30020046
cmp eax, 0x400
jae 0x3002000d
mov eax, eax
movzx ecx, byte [rax + r10 + 0x47c]
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x30020084
cmp eax, 0x80000
jae 0x30020031
shr eax, 9
mov eax, eax
movzx ecx, byte [rax + r10 + 0x47c]
add ecx, 0x12
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x30020084
shr eax, 0x11
movzx ecx, al
add ecx, 0x22
movzx eax, dl
lea eax, [rax + rcx*8 + 0x100]
jmp 0x30020084
cmp eax, 0x400
jae 0x3002005a
mov eax, eax
movzx eax, byte [rax + r10 + 0x47c]
jmp 0x3002007d
cmp eax, 0x80000
jae 0x30020074
shr eax, 9
mov eax, eax
movzx eax, byte [rax + r10 + 0x47c]
add eax, 0x12
jmp 0x3002007d
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [rax*8 + 0x107]
add r11d, 1
add r8d, 1
movsxd rax, eax
add word [rsp + rax*2 + 0x640], 1
sub rdi, 1
jne 0x3001fed3
xor r9d, r9d
lea eax, [r13*8 + 0x100]
test eax, eax
jbe 0x30020136
xor r8d, r8d
mov r10d, eax
lea r11, [0x30039540]
lea rbx, [0x300394f0]
mov ax, word [rsp + r8]
cmp ax, 0x100
jae 0x300200e0
movzx rax, ax
movzx edx, byte [rax + r11]
jmp 0x300200f0
shr ax, 8
movzx rax, ax
movzx edx, byte [rax + r11]
add edx, 8
mov ax, word [rsp + r8 + 0x640]
cmp ax, 0x100
jae 0x3002010a
movzx rax, ax
movzx eax, byte [rax + r11]
jmp 0x3002011a
shr ax, 8
movzx rax, ax
movzx eax, byte [rax + r11]
add eax, 8
mov ecx, eax
mov eax, edx
mov eax, dword [rbx + rax*4]
sub eax, dword [rbx + rcx*4]
cdq
xor eax, edx
sub eax, edx
add r9d, eax
add r8, 2
sub r10, 1
jne 0x300200c9
mov eax, r9d
add rsp, 0xc80
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret