Function at 0x491ec5
Capabilities:
Encrypt data using rc4 prga

Disassembly:
xor ebx, ebx
mov dword [ebp - 0x18], ecx
add esi, edx
lea eax, [edi + edx*4]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 8], eax
mov eax, dword [ecx - 0xc]
inc ebx
mov dword [ebp - 0x34], ebx
mov edi, dword [eax + edx*4]
mov eax, dword [ecx]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x30], edi
mov edx, dword [eax + edx*4]
mov eax, ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ecx]
sar eax, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp - 0x10]
add ebx, 0xcfb0
shl eax, 8
add eax, ebx
movzx ebx, byte [esi]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], ebx
cmp ebx, ecx
jge 0x491ef2
mov esi, dword [ebp - 0x10]
add esi, 0xc960
movzx eax, byte [ebx + edi]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov edi, dword [ecx + eax*8 + 4]
mov eax, dword [ecx + eax*8]
mov dword [ebp - 0x24], eax
cmp edi, 0x20
ja 0x491e9e
mov ecx, dword [esi + 0x10]
lea eax, [ecx - 4]
cmp dword [esi], eax
jl 0x491e02
cmp dword [esi + 0xc], 0
je 0x491ebf
cmp ecx, 0x7ffffeff
jg 0x491e9e
lea eax, [ecx + 0x100]
push eax
push dword [esi + 8]
call dword [0x4995c4]
add esp, 8
test eax, eax
je 0x491e9e
mov ecx, dword [esi]
add dword [esi + 0x10], 0x100
add ecx, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov ebx, dword [edi*4 + 0x4a3848]
mov ecx, 0x20
and ebx, dword [ebp - 0x24]
sub ecx, edi
mov edx, dword [esi + 0xc]
shl ebx, cl
mov ecx, dword [esi + 4]
mov eax, ebx
add edi, ecx
add ecx, 0x18
shr eax, cl
or byte [edx], al
cmp edi, 8
jl 0x491e83
mov ecx, dword [esi + 4]
mov edx, ebx
mov eax, dword [esi + 0xc]
add ecx, 0x10
shr edx, cl
mov byte [eax + 1], dl
cmp edi, 0x10
jl 0x491e83
mov ecx, dword [esi + 4]
mov edx, ebx
mov eax, dword [esi + 0xc]
add ecx, 8
shr edx, cl
mov byte [eax + 2], dl
cmp edi, 0x18
jl 0x491e83
mov eax, dword [esi + 0xc]
mov edx, ebx
mov ecx, dword [esi + 4]
shr edx, cl
mov byte [eax + 3], dl
cmp edi, 0x20
jl 0x491e83
mov edx, dword [esi + 4]
mov eax, dword [esi + 0xc]
test edx, edx
je 0x491e7f
mov ecx, 8
sub ecx, edx
shl bl, cl
mov byte [eax + 4], bl
jmp 0x491e83
mov byte [eax + 4], 0
mov ebx, dword [ebp - 0x14]
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
add dword [esi], eax
add dword [esi + 0xc], eax
and edi, 7
mov dword [esi + 4], edi
jmp 0x491ebc
mov eax, dword [esi + 8]
test eax, eax
je 0x491eaf
push eax
call dword [fcn.004995b4]
add esp, 4
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax + 0x4a3430]
xor byte [edx + ecx*2], dh
invalid
test eax, eax
je 0x491edc
xor byte [edx + ecx*2], dh
add byte [ebp + 0x500f74c0], al
push eax
movzx eax, word [edx + ebx*2]
push eax
push esi
call int.004adbc5
add esp, 0xc
mov edx, dword [ebp - 4]
inc ebx
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x14], ebx
cmp ebx, dword [ebp - 0x2c]
jl 0x491d99
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
add esi, 0x40
add dword [ebp - 8], 0x100
add ecx, 4
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], esi
cmp ebx, 3
jl 0x491d4a
mov ecx, dword [ebp - 0x38]
inc edx
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0xc], edx
cmp edx, dword [ebp + 8]
jl 0x491d3a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret