Function at 0x4a0070
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
add eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
movzx ecx, byte [ebp + 0x14]
cmp ecx, 1
jne 0x4a00b5
mov dword [ebp - 0x18], 1
jmp 0x4a0113
mov dword [ebp - 0x18], 2
movzx edx, byte [ebp + 0x14]
mov eax, 3
sub eax, edx
mov dword [ebp - 4], eax
jmp 0x4a00d5
mov ecx, dword [ebp - 4]
add ecx, 2
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp + 0x10]
jge 0x4a00ec
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x4a00ec
jmp 0x4a00cc
mov edx, dword [ebp - 4]
xor eax, eax
cmp edx, dword [ebp + 0x10]
setl al
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
xor ecx, 1
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
movzx edx, byte [ebp + 0x14]
and edx, 1
add edx, dword [ebp + 8]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x4a0138
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
movzx eax, byte [edx + 0x4c3698]
and eax, 1
je 0x4a0138
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x4a0113
mov edx, dword [ebp + 8]
cmp edx, dword [ebp - 8]
jae 0x4a0171
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2d
jne 0x4a015d
mov dword [ebp - 0x20], 1
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
jmp 0x4a0171
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2b
jne 0x4a0171
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp - 8]
jae 0x4a0195
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0x30
jne 0x4a0195
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x4a0177
mov dword [ebp - 4], 0
jmp 0x4a01a7
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jae 0x4a01f5
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0x30
jl 0x4a01f5
cmp dword [ebp - 0x24], 0x39
jg 0x4a01f5
push 0
push 0xa
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004b95c0
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0x24]
cdq
add ecx, eax
adc esi, edx
sub ecx, 0x30
sbb esi, 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], esi
jmp 0x4a019e
cmp dword [ebp - 0xc], 0x7fffffff
jb 0x4a023a
ja 0x4a0206
cmp dword [ebp - 0x10], 0xffffffff
jbe 0x4a023a
cmp dword [ebp - 0x20], 0
je 0x4a021c
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0x80000000
jmp 0x4a022a
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x28], 0x7fffffff
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x2c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x28]
mov dword [edx + 4], ecx
jmp 0x4a0265
cmp dword [ebp - 0x20], 0
je 0x4a0257
mov edx, dword [ebp - 0x10]
neg edx
mov eax, dword [ebp - 0xc]
adc eax, 0
neg eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edx
mov dword [ecx + 4], eax
jmp 0x4a0265
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
mov ecx, dword [ebp - 0xc]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jb 0x4a028f
cmp dword [ebp - 4], 0
jne 0x4a027e
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
je 0x4a028f
mov ecx, dword [ebp - 0x18]
imul ecx, ecx, 0x13
cmp dword [ebp - 4], ecx
jg 0x4a028f
cmp dword [ebp - 0x14], 0
je 0x4a0298
mov eax, 1
jmp 0x4a02e4
mov edx, dword [ebp - 0x18]
imul edx, edx, 0x13
cmp dword [ebp - 4], edx
jge 0x4a02a9
xor eax, eax
jmp 0x4a02e4
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049f410
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jge 0x4a02c8
xor eax, eax
jmp 0x4a02e4
cmp dword [ebp - 0x24], 0
jle 0x4a02d7
mov eax, 1
jmp 0x4a02e4
mov eax, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
pop esi
mov esp, ebp
pop ebp
ret