Function at 0x637ab0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x29c
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], ebp
mov eax, 0
mov dword [esp + 0xa0], eax
mov ecx, dword [0x6d35dc]
lea edx, [0x6364b0]
cmp ecx, edx
je 0x637af7
mov eax, 0xffffffff
mov dword [esp + 0x27c], eax
jmp 0x637b11
mov ecx, 0xfffffff6
mov dword [esp], ecx
call sub.KERNEL32.dll_GetStdHandle
sub esp, 4
mov dword [esp + 0x27c], eax
mov ebp, dword [esp + 0x2a8]
mov edi, dword [ebp + 0x34c]
and edi, edi
je 0x637b84
mov edx, dword [ebp + 0x350]
movsx ebx, byte [edi + edx]
and ebx, ebx
je 0x637b84
lea edi, [esp + 0xc0]
mov dword [esp], edi
mov ecx, 0x104
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
call fcn.00636190
mov edx, eax
mov dword [esp + 0xa4], edx
mov dword [esp + 4], edi
mov ecx, dword [esp + 0x2a0]
mov dword [esp], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebp
call fcn.0063a8d8
mov dword [esp + 0xa0], eax
jmp 0x638192
mov ebp, dword [esp + 0x27c]
and ebp, ebp
je 0x637dc0
cmp ebp, 0xffffffff
je 0x637dc0
lea edx, str.FORTRAN_I_O_LIBRARY___file_name_needed_for_OPEN_UNIT
mov dword [esp + 0x224], edx
mov ebp, 0
mov dword [esp + 0xa8], ebp
movsx ebx, byte [str.FORTRAN_I_O_LIBRARY___file_name_needed_for_OPEN_UNIT]
and ebx, ebx
je 0x637bfd
lea eax, [esp + 0xc0]
mov edi, eax
add edi, ebp
nop
mov ecx, dword [esp + 0x224]
mov edx, ecx
inc edx
mov dword [esp + 0x224], edx
movsx ebx, byte [ecx]
mov byte [edi], bl
inc edi
inc ebp
mov eax, dword [esp + 0x224]
movsx ecx, byte [eax]
and ecx, ecx
jne 0x637bd0
mov dword [esp + 0xa8], ebp
mov edx, dword [esp + 0x2a0]
mov eax, dword [edx]
mov dword [esp], eax
lea edi, [esp + 0xc0]
mov ebp, dword [esp + 0xa8]
mov ecx, edi
add ecx, dword [esp + 0xa8]
mov dword [esp + 4], ecx
mov edx, 0x3001
mov dword [esp + 8], edx
call fcn.00628c70
movsx ebx, byte [esp + ebp + 0xc0]
and ebx, ebx
je 0x637c64
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc ebp
movsx eax, byte [esp + ebp + 0xc0]
and eax, eax
jne 0x637c50
mov dword [esp + 0xa8], ebp
mov ecx, dword [esp + 0xa8]
mov edx, ecx
inc edx
lea ebx, [esp + 0xc0]
mov esi, 0x3f
xchg eax, esi
mov byte [esp + ecx + 0xc0], al
xchg esi, eax
add ecx, 2
mov esi, 0x20
xchg eax, esi
mov byte [esp + edx + 0xc0], al
xchg esi, eax
mov edx, 0
mov byte [esp + ecx + 0xc0], dl
mov edx, 0xfffffff5
mov dword [esp], edx
mov dword [esp + 0x4c], ecx
call sub.KERNEL32.dll_GetStdHandle
sub esp, 4
mov dword [esp], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
lea esi, [esp + 0xa4]
mov dword [esp + 0xc], esi
mov edx, 0
mov dword [esp + 0x10], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
mov edx, 0xfffffff6
mov dword [esp], edx
call sub.KERNEL32.dll_GetStdHandle
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 0xc], esi
mov eax, 0x104
mov dword [esp + 8], eax
mov ecx, 0
mov dword [esp + 0x10], ecx
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
mov edx, 0
mov dword [esp + 0xa8], edx
mov eax, dword [esp + 0xa4]
mov dword [esp + 0xac], eax
and eax, eax
jle 0x637d78
mov ecx, dword [esp + 0xac]
mov edx, ecx
mov eax, 0
mov ebp, eax
mov esi, edx
sub esi, ebp
mov edi, ebx
add edi, ebp
nop
nop
movsx ecx, byte [edi]
cmp ecx, 0xd
je 0x637d71
inc edi
inc ebp
dec esi
jg 0x637d60
mov dword [esp + 0xa8], ebp
lea edx, [esp + 0xc0]
mov ecx, dword [esp + 0xa8]
mov ebx, 0
mov byte [esp + ecx + 0xc0], bl
mov dword [esp + 4], edx
mov edx, dword [esp + 0x2a0]
mov dword [esp], edx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x2a8]
mov dword [esp + 0xc], ecx
call fcn.0063a8d8
mov dword [esp + 0xa0], eax
jmp 0x638192
lea edx, str.Data_Files__.dat_
mov dword [esp + 0x220], edx
lea eax, [0x6d5eb8]
mov dword [esp + 0x228], eax
mov edi, dword [esp + 0x2a0]
mov ecx, dword [edi]
mov dword [esp], ecx
lea esi, [esp + 0xc0]
mov dword [esp + 4], esi
mov edx, dword [esp + 0x2a8]
mov dword [esp + 8], edx
call fcn.00632a60
mov eax, 0x4c
mov dword [esp + 0x22c], eax
mov ebp, 0
mov dword [esp + 0x230], ebp
mov dword [esp + 0x234], ebp
mov ecx, dword [esp + 0x220]
mov dword [esp + 0x238], ecx
mov dword [esp + 0x23c], ebp
mov dword [esp + 0x244], ebp
mov dword [esp + 0x248], esi
mov edx, 0x104
mov dword [esp + 0x24c], edx
mov dword [esp + 0x250], ebp
mov dword [esp + 0x254], ebp
mov dword [esp + 0x258], ebp
mov dword [esp + 0x25c], ebp
mov dword [esp + 0x260], ebp
mov eax, 0
mov word [esp + 0x264], ax
mov word [esp + 0x266], ax
mov ecx, dword [esp + 0x228]
mov dword [esp + 0x268], ecx
mov dword [esp + 0x26c], ebp
mov dword [esp + 0x270], ebp
mov dword [esp + 0x274], ebp
mov dword [esp + 0xa4], ebp
mov edx, dword [esp + 0x2a4]
cmp edx, 0x10000
jne 0x638027
mov eax, 0x1000
mov dword [esp + 0x260], eax
lea ecx, str.Open_file_on_FORTRAN_UNIT
mov dword [esp + 0x278], ecx
mov dword [esp + 0xa8], ebp
movsx edx, byte [ebp + str.Open_file_on_FORTRAN_UNIT]
and edx, edx
je 0x637f29
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x278]
movsx ecx, byte [eax + ebp]
mov byte [esp + ebp + 0x1e0], cl
inc ebp
mov edx, dword [esp + 0x278]
movsx ebx, byte [edx + ebp]
and ebx, ebx
jne 0x637f00
mov dword [esp + 0xa8], ebp
mov ecx, dword [edi]
mov dword [esp], ecx
lea ebx, [esp + 0x1e0]
mov edx, ebx
add edx, dword [esp + 0xa8]
mov dword [esp + 4], edx
mov ecx, 0x3001
mov dword [esp + 8], ecx
call fcn.00628c70
mov dword [esp + 0x25c], ebx
lea edx, [esp + 0x22c]
mov dword [esp], edx
call sub.comdlg32.dll_GetOpenFileNameA
sub esp, 4
and eax, eax
je 0x637ff0
mov ebp, 0
mov dword [esp + 0xa8], ebp
lea edi, [esp + 0xc0]
movsx ebx, byte [esp + ebp + 0xc0]
and ebx, ebx
je 0x637fb4
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc ebp
movsx eax, byte [esp + ebp + 0xc0]
and eax, eax
jne 0x637fa0
mov dword [esp + 0xa8], ebp
lea ecx, [esp + 0xc0]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x2a0]
mov dword [esp], edx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x2a8]
mov dword [esp + 0xc], edx
call fcn.0063a8d8
mov dword [esp + 0xa0], eax
jmp 0x638192
mov ecx, dword [esp + 0x2a0]
mov dword [esp], ecx
mov ebp, dword [esp + 0x2a8]
mov dword [esp + 4], ebp
call fcn.006327c0
mov edx, 0x271e
mov dword [esp], edx
mov dword [esp + 4], ebp
call fcn.006383b8
mov dword [esp + 0xa0], eax
jmp 0x638192
mov eax, dword [esp + 0x2a4]
cmp eax, 0x20000
jne 0x638046
mov ecx, 6
mov dword [esp + 0x260], ecx
lea edx, str.Create_file_on_FORTRAN_UNIT
mov dword [esp + 0x278], edx
mov ebp, 0
mov dword [esp + 0xa8], ebp
movsx ebx, byte [ebp + str.Create_file_on_FORTRAN_UNIT]
and ebx, ebx
je 0x638099
nop
mov eax, dword [esp + 0x278]
movsx ecx, byte [eax + ebp]
mov byte [esp + ebp + 0x1e0], cl
inc ebp
mov edx, dword [esp + 0x278]
movsx ebx, byte [edx + ebp]
and ebx, ebx
jne 0x638070
mov dword [esp + 0xa8], ebp
mov ecx, dword [esp + 0x2a0]
mov edx, dword [ecx]
mov dword [esp], edx
lea edi, [esp + 0x1e0]
mov ecx, edi
add ecx, dword [esp + 0xa8]
mov dword [esp + 4], ecx
mov edx, 0x3001
mov dword [esp + 8], edx
call fcn.00628c70
mov dword [esp + 0x25c], edi
lea ecx, [esp + 0x22c]
mov dword [esp], ecx
call sub.comdlg32.dll_GetSaveFileNameA
sub esp, 4
and eax, eax
je 0x638160
mov ebp, 0
mov dword [esp + 0xa8], ebp
lea edi, [esp + 0xc0]
movsx edx, byte [esp + ebp + 0xc0]
and edx, edx
je 0x638124
nop
nop
inc ebp
movsx ebx, byte [esp + ebp + 0xc0]
and ebx, ebx
jne 0x638110
mov dword [esp + 0xa8], ebp
lea ecx, [esp + 0xc0]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x2a0]
mov dword [esp], edx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x2a8]
mov dword [esp + 0xc], edx
call fcn.0063a8d8
mov dword [esp + 0xa0], eax
jmp 0x638192
mov ecx, dword [esp + 0x2a0]
mov dword [esp], ecx
mov esi, dword [esp + 0x2a8]
mov dword [esp + 4], esi
call fcn.006327c0
mov edx, 0x271e
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.006383b8
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0xa0]
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
add esp, 0x29c
ret