Function at 0x4a9ad0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4a9dce
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 0x4a9b1a
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 0x4a9d81
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 0x4a9d1b
cmp dl, 0x22
je 0x4a9bde
cmp dl, 0x5c
jne 0x4a9b5f
lea edx, [eax + 1]
mov eax, dword [esp + 0x38]
cmp ebx, 1
jae 0x4a9afd
jmp 0x4a9dc1
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a9a30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a9ba7
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 0x4a9b55
mov dword [esp + 0x28], eax
lea ebp, [0x643900]
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.004441e0
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 0x4a9b86
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.004a9a30
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 0x4a9cc1
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x4a9cb7
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x4a9cb1
mov esi, dword [esp + 0x38]
cmp byte [esi + 1], 0x22
jne 0x4a9cab
lea edi, [eax + 1]
cmp edi, ecx
ja 0x4a9c6b
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 0x4a9b55
lea ebx, [0x643900]
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.004441e0
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 0x4a9c46
mov ebx, esi
mov edi, eax
jmp 0x4a9c52
mov esi, dword [esp + 0x38]
jmp 0x4a9cab
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x4a9cab
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a9ce8
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 0x4a9c5a
lea ebp, [0x643900]
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.004441e0
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 0x4a9cc8
cmp dl, 9
jne 0x4a9d77
xchg edi, eax
test al, al
xchg edi, eax
jne 0x4a9b5f
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a9a30
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 0x4a9d20
jmp 0x4a9b5f
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a9a30
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.0045ca00
nop
call fcn.0045b380
jmp fcn.004a9ad0