Function at 0x4a6790
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4a6aa2
sub esp, 0x34
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
xor edx, edx
xor ebx, ebx
mov ebp, edx
mov esi, ebp
xor edi, edi
jmp 0x4a67d4
dec ecx
mov dword [esp + 0x3c], ecx
neg ecx
sar ecx, 0x1f
and ecx, 1
add ecx, esi
mov esi, eax
mov eax, ecx
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jle 0x4a6a5b
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
xchg edi, eax
mov byte [esp + 0x22], al
xchg edi, eax
movzx eax, byte [eax]
mov byte [esp + 0x23], al
cmp al, 0x20
jbe 0x4a69f5
cmp al, 0x22
je 0x4a689a
cmp al, 0x5c
jne 0x4a6819
lea eax, [esi + 1]
mov esi, dword [esp + 0x38]
cmp ecx, 1
jae 0x4a67bd
jmp 0x4a6a9b
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.004a66f0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x4a6863
movzx ebp, byte [esp + 0x23]
xchg ebp, ebx
mov byte [eax + ecx], bl
xchg ebp, ebx
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov ebp, edx
mov edx, ebx
mov ebx, eax
xor eax, eax
movzx edi, byte [esp + 0x22]
jmp 0x4a680f
mov dword [esp + 0x28], ecx
lea ebp, [0x5a5b80]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call fcn.00438c30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x4a6840
mov dword [esp + 0x24], esi
mov eax, esi
sar esi, 0x1f
shr esi, 0x1f
lea ecx, [eax + esi]
sar ecx, 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], ecx
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
call fcn.004a66f0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
shl ebx, 1
mov ebp, dword [esp + 0x24]
sub ebp, ebx
test ebp, ebp
jne 0x4a699b
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x4a6991
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x4a698b
mov esi, dword [esp + 0x38]
movzx edi, byte [esi + 1]
lea ebx, [esi + 1]
xchg edi, eax
cmp al, 0x22
xchg edi, eax
jne 0x4a6981
lea esi, [ecx + 1]
cmp esi, edx
jg 0x4a6942
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
lea ecx, [ebp - 1]
movzx ebp, byte [esp + 0x22]
xor ebp, 1
mov edi, ebp
mov ebp, edx
mov edx, esi
mov esi, ebx
mov ebx, eax
xor eax, eax
jmp 0x4a680f
mov dword [esp + 0x30], ebx
lea ebx, [0x5a5b80]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], esi
call fcn.00438c30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
jmp 0x4a691a
mov ebx, esi
mov ecx, ebp
mov esi, dword [esp + 0x28]
jmp 0x4a6929
mov esi, dword [esp + 0x38]
jmp 0x4a6981
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x4a6981
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x4a69c2
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
mov ecx, dword [esp + 0x3c]
mov esi, ebx
movzx ebp, byte [esp + 0x22]
mov ebx, dword [esp + 0x38]
jmp 0x4a6931
lea ebp, [0x5a5b80]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call fcn.00438c30
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x4a69a2
cmp al, 9
jne 0x4a6a51
xchg edi, eax
test al, al
xchg edi, eax
jne 0x4a6819
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.004a66f0
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 al, 0x20
je 0x4a69fa
jmp 0x4a6819
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.004a66f0
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
call fcn.00425cf0
ud2
call fcn.0044a520
jmp fcn.004a6790