Function at 0x402480
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, ecx
mov eax, dword [ebp + 8]
mov byte [ecx + 0x61], 1
movsd xmm4, qword [ecx + 0x10]
movsd xmm2, qword [ecx]
movsd xmm1, qword [ecx + 8]
subsd xmm4, xmm2
movsd xmm3, qword [ecx + 0x18]
subsd xmm3, xmm1
lea edi, [ecx + 0x40]
movsd qword [ecx + 0x40], xmm4
movsd qword [ecx + 0x48], xmm3
cmp eax, 1
jne 0x4024da
movups xmm0, xmmword [edi]
movups xmmword [esi + 0x50], xmm0
mov byte [esi + 0x60], 0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4
movsd xmm5, qword [esi + 0x20]
movsd xmm7, qword [esi + 0x28]
subsd xmm5, xmm2
subsd xmm7, xmm1
movsd qword [esi + 0x50], xmm5
movsd qword [esi + 0x58], xmm7
lea ecx, [eax + 1]
mov edx, ecx
sar edx, 2
cmp edx, eax
jg 0x40264e
movapd xmmword [esp + 0x40], xmm4
movapd xmmword [esp + 0x20], xmm3
movsd qword [esp + 0x18], xmm5
sub ecx, edx
lea edx, [esi + 8]
xorpd xmm0, xmm0
movapd xmm3, xmmword [0x1d4c3f60]
movapd xmm4, xmm0
movsd xmm5, qword [edx - 8]
movsd xmm6, qword [edx]
movapd xmm0, xmm6
xorpd xmm0, xmm3
maxsd xmm0, xmm6
movapd xmm6, xmm5
xorpd xmm6, xmm3
maxsd xmm6, xmm5
maxsd xmm0, xmm6
maxsd xmm0, xmm4
add edx, 0x10
dec ecx
jne 0x402529
mulsd xmm0, qword [0x1d8a1738]
movsd xmm5, qword [esp + 0x18]
movapd xmm3, xmmword [esp + 0x20]
movapd xmm4, xmmword [esp + 0x40]
lea ebx, [esi + 0x50]
cmp eax, 4
je 0x402662
xorpd xmm1, xmm1
ucomisd xmm4, xmm1
jne 0x402735
jp 0x402735
ucomisd xmm3, xmm1
jne 0x4025a2
jnp 0x402657
movapd xmm1, xmmword [0x1d6dac40]
andpd xmm3, xmm1
andpd xmm0, xmm1
ucomisd xmm0, xmm3
ja 0x402657
mulsd xmm7, qword [esi + 0x40]
mulsd xmm5, qword [esi + 0x48]
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm5
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm7
movaps xmm2, xmmword [0x1d89a1c0]
movaps xmm4, xmm1
andps xmm4, xmm2
movss xmm3, dword [0x1d8a167c]
ucomiss xmm3, xmm4
jb 0x4025f6
andps xmm2, xmm0
ucomiss xmm3, xmm2
jae 0x40262d
movd edx, xmm1
mov eax, 0x7fffffff
mov ecx, edx
and ecx, eax
neg ecx
test edx, edx
cmovns ecx, edx
movd edx, xmm0
and eax, edx
neg eax
test edx, edx
cmovns eax, edx
lea edx, [eax + 0x10]
cmp ecx, edx
setl dl
add ecx, 0x10
cmp eax, ecx
setl al
and al, dl
cmp al, 1
jne 0x402648
xorpd xmm7, xmm7
xorps xmm0, xmm0
ucomisd xmm7, xmm0
setp al
setne cl
or cl, al
mov byte [esi + 0x60], cl
jmp 0x4024d0
subsd xmm7, xmm5
jmp 0x402631
xorpd xmm0, xmm0
jmp 0x402576
movups xmm0, xmmword [ebx]
movups xmmword [edi], xmm0
jmp 0x4025bc
movapd xmmword [esp + 0x20], xmm3
movsd qword [esp + 0x18], xmm5
movsd qword [esp + 0x38], xmm7
movsd xmm5, qword [esi + 0x30]
movsd xmm3, qword [esi + 0x38]
subsd xmm5, xmm2
movsd qword [esp + 8], xmm5
subsd xmm3, xmm1
movsd qword [esp + 0x10], xmm3
xorpd xmm1, xmm1
movapd xmmword [esp + 0x40], xmm4
ucomisd xmm4, xmm1
jne 0x402754
jp 0x402754
xorpd xmm1, xmm1
movapd xmm2, xmmword [esp + 0x20]
ucomisd xmm2, xmm1
jne 0x402754
jp 0x402754
movups xmm2, xmmword [ebx]
movups xmmword [edi], xmm2
movsd xmm2, qword [esp + 8]
movsd qword [esi + 0x50], xmm2
movsd xmm2, qword [esp + 0x10]
movsd qword [esi + 0x58], xmm2
movsd xmm2, qword [esi + 0x40]
ucomisd xmm2, xmm1
jne 0x4028c2
jp 0x4028c2
movsd xmm1, qword [esi + 0x48]
xorpd xmm2, xmm2
ucomisd xmm1, xmm2
jne 0x4028e1
jp 0x4028e1
lea eax, [esi + 0x10]
lea ecx, [esi + 0x30]
movups xmm0, xmmword [ebx]
movups xmmword [edi], xmm0
movupd xmm0, xmmword [ecx]
movupd xmmword [eax], xmm0
movsd xmm5, qword [esp + 8]
movsd xmm7, qword [esp + 0x10]
jmp 0x4025bc
movapd xmm2, xmmword [0x1d6dac40]
andpd xmm4, xmm2
andpd xmm2, xmm0
ucomisd xmm2, xmm4
ja 0x402596
jmp 0x4025bc
movapd xmm1, xmmword [esp + 0x40]
mulsd xmm1, qword [esp + 0x10]
movapd xmm0, xmmword [esp + 0x20]
mulsd xmm0, qword [esp + 8]
movapd xmmword [esp + 0x70], xmm0
cvtsd2ss xmm0, xmm0
movapd xmmword [esp + 0x50], xmm1
cvtsd2ss xmm1, xmm1
movss dword [esp + 4], xmm0
movss dword [esp], xmm1
call 0x1593440
xorps xmm0, xmm0
movsd qword [esp + 0x68], xmm0
test al, al
jne 0x4027af
movapd xmm0, xmmword [esp + 0x50]
subsd xmm0, qword [esp + 0x70]
movsd qword [esp + 0x68], xmm0
movsd xmm1, qword [esp + 0x38]
mulsd xmm1, qword [esp + 8]
movsd xmm0, qword [esp + 0x18]
mulsd xmm0, qword [esp + 0x10]
movsd qword [esp + 0x80], xmm0
cvtsd2ss xmm0, xmm0
movsd qword [esp + 0x70], xmm1
cvtsd2ss xmm1, xmm1
movss dword [esp + 4], xmm0
movss dword [esp], xmm1
call 0x1593440
xorps xmm0, xmm0
movsd qword [esp + 0x50], xmm0
test al, al
jne 0x402810
movsd xmm0, qword [esp + 0x70]
subsd xmm0, qword [esp + 0x80]
movsd qword [esp + 0x50], xmm0
movsd xmm0, qword [esp + 0x68]
mulsd xmm0, qword [esp + 0x50]
ucomisd xmm0, qword [0x1d4b39c0]
jae 0x4028b1
movapd xmm1, xmmword [esp + 0x20]
mulsd xmm1, qword [esp + 0x18]
movapd xmm0, xmmword [esp + 0x40]
mulsd xmm0, qword [esp + 0x38]
movapd xmmword [esp + 0x40], xmm0
cvtsd2ss xmm0, xmm0
movapd xmmword [esp + 0x20], xmm1
cvtsd2ss xmm1, xmm1
movss dword [esp + 4], xmm0
movss dword [esp], xmm1
call 0x1593440
xorps xmm0, xmm0
xorps xmm1, xmm1
test al, al
jne 0x40287c
movapd xmm1, xmmword [esp + 0x20]
subsd xmm1, qword [esp + 0x40]
movsd xmm2, qword [esp + 0x50]
mulsd xmm2, xmm1
ucomisd xmm0, xmm2
jbe 0x402896
movups xmm0, xmmword [ebx]
movups xmmword [edi], xmm0
mov byte [esi + 0x61], 0
movsd xmm5, qword [esp + 8]
movsd qword [esi + 0x50], xmm5
movsd xmm7, qword [esp + 0x10]
movsd qword [esi + 0x58], xmm7
jmp 0x4025bc
movsd xmm7, qword [esp + 0x38]
movsd xmm5, qword [esp + 0x18]
jmp 0x4025bc
movapd xmm1, xmmword [0x1d6dac40]
andpd xmm2, xmm1
andpd xmm1, xmm0
ucomisd xmm1, xmm2
ja 0x4026f7
jmp 0x402724
movapd xmm2, xmmword [0x1d6dac40]
andpd xmm1, xmm2
andpd xmm0, xmm2
ucomisd xmm0, xmm1
ja 0x402710
jmp 0x402724