Function at 0x4a9a50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4a9d4e
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 0x4a9a9a
dec ebx
mov dword [esp + 0x3c], ebx
neg ebx
sar ebx, 0x1f
and ebx, 1
add eax, ebx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, edx
mov edx, dword [esp + 0x2c]
test ebx, ebx
jle 0x4a9d01
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], edx
xchg edi, eax
mov byte [esp + 0x22], al
xchg edi, eax
movzx edx, byte [edx]
mov byte [esp + 0x23], dl
cmp dl, 0x20
jbe 0x4a9c9b
cmp dl, 0x22
je 0x4a9b5e
cmp dl, 0x5c
jne 0x4a9adf
lea edx, [eax + 1]
mov eax, dword [esp + 0x38]
cmp ebx, 1
jae 0x4a9a7d
jmp 0x4a9d41
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a99b0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a9b27
movzx ebp, byte [esp + 0x23]
xchg ebp, ebx
mov byte [edx + eax], bl
xchg ebp, ebx
mov eax, dword [esp + 0x38]
mov ebp, ebx
mov esi, edx
movzx edi, byte [esp + 0x22]
mov ebx, dword [esp + 0x3c]
xor edx, edx
jmp 0x4a9ad5
mov dword [esp + 0x28], eax
lea ebp, [0x550e80]
mov dword [esp], ebp
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ebx
call fcn.00441c00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
lea ebx, [eax + 1]
mov eax, dword [esp + 0x28]
jmp 0x4a9b06
mov dword [esp + 0x24], eax
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov ecx, eax
shr eax, 0x1f
add eax, ecx
sar eax, 1
mov dword [esp + 0xc], eax
call fcn.004a99b0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x24]
test ebx, 1
jne 0x4a9c41
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x4a9c37
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x4a9c31
mov esi, dword [esp + 0x38]
cmp byte [esi + 1], 0x22
jne 0x4a9c2b
lea edi, [eax + 1]
cmp edi, ecx
ja 0x4a9beb
movzx ebx, byte [esp + 0x23]
mov byte [edx + eax], bl
lea ebx, [esi + 1]
dec ebp
movzx esi, byte [esp + 0x22]
xor esi, 1
mov eax, ebx
mov ebx, ebp
mov ebp, edi
mov edi, esi
mov esi, edx
xor edx, edx
jmp 0x4a9ad5
lea ebx, [0x550e80]
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edi
call fcn.00441c00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
lea edi, [eax + 1]
mov eax, dword [esp + 0x28]
movzx ebx, byte [esp + 0x22]
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x4a9bc6
mov ebx, esi
mov edi, eax
jmp 0x4a9bd2
mov esi, dword [esp + 0x38]
jmp 0x4a9c2b
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x4a9c2b
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a9c68
movzx ebp, byte [esp + 0x23]
xchg ebp, ebx
mov byte [edx + eax], bl
xchg ebp, ebx
mov ebp, dword [esp + 0x3c]
mov edi, ebx
movzx esi, byte [esp + 0x22]
mov ebx, dword [esp + 0x38]
jmp 0x4a9bda
lea ebp, [0x550e80]
mov dword [esp], ebp
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ebx
call fcn.00441c00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
lea ebx, [eax + 1]
mov eax, dword [esp + 0x28]
jmp 0x4a9c48
cmp dl, 9
jne 0x4a9cf7
xchg edi, eax
test al, al
xchg edi, eax
jne 0x4a9adf
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a99b0
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 + 0x3c]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
add esp, 0x34
ret
cmp dl, 0x20
je 0x4a9ca0
jmp 0x4a9adf
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a99b0
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
mov ecx, ebx
call fcn.0045a1d0
nop
call fcn.00458ba0
jmp fcn.004a9a50