Function at 0x401318
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push edi
push esi
push ebx
mov eax, 0x1c274
call fcn.00401dac
call sym.___main
mov dword [esp + 4], 0x403024
mov dword [esp], str.data.txt
call sym._fopen
mov dword [esp + 0x1c254], eax
mov dword [esp + 4], 0x40302f
mov dword [esp], str.distance.txt
call sym._fopen
mov dword [esp + 0x1c258], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x75
mov eax, dword [esp + 0x1c254]
mov dword [esp], eax
call sym._fseek
mov dword [esp + 0x1c25c], 0
jmp 0x401436
mov edx, dword [esp + 0x1c25c]
lea eax, [esp + 0x5a30]
shl edx, 1
inc edx
shl edx, 4
add eax, edx
lea esi, [eax + 8]
mov edx, dword [esp + 0x1c25c]
lea eax, [esp + 0x5a30]
shl edx, 1
inc edx
shl edx, 4
lea ebx, [eax + edx]
mov edx, dword [esp + 0x1c25c]
lea eax, [esp + 0x5a30]
shl edx, 5
add eax, edx
lea ecx, [eax + 8]
mov edx, dword [esp + 0x1c25c]
lea eax, [esp + 0x5a30]
shl edx, 5
add eax, edx
lea edx, [eax + 4]
mov edi, dword [esp + 0x1c25c]
lea eax, [esp + 0x5a30]
shl edi, 5
add eax, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d__lf__lf__lf
mov eax, dword [esp + 0x1c254]
mov dword [esp], eax
call sym._fscanf
inc dword [esp + 0x1c25c]
cmp dword [esp + 0x1c25c], 0xb40
jle 0x401395
mov dword [esp + 0x1c25c], 0
jmp 0x401589
mov ebx, dword [esp + 0x1c25c]
mov eax, dword [esp + 0x1c25c]
shl eax, 5
lea edx, [esp + 0x1c270]
lea eax, [edx + eax]
sub eax, 0x16840
fld qword [eax + 8]
fld qword [esp + 0x1c238]
fsubp st(1)
mov eax, dword [esp + 0x1c25c]
shl eax, 5
lea ecx, [esp + 0x1c270]
lea eax, [ecx + eax]
sub eax, 0x16840
fld qword [eax + 8]
fld qword [esp + 0x1c238]
fsubp st(1)
fmulp st(1)
mov eax, dword [esp + 0x1c25c]
shl eax, 1
inc eax
shl eax, 4
lea edx, [esp + 0x1c270]
lea eax, [edx + eax]
sub eax, 0x16840
fld qword [eax]
fld qword [esp + 0x1c240]
fsubp st(1)
mov eax, dword [esp + 0x1c25c]
shl eax, 1
inc eax
shl eax, 4
lea ecx, [esp + 0x1c270]
lea eax, [ecx + eax]
sub eax, 0x16840
fld qword [eax]
fld qword [esp + 0x1c240]
fsubp st(1)
fmulp st(1)
faddp st(1)
mov eax, dword [esp + 0x1c25c]
shl eax, 1
inc eax
shl eax, 4
lea edx, [esp + 0x1c270]
lea eax, [edx + eax]
sub eax, 0x16840
fld qword [eax + 8]
fld qword [esp + 0x1c248]
fsubp st(1)
mov eax, dword [esp + 0x1c25c]
shl eax, 1
inc eax
shl eax, 4
lea ecx, [esp + 0x1c270]
lea eax, [ecx + eax]
sub eax, 0x16840
fld qword [eax + 8]
fld qword [esp + 0x1c248]
fsubp st(1)
fmulp st(1)
faddp st(1)
fld st(0)
fsqrt
fucom st(0)
fnstsw ax
and ah, 0x45
cmp ah, 0x40
je 0x40156c
fstp st(0)
fstp qword [esp]
call sym._sqrt
jmp 0x40156e
fstp st(1)
fstp qword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + ebx*8 + 0x30], eax
mov dword [esp + ebx*8 + 0x34], edx
inc dword [esp + 0x1c25c]
cmp dword [esp + 0x1c25c], 0xb3f
jle 0x401457
mov eax, dword [esp + 0x1c258]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.num_tdistance_n
call sym._fwrite
mov dword [esp + 0x1c25c], 0xb3f
jmp 0x401703
mov eax, dword [esp + 0x1c25c]
mov dword [esp + 0x1c260], eax
jmp 0x4016ee
mov eax, dword [esp + 0x1c260]
fld qword [esp + eax*8 + 0x30]
mov eax, dword [esp + 0x1c260]
dec eax
fld qword [esp + eax*8 + 0x30]
fucompp
fnstsw ax
test ah, 5
sete al
test al, al
je 0x4016e7
mov eax, dword [esp + 0x1c260]
shl eax, 5
lea edx, [esp + 0x1c270]
lea eax, [edx + eax]
sub eax, 0x16840
mov eax, dword [eax]
mov dword [esp + 0x1c264], eax
mov edx, dword [esp + 0x1c260]
mov eax, dword [esp + 0x1c260]
dec eax
shl eax, 5
lea ecx, [esp + 0x1c270]
lea eax, [ecx + eax]
sub eax, 0x16840
mov eax, dword [eax]
shl edx, 5
lea ebx, [esp + 0x1c270]
lea edx, [ebx + edx]
sub edx, 0x16840
mov dword [edx], eax
mov eax, dword [esp + 0x1c260]
dec eax
shl eax, 5
lea edx, [esp + 0x1c270]
lea eax, [edx + eax]
lea edx, [eax - 0x16840]
mov eax, dword [esp + 0x1c264]
mov dword [edx], eax
mov eax, dword [esp + 0x1c260]
mov edx, dword [esp + eax*8 + 0x34]
mov eax, dword [esp + eax*8 + 0x30]
mov dword [esp + 0x1c268], eax
mov dword [esp + 0x1c26c], edx
mov ecx, dword [esp + 0x1c260]
mov eax, dword [esp + 0x1c260]
dec eax
mov edx, dword [esp + eax*8 + 0x34]
mov eax, dword [esp + eax*8 + 0x30]
mov dword [esp + ecx*8 + 0x30], eax
mov dword [esp + ecx*8 + 0x34], edx
mov eax, dword [esp + 0x1c260]
lea ecx, [eax - 1]
mov eax, dword [esp + 0x1c268]
mov edx, dword [esp + 0x1c26c]
mov dword [esp + ecx*8 + 0x30], eax
mov dword [esp + ecx*8 + 0x34], edx
dec dword [esp + 0x1c260]
cmp dword [esp + 0x1c260], 0
jg 0x4015e4
dec dword [esp + 0x1c25c]
cmp dword [esp + 0x1c25c], 0
jns 0x4015d1
mov dword [esp + 0x1c25c], 0
jmp 0x401773
mov eax, dword [esp + 0x1c25c]
mov edx, dword [esp + eax*8 + 0x34]
mov eax, dword [esp + eax*8 + 0x30]
mov ecx, dword [esp + 0x1c25c]
shl ecx, 5
lea ebx, [esp + 0x1c270]
lea ecx, [ebx + ecx]
sub ecx, 0x16840
mov ecx, dword [ecx]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._d_t_lf_n
mov eax, dword [esp + 0x1c258]
mov dword [esp], eax
call sym._fprintf
inc dword [esp + 0x1c25c]
cmp dword [esp + 0x1c25c], 0xb3f
jle 0x40171e
mov eax, dword [esp + 0x1c254]
mov dword [esp], eax
call sym._fclose
mov eax, dword [esp + 0x1c258]
mov dword [esp], eax
call sym._fclose
mov eax, 0
add esp, 0x1c274
pop ebx
pop esi
pop edi
leave
ret