Function at 0x30019f91
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 0x30019fbd
xor eax, eax
jmp 0x3001a222
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 0x3001a1aa
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 0x3001a042
movzx eax, byte [esi + eax]
jmp 0x3001a0cc
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001a08d
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + eax]
cmp eax, edi
jae 0x3001a061
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001a081
cmp eax, 0x80000
jae 0x3001a078
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001a081
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001a0c8
mov ecx, dword [ebp + 8]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001a0a1
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001a0c1
cmp eax, 0x80000
jae 0x3001a0b8
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001a0c1
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 0x3001a105
movzx eax, byte [esi + eax]
jmp 0x3001a18f
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001a150
mov esi, dword [ebp + 0x1c]
mov eax, dword [eax + esi]
cmp eax, edi
jae 0x3001a124
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001a144
cmp eax, 0x80000
jae 0x3001a13b
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001a144
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001a18b
mov ecx, dword [ebp + 0x1c]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001a164
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001a184
cmp eax, 0x80000
jae 0x3001a17b
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001a184
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 0x3001a01b
xor esi, esi
xor edi, edi
cmp dword [ebp - 4], esi
jbe 0x3001a21d
mov ax, word [ebp + esi*2 - 0x644]
cmp ax, 0x100
movzx eax, ax
jae 0x3001a1cd
movzx eax, byte [eax + 0x30001ba0]
jmp 0x3001a1da
shr eax, 8
movzx eax, byte [eax + 0x30001ba0]
add eax, 8
mov cx, word [ebp + esi*2 - 0xc84]
cmp cx, 0x100
movzx ecx, cx
jae 0x3001a1f5
movzx ecx, byte [ecx + 0x30001ba0]
jmp 0x3001a202
shr ecx, 8
movzx ecx, byte [ecx + 0x30001ba0]
add ecx, 8
mov eax, dword [eax*4 + 0x30001b58]
sub eax, dword [ecx*4 + 0x30001b58]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc esi
cmp esi, dword [ebp - 4]
jb 0x3001a1b3
pop ebx
mov eax, edi
pop esi
pop edi
leave
ret 0x18