Function at 0x4a7ce0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4a7fde
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 0x4a7d2a
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 0x4a7f91
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 0x4a7f2b
cmp dl, 0x22
je 0x4a7dee
cmp dl, 0x5c
jne 0x4a7d6f
lea edx, [eax + 1]
mov eax, dword [esp + 0x38]
cmp ebx, 1
jae 0x4a7d0d
jmp 0x4a7fd1
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a7c40
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a7db7
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 0x4a7d65
mov dword [esp + 0x28], eax
lea ebp, [0x633cc0]
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.004429e0
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 0x4a7d96
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.004a7c40
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 0x4a7ed1
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x4a7ec7
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x4a7ec1
mov esi, dword [esp + 0x38]
cmp byte [esi + 1], 0x22
jne 0x4a7ebb
lea edi, [eax + 1]
cmp edi, ecx
ja 0x4a7e7b
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 0x4a7d65
lea ebx, [0x633cc0]
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.004429e0
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 0x4a7e56
mov ebx, esi
mov edi, eax
jmp 0x4a7e62
mov esi, dword [esp + 0x38]
jmp 0x4a7ebb
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x4a7ebb
lea ebx, [eax + 1]
cmp ebx, ecx
ja 0x4a7ef8
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 0x4a7e6a
lea ebp, [0x633cc0]
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.004429e0
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 0x4a7ed8
cmp dl, 9
jne 0x4a7f87
xchg edi, eax
test al, al
xchg edi, eax
jne 0x4a7d6f
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a7c40
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 0x4a7f30
jmp 0x4a7d6f
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call fcn.004a7c40
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.0045adc0
nop
call fcn.00459790
jmp fcn.004a7ce0