Function at 0x4d5fa8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x6c]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x64]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4d5ff2
mov eax, dword [ebp - 4]
cmp dword [eax + 0x64], 0
jne 0x4d5ff2
mov eax, dword [ebp - 4]
cmp dword [eax + 0x6c], 0
jne 0x4d5ff2
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jmp 0x4d60ee
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4d6000
dec dword [ebp - 0x14]
jmp 0x4d60ee
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x18]
sub edx, 0x106
cmp eax, edx
jb 0x4d60ee
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x18]
lea edx, [eax + edx]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp - 0x18]
call fcn.004d50a4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub dword [eax + 0x68], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub dword [eax + 0x64], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub dword [eax + 0x54], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, dword [ebp - 8]
lea eax, [eax + edx*2]
mov dword [ebp - 0x10], eax
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jb 0x4d608c
mov ax, word [ebp - 0xc]
sub ax, word [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov word [edx], ax
jmp 0x4d6094
mov eax, dword [ebp - 0x10]
mov word [eax], 0
dec dword [ebp - 8]
cmp dword [ebp - 8], 0
jne 0x4d6067
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov edx, dword [ebp - 8]
lea eax, [eax + edx*2]
mov dword [ebp - 0x10], eax
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jb 0x4d60d7
mov ax, word [ebp - 0xc]
sub ax, word [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov word [edx], ax
jmp 0x4d60df
mov eax, dword [ebp - 0x10]
mov word [eax], 0
dec dword [ebp - 8]
cmp dword [ebp - 8], 0
jne 0x4d60b2
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 4], 0
je 0x4d6191
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 4]
add eax, dword [edx + 0x6c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x30]
add edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x14]
call fcn.004d5bb8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add dword [eax + 0x6c], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x6c], 3
jb 0x4d6176
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x30]
movzx eax, byte [edx + eax]
mov edx, dword [ebp - 4]
mov dword [edx + 0x40], eax
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x50]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x40]
shl eax, cl
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x64]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x30]
movzx edx, byte [ecx + edx + 1]
xor eax, edx
mov edx, dword [ebp - 4]
and eax, dword [edx + 0x4c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x6c], 0x106
jae 0x4d6191
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 4], 0
jne 0x4d5fba
mov esp, ebp
pop ebp
ret