Function at 0x40e570
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x440
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x4930b8]
mov ebx, dword [eax + 0xb8]
mov edx, dword [edi + 0x4930bc]
mov ebp, dword [eax + 0xbc]
mov ecx, dword [edx + 0xb8]
mov eax, dword [edx + 0xbc]
cmp ebp, eax
lea esi, [edi + 0x489ff0]
mov dword [esp + 0x38], esi
jg 0x40e5cc
jl 0x40e5ba
cmp ebx, ecx
jae 0x40e5cc
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x40e5e8
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov ebx, ecx
mov ecx, dword [esp + 0x10]
mov ebp, eax
mov eax, dword [esp + 0x14]
cmp ebx, ecx
jne 0x40e5f4
cmp ebp, eax
je 0x40e819
sub ecx, ebx
sbb eax, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
push 0xcc
mov dword [esp + 0x30], 0
fstp qword [esp + 0x34]
call fcn.004060c0
add esp, 4
push eax
mov eax, dword [edi + 0x48b008]
push 2
push 0x400
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [edi + 0x4930b4]
lea eax, [edi + 0x49302c]
push eax
push esi
call fcn.00401b60
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x3c], esi
jne 0x40e68e
mov ecx, dword [edi + 0x48b008]
push 0x64
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0x48b008], 0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebp, dword [esp + 0x14]
mov edx, dword [edi + 0x49302c]
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ebx
jg 0x40e7c8
jl 0x40e6bf
cmp ebx, dword [esp + 0x10]
jae 0x40e7c8
fld qword [0x428428]
fdiv qword [esp + 0x30]
fstp qword [esp + 0x40]
lea ecx, [ecx]
mov eax, dword [esp + 0x28]
xor ebx, ebx
test eax, eax
jle 0x40e72d
lea esi, [edi + 0x493030]
mov eax, dword [esi + 0x40]
mov ecx, dword [esp + 0x18]
dec eax
push eax
push ebp
push ecx
mov ecx, dword [edi + 0x4930b4]
call fcn.004014c0
fimul dword [esi]
mov edx, dword [esi + 0x44]
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x4930b4]
dec edx
push edx
push ebp
push eax
fstp dword [esp + ebx*4 + 0x5c]
call fcn.004014c0
fimul dword [esi + 4]
mov eax, dword [esp + 0x28]
inc ebx
add esi, 8
cmp ebx, eax
fadd dword [esp + ebx*4 + 0x4c]
fstp dword [esp + ebx*4 + 0x4c]
jl 0x40e6e0
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x50]
push ecx
shl eax, 2
push eax
lea edx, [esp + 0x5c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, ebx
mov ecx, ebp
sbb ecx, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
fild qword [esp + 0x30]
fmul qword [esp + 0x40]
fmul qword [0x4276c0]
call fcn.00412e7c
mov ebx, eax
cmp ebx, dword [esp + 0x2c]
je 0x40e796
mov edx, dword [edi + 0x48b008]
push ebx
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x2c], ebx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
add edx, 1
adc ebp, 0
cmp ebp, eax
mov dword [esp + 0x18], edx
jl 0x40e6d0
jg 0x40e7c0
mov eax, dword [esp + 0x10]
mov ecx, edx
cmp ecx, eax
jb 0x40e6d0
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
push ebp
push ebx
push esi
mov ecx, edi
call fcn.0040ce30
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x48b008]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push ecx
mov dword [edi + 0x48b028], 1
call esi
mov edx, dword [esp + 0x38]
push edx
push 1
mov dword [edi + 0x48b008], 0
mov eax, dword [0x42f9e0]
push 0x400
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret