Function at 0x406870
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
fld qword [0x44d340]
sub esp, 0x434
fsubr qword [0x4475d0]
fld qword [0x4475c8]
fcompi st(1)
fstp st(0)
jb 0x4068ca
fld qword [0x44d0f8]
fadd qword [0x446c18]
fstp qword [0x44d0f8]
fld qword [0x44d0f8]
fadd dword [0x44d094]
mov eax, dword [0x44d04c]
cvtsi2sd xmm0, eax
fstp qword [ebp - 8]
addsd xmm0, qword [ebp - 8]
cvttsd2si ecx, xmm0
mov dword [0x44d04c], ecx
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
call fcn.00416c40
cmp eax, 0x8000
jbe 0x406bed
fld dword [0x44d560]
lea eax, [ebp - 0x124]
fadd qword [0x446c18]
push esi
push eax
fstp dword [0x44d560]
mov edx, dword [0x44d408]
mov dword [ebp - 0xc], edx
fild dword [ebp - 0xc]
fsub dword [0x44d560]
fld qword [0x44d3f8]
fld qword [0x44d3c0]
faddp st(2)
fsubrp st(1)
fstp qword [0x44d3f8]
call fcn.00403780
mov esi, eax
call fcn.00413800
movzx ecx, al
and ecx, 0x80000003
jns 0x40693e
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, 7
push ecx
lea edx, [ebp + esi - 0x124]
push edx
call fcn.00413000
push 5
push 0x1591
call fcn.00413610
add esp, 0x14
mov dword [ebp - 4], eax
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406963
push edi
lea edi, [ebp - 0x124]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406974
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 3
push 0x20d9
rep movsb byte es:[edi], byte [esi]
call fcn.00413610
mov edi, eax
mov ax, word [0x44d168]
movsx ecx, ax
add esp, 8
cmp ecx, 0xa9031e57
jle 0x4069db
mov dx, word [0x44d3c8]
mov ax, word [0x44d508]
movsx ecx, dx
cwde
sub eax, ecx
mov cx, word [0x44d194]
movsx edx, cx
sub eax, edx
cvtsi2ss xmm0, eax
movss dword [0x44d470], xmm0
jmp 0x406a03
inc word [0x44d080]
mov ax, word [0x44d080]
movsx ecx, ax
sub ecx, 0x554f5fb7
mov dword [ebp - 0xc], ecx
fild dword [ebp - 0xc]
fmul qword [0x44d070]
fstp qword [0x44d070]
mov edx, dword [ebp - 4]
push edx
push 5
call fcn.00417c50
mov eax, dword [0x44d0c8]
mov dword [ebp - 4], eax
fild dword [ebp - 4]
lea ecx, [ebp - 0x124]
push edi
push ecx
fsub qword [0x44d370]
fsub qword [0x4475c0]
fstp dword [0x44d6a8]
fld qword [0x44d370]
fsub qword [0x446c18]
fstp qword [0x44d370]
call fcn.0041ae9d
push edi
push 3
mov esi, eax
call fcn.00417c50
add esp, 0x18
test esi, esi
je 0x406beb
fld dword [0x44d0e4]
mov edi, 1
fadd qword [0x4475b8]
push esi
push edi
fstp dword [0x44d0e4]
add word [0x44d1b0], di
mov dx, word [0x44d1b0]
movsx eax, dx
mov dword [ebp - 4], eax
fild dword [ebp - 4]
fsub dword [0x44d3a4]
mov cx, word [0x44d5b8]
movsx edx, cx
cvtsi2sd xmm0, edx
fsub qword [0x4475b0]
mov ecx, ebx
fstp qword [ebp - 8]
addsd xmm0, qword [ebp - 8]
cvttsd2si eax, xmm0
mov word [0x44d5b8], ax
fld dword [0x44d3a4]
fsub qword [0x446c18]
fstp dword [0x44d3a4]
call fcn.00416c40
push eax
mov ecx, ebx
call fcn.00416e80
push eax
call fcn.0041b319
push esi
call fcn.0041b13b
add esp, 0x14
mov ecx, ebx
call fcn.00408a30
fld qword [0x44d4f8]
fmul qword [0x4475a8]
push 0x104
lea ecx, [ebp - 0x22c]
push ecx
fstp qword [0x44d4f8]
push 0
mov byte [ebp - 0x128], 0
call dword [0x44ecec]
push 0x15
push 0x181a
mov byte [ebp - 0x22d], 0
call fcn.00413610
mov edx, dword [0x44f0a0]
push edx
mov esi, eax
mov eax, dword [0x44f0fc]
push eax
lea ecx, [ebp - 0x22c]
push ecx
push esi
lea edx, [ebp - 0x434]
push 0x207
push edx
call fcn.0041b48f
push esi
push 0x15
call fcn.00417c50
add dword [0x44d4c8], edi
mov ax, word [0x44d2f4]
mov ecx, dword [0x44d4c8]
mov edx, dword [0x44f0a0]
cwde
add eax, 0xc334ad94
add ecx, eax
cvtsi2sd xmm0, ecx
push edx
movsd qword [0x44d0d8], xmm0
call fcn.00404470
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x124]
push ecx
call fcn.004112e0
push 0x208
push 0
lea edx, [ebp - 0x434]
push edx
call fcn.00419790
add esp, 0x40
push 0x105
lea eax, [ebp - 0x22c]
push 0
push eax
call fcn.00419790
add esp, 0xc
push 0x15f90
call dword [0x44ed00]
lea ecx, [ebp - 0x124]
push ecx
call dword [0x44f350]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret