Function at 0x403960
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
fld dword [0x460220]
fstp qword [ebp - 0x18]
fld dword [0x4600cc]
fstp qword [ebp - 8]
fld dword [0x460088]
fsubr qword [ebp - 8]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
fsubr qword [ebp - 0x18]
fstp dword [0x460220]
fld dword [0x4600cc]
fld1
fsubp st(1)
fstp dword [0x4600cc]
call fcn.0040f010
cmp eax, 0x8000
jbe 0x403cf7
dec dword [0x4600a4]
mov eax, dword [0x4600a4]
mov dword [ebp - 4], eax
fild dword [ebp - 4]
push esi
fstp qword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
fld qword [0x460080]
mov dword [ebp - 8], eax
mov eax, dword [0x4602a8]
mov dword [ebp - 4], ecx
fadd qword [ebp - 8]
mov dword [ebp - 4], eax
fsub qword [0x455920]
fstp qword [ebp - 0x10]
fild dword [ebp - 4]
fstp qword [ebp - 0x18]
fld qword [ebp - 0x18]
fmul qword [ebp - 0x10]
call fcn.00424a9c
mov dword [0x4602a8], eax
lea eax, [ebp - 0x130]
fld qword [0x460080]
fadd qword [0x455070]
push eax
fstp qword [0x460080]
call fcn.00402030
mov esi, eax
call fcn.00418d90
movzx ecx, al
and ecx, 0x80000003
jns 0x403a39
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, 7
lea eax, [ebp - 0x130]
push ecx
add eax, esi
push eax
call fcn.0040e920
push 5
push 0x45
call fcn.004024f0
mov edx, eax
mov dword [ebp - 4], eax
add esp, 0x14
mov esi, edx
mov edi, edi
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403a60
push edi
lea edi, [ebp - 0x130]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403a71
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
push 0x4b52
call fcn.004024f0
push dword [ebp - 4]
mov edi, eax
push 5
call fcn.00401160
mov ecx, dword [0x460284]
add esp, 0x10
mov dword [ebp - 4], ecx
fild dword [ebp - 4]
fstp qword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
fld qword [0x4601d8]
mov dword [ebp - 8], eax
mov eax, dword [0x460434]
mov dword [ebp - 4], ecx
fadd qword [ebp - 8]
mov dword [ebp - 4], eax
fstp qword [ebp - 0x18]
fild dword [ebp - 4]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fadd qword [ebp - 0x18]
movsx eax, word [0x460124]
sub eax, 0x3bc09b2
mov dword [ebp - 4], eax
fstp qword [ebp - 0x18]
fild dword [ebp - 4]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fcomp qword [ebp - 0x18]
fnstsw ax
test ah, 1
jne 0x403b5a
inc word [0x46040c]
mov ecx, 0x95c2ea65
movsx eax, word [0x46040c]
sub ecx, eax
mov eax, dword [0x460308]
add eax, ecx
cmp eax, 0x1302ef96
je 0x403b46
movsx eax, word [0x4603fc]
sub eax, 0x7f5f702a
mov dword [ebp - 4], eax
fild dword [ebp - 4]
fstp qword [0x460028]
dec word [0x4603fc]
jmp 0x403b72
fld dword [0x460198]
fadd dword [0x455bf8]
fstp dword [0x460198]
jmp 0x403b72
fld qword [0x460250]
fsub qword [0x455400]
fsub qword [0x455168]
fstp qword [0x4600b8]
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.00424277
push edi
push 3
mov esi, eax
call fcn.00401160
add esp, 0x10
pop edi
test esi, esi
je 0x403cb7
push esi
mov dword [0x460268], 0x4ec6d497
mov ecx, ebx
push 1
call fcn.0040f010
push eax
mov ecx, ebx
call fcn.004192e0
push eax
call fcn.0042442a
push esi
call fcn.00423f4c
add esp, 0x14
mov ecx, ebx
call fcn.0041f900
movzx eax, word [0x460310]
sub eax, 0x7317f66f
mov byte [ebp - 0x134], 0
mov word [0x460310], ax
lea eax, [ebp - 0x238]
push 0x104
push eax
push 0
call dword [0x461c9c]
push 0x15
push 0x228f
mov byte [ebp - 0x239], 0
call fcn.004024f0
push dword [0x46337c]
mov esi, eax
lea eax, [ebp - 0x238]
push dword [0x463364]
push eax
push esi
lea eax, [ebp - 0x440]
push 0x207
push eax
call fcn.00424795
push esi
push 0x15
call fcn.00401160
push dword [0x46337c]
call fcn.0040f730
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.00410a90
inc word [0x4600c0]
movsx eax, word [0x4600c0]
add eax, 0x3c91b142
mov dword [ebp - 4], eax
lea eax, [ebp - 0x440]
fild dword [ebp - 4]
push 0x208
push 0
push eax
fstp dword [0x4602d4]
call fcn.00425190
add esp, 0x40
lea eax, [ebp - 0x238]
push 0x105
push 0
push eax
call fcn.00425190
add esp, 0xc
push 0x15f90
call dword [0x461cf8]
lea eax, [ebp - 0x130]
push eax
call dword [0x461c48]
mov eax, dword [0x460304]
mov dword [ebp - 4], eax
fild dword [ebp - 4]
fstp qword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
fld dword [0x4602e4]
fstp qword [ebp - 0x10]
fld qword [0x4602b0]
fadd qword [ebp - 0x10]
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
fsub qword [0x4562d0]
fsubr qword [ebp - 8]
call fcn.00424a9c
mov dword [0x460304], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret