Function at 0x418040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x46c
push esi
push edi
movss xmm0, dword [0x466020]
subss xmm0, dword [0x45ade8]
movss dword [0x466020], xmm0
movss xmm0, dword [0x45c024]
comiss xmm0, dword [0x466020]
jb 0x41808e
movss xmm0, dword [0x466304]
subss xmm0, dword [0x45c28c]
movss dword [0x466304], xmm0
jmp 0x4180bb
movsx eax, word [0x46626c]
movsx ecx, word [0x466408]
lea edx, [eax + ecx - 0x56d66fbf]
cvtsi2ss xmm0, edx
movss xmm1, dword [0x46630c]
addss xmm1, xmm0
movss dword [0x46630c], xmm1
mov ecx, dword [ebp + 8]
call fcn.00415c30
cmp eax, 0x8000
jbe 0x418505
lea eax, [ebp - 0x15c]
push eax
call fcn.0040d5f0
add esp, 4
mov dword [ebp - 0x2c], eax
movsx ecx, word [0x466344]
mov edx, 0x3e71041e
sub edx, ecx
sub edx, 0x6e65d04d
movsx eax, word [0x466260]
imul eax, edx
mov word [0x466260], ax
mov cx, word [0x466344]
sub cx, 1
mov word [0x466344], cx
call fcn.00409d90
movzx edx, al
and edx, 0x80000003
jns 0x41812b
dec edx
or edx, 0xfffffffc
inc edx
add edx, 7
push edx
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp + eax - 0x15c]
push ecx
call fcn.00402d40
add esp, 8
push 5
push 0xe1b
call fcn.0040fc50
add esp, 8
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 8]
mov dl, byte [ecx]
mov byte [ebp - 1], dl
add dword [ebp - 8], 1
cmp byte [ebp - 1], 0
jne 0x418160
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0x15c]
add edx, 0xffffffff
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 1]
mov byte [ebp - 2], cl
add dword [ebp - 0xc], 1
cmp byte [ebp - 2], 0
jne 0x41818d
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movss xmm0, dword [0x46620c]
subss xmm0, dword [0x45b694]
movss dword [0x46620c], xmm0
push 3
push 0x2e5
call fcn.0040fc50
add esp, 8
mov dword [ebp - 0x18], eax
movss xmm0, dword [0x45b778]
subss xmm0, dword [0x466094]
mov eax, dword [0x4661a4]
cvtsi2ss xmm1, eax
mulss xmm1, xmm0
cvttss2si ecx, xmm1
mov dword [0x4661a4], ecx
mov edx, dword [ebp - 0x1c]
push edx
push 5
call fcn.0040b630
add esp, 8
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x15c]
push ecx
call fcn.0042b077
add esp, 8
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x18]
push edx
push 3
call fcn.0040b630
add esp, 8
movss xmm0, dword [0x466018]
mulss xmm0, dword [0x45c110]
movss dword [0x466018], xmm0
cmp dword [ebp - 0x10], 0
je 0x4184c7
mov dword [0x466130], 0x4cfffdeb
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp + 8]
call fcn.00415c30
push eax
mov ecx, dword [ebp + 8]
call fcn.00427d90
push eax
call fcn.0042b22a
add esp, 0x10
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0042ad4c
add esp, 4
movss xmm0, dword [0x45c2d8]
movss dword [0x466398], xmm0
mov ecx, dword [ebp + 8]
call fcn.0040b7f0
movsd xmm0, qword [0x466390]
subsd xmm0, qword [0x45ae08]
subsd xmm0, qword [0x45afb8]
movsd xmm1, qword [0x4661a8]
subsd xmm1, xmm0
movsd qword [0x4661a8], xmm1
mov edx, 1
imul eax, edx, 0x104
mov byte [ebp + eax - 0x264], 0
push 0x104
lea ecx, [ebp - 0x264]
push ecx
push 0
call dword [0x467cfc]
movsd xmm0, qword [0x4663c0]
subsd xmm0, qword [0x45adf0]
movsd qword [0x4663c0], xmm0
movsd xmm0, qword [0x4663c0]
addsd xmm0, qword [0x45bad8]
movsd qword [ebp - 0x44], xmm0
mov edx, dword [0x466464]
sub edx, 0x6cd6e357
cvtsi2sd xmm0, edx
movsd qword [ebp - 0x34], xmm0
mov eax, dword [0x466464]
add eax, 1
mov dword [0x466464], eax
movsd xmm0, qword [ebp - 0x44]
comisd xmm0, xmmword [ebp - 0x34]
jbe 0x418385
mov ecx, dword [0x466024]
sub ecx, 1
mov dword [0x466024], ecx
mov edx, dword [0x466024]
cvtsi2ss xmm0, edx
movss xmm1, dword [0x466094]
subss xmm1, xmm0
movss dword [0x466094], xmm1
mov eax, 1
imul ecx, eax, 0x207
mov byte [ebp + ecx - 0x46c], 0
push 0x15
push 0x22ef
call fcn.0040fc50
add esp, 8
mov dword [ebp - 0x14], eax
mov edx, dword [0x468438]
push edx
mov eax, dword [0x468420]
push eax
lea ecx, [ebp - 0x264]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 0x207
lea eax, [ebp - 0x46c]
push eax
call fcn.0042b595
add esp, 0x18
mov ecx, dword [ebp - 0x14]
push ecx
push 0x15
call fcn.0040b630
add esp, 8
mov edx, dword [0x468438]
push edx
call fcn.004112f0
add esp, 4
movsd xmm0, qword [0x466080]
movsd qword [ebp - 0x3c], xmm0
movsd xmm0, qword [0x466080]
subsd xmm0, qword [0x45adf0]
movsd qword [0x466080], xmm0
movsd xmm0, qword [0x45ba78]
ucomisd xmm0, qword [ebp - 0x3c]
lahf
test ah, 0x44
jp 0x418455
mov eax, 0x9ef48b5f
sub eax, dword [0x466424]
sub eax, 0x31634d11
cvtsi2sd xmm0, eax
movsd xmm1, qword [0x466498]
subsd xmm1, xmm0
movsd qword [0x466498], xmm1
jmp 0x41846d
movsd xmm0, qword [0x4663f0]
mulsd xmm0, qword [0x45bd38]
movsd qword [0x4663f0], xmm0
lea ecx, [ebp - 0x46c]
push ecx
lea edx, [ebp - 0x15c]
push edx
call fcn.00405e70
add esp, 8
push 0x208
push 0
lea eax, [ebp - 0x46c]
push eax
call fcn.0042eee0
add esp, 0xc
push 0x105
push 0
lea ecx, [ebp - 0x264]
push ecx
call fcn.0042eee0
add esp, 0xc
push 0x15f90
call dword [0x467d58]
lea edx, [ebp - 0x15c]
push edx
call dword [0x467ca8]
push 0x118
push 0
lea eax, [ebp - 0x15c]
push eax
call fcn.0042eee0
add esp, 0xc
movsx ecx, word [0x4662ec]
movsx edx, word [0x466044]
imul edx, ecx
mov word [0x466044], dx
mov ax, word [0x4662ec]
sub ax, 1
mov word [0x4662ec], ax
pop edi
pop esi
mov esp, ebp
pop ebp
ret