Function at 0x10012530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x388
mov eax, dword [0x100c6084]
xor eax, esp
mov dword [esp + 0x384], eax
push esi
mov esi, ecx
movsd qword [esp + 0xc], xmm3
mov ecx, dword [ebp + 8]
movapd xmm1, xmm2
push edi
movsd qword [esp + 0x30], xmm1
cmp dword [esi + 0x2f38], ecx
jne 0x10012591
movsd xmm0, qword [esi + 0x2f40]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x10012591
movsd xmm0, qword [esi + 0x2f48]
ucomisd xmm0, xmm3
lahf
test ah, 0x44
jnp 0x10012bbe
movsd xmm0, qword [0x100a3720]
movsd qword [esi + 0x2f40], xmm1
divsd xmm1, xmm0
mov dword [esi + 0x2f38], ecx
mov dword [esi], 0
movsd qword [esi + 0x2f48], xmm3
call fcn.10085680
movapd xmm1, xmm0
subsd xmm1, qword [0x100a36b8]
movsd qword [esp + 0x20], xmm1
movsd xmm1, qword [esp + 0x10]
subsd xmm1, qword [0x100a36b8]
movaps xmm0, xmm1
call fcn.10036aa0
movapd xmm1, xmm0
movsd xmm0, qword [0x100a36b8]
mulsd xmm1, qword [0x100a3700]
addsd xmm1, xmm0
divsd xmm0, xmm1
movsd qword [esp + 0x10], xmm1
call fcn.10012440
movsd xmm2, qword [0x100a36b8]
movsd qword [esi + 0x30], xmm0
movapd xmm1, xmm2
movsd xmm0, qword [esp + 0x10]
mulsd xmm0, xmm0
divsd xmm1, xmm0
movaps xmm0, xmm2
subsd xmm0, xmm1
call fcn.100863c0
call fcn.10012440
mov eax, dword [ebp + 8]
mov edi, 1
mov ecx, eax
movsd qword [esi + 0x38], xmm0
not ecx
cdq
and ecx, 1
sub eax, edx
mov dword [esp + 8], ecx
mov ecx, eax
sar ecx, 1
mov dword [esp + 0x10], ecx
cmp ecx, edi
jl 0x10012700
movd xmm1, dword [ebp + 8]
lea ecx, [esi + 0x58]
cvtdq2pd xmm1, xmm1
mov eax, 2
sub eax, dword [esp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
movsd qword [esp + 0x18], xmm1
jmp 0x10012690
movd xmm0, eax
mov ecx, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [esi + 0x30]
divsd xmm0, xmm1
movaps xmm1, xmm0
call fcn.10013370
movapd xmm1, xmm0
movsd xmm2, qword [0x100a36b8]
movsd xmm0, qword [0x100a3710]
divsd xmm0, qword [esi + 0x30]
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
add eax, 2
mov dword [esp + 0xc], eax
mulsd xmm1, xmm0
movaps xmm0, xmm2
divsd xmm0, xmm1
movsd xmm1, qword [esp + 0x18]
movsd qword [ecx], xmm0
add ecx, 8
movsd qword [esp + edi*8 + 0x68], xmm0
inc edi
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x10]
cmp edi, ecx
jle 0x10012690
jmp 0x10012708
movsd xmm2, qword [0x100a36b8]
movsd xmm0, qword [0x100c74c8]
mov eax, dword [ebp + 8]
movsd qword [esi + ecx*8 + 0x58], xmm0
movdqu xmmword [esp + 0x58], xmm0
and eax, 0x80000001
jns 0x1001272b
dec eax
or eax, 0xfffffffe
inc eax
mov edi, 1
mov dword [esi + 0x48], eax
mov dword [esi + 0x50], ecx
cmp ecx, edi
jl 0x10012784
lea eax, [esi + 0x1320]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x50]
movapd xmm1, xmm2
sub eax, edi
movsd xmm0, qword [esp + eax*8 + 0x70]
mulsd xmm0, xmm0
divsd xmm1, xmm0
movaps xmm0, xmm2
subsd xmm0, xmm1
call fcn.100863c0
mov eax, dword [esp + 8]
inc edi
movsd xmm2, qword [0x100a36b8]
movsd qword [eax], xmm0
add eax, 8
mov dword [esp + 8], eax
cmp edi, dword [esi + 0x50]
jle 0x10012744
movsd xmm0, qword [esp + 0x20]
call fcn.100863c0
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
movsd qword [esi + 0x40], xmm0
lea eax, [eax + ecx*2]
mov ecx, esi
mov dword [esi + 0x4c], eax
cdq
sub eax, edx
and eax, 0xfffffffe
mov dword [esi + 0x54], eax
call fcn.10012e30
mov ecx, esi
call fcn.10012f10
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x54]
jle 0x100127cd
add eax, eax
xorps xmm1, xmm1
movsd qword [esi + eax*8 + 0x378], xmm1
mov eax, dword [esi + 0x4c]
xor ecx, ecx
add eax, eax
mov dword [esp + 8], ecx
js 0x10012818
lea edi, [esi + 0x378]
movsd xmm0, qword [edi + 0x960]
mov eax, ecx
mov ecx, dword [esi + 0x4c]
addsd xmm0, qword [edi]
cdq
add edi, 0x10
sub eax, edx
sar eax, 1
sub ecx, eax
movsd qword [esi + ecx*8 + 0x9b8], xmm0
mov ecx, dword [esp + 8]
mov eax, dword [esi + 0x4c]
add ecx, 2
add eax, eax
mov dword [esp + 8], ecx
cmp ecx, eax
jle 0x100127e0
push dword [esi + 0x4c]
mov ecx, esi
call fcn.10013020
mov eax, dword [esi + 0x54]
xor ecx, ecx
movsd xmm4, qword [0x100a3680]
cdq
sub eax, edx
movsd qword [esp + 0x10], xmm0
sar eax, 1
mov dword [esp + 0xc], ecx
test eax, eax
jle 0x10012ae8
movsd xmm5, qword [0x100a36a8]
xorps xmm0, xmm0
movsd qword [esp + 0x48], xmm0
mov edi, 0xff8
movsd qword [esp + 0x38], xmm0
movsd xmm2, qword [edi + esi + 0xc88]
add edi, 8
divsd xmm2, qword [0x100a3720]
inc ecx
mov dword [esp + 0xc], ecx
movsd xmm0, qword [edi + esi]
divsd xmm0, qword [0x100a3748]
movapd xmm1, xmm2
movsd qword [edi + esi + 0xc80], xmm2
addsd xmm1, qword [0x100a36b8]
mulsd xmm2, xmm5
movsd qword [edi + esi], xmm0
addsd xmm1, xmm0
addsd xmm2, qword [0x100a36b8]
movapd xmm0, xmm1
mulsd xmm2, xmm4
divsd xmm2, xmm1
movsd xmm1, qword [0x100a3698]
movsd qword [esp + 0x20], xmm2
movsd qword [edi + esi - 0x960], xmm2
call fcn.10085680
movsd xmm1, qword [0x100a3690]
divsd xmm1, xmm0
movapd xmm0, xmm1
movsd qword [esp + 0x18], xmm1
mulsd xmm0, xmm1
movsd qword [edi + esi + 0x12c0], xmm1
movsd xmm1, qword [esp + 0x20]
divsd xmm1, xmm0
movsd xmm0, qword [0x100a36b8]
subsd xmm0, xmm1
mulsd xmm0, qword [0x100a36d8]
andpd xmm0, xmmword [0x100a3910]
call fcn.100863c0
movsd xmm1, qword [0x100a36b8]
divsd xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
mulsd xmm0, qword [0x100a3710]
movsd qword [edi + esi + 0x15e0], xmm1
movsd qword [edi + esi + 0xfa0], xmm0
mulsd xmm0, qword [0x100a37a0]
divsd xmm0, xmm1
movsd qword [edi + esi + 0x1900], xmm0
mov eax, dword [esi + 0x54]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0xc]
movsd qword [esi + eax*8 + 0x28f8], xmm0
movsd xmm2, qword [edi + esi + 0xfa0]
movsd xmm0, qword [edi + esi + 0x15e0]
movaps xmm1, xmm2
mulsd xmm0, xmm0
mulsd xmm1, xmm2
divsd xmm1, xmm0
movaps xmm0, xmm2
mulsd xmm0, qword [0x100a36f8]
mulsd xmm0, xmm2
subsd xmm1, xmm0
andpd xmm1, xmmword [0x100a3910]
movaps xmm0, xmm1
call fcn.100863c0
mulsd xmm0, qword [0x100a36a8]
movsd qword [edi + esi + 0x1c20], xmm0
mov eax, dword [esi + 0x54]
xorpd xmm0, xmmword [0x100a3920]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0xc]
movsd qword [esi + eax*8 + 0x2c18], xmm0
movsd xmm2, qword [edi + esi + 0xfa0]
movsd xmm0, qword [edi + esi + 0x15e0]
movapd xmm1, xmm2
mulsd xmm1, qword [0x100a37a0]
divsd xmm1, xmm0
mulsd xmm0, xmm0
movdqu xmmword [esp + 0x20], xmm1
movapd xmm1, xmm2
mulsd xmm1, xmm2
divsd xmm1, xmm0
movaps xmm0, xmm2
mulsd xmm0, qword [0x100a36f8]
mulsd xmm0, xmm2
subsd xmm1, xmm0
andpd xmm1, xmmword [0x100a3910]
movapd xmm0, xmm1
call fcn.100863c0
mov eax, dword [esi]
movapd xmm2, xmm0
movsd xmm0, qword [edi + esi - 0xfa8]
movsd xmm5, qword [0x100a36a8]
movdqu xmm3, xmmword [esp + 0x20]
cdq
sub eax, edx
mov ecx, dword [esp + 0xc]
sar eax, 1
movsd qword [esp + 0x50], xmm0
xorpd xmm0, xmmword [0x100a3920]
shl eax, 6
add eax, dword [esi + 8]
movsd xmm4, qword [0x100a3680]
mulsd xmm2, xmm5
movsd qword [esp + 0x40], xmm0
movsd xmm0, xmm3
unpcklpd xmm0, xmm2
movapd xmm1, xmm2
xorpd xmm1, xmmword [0x100a3920]
movdqu xmmword [eax], xmm0
movdqu xmm0, xmmword [esp + 0x48]
unpcklpd xmm3, xmm1
movdqu xmmword [eax + 0x10], xmm3
movdqu xmmword [eax + 0x20], xmm0
movdqu xmm0, xmmword [esp + 0x38]
movdqu xmmword [eax + 0x30], xmm0
add dword [esi], 2
mov eax, dword [esi + 0x54]
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
jl 0x10012862
movsd xmm0, qword [esp + 0x10]
ucomisd xmm0, qword [0x100a3630]
lahf
test ah, 0x44
jnp 0x10012b86
mulsd xmm0, qword [0x100a3688]
subsd xmm0, qword [0x100a36b8]
divsd xmm4, xmm0
movapd xmm0, xmm4
call fcn.100863c0
mov eax, dword [esi + 0x54]
movapd xmm2, xmm0
mulsd xmm2, qword [0x100a37c8]
xorps xmm3, xmm3
cdq
sub eax, edx
xorps xmm0, xmm0
sar eax, 1
xorps xmm1, xmm1
add eax, dword [esp + 0xc]
movsd qword [esi + eax*8 + 0x2900], xmm2
mov eax, dword [esi + 0x54]
cdq
sub eax, edx
unpcklpd xmm2, xmm3
sar eax, 1
add eax, dword [esp + 0xc]
movsd qword [esi + eax*8 + 0x2c20], xmm3
mov eax, dword [esi]
cdq
sub eax, edx
sar eax, 1
shl eax, 6
add eax, dword [esi + 8]
movdqu xmmword [eax + 0x10], xmm0
movdqu xmm0, xmmword [esp + 0x58]
movdqu xmmword [eax], xmm2
unpcklpd xmm0, xmm3
movdqu xmmword [eax + 0x20], xmm0
movdqu xmmword [eax + 0x30], xmm1
inc dword [esi]
test byte [ebp + 8], 1
je 0x10012b96
movsd xmm0, qword [0x100a36b8]
jmp 0x10012bb1
movsd xmm1, qword [esp + 0x30]
divsd xmm1, qword [0x100a37d8]
movsd xmm0, qword [0x100a3720]
call fcn.10085680
xorps xmm1, xmm1
movsd qword [esi + 0x18], xmm0
movsd qword [esi + 0x10], xmm1
mov ecx, dword [esp + 0x38c]
pop edi
pop esi
xor ecx, esp
call fcn.100368c4
mov esp, ebp
pop ebp
ret 4