Function at 0x3001afd9
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc84
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x870]
add eax, 0x20
mov ecx, eax
shl ecx, 3
cmp ecx, 0x320
mov dword [ebp - 4], ecx
jb 0x3001b005
xor eax, eax
jmp 0x3001b26a
push edi
push esi
shl eax, 4
mov esi, eax
push ebx
mov ecx, esi
xor eax, eax
mov ebx, ecx
lea edi, [ebp - 0x644]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0xc84]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x1c]
test eax, eax
jbe 0x3001b1f2
mov ecx, dword [ebp + 0x18]
mov ebx, dword [edx + 0x34]
shl ecx, 2
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ebp + 0x14]
shl ecx, 2
mov dword [ebp + 8], ecx
mov dword [ebp + 0x18], eax
mov edi, 0x400
mov ecx, dword [ebp + 0xc]
push 1
and ecx, 7
pop eax
shl eax, cl
mov ecx, dword [ebp + 0xc]
mov esi, dword [edx + 0x30]
shr ecx, 3
mov cl, byte [ecx + ebx]
test cl, al
mov eax, dword [ebp + 0xc]
jne 0x3001b08a
movzx eax, byte [esi + eax]
jmp 0x3001b114
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001b0d5
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + eax]
cmp eax, edi
jae 0x3001b0a9
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b0c9
cmp eax, 0x80000
jae 0x3001b0c0
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b0c9
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001b110
mov ecx, dword [ebp + 8]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001b0e9
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b109
cmp eax, 0x80000
jae 0x3001b100
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b109
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add dword [ebp + 8], 4
inc dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
inc word [ebp + eax*2 - 0x644]
lea eax, [ebp + eax*2 - 0x644]
mov ebx, dword [edx + 0x34]
push 1
and ecx, 7
pop eax
shl eax, cl
mov ecx, dword [ebp + 0x10]
shr ecx, 3
mov cl, byte [ecx + ebx]
test cl, al
mov eax, dword [ebp + 0x10]
jne 0x3001b14d
movzx eax, byte [esi + eax]
jmp 0x3001b1d7
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001b198
mov esi, dword [ebp + 0x1c]
mov eax, dword [eax + esi]
cmp eax, edi
jae 0x3001b16c
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b18c
cmp eax, 0x80000
jae 0x3001b183
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b18c
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001b1d3
mov ecx, dword [ebp + 0x1c]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001b1ac
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b1cc
cmp eax, 0x80000
jae 0x3001b1c3
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b1cc
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add dword [ebp + 0x1c], 4
inc dword [ebp + 0x10]
inc word [ebp + eax*2 - 0xc84]
dec dword [ebp + 0x18]
lea eax, [ebp + eax*2 - 0xc84]
jne 0x3001b063
xor esi, esi
xor edi, edi
cmp dword [ebp - 4], esi
jbe 0x3001b265
mov ax, word [ebp + esi*2 - 0x644]
cmp ax, 0x100
movzx eax, ax
jae 0x3001b215
movzx eax, byte [eax + 0x30001b70]
jmp 0x3001b222
shr eax, 8
movzx eax, byte [eax + 0x30001b70]
add eax, 8
mov cx, word [ebp + esi*2 - 0xc84]
cmp cx, 0x100
movzx ecx, cx
jae 0x3001b23d
movzx ecx, byte [ecx + 0x30001b70]
jmp 0x3001b24a
shr ecx, 8
movzx ecx, byte [ecx + 0x30001b70]
add ecx, 8
mov eax, dword [eax*4 + 0x30001b28]
sub eax, dword [ecx*4 + 0x30001b28]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc esi
cmp esi, dword [ebp - 4]
jb 0x3001b1fb
pop ebx
mov eax, edi
pop esi
pop edi
leave
ret 0x18