Function at 0x4986f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
push 1
push 0x5850c2
push dword [ebp + 0x10]
call fcn.004dec60
add esp, 0xc
test al, al
je 0x498526
mov al, 1
jmp 0x4986c2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor ecx, ecx
lea edi, [edx + eax]
mov dword [ebp - 0x14], edi
sub eax, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], eax
je 0x498699
mov esi, dword [ebp - 0x10]
lea ecx, [edx + esi]
jmp 0x49856f
add ecx, 2
cmp eax, dword [ebp - 0x14]
mov edi, 2
cmovne eax, ecx
nop dword [eax + eax]
mov ecx, dword [ebp - 0x14]
add esi, edi
cmp eax, ecx
mov ecx, eax
je 0x498699
movzx ebx, byte [ecx]
lea eax, [ecx + 1]
mov edi, 1
test bl, bl
jns 0x498560
cmp bl, 0xe0
jb 0x49854a
mov edi, dword [ebp - 0x14]
cmp bl, 0xed
jne 0x4985b9
cmp eax, edi
je 0x498699
lea eax, [ecx + 2]
cmp eax, edi
je 0x498699
movzx edi, byte [ecx + 1]
movzx edi, di
cmp edi, 0x9f
ja 0x4985e9
add ecx, 3
mov edi, 3
mov eax, ecx
jmp 0x498560
add ecx, 2
cmp eax, edi
cmove ecx, eax
xor eax, eax
cmp ecx, edi
setne al
add eax, ecx
cmp bl, 0xf0
mov ebx, edi
mov edi, 3
jb 0x498560
xor ecx, ecx
cmp eax, ebx
mov edi, 4
setne cl
add eax, ecx
jmp 0x498560
movzx eax, byte [eax]
and edi, 0x1f
mov ecx, dword [ebp - 0x10]
shl edi, 6
and eax, 0x3f
lea eax, [edi + eax + 0xd800]
mov word [ebp - 0x16], ax
mov eax, esi
sub eax, ecx
jb 0x4986d8
cmp esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
ja 0x4986ca
mov ebx, edx
add ecx, edx
mov edx, ecx
mov ecx, edi
push eax
call 0x4986f0
add esp, 4
test al, al
jne 0x49851f
lea eax, [ebp - 0x16]
mov dword [ebp - 0x3c], 0x586620
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], fcn.004ea520
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x30], 1
push eax
push dword [edi + 0x18]
push dword [edi + 0x14]
call fcn.004de290
add esp, 0xc
test al, al
jne 0x49851f
mov eax, dword [ebp + 0xc]
add esi, 3
mov edx, ebx
mov ecx, esi
cmp esi, eax
jbe 0x498534
push 0x586664
push eax
push esi
call fcn.004e06f0
mov esi, dword [ebp + 0x10]
add edx, dword [ebp - 0x10]
mov ecx, esi
push dword [ebp - 0x1c]
call 0x4986f0
add esp, 4
test al, al
mov al, 1
jne 0x4986c2
push 1
push 0x5850c2
push esi
call fcn.004dec60
add esp, 0xc
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x58660c
push dword [ebp + 0xc]
push esi
call fcn.004e0750
push 0x58660c
push esi
push ecx
call fcn.004e07b0
nop word cs:[eax + eax]
nop
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
call 0x4986fe
pop eax
mov byte [ebp - 0x4c], 0x81
mov byte [ebp - 0x40], 0x81
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x24], ecx
mov ecx, edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
add eax, edx
mov dl, 0x81
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
movzx eax, byte [ebp - 0x41]
mov esi, dword [ebp - 0x46]
movzx ebx, byte [ebp - 0x42]
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 0x4b]
mov dword [ebp - 0x18], esi
mov esi, dword [ebp - 0x4a]
mov dword [ebp - 0x10], eax
jmp 0x498765
mov al, 2
mov edi, edx
xor edx, edx
xor esi, esi
mov dword [ebp - 0x1c], eax
xor eax, eax
shld esi, ebx, 0x10
shl ebx, 0x10
mov dword [ebp - 0x18], esi
movzx esi, ax
or esi, ebx
mov ebx, edx
mov edx, edi
cmp dl, 0x81
je 0x498781
movzx eax, dl
cmp eax, 0x80
je 0x49895c
cmp bl, byte [ebp - 0x1c]
jb 0x498997
test ecx, ecx
je 0x4989d7
cmp ecx, dword [ebp - 0x2c]
je 0x4989d7
movzx ebx, byte [ecx]
test bl, bl
js 0x4987b0
inc ecx
cmp ebx, 0x27
jbe 0x498810
jmp 0x498850
movzx edx, byte [ecx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x498800
mov esi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x49883f
movzx ebx, byte [esi + 3]
and eax, 7
shl ecx, 6
shl eax, 0x12
and ebx, 0x3f
or ebx, ecx
or ebx, eax
cmp ebx, 0x110000
je 0x4989d7
mov ecx, esi
add ecx, 4
cmp ebx, 0x27
jbe 0x498810
jmp 0x498850
shl eax, 6
add ecx, 2
or eax, edx
mov ebx, eax
cmp ebx, 0x27
ja 0x498850
nop
mov esi, dword [ebx*4 + 0x4989e4]
mov al, 0x30
mov dl, 0x5c
mov dword [ebp - 0x10], eax
add esi, dword [ebp - 0x28]
jmp esi
shl eax, 0xc
add esi, 3
or ecx, eax
mov ebx, ecx
mov ecx, esi
cmp ebx, 0x27
jbe 0x498810
cmp ebx, 0x5c
jne 0x498863
mov al, 0x5c
xor ebx, ebx
mov dl, 0x5c
mov dword [ebp - 0x10], eax
jmp 0x498745
mov esi, ecx
cmp ebx, 0x2ff
jbe 0x49887d
push ebx
call fcn.004f0fa0
add esp, 4
test al, al
lea eax, [ebp - 0x58]
jne 0x498899
push ebx
call fcn.004e31c0
add esp, 4
test al, al
lea eax, [ebp - 0x64]
je 0x498899
mov ecx, esi
mov dl, pe_nt_image_headers32
mov dword [ebp - 0x10], eax
jmp 0x498745
mov ecx, ebx
mov byte [eax + 2], 0
mov word [eax], 0
or ecx, 1
bsr edx, ecx
mov ecx, ebx
shr ecx, 0x14
xor edx, 0x1c
movzx ecx, byte [ecx + 0x5841a0]
shr edx, 2
mov byte [eax + 3], cl
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xf
movzx ecx, byte [ecx + 0x5841a0]
mov byte [eax + 4], cl
mov ecx, ebx
shr ecx, 0xc
and ecx, 0xf
movzx ecx, byte [ecx + 0x5841a0]
mov byte [eax + 5], cl
mov ecx, ebx
shr ecx, 8
and ecx, 0xf
movzx ecx, byte [ecx + 0x5841a0]
mov byte [eax + 6], cl
mov ecx, ebx
and ebx, 0xf
shr ecx, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x5841a0]
mov byte [eax + 7], cl
movzx ecx, byte [ebx + 0x5841a0]
mov byte [eax + 8], cl
mov byte [eax + 9], 0x7d
mov word [eax + edx - 2], 0x755c
mov byte [eax + edx], 0x7b
movzx ecx, byte [eax]
cmp cl, 0x81
je 0x4989d7
mov edi, ecx
mov ecx, esi
movzx ebx, byte [eax + 1]
mov esi, dword [eax + 6]
mov eax, dword [eax + 2]
add edx, 0xfffffffe
mov dword [ebp - 0x14], ecx
mov cl, 0xa
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], ebx
mov ebx, eax
shrd ebx, esi, 0x10
shr esi, 0x10
jmp 0x498752
mov eax, dword [ebp - 0x18]
xorps xmm0, xmm0
xor ebx, ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
movsd qword [ebp - 0x4c], xmm0
shld eax, esi, 0x10
xor esi, esi
jmp 0x4989b9
mov eax, dword [ebp - 0x10]
mov byte [ebp - 0x4c], dl
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], edx
mov byte [ebp - 0x4b], al
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x4a], esi
mov dword [ebp - 0x46], eax
movzx eax, bl
inc bl
movzx eax, byte [ebp + eax - 0x4c]
push eax
push dword [ebp - 0x24]
call fcn.004df6e0
add esp, 8
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
test al, al
je 0x498765
mov al, 1
jmp 0x4989d9
xor eax, eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret