Function at 0x40c879
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x4f54]
mov eax, 0x4fd4
call fcn.00415470
mov eax, dword [0x438970]
xor eax, ebp
mov dword [ebp + 0x4f50], eax
mov eax, dword [ebp + 0x4f60]
push ebx
mov ebx, dword [ebp + 0x4f5c]
push esi
mov esi, dword [ebp + 0x4f64]
push edi
mov edi, dword [ebp + 0x4f6c]
push esi
push dword [ebp + 0x4f68]
mov dword [ebp - 0x60], eax
push 0x42f500
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x5c], edi
call fcn.0040aced
push 0x42f4fc
push edi
call fcn.00416d48
add esp, 0x14
mov dword [ebp - 0x64], eax
test eax, eax
jne 0x40c90e
call dword [0x42d098]
push eax
push edi
push 0x42f4c0
call fcn.0040ac8e
add esp, 0xc
push esi
call dword [0x445f08]
push dword [ebp - 0x60]
call dword [0x445f08]
xor al, al
jmp 0x40cb26
mov esi, dword [0x42d164]
xor edi, edi
mov byte [ebp - 0x51], 1
call esi
and dword [ebp - 0x58], edi
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x4f68]
cmp edi, eax
jae 0x40caea
sub eax, edi
mov ecx, 0x4000
cmp eax, ecx
jle 0x40c93d
mov eax, ecx
lea ecx, [ebp - 0x68]
push ecx
push eax
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x6c]
call dword [0x445f10]
test eax, eax
setne byte [ebp - 0x51]
cmp byte [ebp - 0x51], 0
je 0x40ca94
push dword [ebp - 0x64]
add edi, dword [ebp - 0x68]
push dword [ebp - 0x68]
lea eax, [ebp - 0x50]
push 1
push eax
call fcn.0041a040
add esp, 0x10
cmp eax, dword [ebp - 0x68]
jne 0x40caaa
test ebx, ebx
je 0x40c922
call esi
mov ecx, dword [ebp - 0x58]
add ecx, 0x1f4
cmp ecx, eax
jae 0x40c922
lea eax, [ebp + 0x4780]
push eax
push 0x4e28
call fcn.0040435d
mov eax, edi
pop ecx
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
pop ecx
test eax, eax
jge 0x40c9b7
fadd qword [0x42f4b8]
mov eax, dword [ebp + 0x4f68]
fstp qword [ebp - 0x74]
fild dword [ebp + 0x4f68]
test eax, eax
jge 0x40c9d0
fadd qword [0x42f4b8]
fstp qword [ebp - 0x80]
call esi
sub eax, dword [ebp - 0x78]
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
test eax, eax
jge 0x40c9e8
fadd qword [0x42f4b8]
fdivr qword [ebp - 0x74]
sub esp, 0x20
lea eax, [ebp + 0x4780]
fstp qword [esp + 0x18]
fld qword [ebp - 0x74]
fmul qword [0x42f4b0]
fdiv qword [ebp - 0x80]
fstp qword [esp + 0x10]
fld qword [ebp - 0x80]
fld qword [0x42f4a8]
fmul st(1), st(0)
fxch st(1)
fstp qword [esp + 8]
fmul qword [ebp - 0x74]
fstp qword [esp]
push eax
lea eax, [ebp + 0x3fb0]
push eax
call fcn.004047dd
lea eax, [ebp + 0x3fb0]
push eax
push 0x3ea
push ebx
call fcn.0040ebdd
add esp, 0x34
call esi
mov dword [ebp - 0x58], eax
mov eax, edi
mov dword [ebp - 0x70], eax
fild dword [ebp - 0x70]
push 0
test eax, eax
jge 0x40ca5a
fadd dword [0x42f4a0]
mov eax, dword [ebp + 0x4f68]
fild dword [ebp + 0x4f68]
test eax, eax
jge 0x40ca70
fadd dword [0x42f4a0]
fdivp st(1)
fmul qword [0x42f4b0]
call fcn.004199c6
push eax
push 0x402
push 0x3e9
push ebx
call dword [0x42d23c]
jmp 0x40c922
call dword [0x42d098]
push eax
push 0x42f474
call fcn.0040ac8e
pop ecx
xor al, al
jmp 0x40cb25
push dword [ebp - 0x64]
call fcn.00417123
pop ecx
push dword [ebp - 0x5c]
call dword [0x42d0cc]
push dword [ebp - 0x6c]
call dword [0x445f08]
push dword [ebp - 0x60]
call dword [0x445f08]
call dword [0x42d098]
push eax
push dword [ebp - 0x5c]
push 0x42f438
call fcn.0040ac8e
add esp, 0xc
jmp 0x40c907
push dword [ebp - 0x64]
call fcn.00417123
pop ecx
push dword [ebp - 0x6c]
call dword [0x445f08]
push dword [ebp - 0x60]
call dword [0x445f08]
cmp byte [ebp - 0x51], 0
jne 0x40cb19
push dword [ebp - 0x5c]
call dword [0x42d0cc]
jmp 0x40c907
push 0x42f424
call fcn.0040aced
mov al, 1
pop ecx
mov ecx, dword [ebp + 0x4f50]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415458
add ebp, 0x4f54
leave
ret