Function at 0x4d2b21
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 0x4d2da7
push eax
call fcn.004c3bfe
pop ecx
mov esi, eax
mov ecx, esi
and ecx, 0xf
add ecx, 5
cmp ecx, 0xf
jbe 0x4d2b62
push 0xffffffffffffffd4
jmp 0x4d2da9
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 0x4d2d81
mov edx, dword [esp + 0x34]
cmp edi, dword [edx]
mov edx, dword [esp + 0x10]
ja 0x4d2d7e
cmp dword [esp + 0x20], 0
je 0x4d2c7b
cmp si, 0xffff
jne 0x4d2be4
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 0x4d2bd3
add ebx, 2
push ebx
call fcn.004c3bfe
pop ecx
mov esi, eax
mov ecx, ebp
shr esi, cl
jmp 0x4d2bd9
shr esi, 0x10
add ebp, 0x10
mov eax, dword [esp + 0x20]
cmp si, 0xffff
je 0x4d2bba
push 3
pop ecx
jmp 0x4d2bf1
add edi, ecx
shr esi, 2
add ebp, 2
mov eax, esi
and eax, ecx
cmp al, 3
je 0x4d2be9
mov eax, esi
add ebp, 2
and eax, ecx
add edi, eax
mov eax, dword [esp + 0x34]
cmp edi, dword [eax]
ja 0x4d2d7a
mov eax, dword [esp + 0x14]
cmp eax, edi
jae 0x4d2c32
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 0x4d2c5d
mov eax, dword [esp + 0x40]
lea ecx, [edx + ebx]
add eax, 0xfffffffc
add eax, edi
cmp ecx, eax
jbe 0x4d2c5d
shr esi, 2
jmp 0x4d2c6f
add ebx, edx
and ebp, 7
push ebx
call fcn.004c3bfe
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 0x4d2cbe
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
dec eax
and eax, dword [esp + 0x14]
dec ebp
movzx ecx, ax
jmp 0x4d2ce3
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 0x4d2d27
mov eax, dword [esp + 0x18]
sar esi, 1
dec eax
cmp edx, esi
jl 0x4d2d18
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 0x4d2d53
lea ecx, [edx + ebx]
lea eax, [esi - 4]
cmp ecx, eax
jbe 0x4d2d53
sub ebx, esi
lea ebp, [ebp + ebx*8]
add ebp, 0x20
lea ebx, [esi - 4]
jmp 0x4d2d58
add ebx, edx
and ebp, 7
push ebx
call fcn.004c3bfe
pop ecx
mov ecx, ebp
mov esi, eax
mov eax, dword [esp + 0x1c]
and ecx, 0x1f
shr esi, cl
cmp eax, 1
jle 0x4d2d81
mov ecx, dword [esp + 0x18]
jmp 0x4d2b89
push 0xffffffffffffffd0
jmp 0x4d2da9
cmp eax, 1
je 0x4d2d88
or eax, 0xffffffff
jmp 0x4d2daa
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 0x4d2da7
mov eax, ebx
jmp 0x4d2daa
push 0xffffffffffffffb8
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret