Function at 0x40d7a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x44f18c]
mov ecx, dword [ebp + 8]
sub eax, 0xb04109
cvtsi2sd xmm0, eax
sub esp, 0x42c
movsd qword [0x44f538], xmm0
call fcn.004154b0
cmp eax, 0x8000
jbe 0x40da89
push ebx
lea ecx, [ebp - 0x11c]
push esi
push ecx
call fcn.00410f50
mov esi, eax
call fcn.00401dd0
movzx edx, al
and edx, 0x80000003
jns 0x40d7f7
dec edx
or edx, 0xfffffffc
inc edx
add edx, 7
push edx
lea eax, [ebp + esi - 0x11c]
push eax
call fcn.00410b80
push 5
push 0x14f1
call fcn.00402a80
mov cx, word [0x44f69c]
movzx edx, word [0x44f220]
mov ebx, eax
movsx eax, cx
movsx ecx, dx
movzx edx, word [0x44f688]
add eax, ecx
mov ecx, 1
add word [0x44f69c], cx
add word [0x44f220], cx
movsx edx, dx
add esp, 0x14
cmp edx, eax
jge 0x40d865
mov ax, word [0x44f414]
movsx ecx, ax
cvtsi2sd xmm0, ecx
movsd qword [0x44f178], xmm0
mov eax, ebx
mov esi, ebx
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d870
push edi
lea edi, [ebp - 0x11c]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d881
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 3
push 0x2a1
rep movsb byte es:[edi], byte [esi]
call fcn.00402a80
push ebx
push 5
mov edi, eax
call fcn.0041a660
lea edx, [ebp - 0x11c]
push edi
push edx
call fcn.0041d1e8
push edi
push 3
mov esi, eax
call fcn.0041a660
add esp, 0x20
test esi, esi
je 0x40da86
mov ax, word [0x44f2c8]
movsx ecx, ax
mov dword [ebp - 4], ecx
mov edi, dword [ebp + 8]
mov ebx, 1
fild dword [ebp - 4]
push esi
push ebx
mov ecx, edi
fadd qword [0x44f078]
fld qword [0x44f028]
movzx edx, word [0x44f3e0]
movsx eax, dx
mov dword [ebp - 4], eax
fild dword [ebp - 4]
faddp st(2)
fsubrp st(1)
fstp qword [0x44f028]
dec word [0x44f3e0]
add word [0x44f2c8], bx
fld qword [0x44f078]
fadd qword [0x448d90]
fstp qword [0x44f078]
call fcn.004154b0
push eax
mov ecx, edi
call fcn.00410920
push eax
call fcn.0041d664
push esi
call fcn.0041d486
add esp, 0x14
mov ecx, edi
call fcn.00417970
push 0x104
lea ecx, [ebp - 0x224]
push ecx
push 0
mov byte [ebp - 0x120], 0
call dword [0x450d6c]
add word [0x44f46c], bx
movzx edx, word [0x44f46c]
movsx eax, dx
mov dword [ebp - 4], eax
push 0x15
push 0x2dff
fild dword [ebp - 4]
fmul qword [0x44f5c8]
mov byte [ebp - 0x225], 0
fstp qword [0x44f5c8]
call fcn.00402a80
mov ecx, dword [0x451120]
mov edx, dword [0x45117c]
push ecx
push edx
mov esi, eax
lea eax, [ebp - 0x224]
push eax
push esi
lea ecx, [ebp - 0x42c]
push 0x207
push ecx
call fcn.0041d7e5
push esi
push 0x15
call fcn.0041a660
mov edx, dword [0x451120]
push edx
call fcn.00407040
lea eax, [ebp - 0x42c]
push eax
lea ecx, [ebp - 0x11c]
push ecx
call fcn.0040d2a0
push 0x208
lea edx, [ebp - 0x42c]
push 0
push edx
call fcn.0041bad0
add esp, 0x40
push 0x105
lea eax, [ebp - 0x224]
push 0
push eax
call fcn.0041bad0
add esp, 0xc
push 0x15f90
call dword [0x450d80]
lea ecx, [ebp - 0x11c]
push ecx
call dword [0x4513d0]
fld qword [0x44f538]
fadd qword [0x448d90]
fstp qword [0x44f538]
fld qword [0x44f538]
fadd qword [0x449950]
fadd qword [0x449948]
fld dword [0x44f1ac]
fsub qword [0x449940]
fsub qword [0x449938]
fcompi st(1)
fstp st(0)
jbe 0x40da86
fld qword [0x44f658]
fmul qword [0x449930]
fstp qword [0x44f658]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret