Function at 0x30019e35
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 0x30019e61
xor eax, eax
jmp 0x3001a0c6
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 0x3001a04e
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 0x30019ee6
movzx eax, byte [esi + eax]
jmp 0x30019f70
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x30019f31
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + eax]
cmp eax, edi
jae 0x30019f05
movzx eax, byte [eax + edx + 0x45c]
jmp 0x30019f25
cmp eax, 0x80000
jae 0x30019f1c
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x30019f25
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x30019f6c
mov ecx, dword [ebp + 8]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x30019f45
movzx eax, byte [eax + edx + 0x45c]
jmp 0x30019f65
cmp eax, 0x80000
jae 0x30019f5c
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x30019f65
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 0x30019fa9
movzx eax, byte [esi + eax]
jmp 0x3001a033
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x30019ff4
mov esi, dword [ebp + 0x1c]
mov eax, dword [eax + esi]
cmp eax, edi
jae 0x30019fc8
movzx eax, byte [eax + edx + 0x45c]
jmp 0x30019fe8
cmp eax, 0x80000
jae 0x30019fdf
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x30019fe8
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001a02f
mov ecx, dword [ebp + 0x1c]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001a008
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001a028
cmp eax, 0x80000
jae 0x3001a01f
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001a028
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 0x30019ebf
xor esi, esi
xor edi, edi
cmp dword [ebp - 4], esi
jbe 0x3001a0c1
mov ax, word [ebp + esi*2 - 0x644]
cmp ax, 0x100
movzx eax, ax
jae 0x3001a071
movzx eax, byte [eax + 0x30001b98]
jmp 0x3001a07e
shr eax, 8
movzx eax, byte [eax + 0x30001b98]
add eax, 8
mov cx, word [ebp + esi*2 - 0xc84]
cmp cx, 0x100
movzx ecx, cx
jae 0x3001a099
movzx ecx, byte [ecx + 0x30001b98]
jmp 0x3001a0a6
shr ecx, 8
movzx ecx, byte [ecx + 0x30001b98]
add ecx, 8
mov eax, dword [eax*4 + 0x30001b50]
sub eax, dword [ecx*4 + 0x30001b50]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc esi
cmp esi, dword [ebp - 4]
jb 0x3001a057
pop ebx
mov eax, edi
pop esi
pop edi
leave
ret 0x18