Function at 0x3001b191
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 0x3001b1bd
xor eax, eax
jmp 0x3001b422
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 0x3001b3aa
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 0x3001b242
movzx eax, byte [esi + eax]
jmp 0x3001b2cc
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001b28d
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + eax]
cmp eax, edi
jae 0x3001b261
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b281
cmp eax, 0x80000
jae 0x3001b278
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b281
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001b2c8
mov ecx, dword [ebp + 8]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001b2a1
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b2c1
cmp eax, 0x80000
jae 0x3001b2b8
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b2c1
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 0x3001b305
movzx eax, byte [esi + eax]
jmp 0x3001b38f
mov cl, byte [esi + eax]
mov eax, dword [edx + 0x2c]
cmp cl, 7
jae 0x3001b350
mov esi, dword [ebp + 0x1c]
mov eax, dword [eax + esi]
cmp eax, edi
jae 0x3001b324
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b344
cmp eax, 0x80000
jae 0x3001b33b
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b344
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, cl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3001b38b
mov ecx, dword [ebp + 0x1c]
mov eax, dword [eax + ecx]
cmp eax, edi
jae 0x3001b364
movzx eax, byte [eax + edx + 0x45c]
jmp 0x3001b384
cmp eax, 0x80000
jae 0x3001b37b
shr eax, 9
movzx eax, byte [eax + edx + 0x45c]
add eax, 0x12
jmp 0x3001b384
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 0x3001b21b
xor esi, esi
xor edi, edi
cmp dword [ebp - 4], esi
jbe 0x3001b41d
mov ax, word [ebp + esi*2 - 0x644]
cmp ax, 0x100
movzx eax, ax
jae 0x3001b3cd
movzx eax, byte [eax + 0x30001b78]
jmp 0x3001b3da
shr eax, 8
movzx eax, byte [eax + 0x30001b78]
add eax, 8
mov cx, word [ebp + esi*2 - 0xc84]
cmp cx, 0x100
movzx ecx, cx
jae 0x3001b3f5
movzx ecx, byte [ecx + 0x30001b78]
jmp 0x3001b402
shr ecx, 8
movzx ecx, byte [ecx + 0x30001b78]
add ecx, 8
mov eax, dword [eax*4 + 0x30001b30]
sub eax, dword [ecx*4 + 0x30001b30]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc esi
cmp esi, dword [ebp - 4]
jb 0x3001b3b3
pop ebx
mov eax, edi
pop esi
pop edi
leave
ret 0x18