Function at 0x40ea90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov eax, dword [0x433018]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov dword [esp + 0x38], edi
call fcn.00406390
mov eax, dword [ebx + 0x10]
lea esi, [ebx + 4]
add eax, 8
cmp eax, dword [esi + 0x10]
jb 0x40eac7
call fcn.0040cac0
mov eax, dword [esi + 0xc]
lea ecx, [eax + 8]
mov dword [esi + 0xc], ecx
test eax, eax
je 0x40eade
mov dword [eax], 0
mov byte [eax + 4], 1
mov edx, dword [ebx]
mov esi, dword [edx]
push 0x5b
call fcn.004079f0
add esp, 4
lea eax, [esp + 0x3c]
mov ecx, edi
call fcn.00413b00
lea eax, [esp + 0x50]
mov edx, edi
call fcn.00416b90
mov esi, dword [esp + 0x44]
cmp esi, dword [eax + 8]
je 0x40ebb1
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x40eb1b
xor edi, edi
jmp 0x40eb1d
mov edi, dword [eax]
mov eax, dword [edi + 8]
mov ecx, esi
mov edx, esi
shr ecx, 2
and edx, 3
cmp eax, ecx
ja 0x40eb30
sub ecx, eax
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov eax, dword [edi + 4]
mov ecx, dword [eax + ecx*4]
fld dword [ecx + edx*4]
sub esp, 8
fstp qword [esp]
push 0x42afbc
lea edx, [esp + 0x68]
push 0x20
push edx
call dword [sym.imp.MSVCR100.dll_sprintf_s]
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.MSVCR100.dll_atof]
fstp qword [esp + 0x60]
add esp, 0x18
call fcn.00406390
fld qword [esp + 0x48]
sub esp, 8
fstp qword [esp]
push ebx
call fcn.00412960
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x50]
inc esi
call fcn.00416b90
cmp esi, dword [eax + 8]
jne 0x40eb0f
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
je 0x40ec3c
mov ecx, dword [ebx]
mov esi, dword [ecx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40ebea
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40ebea
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0xa
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40ec16
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40ec16
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
movzx edx, word [ebx + 0x20]
mov ecx, dword [ebx]
shr eax, 3
imul eax, dword [ebx + 0x24]
push edx
push ecx
call fcn.00407a60
add esp, 8
mov edx, dword [ebx]
mov esi, dword [edx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40ec63
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40ec63
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x5d
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40ec8f
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40ec8f
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0xc]
jne 0x40ecc2
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40ecc2
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00424ffa
mov esp, ebp
pop ebp
ret