Function at 0x40577a
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
and ebp, 0xfffffff0
sub ebp, 0x90
mov dword [ebp + 0x84], 0x405231
cmp byte [0x415371], 1
je 0x4057bf
mov dword [ebp + 0x88], 9
mov dword [ebp + 0x8c], 0x800
mov dword [ebp + 0x90], 0x3ffff
jmp 0x4057dd
mov dword [ebp + 0x88], 5
mov dword [ebp + 0x8c], pe_nt_image_headers32
mov dword [ebp + 0x90], 0x3ff
cld
lea esi, [0x54cd08]
lea edi, [ebp + 0x40]
mov ecx, 0x10
movaps xmm0, xmmword [0x410890]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x80], fcn.00404231
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], 0x405c30
movaps xmmword [ebp + 0x30], xmm0
pcmpeqd xmm0, xmm0
psrldq xmm0, 4
movaps xmmword [ebp - 0x70], xmm0
psrld xmm0, 0x18
cvtdq2ps xmm0, xmm0
movaps xmmword [ebp + 0x10], xmm0
mov dh, byte [0x41561b]
mov dl, byte [0x414fcf]
mov al, byte [0x41506a]
push dword [ebp + 0x6c]
pop dword [ebp - 0x40]
push dword [ebp + 0x70]
pop dword [ebp - 0x44]
push dword [0x54cc4c]
pop dword [ebp + 0x26]
mov byte [ebp + 0x22], al
mov word [ebp + 0x20], dx
cld
cmp dl, 0xe
je 0x405da0
mov eax, dword [ebp - 0x3c]
push word [ebp + 0x28]
pop word [ebp - 8]
mov word [ebp - 6], 0
push word [ebp + 0x26]
pop word [ebp - 4]
mov word [ebp - 2], 0
xorps xmm3, xmm3
movups xmm1, xmmword [ebp - 8]
punpcklwd xmm1, xmm3
xorps xmm2, xmm2
shufps xmm1, xmm1, 0xb1
btr eax, 0x1f
jb 0x405c45
movzx ebx, word [ebp + 0x28]
shr ebx, 1
mov ecx, ebx
imul ebx, eax
mov word [ebp - 6], bx
add ebx, ecx
mov word [ebp - 8], bx
mov word [ebp - 2], 0
push word [ebp + 0x26]
pop word [ebp - 4]
pcmpeqd xmm3, xmm3
psrld xmm3, 0x10
movlps xmm1, qword [ebp - 8]
movlps xmm2, qword [ebp - 6]
andps xmm1, xmm3
andps xmm2, xmm3
packssdw xmm1, xmm1
packssdw xmm2, xmm2
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 0
movaps xmmword [ebp - 0x80], xmm1
movaps xmmword [ebp - 0x20], xmm2
cmp byte [ebp + 0x21], 1
jne 0x405907
xorps xmm3, xmm3
movups xmm1, xmmword [ebp - 8]
punpcklwd xmm1, xmm3
xorps xmm2, xmm2
shufps xmm1, xmm1, 0xb1
call fcn.004068ed
mov esi, dword [ebp + 0x54]
xor ecx, ecx
push ecx
push esi
pushal
cmp byte [ebp + 0x22], 1
je 0x405926
imul ecx, ecx, 0xc
add ecx, dword [ebp + 0x40]
bt dword [ecx + 8], 0x1f
jae 0x405c30
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
shl edx, 2
shl eax, 2
shl ebx, 2
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], ebx
lea edx, [edx + edx*2]
lea eax, [eax + eax*2]
lea ebx, [ebx + ebx*2]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ebx
mov ecx, dword [ebp + 0x58]
movups xmm0, xmmword [edx + ecx]
movups xmm1, xmmword [eax + ecx]
movups xmm2, xmmword [ebx + ecx]
shufps xmm0, xmm0, 0xe1
shufps xmm1, xmm1, 0xe1
shufps xmm2, xmm2, 0xe1
movaps xmm4, xmm0
movhlps xmm4, xmm1
shufps xmm4, xmm4, 0x82
movhlps xmm5, xmm2
movlhps xmm4, xmm5
andps xmm4, xmmword [ebp - 0x70]
cvtps2dq xmm0, xmm0
cvtps2dq xmm1, xmm1
cvtps2dq xmm2, xmm2
packssdw xmm0, xmm0
packssdw xmm1, xmm1
packssdw xmm2, xmm2
punpckldq xmm0, xmm1
movlhps xmm0, xmm2
movups xmmword [ebp - 0x60], xmm0
movaps xmm3, xmm0
pcmpgtw xmm0, xmmword [ebp - 0x80]
pcmpgtw xmm3, xmmword [ebp - 0x20]
pmovmskb ecx, xmm0
pmovmskb eax, xmm3
and ecx, 0xfff
and eax, 0xfff
cmp ecx, 0xfff
je 0x405c30
or eax, eax
je 0x405c30
movzx eax, byte [ebp + 0x20]
add eax, 0x414e64
movzx edi, byte [eax]
mov ecx, dword [ebp + 0x5c]
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
movaps xmm5, xmmword [ebp + 0x30]
movlps xmm7, qword [eax + ecx]
movhps xmm7, qword [ebx + ecx]
movlps xmm2, qword [edx + ecx]
mulps xmm7, xmm5
mulps xmm2, xmm5
addps xmm7, xmm5
addps xmm2, xmm5
mov edx, 0x6cf8e0
shufps xmm7, xmm7, 0x8d
push edx
push edx
push edx
push edx
cvtps2dq xmm7, xmm7
cvtps2dq xmm2, xmm2
movups xmm5, xmmword [esp]
pslld xmm7, 2
pslld xmm2, 2
movlhps xmm3, xmm2
shufps xmm2, xmm2, 0xc5
movhlps xmm3, xmm7
movlhps xmm7, xmm2
pslld xmm7, 9
paddd xmm7, xmm3
paddd xmm7, xmm5
movups xmmword [esp], xmm7
pop eax
pop ebx
pop edx
pop ecx
movlps xmm0, qword [eax]
movlps xmm1, qword [ebx]
movlps xmm2, qword [edx]
xorps xmm3, xmm3
punpcklbw xmm0, xmm3
punpcklbw xmm1, xmm3
punpcklbw xmm2, xmm3
movlhps xmm0, xmm1
cmp byte [ebp + 0x20], 0
je 0x405b2b
bt edi, 3
jb 0x405a9e
mov eax, 0x55555555
movhlps xmm3, xmm0
paddw xmm2, xmm0
paddw xmm2, xmm3
movd xmm3, eax
shufps xmm3, xmm3, 0
pmulhuw xmm3, xmm2
packuswb xmm3, xmm3
jmp 0x405afe
movlps xmm5, qword [ebp - 8]
xorps xmm7, xmm7
punpcklwd xmm5, xmm7
shufps xmm5, xmm5, 0xb1
punpcklwd xmm0, xmm7
punpcklwd xmm1, xmm7
punpcklwd xmm2, xmm7
cvtdq2ps xmm0, xmm0
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm2, xmm2
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
mov ebx, dword [ebp + 0x7c]
movlps xmm6, qword [ebx + eax*2]
movhps xmm6, qword [ebx + edx*2]
movlps xmm3, qword [ebx + ecx*2]
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x58]
movups xmm7, xmmword [ebp + 0x84]
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov edx, 0x7cf8e0
call dword [ebp + pe_nt_image_headers32]
jmp dword [ebp - 0x2c]
movaps xmm0, xmm4
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x58]
movaps xmm7, xmm3
mov esi, 0x406022
movd xmm5, esi
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov edx, dword [ebp + 0x26]
movups xmm1, xmmword [ebp - 8]
call fcn.0040616f
jmp dword [ebp - 0x2c]
sub esp, 0x10
shufps xmm4, xmm4, 0xc6
movups xmmword [esp], xmm4
movups xmm5, xmmword [0x4105f0]
xor eax, eax
lea esi, [ebp - 0x38]
movaps xmm1, xmm5
mov ebx, dword [esi + eax*2]
mov edx, ebx
add ebx, dword [ebp + 0x58]
movups xmm2, xmmword [ebx]
andps xmm2, xmmword [ebp - 0x70]
subps xmm1, xmm2
andps xmm1, xmmword [ebp - 0x70]
movaps xmm7, xmm1
mulps xmm7, xmm7
haddps xmm7, xmm7
haddps xmm7, xmm7
rsqrtps xmm7, xmm7
mulps xmm1, xmm7
add edx, dword [ebp + 0x5c]
movups xmm3, xmmword [edx]
mulps xmm3, xmm1
haddps xmm3, xmm3
haddps xmm3, xmm3
xorps xmm4, xmm4
maxps xmm3, xmm4
shufps xmm3, xmm3, 0xc0
movaps xmm4, xmm3
mov ecx, 5
mulps xmm4, xmm4
loop 0x405b92
movlps xmm0, qword [0x413d32]
xorps xmm1, xmm1
punpcklwd xmm0, xmm1
cvtdq2ps xmm2, xmm0
mulps xmm4, xmm2
movlps xmm0, qword [0x413d22]
punpcklwd xmm0, xmm1
cvtdq2ps xmm2, xmm0
addps xmm4, xmm2
movlps xmm0, qword [0x413d2a]
punpcklwd xmm0, xmm1
cvtdq2ps xmm2, xmm0
mulps xmm2, xmm3
addps xmm4, xmm2
minps xmm4, xmmword [ebp + 0x10]
sub esp, 0x10
shufps xmm4, xmm4, 0xd2
movups xmmword [esp], xmm4
add eax, 2
cmp eax, 6
jne 0x405b42
movups xmm0, xmmword [esp]
movups xmm1, xmmword [esp + 0x10]
movups xmm2, xmmword [esp + 0x20]
add esp, 0x30
movups xmm4, xmmword [esp]
add esp, 0x10
movlps xmm5, qword [ebp - 8]
xorps xmm7, xmm7
punpcklwd xmm5, xmm7
shufps xmm5, xmm5, 0xb1
mov eax, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
mov esi, 0x405231
mov edi, dword [ebp - 0x40]
movd xmm7, esi
mov esi, dword [ebp - 0x44]
call dword [ebp + pe_nt_image_headers32]
popal
pop esi
add esi, 0xc
pop ecx
inc ecx
cmp ecx, dword [ebp + 0x4c]
jne 0x40590c
jmp 0x405e00
cmp byte [ebp + 0x21], 1
jne 0x405c50
call fcn.004068ed
movzx ecx, byte [ebp + 0x20]
mov esi, 0x405ed7
mov edi, 0x405f4a
mov edx, 0x405fd5
cmp cl, 0xd
cmove edi, edx
cmp cl, 9
cmove edi, esi
mov dword [ebp - 0x28], fcn.00405e08
mov dword [ebp - 0x50], edi
mov edx, 0x5cf8e0
mov eax, 0x7cf8e0
mov ebx, 0x6cf8e0
mov esi, 0xff00
cmp cl, 0xd
cmove edx, esi
cmp cl, 0xc
cmove edx, eax
cmp cl, 9
cmove edx, ebx
cmp cl, 0xb
mov dword [ebp - 0x48], edx
movzx edx, word [ebp + 0x26]
mov dword [ebp - 0x4c], edx
mov ecx, dword [ebp + 0x64]
mov esi, dword [ebp + 0x60]
cld
push ecx
push esi
cmp byte [ebp + 0x22], 1
je 0x405cce
mov ebx, dword [esi]
imul ebx, ebx, 0xc
add ebx, dword [ebp + 0x5c]
bt dword [ebx + 8], 0x1f
jae 0x405d92
mov eax, dword [esi]
mov ebx, dword [esi + 4]
push eax
push ebx
imul ebx, ebx, 0xc
imul eax, eax, 0xc
mov edx, dword [ebp + 0x58]
movlps xmm4, qword [ebx + edx]
movhps xmm4, qword [eax + edx]
cvtps2dq xmm4, xmm4
movlps xmm2, qword [ebx + edx + 8]
movlps xmm3, qword [eax + edx + 8]
mov edx, dword [ebp + 0x5c]
movlps xmm0, qword [eax + edx]
movhps xmm0, qword [ebx + edx]
movaps xmm5, xmmword [ebp + 0x30]
mulps xmm0, xmm5
addps xmm0, xmm5
cvtps2dq xmm6, xmm0
pop ebx
pop eax
cmp byte [ebp + 0x20], 0xc
jne 0x405d29
shl eax, 3
shl ebx, 3
add eax, dword [ebp + 0x7c]
add ebx, dword [ebp + 0x7c]
movups xmm0, xmmword [eax]
movups xmm1, xmmword [ebx]
jmp 0x405d6e
cmp byte [ebp + 0x20], 0xd
je 0x405d6e
sub esp, 0x10
movups xmmword [esp], xmm6
pop eax
pop ebx
pop ecx
pop edx
shl eax, 9
shl ecx, 9
add eax, ebx
add ecx, edx
mov ebx, dword [ebp - 0x48]
lea eax, [ebx + eax*4]
lea ecx, [ebx + ecx*4]
movss xmm0, dword [eax]
movss xmm1, dword [ecx]
xorps xmm6, xmm6
punpcklbw xmm0, xmm6
punpcklbw xmm1, xmm6
punpcklwd xmm0, xmm6
punpcklwd xmm1, xmm6
cvtdq2ps xmm0, xmm0
cvtdq2ps xmm1, xmm1
sub esp, 0x10
movups xmmword [esp], xmm4
pop eax
pop ebx
pop ecx
pop edx
xorps xmm6, xmm6
movd xmm7, dword [ebp + 0x26]
punpcklwd xmm7, xmm6
movlhps xmm7, xmm7
movups xmm5, xmmword [ebp - 0x4c]
mov edi, dword [ebp - 0x50]
call dword [ebp - 0x28]
pop esi
pop ecx
add esi, 8
dec ecx
jne 0x405cb3
jmp 0x405e00
cmp byte [ebp + 0x21], 1
jne 0x405dab
call fcn.004068ed
mov esi, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x48]
movzx edx, word [ebp + 0x26]
or eax, 0xffffffff
xorps xmm3, xmm3
movd xmm5, dword [ebp + 0x26]
punpcklwd xmm5, xmm3
cld
movups xmm0, xmmword [esi]
cvtps2dq xmm0, xmm0
xorps xmm3, xmm3
movaps xmm4, xmm5
pcmpgtd xmm4, xmm0
pcmpgtd xmm3, xmm0
xorps xmm3, xmm4
pmovmskb ebx, xmm3
cmp bl, 0xff
jne 0x405dfb
sub esp, 8
movlps qword [esp], xmm0
pop ebx
pop edi
imul edi, edx
add edi, ebx
shl edi, 2
add edi, dword [ebp - 0x40]
stosd dword es:[edi], eax
add esi, 0xc
loop 0x405dc5
add esp, 0x154
pop ebp
ret