Function at 0x2c7d710
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x2c7da68
sub esp, 0x48
movzx eax, byte [esp + 0x4c]
lea edx, [eax - 1]
cmp dl, 7
ja 0x2c7da4f
mov edx, dword [esp + 0x54]
test edx, edx
je 0x2c7d853
mov ebx, dword [esp + 0x50]
movzx ebp, byte [ebx]
cmp al, 8
jae 0x2c7d768
movzx ecx, al
cmp ecx, 0x20
sbb esi, esi
mov edi, 1
shl edi, cl
and edi, esi
add edi, 0xffffffff
and ebp, edi
movzx ecx, al
cmp ecx, 0x20
sbb eax, eax
mov esi, 1
shl esi, cl
and esi, eax
mov eax, esi
add esi, 0xffffffff
add ecx, 0xffffffe0
mov dword [esp + 0x38], ecx
cmp ecx, 0x20
sbb edi, edi
neg ecx
mov dword [esp + 0x34], ecx
cmp ecx, 0x20
sbb edx, edx
mov ecx, dword [esp + 0x38]
mov ebx, 1
shl ebx, cl
and edi, ebx
mov ecx, dword [esp + 0x34]
mov ebx, 1
shr ebx, cl
and ebx, edx
or edi, ebx
add eax, 0xffffffff
adc edi, 0xffffffff
test edi, edi
sete al
cmp esi, ebp
seta dl
test edi, edi
seta bl
and eax, edx
or eax, ebx
test al, al
jne 0x2c7d80d
mov eax, dword [esp + 0x58]
lea edx, [eax - 1]
mov ebx, edx
neg edx
sar edx, 0x1f
and edx, 1
mov esi, dword [esp + 0x50]
add edx, esi
mov edi, dword [esp + 0x54]
mov ecx, eax
lea eax, [edi - 1]
mov dword [esp + 0x3c], eax
xor eax, eax
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
jmp 0x2c7d8bf
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], ebp
mov eax, dword [esp + 0x58]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x50]
add eax, edx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x54]
dec eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
add esp, 0x48
ret
mov eax, dword [0x30f77d0]
mov ecx, dword [0x30f77d4]
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
add esp, 0x48
ret
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
mov eax, ebp
mov edx, ecx
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
test eax, eax
jle 0x2c7da1b
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x44], edx
mov edi, dword [esp + 0x18]
cmp edi, 1
sbb esi, esi
xor esi, 0xffffffff
mov edi, dword [esp + 0x14]
or esi, edi
cmp esi, 0x20
sbb edi, edi
movzx eax, byte [edx]
mov byte [esp + 0x13], al
and eax, 0x7f
mov dword [esp + 0x34], eax
mov ecx, esi
shl eax, cl
and edi, eax
mov eax, edi
add edi, ebp
mov dword [esp + 0x28], edi
add ecx, 0xffffffe0
mov dword [esp + 0x24], ecx
cmp ecx, 0x20
sbb esi, esi
neg ecx
mov dword [esp + 0x20], ecx
cmp ecx, 0x20
sbb edi, edi
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x34]
shl edx, cl
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x34]
shr ebx, cl
and edi, ebx
and edx, esi
or edx, edi
add eax, ebp
mov eax, dword [esp + 0x38]
adc edx, eax
mov eax, dword [esp + 0x30]
dec eax
mov ebx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov ebp, dword [esp + 0x44]
add eax, ebp
mov ebp, dword [esp + 0x2c]
dec ebp
movzx esi, byte [esp + 0x13]
xchg esi, eax
test al, 0x80
xchg esi, eax
je 0x2c7d9ef
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], edx
mov esi, dword [esp + 0x14]
add esi, 7
mov edi, dword [esp + 0x18]
adc edi, 0
test edi, edi
mov ecx, eax
seta al
sete dl
cmp esi, 0x3f
setae bl
and ebx, edx
or ebx, eax
test bl, bl
je 0x2c7d88f
lea eax, [0x2da4b80]
mov dword [esp], eax
lea eax, [0x30f77d8]
mov dword [esp + 4], eax
call fcn.02ae9050
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov edx, dword [esp + 0x50]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
add esp, 0x48
ret
mov dword [esp + 0x60], edx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
add esp, 0x48
ret
mov eax, dword [0x30f77d0]
mov edx, dword [0x30f77d4]
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], edx
add esp, 0x48
ret
lea eax, [0x2d0e5c0]
mov dword [esp], eax
lea eax, [0x2da26b8]
mov dword [esp + 4], eax
call fcn.02b13450
nop
call fcn.02b3d440
jmp fcn.02c7d710