Function at 0x40b990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x470
push esi
push edi
fld dword [0x453110]
fstp qword [0x453378]
mov ecx, dword [ebp + 8]
call fcn.0041a340
cmp eax, 0x8000
jbe 0x40bda5
lea eax, [ebp - 0x130]
push eax
call fcn.0041d8d0
add esp, 4
mov dword [ebp - 0x10], eax
fld dword [0x453270]
fadd qword [0x453168]
mov ecx, dword [0x453100]
mov dword [ebp - 0x444], ecx
fild dword [ebp - 0x444]
fsubp st(1)
call fcn.00421a50
mov dword [0x453058], eax
fld dword [0x453270]
fsub qword [0x44cdd8]
fstp dword [0x453270]
fld qword [0x453168]
fadd qword [0x44cdd8]
fstp qword [0x453168]
call fcn.00421460
movzx edx, al
and edx, 0x80000003
jns 0x40ba2f
dec edx
or edx, 0xfffffffc
inc edx
add edx, 7
push edx
mov eax, dword [ebp - 0x10]
lea ecx, [ebp + eax - 0x130]
push ecx
call fcn.00402b70
add esp, 8
push 5
push 0x790
call fcn.00412b20
add esp, 8
mov dword [ebp - 0xc], eax
mov edx, dword [0x4530cc]
mov dword [ebp - 0x448], edx
fild dword [ebp - 0x448]
fadd qword [0x453168]
mov eax, dword [0x453118]
mov dword [ebp - 0x44c], eax
fild dword [ebp - 0x44c]
faddp st(1)
fmul dword [0x45341c]
fstp dword [0x45341c]
mov ecx, dword [0x453118]
sub ecx, 1
mov dword [0x453118], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x450], edx
mov eax, dword [ebp - 0x450]
mov dword [ebp - 0x454], eax
mov ecx, dword [ebp - 0x450]
mov dl, byte [ecx]
mov byte [ebp - 0x455], dl
add dword [ebp - 0x450], 1
cmp byte [ebp - 0x455], 0
jne 0x40bab3
mov eax, dword [ebp - 0x450]
sub eax, dword [ebp - 0x454]
mov ecx, dword [ebp - 0x454]
mov dword [ebp - 0x45c], ecx
mov dword [ebp - 0x460], eax
lea edx, [ebp - 0x130]
add edx, 0xffffffff
mov dword [ebp - 0x464], edx
mov eax, dword [ebp - 0x464]
mov cl, byte [eax + 1]
mov byte [ebp - 0x465], cl
add dword [ebp - 0x464], 1
cmp byte [ebp - 0x465], 0
jne 0x40bafe
mov edi, dword [ebp - 0x464]
mov esi, dword [ebp - 0x45c]
mov edx, dword [ebp - 0x460]
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]
push 3
push 0x32d
call fcn.00412b20
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
push eax
push 5
call fcn.004021e0
add esp, 8
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x130]
push edx
call fcn.004223b5
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
push eax
push 3
call fcn.004021e0
add esp, 8
cmp dword [ebp - 0x14], 0
je 0x40bd8f
mov ecx, dword [ebp - 0x14]
push ecx
push 1
mov ecx, dword [ebp + 8]
call fcn.0041a340
push eax
mov ecx, dword [ebp + 8]
call fcn.0041ebe0
push eax
call fcn.00422837
add esp, 0x10
mov edx, dword [ebp - 0x14]
push edx
call fcn.0042266c
add esp, 4
fld dword [0x453050]
fadd qword [0x44cfa0]
fadd qword [0x453428]
mov eax, dword [0x453184]
mov dword [ebp - 0x46c], eax
fild dword [ebp - 0x46c]
fmulp st(1)
call fcn.00421a50
mov dword [0x453184], eax
mov ecx, dword [ebp + 8]
call fcn.00411da0
mov byte [ebp - 0x33c], 0
push 0x104
lea ecx, [ebp - 0x440]
push ecx
push 0
call dword [0x454a8c]
fld dword [0x453348]
fadd qword [0x44cdd8]
fstp dword [0x453348]
fld dword [0x453348]
fsubr qword [0x44cf98]
fld qword [0x44cf90]
fxch st(1)
fcompi st(1)
fstp st(0)
jbe 0x40bc64
fld qword [0x453090]
fsub qword [0x44cf88]
fsub qword [0x44cf80]
fld qword [0x4531f0]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jnp 0x40bc64
movsx edx, word [0x45300c]
mov ecx, dword [0x453230]
mov byte [ebp - 0x131], 0
push 0x15
push 0x37c6
call fcn.00412b20
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [0x454e40]
push edx
mov eax, dword [0x454e9c]
push eax
lea ecx, [ebp - 0x440]
push ecx
mov edx, dword [ebp - 8]
push edx
push 0x207
lea eax, [ebp - 0x338]
push eax
call fcn.00421978
add esp, 0x18
mov ecx, dword [ebp - 8]
push ecx
push 0x15
call fcn.004021e0
add esp, 8
mov dx, word [0x453098]
add dx, 1
mov word [0x453098], dx
movsx eax, word [0x453098]
add eax, 0x1bab2e8a
movsx ecx, word [0x4530b8]
sub ecx, eax
mov word [0x4530b8], cx
mov edx, dword [0x454e40]
push edx
call fcn.00413e90
add esp, 4
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x130]
push ecx
call fcn.004164c0
add esp, 8
push 0x208
push 0
lea edx, [ebp - 0x338]
push edx
call fcn.00421b00
add esp, 0xc
fld dword [0x453400]
fadd qword [0x44cf78]
fadd qword [0x44cf70]
mov eax, dword [0x453040]
mov dword [ebp - 0x470], eax
fild dword [ebp - 0x470]
fmulp st(1)
call fcn.00421a50
mov dword [0x453040], eax
fld dword [0x453400]
fsub qword [0x44cdd8]
fstp dword [0x453400]
push 0x105
push 0
lea ecx, [ebp - 0x440]
push ecx
call fcn.00421b00
add esp, 0xc
push 0x15f90
call dword [0x454aa0]
lea edx, [ebp - 0x130]
push edx
call dword [0x4550f0]
push 0x118
push 0
lea eax, [ebp - 0x130]
push eax
call fcn.00421b00
add esp, 0xc
pop edi
pop esi
mov esp, ebp
pop ebp
ret