Function at 0x4d2d91
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x2c]
push ebx
push ebp
push esi
push edi
push 4
xor edi, edi
mov ebx, eax
pop ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
cmp dword [esp + 0x40], ebp
jb 0x4d3017
push eax
call fcn.004c3e6e
pop ecx
mov esi, eax
mov ecx, esi
and ecx, 0xf
add ecx, 5
cmp ecx, 0xf
jbe 0x4d2dd2
push 0xffffffffffffffd4
jmp 0x4d3019
mov eax, dword [esp + 0x38]
xor edx, edx
inc edx
shr esi, 4
shl edx, cl
mov dword [esp + 0x10], edx
mov dword [eax], ecx
inc ecx
mov dword [esp + 0x18], ecx
lea eax, [edx + 1]
mov dword [esp + 0x1c], eax
cmp eax, 1
jle 0x4d2ff1
mov edx, dword [esp + 0x34]
cmp edi, dword [edx]
mov edx, dword [esp + 0x10]
ja 0x4d2fee
cmp dword [esp + 0x20], 0
je 0x4d2eeb
cmp si, 0xffff
jne 0x4d2e54
mov eax, dword [esp + 0x3c]
add eax, 0xfffffffb
add eax, dword [esp + 0x40]
mov dword [esp + 0x20], eax
add edi, 0x18
cmp ebx, eax
jae 0x4d2e43
add ebx, 2
push ebx
call fcn.004c3e6e
pop ecx
mov esi, eax
mov ecx, ebp
shr esi, cl
jmp 0x4d2e49
shr esi, 0x10
add ebp, 0x10
mov eax, dword [esp + 0x20]
cmp si, 0xffff
je 0x4d2e2a
push 3
pop ecx
jmp 0x4d2e61
add edi, ecx
shr esi, 2
add ebp, 2
mov eax, esi
and eax, ecx
cmp al, 3
je 0x4d2e59
mov eax, esi
add ebp, 2
and eax, ecx
add edi, eax
mov eax, dword [esp + 0x34]
cmp edi, dword [eax]
ja 0x4d2fea
mov eax, dword [esp + 0x14]
cmp eax, edi
jae 0x4d2ea2
mov ecx, edi
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x30]
mov edx, eax
sub ecx, eax
xor eax, eax
shr ecx, 1
lea edi, [edi + edx*2]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [esp + 0x40]
mov edx, ebp
mov edi, dword [esp + 0x3c]
add eax, 0xfffffff9
add eax, edi
sar edx, 3
cmp ebx, eax
jbe 0x4d2ecd
mov eax, dword [esp + 0x40]
lea ecx, [edx + ebx]
add eax, 0xfffffffc
add eax, edi
cmp ecx, eax
jbe 0x4d2ecd
shr esi, 2
jmp 0x4d2edf
add ebx, edx
and ebp, 7
push ebx
call fcn.004c3e6e
pop ecx
mov esi, eax
mov ecx, ebp
shr esi, cl
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
movzx eax, dx
add ebp, ecx
mov dword [esp + 0x24], eax
lea ecx, [edx - 1]
add eax, eax
and ecx, esi
mov dword [esp + 0x28], eax
sub eax, dword [esp + 0x1c]
dec eax
movzx eax, ax
mov dword [esp + 0x20], eax
movzx eax, si
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
cwde
cmp ecx, eax
jae 0x4d2f2e
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
dec eax
and eax, dword [esp + 0x14]
dec ebp
movzx ecx, ax
jmp 0x4d2f53
mov esi, dword [esp + 0x28]
dec esi
and esi, dword [esp + 0x14]
movzx eax, si
movsx edx, ax
sub eax, dword [esp + 0x20]
movzx ecx, ax
movzx eax, si
mov esi, dword [esp + 0x10]
cmp edx, esi
cmovl ecx, eax
movzx ecx, cx
dec ecx
movsx eax, cx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x1c]
cwde
sub edx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
mov word [eax + edi*2], cx
xor eax, eax
inc edi
test cx, cx
mov dword [esp + 0x14], edi
sete al
mov dword [esp + 0x20], eax
cmp edx, esi
jge 0x4d2f97
mov eax, dword [esp + 0x18]
sar esi, 1
dec eax
cmp edx, esi
jl 0x4d2f88
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x3c]
mov edx, ebp
add esi, dword [esp + 0x40]
sar edx, 3
lea eax, [esi - 7]
cmp ebx, eax
jbe 0x4d2fc3
lea ecx, [edx + ebx]
lea eax, [esi - 4]
cmp ecx, eax
jbe 0x4d2fc3
sub ebx, esi
lea ebp, [ebp + ebx*8]
add ebp, 0x20
lea ebx, [esi - 4]
jmp 0x4d2fc8
add ebx, edx
and ebp, 7
push ebx
call fcn.004c3e6e
pop ecx
mov ecx, ebp
mov esi, eax
mov eax, dword [esp + 0x1c]
and ecx, 0x1f
shr esi, cl
cmp eax, 1
jle 0x4d2ff1
mov ecx, dword [esp + 0x18]
jmp 0x4d2df9
push 0xffffffffffffffd0
jmp 0x4d3019
cmp eax, 1
je 0x4d2ff8
or eax, 0xffffffff
jmp 0x4d301a
mov eax, dword [esp + 0x34]
lea ecx, [edi - 1]
mov dword [eax], ecx
lea ecx, [ebp + 7]
sar ecx, 3
add ebx, ecx
sub ebx, dword [esp + 0x3c]
cmp ebx, dword [esp + 0x40]
ja 0x4d3017
mov eax, ebx
jmp 0x4d301a
push 0xffffffffffffffb8
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret