Function at 0x4a8b50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword [0x587cec]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4a8e3c
sub esp, 0x34
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
xor eax, eax
xor ecx, ecx
xor ebp, ebp
xor esi, esi
xor edi, edi
jmp 0x4a8ba8
dec ebp
mov dword [esp + 0x2c], ebp
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 1
add ebp, esi
mov esi, dword [esp + 0x2c]
mov esi, eax
mov eax, edi
mov edi, ebx
mov ebx, dword [esp + 0x2c]
mov ebx, edx
mov edx, ebp
mov ebp, ecx
mov ecx, ebx
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x4a8def
xchg edi, eax
mov byte [esp + 0x22], al
xchg edi, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ecx
movzx ecx, byte [edx]
mov byte [esp + 0x23], cl
cmp cl, 0x20
jbe 0x4a8cfe
cmp cl, 0x22
je 0x4a8bfd
cmp cl, 0x5c
jne 0x4a8d12
inc eax
mov edi, eax
mov edx, dword [esp + 0x28]
mov ecx, ebp
mov eax, esi
movzx ebx, byte [esp + 0x22]
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
jmp 0x4a8d90
mov dword [esp + 0x24], eax
mov dword [esp], esi
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov ecx, eax
shr eax, 0x1f
add eax, ecx
sar eax, 1
mov dword [esp + 0xc], eax
call fcn.004a8ac0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
test ebx, 1
jne 0x4a8cb2
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x4a8ca5
mov ebp, dword [esp + 0x2c]
cmp ebp, 1
jle 0x4a8c9f
mov esi, dword [esp + 0x30]
cmp byte [esi + 1], 0x22
jne 0x4a8cad
inc edx
cmp ecx, edx
jae 0x4a8c96
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
lea eax, [0x4c3c20]
mov dword [esp + 0x10], eax
call fcn.00470510
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
movzx ebx, byte [esp + 0x22]
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov byte [edx + eax - 1], 0x22
inc esi
dec ebp
jmp 0x4a8cad
mov esi, dword [esp + 0x30]
jmp 0x4a8cad
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
xor ebx, 1
jmp 0x4a8cf7
inc edx
cmp ecx, edx
jae 0x4a8ce5
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
lea eax, [0x4c3c20]
mov dword [esp + 0x10], eax
call fcn.00470510
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov byte [edx + eax - 1], 0x22
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
movzx ebx, byte [esp + 0x22]
xor edi, edi
jmp 0x4a8d90
cmp cl, 9
je 0x4a8d08
cmp cl, 0x20
jne 0x4a8d12
xchg edi, eax
test al, al
xchg edi, eax
je 0x4a8d9e
mov dword [esp], esi
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], eax
call fcn.004a8ac0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc ecx
mov edx, dword [esp + 0x10]
cmp eax, ecx
jae 0x4a8d69
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
lea eax, [0x4c3c20]
mov dword [esp + 0x10], eax
call fcn.00470510
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
movzx edi, byte [esp + 0x23]
xchg edi, eax
mov byte [ecx + edx - 1], al
xchg edi, eax
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
xor edi, edi
movzx ebx, byte [esp + 0x22]
mov ebx, edx
mov edx, ecx
mov ecx, eax
mov eax, ebx
movzx ebx, byte [esp + 0x22]
cmp ebp, 1
jae 0x4a8b7b
jmp 0x4a8e2f
mov dword [esp], esi
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], eax
call fcn.004a8ac0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x2c]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x30]
add eax, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
add esp, 0x34
ret
mov dword [esp], esi
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], eax
call fcn.004a8ac0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
add esp, 0x34
ret
mov eax, 1
xor ecx, ecx
call fcn.00474b80
nop
call fcn.004736a0
jmp fcn.004a8b50