Function at 0x3003943b
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc84
mov eax, dword [edx + 0x870]
add eax, 0x20
mov ecx, eax
shl ecx, 3
cmp ecx, 0x320
mov dword [ebp - 4], ecx
jb 0x30039464
xor eax, eax
jmp 0x300396b9
shl eax, 4
push ebx
push esi
mov esi, eax
push edi
mov ecx, esi
mov ebx, ecx
shr ecx, 2
xor eax, eax
lea edi, [ebp - 0x644]
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
shr ecx, 2
xor eax, eax
lea edi, [ebp - 0xc84]
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x18]
test eax, eax
jbe 0x30039641
mov ecx, dword [ebp + 0x14]
mov edi, dword [edx + 0x30]
shl ecx, 2
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0x10]
shl ecx, 2
mov dword [ebp + 0x18], ecx
mov dword [ebp + 0x10], eax
mov esi, 0x400
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x34]
xor ebx, ebx
and ecx, 7
inc ebx
shl ebx, cl
mov ecx, dword [ebp + 8]
shr ecx, 3
mov al, byte [ecx + eax]
test al, bl
mov eax, dword [ebp + 8]
jne 0x300394e9
movzx eax, byte [edi + eax]
jmp 0x30039570
mov bl, byte [edi + eax]
mov eax, dword [edx + 0x2c]
mov ecx, dword [ebp + 0x18]
add ecx, eax
cmp bl, 7
mov eax, dword [ecx]
jae 0x30039535
cmp eax, esi
jae 0x30039509
movzx eax, byte [edx + eax + 0x45c]
jmp 0x30039529
cmp eax, 0x80000
jae 0x30039520
shr eax, 9
movzx eax, byte [edx + eax + 0x45c]
add eax, 0x12
jmp 0x30039529
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, bl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x3003956c
cmp eax, esi
jae 0x30039545
mov eax, dword [ecx]
movzx eax, byte [edx + eax + 0x45c]
jmp 0x30039565
cmp eax, 0x80000
jae 0x3003955c
shr eax, 9
movzx eax, byte [edx + eax + 0x45c]
add eax, 0x12
jmp 0x30039565
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add dword [ebp + 0x18], 4
mov ecx, dword [ebp + 0xc]
inc dword [ebp + 8]
xor ebx, ebx
and ecx, 7
lea eax, [ebp + eax*2 - 0x644]
inc word [eax]
mov eax, dword [edx + 0x34]
inc ebx
shl ebx, cl
mov ecx, dword [ebp + 0xc]
shr ecx, 3
mov al, byte [ecx + eax]
test al, bl
mov eax, dword [ebp + 0xc]
jne 0x300395a4
movzx eax, byte [edi + eax]
jmp 0x3003962b
mov bl, byte [edi + eax]
mov eax, dword [edx + 0x2c]
mov ecx, dword [ebp + 0x14]
add ecx, eax
cmp bl, 7
mov eax, dword [ecx]
jae 0x300395f0
cmp eax, esi
jae 0x300395c4
movzx eax, byte [edx + eax + 0x45c]
jmp 0x300395e4
cmp eax, 0x80000
jae 0x300395db
shr eax, 9
movzx eax, byte [edx + eax + 0x45c]
add eax, 0x12
jmp 0x300395e4
shr eax, 0x11
movzx eax, al
add eax, 0x22
movzx ecx, bl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x30039627
cmp eax, esi
jae 0x30039600
mov eax, dword [ecx]
movzx eax, byte [edx + eax + 0x45c]
jmp 0x30039620
cmp eax, 0x80000
jae 0x30039617
shr eax, 9
movzx eax, byte [edx + eax + 0x45c]
add eax, 0x12
jmp 0x30039620
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add dword [ebp + 0x14], 4
inc dword [ebp + 0xc]
lea eax, [ebp + eax*2 - 0xc84]
inc word [eax]
dec dword [ebp + 0x10]
jne 0x300394c2
xor esi, esi
xor edi, edi
cmp dword [ebp - 4], esi
jbe 0x300396b4
mov ax, word [ebp + esi*2 - 0x644]
cmp ax, 0x100
movzx eax, ax
jae 0x30039664
movzx eax, byte [eax + 0x30006130]
jmp 0x30039671
shr eax, 8
movzx eax, byte [eax + 0x30006130]
add eax, 8
mov cx, word [ebp + esi*2 - 0xc84]
cmp cx, 0x100
movzx ecx, cx
jae 0x3003968c
movzx ecx, byte [ecx + 0x30006130]
jmp 0x30039699
shr ecx, 8
movzx ecx, byte [ecx + 0x30006130]
add ecx, 8
mov eax, dword [eax*4 + 0x300060e8]
sub eax, dword [ecx*4 + 0x300060e8]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc esi
cmp esi, dword [ebp - 4]
jb 0x3003964a
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x14