Function at 0x40ec20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
movsd xmm0, qword [0x4497d8]
mov eax, 0xffffa7db
mov word [ebp - 0x14], ax
mov eax, 0xffffdcda
mov word [ebp - 0xc], ax
mov eax, 0x51a9
mov dword [ebp - 0x10], 0x4cfbd972
mov word [ebp - 8], ax
mov eax, 0xffff9a38
movsd qword [ebp - 0x28], xmm0
movsd xmm0, qword [0x449678]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
movsd qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x20], 0xcefcb0e9
mov word [ebp - 4], ax
call fcn.004081c0
cmp eax, 0x8000
jbe 0x40f0d0
movsx eax, word [ebp - 8]
mov ecx, 0x8eea8d44
push esi
push edi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
subss xmm0, dword [ebp - 0x20]
cvttss2si eax, xmm0
mov word [ebp - 8], ax
movsx eax, word [0x4522dc]
movsd xmm0, qword [ebp - 0x28]
sub ecx, eax
lea eax, [ebp - 0x140]
push eax
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mulsd xmm0, xmm1
movsd qword [ebp - 0x28], xmm0
call fcn.0040a530
mov esi, eax
call fcn.0040df00
movzx ecx, al
and ecx, 0x80000003
jns 0x40ecec
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, 7
lea eax, [ebp - 0x140]
push ecx
add eax, esi
push eax
call fcn.0040de00
movzx eax, word [ebp - 8]
add eax, dword [0x4520d8]
mov word [ebp - 8], ax
inc dword [ebp - 8]
inc dword [0x4520d8]
push 5
push 0x2096
call fcn.0040e120
mov esi, eax
lea eax, [ebp - 0x140]
push esi
push eax
call fcn.0042f0c0
push 3
push 0x415d
call fcn.0040e120
movsx edx, word [ebp - 4]
mov edi, eax
mov ecx, dword [0x452154]
movss xmm0, dword [ebp - 0x10]
add ecx, 0x8e616d64
add ecx, edx
push esi
push 5
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
addss xmm0, xmm1
movss dword [ebp - 0x10], xmm0
call fcn.0040e550
movsd xmm0, qword [ebp - 0x1c]
lea eax, [ebp - 0x140]
subsd xmm0, qword [0x448600]
push edi
push eax
movsd qword [ebp - 0x1c], xmm0
call fcn.0043047c
push edi
push 3
mov esi, eax
call fcn.0040e550
add esp, 0x3c
test esi, esi
je 0x40f0b8
mov ecx, dword [0x4522d0]
movsd xmm0, qword [ebp - 0x1c]
subsd xmm0, qword [ebp - 0x28]
push esi
movd xmm1, ecx
mov ecx, ebx
cvtdq2pd xmm1, xmm1
push 1
subsd xmm1, xmm0
cvttsd2si eax, xmm1
mov dword [0x4522d0], eax
movsd xmm0, qword [ebp - 0x28]
addsd xmm0, qword [0x447a60]
movsd qword [ebp - 0x28], xmm0
call fcn.004081c0
push eax
mov ecx, ebx
call fcn.00409400
push eax
call fcn.004305ea
push esi
call fcn.00430151
add esp, 0x14
mov ecx, ebx
call fcn.00408620
movss xmm2, dword [0x4524b8]
movsx eax, word [ebp - 4]
movss xmm0, dword [0x4524b8]
addss xmm2, dword [0x44913c]
subss xmm0, dword [0x447a58]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movss dword [0x4524b8], xmm0
comiss xmm2, xmm1
jb 0x40ee59
mov eax, dword [0x452444]
movsd xmm0, qword [0x452338]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
addsd xmm0, xmm1
movsd qword [0x452338], xmm0
mov byte [ebp - 0x144], 0
mov ecx, 0x5d3a3e81
dec dword [0x45220c]
movsd xmm0, qword [ebp - 0x1c]
addsd xmm0, qword [0x447a60]
push 0x104
movsd qword [ebp - 0x1c], xmm0
movsx eax, word [0x4523b0]
movd xmm2, eax
mov eax, dword [0x45220c]
sub ecx, eax
movsd xmm0, qword [ebp - 0x1c]
cvtdq2pd xmm2, xmm2
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
subsd xmm1, xmm0
subsd xmm2, xmm1
cvttsd2si eax, xmm2
mov word [0x4523b0], ax
lea eax, [ebp - 0x248]
push eax
push 0
call dword [0x453f38]
mov eax, dword [0x4522d0]
add eax, 0x29f74fe1
mov byte [ebp - 0x249], 0
push 0x15
mov word [ebp - 4], ax
push 0x4447
call fcn.0040e120
push dword [0x453e2c]
mov esi, eax
lea eax, [ebp - 0x248]
push dword [0x453e14]
push eax
push esi
lea eax, [ebp - 0x450]
push 0x207
push eax
call fcn.0043082b
push esi
push 0x15
call fcn.0040e550
movss xmm0, dword [0x4521e0]
add esp, 0x28
addss xmm0, dword [0x4494a4]
ucomiss xmm0, dword [0x448fec]
movss xmm0, dword [0x4521e0]
addss xmm0, dword [0x447a58]
lahf
movss dword [0x4521e0], xmm0
test ah, 0x44
jp 0x40ef66
movsd xmm0, qword [0x4523b8]
subsd xmm0, qword [0x448da8]
movsd qword [0x4523b8], xmm0
push dword [0x453e2c]
call fcn.004114e0
movsx eax, word [0x452414]
movsd xmm0, qword [0x452270]
addsd xmm0, qword [0x448950]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
subsd xmm0, qword [0x448818]
subsd xmm1, xmm0
cvttsd2si eax, xmm1
mov word [0x452414], ax
lea eax, [ebp - 0x450]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.0040a970
mov ax, word [0x452438]
movzx ecx, word [ebp - 4]
cwde
imul ecx, eax
lea eax, [ebp - 0x450]
push 0x208
push 0
push eax
mov word [ebp - 4], cx
call fcn.0042f020
push 0x105
lea eax, [ebp - 0x248]
push 0
push eax
call fcn.0042f020
movss xmm0, dword [ebp - 0x20]
add esp, 0x24
ucomiss xmm0, dword [0x44a3f4]
lahf
test ah, 0x44
jnp 0x40f083
inc dword [ebp - 4]
movss xmm1, dword [0x452410]
mov eax, dword [0x4520d8]
movd xmm0, eax
movsx eax, word [ebp - 0x14]
cvtdq2ps xmm0, xmm0
subss xmm1, xmm0
movd xmm0, eax
movsx eax, word [ebp - 4]
cvtdq2ps xmm0, xmm0
add eax, 0x4d7b92c6
addss xmm0, xmm1
movd xmm1, eax
cvtdq2pd xmm1, xmm1
cvtps2pd xmm2, xmm0
subsd xmm1, qword [0x452338]
movsd xmm0, qword [0x452338]
subsd xmm0, qword [0x447a60]
comisd xmm2, xmm1
movsd qword [0x452338], xmm0
jb 0x40f0a0
movss xmm0, dword [ebp - 0x10]
movss xmm0, dword [ebp - 0x10]
subss xmm0, dword [0x447a58]
movss dword [ebp - 0x10], xmm0
jmp 0x40f0a0
movzx ecx, word [ebp - 0xc]
movzx eax, word [ebp - 0x14]
sub ecx, eax
movzx eax, word [0x452038]
sub ecx, eax
add ecx, 0x6dd4f01f
mov word [ebp - 0xc], cx
push 0x15f90
call dword [0x453f94]
lea eax, [ebp - 0x140]
push eax
call dword [0x453ee4]
push 0x118
lea eax, [ebp - 0x140]
push 0
push eax
call fcn.0042f020
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret