Function at 0x408590
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
movzx eax, word [0x4ad59c]
mov ecx, dword [0x4ad688]
cwde
imul ecx, eax
movsd xmm4, qword [0x49eff0]
mov edx, dword [ebp + 8]
push esi
mov dword [0x4ad688], ecx
inc dword [0x4ad488]
movzx eax, word [0x4ad030]
movsx ecx, word [0x4ad130]
cwde
sub ecx, eax
mov eax, dword [0x4ad488]
sub ecx, eax
movzx eax, word [0x4ad18c]
add eax, ecx
mov word [0x4ad130], ax
mov eax, dword [0x4ad5f4]
add eax, 0x6e44c7b2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [0x4ad218], xmm0
dec dword [0x4ad5f4]
mov eax, dword [0x4ad4f0]
movsd xmm0, qword [0x4ad1d8]
add eax, 0x1f331577
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mov eax, dword [ebp + 0xc]
lea esi, [edx + eax*4]
mov eax, dword [ebp + 0x10]
addsd xmm0, xmm1
movsd qword [0x4ad1d8], xmm0
movsd xmm0, qword [0x4ad4a8]
mulsd xmm0, qword [0x4ad3f8]
movsd qword [0x4ad3f8], xmm0
movsd xmm0, qword [0x4ad4a8]
subsd xmm0, xmm4
mov dword [ebp - 4], eax
movsd qword [0x4ad4a8], xmm0
movss xmm0, dword [0x4ad3b0]
addss xmm0, dword [0x4a1244]
comiss xmm0, dword [0x4a2840]
jb 0x4086a5
mov eax, dword [0x4ad2e0]
movsd xmm0, qword [0x4ad328]
subsd xmm0, qword [0x4a26d8]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
subsd xmm1, xmm0
cvttsd2si eax, xmm1
mov dword [0x4ad2e0], eax
cmp edx, esi
je 0x408980
movss xmm7, dword [0x4a2974]
movss xmm3, dword [0x49efec]
movsd xmm6, qword [0x49f750]
movss xmm5, dword [0x4a1ba4]
nop dword [eax]
movss xmm0, dword [0x4ad3b8]
subss xmm0, xmm7
cvtps2pd xmm1, xmm0
movsd xmm0, qword [0x4ad190]
subsd xmm1, xmm0
movsd xmm0, qword [0x4a2478]
ucomisd xmm0, xmm1
movss xmm0, dword [0x4ad3b8]
subss xmm0, xmm3
lahf
movss dword [0x4ad3b8], xmm0
test ah, 0x44
jnp 0x40874e
movsd xmm0, qword [0x4ad1f0]
addsd xmm0, xmm4
movsd qword [0x4ad1f0], xmm0
movsd xmm1, qword [0x4ad1f0]
movsx eax, word [0x4ad2c8]
subsd xmm1, xmm6
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov word [0x4ad2c8], ax
mov eax, dword [ebp - 4]
mov ecx, 0x2c8c2d74
xor dword [edx], eax
mov eax, dword [0x4ad490]
sub ecx, eax
mov eax, dword [0x4ad5c0]
movss xmm1, dword [0x4a1020]
imul eax, ecx
ror dword [ebp - 4], 1
mov dword [0x4ad5c0], eax
movsx eax, word [0x4ad1a8]
movss xmm0, dword [0x4ad3e4]
subss xmm1, xmm0
movd xmm2, eax
cvtdq2ps xmm2, xmm2
subss xmm2, xmm1
cvttss2si eax, xmm2
mov word [0x4ad1a8], ax
movsd xmm0, qword [0x4ad520]
addsd xmm0, xmm4
movsd qword [0x4ad520], xmm0
movsd xmm0, qword [0x4ad520]
addsd xmm0, qword [0x49f088]
subsd xmm0, qword [0x49fb10]
ucomisd xmm0, qword [0x4a26b8]
lahf
test ah, 0x44
jp 0x408803
movss xmm1, dword [0x4ad19c]
movsx eax, word [0x4ad378]
subss xmm1, xmm5
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
cvttss2si eax, xmm0
mov word [0x4ad378], ax
jmp 0x408841
movss xmm0, dword [0x4ad068]
mov ax, word [0x4ad230]
mov ecx, dword [0x4ad550]
movsd xmm1, qword [0x4ad558]
cwde
add ecx, eax
cvtps2pd xmm2, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
subsd xmm2, xmm1
cvtpd2ps xmm0, xmm2
movss dword [0x4ad068], xmm0
mov eax, dword [ebp - 4]
movss xmm1, dword [0x4ad614]
shr eax, 8
add al, byte [ebp - 4]
mov byte [ebp - 3], al
mov eax, dword [0x4ad490]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
subss xmm1, xmm0
movss xmm0, dword [0x4ad4c0]
cvtps2pd xmm0, xmm0
subss xmm1, dword [0x4a10a0]
cvtps2pd xmm2, xmm1
movsd xmm1, qword [0x4ad548]
addsd xmm1, xmm0
movss xmm0, dword [0x4ad4c0]
addss xmm0, xmm3
ucomisd xmm2, xmm1
movss dword [0x4ad4c0], xmm0
movss xmm0, dword [0x4ad614]
subss xmm0, xmm3
lahf
movss dword [0x4ad614], xmm0
test ah, 0x44
jnp 0x4088c8
add dword [0x4ad504], 0x3b426a86
jmp 0x40894a
movsx eax, word [0x4ad254]
movss xmm1, dword [0x4ad074]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
addss xmm1, xmm0
movss xmm0, dword [0x4ad19c]
cvtps2pd xmm0, xmm0
subss xmm1, dword [0x4a0e18]
cvtps2pd xmm2, xmm1
movsd xmm1, qword [0x4ad190]
addsd xmm1, xmm0
subsd xmm1, qword [0x4a2360]
comisd xmm2, xmm1
jb 0x408923
imul eax, dword [0x4ad68c], 0x759afe04
mov dword [0x4ad68c], eax
jmp 0x40894a
movsx eax, word [0x4ad67c]
movss xmm0, dword [0x4ad4c0]
sub eax, 0x2f18ec30
movd xmm1, eax
cvtdq2ps xmm1, xmm1
addss xmm0, xmm1
movss dword [0x4ad4c0], xmm0
mov al, byte [ebp - 3]
add edx, 4
add byte [ebp - 4], al
movzx eax, word [0x4ad5f8]
movsx ecx, word [0x4ad348]
cwde
sub ecx, eax
movzx eax, word [0x4ad0dc]
add eax, 0xa40f4d3e
add eax, ecx
mov word [0x4ad348], ax
cmp edx, esi
jne 0x4086d0
mov ax, word [0x4ad64c]
movzx ecx, word [0x4ad104]
cwde
add ecx, eax
mov word [0x4ad104], cx
inc word [0x4ad64c]
mov eax, dword [ebp - 4]
pop esi
mov esp, ebp
pop ebp
ret