Function at 0x40161b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2598
call fcn.00407a80
cmp dword [ebp + 8], 0
jne 0x40163d
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d310]
and eax, 0x800
test eax, eax
je 0x40198d
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x401673
mov dword [esp + 4], str.Edit_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [esp + 8], 0x1a4
mov dword [esp + 4], 0x8002
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4016f6
mov dword [esp], str.grubinst:_open
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4016e4
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
call sym.__errno
mov eax, dword [eax]
mov dword [ebp - 0x256c], eax
jmp 0x403514
movzx eax, word [0x409ffa]
mov word [ebp - 0x202e], ax
mov dword [esp + 8], 0x2000
mov dword [esp + 4], 0x408000
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x401792
mov dword [esp], str.grubinst:_read
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401775
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sym.__errno
mov eax, dword [eax]
mov dword [ebp - 0x256c], eax
jmp 0x403514
cmp dword [ebp - 0x14], 0x1fff
ja 0x401816
mov dword [esp + 8], str.The_input_file_is_too_short
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4017fc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [0x409ffc], 0xaa555247
je 0x40189d
mov dword [esp + 8], str.Invalid_input_file
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401883
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
movzx eax, word [0x409ffa]
mov word [ebp - 0x2030], ax
movzx eax, word [ebp - 0x202e]
cmp ax, word [ebp - 0x2030]
je 0x401968
movzx eax, word [ebp - 0x202e]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x2030]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Version_number_mismatched__old_d_new_d_
lea eax, [ebp - 0x2088]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x2088]
mov dword [esp + 8], eax
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40194e
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._lseek
or dword [0x40d310], 0x400
cmp dword [0x40d2a0], 0
je 0x401ca7
mov eax, dword [0x40d2a0]
mov dword [esp], eax
call sym._strlen
mov word [ebp - 0x202e], ax
movzx eax, word [0x4085ec]
and eax, 0x7ff
mov word [ebp - 0x2030], ax
mov dword [esp + 4], 0x40d2c0
movzx eax, word [ebp - 0x2030]
add eax, 0x408400
mov dword [esp], eax
call sym._strcpy
cmp word [0x40d2d0], 0
je 0x4019f4
movzx eax, word [0x40d2d0]
mov word [0x4085ea], ax
movzx eax, word [0x4087ec]
and eax, 0x7ff
mov word [ebp - 0x2030], ax
mov dword [esp + 4], 0x40d2c0
movzx eax, word [ebp - 0x2030]
add eax, 0x408600
mov dword [esp], eax
call sym._strcpy
cmp word [0x40d2d0], 0
je 0x401a3a
movzx eax, word [0x40d2d0]
mov word [0x4087ea], ax
movzx eax, word [0x4089ee]
and eax, 0x7ff
mov word [ebp - 0x2030], ax
movzx eax, word [0x4089ee]
shr eax, 0xb
mov word [ebp - 0x208a], ax
movzx eax, word [ebp - 0x202e]
cmp ax, word [ebp - 0x208a]
jbe 0x401b1b
movzx eax, word [ebp - 0x208a]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x202e]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Boot_file_name_too_long_for_ext2_partition___d__d_
lea eax, [ebp - 0x20e8]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x20e8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401b01
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d2a0]
mov dword [esp + 4], eax
movzx eax, word [ebp - 0x2030]
add eax, 0x408800
mov dword [esp], eax
call sym._strcpy
movzx eax, word [0x408bec]
and eax, 0x7ff
mov word [ebp - 0x2030], ax
movzx eax, word [0x408bec]
shr eax, 0xb
mov word [ebp - 0x208a], ax
movzx eax, word [ebp - 0x202e]
cmp ax, word [ebp - 0x208a]
jbe 0x401c19
movzx eax, word [ebp - 0x208a]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x202e]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Boot_file_name_too_long_for_ntfs_partition___d__d_
lea eax, [ebp - 0x2138]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x2138]
mov dword [esp + 8], eax
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401bff
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d2a0]
mov dword [esp + 4], eax
movzx eax, word [ebp - 0x2030]
add eax, 0x408a00
mov dword [esp], eax
call sym._strcpy
cmp word [0x40d2d0], 0
je 0x401c4d
movzx eax, word [0x40d2d0]
mov word [0x408bea], ax
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x401ca7
mov eax, dword [0x40d2a0]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Boot_file_changed_to__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
cmp word [0x40d2d0], 0
je 0x401ca7
movzx eax, word [0x40d2d0]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Load_segment_changed_to__04X_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 0x400
test eax, eax
je 0x401e64
mov eax, dword [0x40d310]
and eax, 4
test eax, eax
jne 0x401cd1
mov dword [ebp - 0x2570], 0x300
jmp 0x401cdb
mov dword [ebp - 0x2570], 0
mov eax, dword [ebp - 0x2570]
mov dword [ebp - 0x213c], eax
mov eax, dword [0x40d310]
and eax, 0x800
test eax, eax
jne 0x401da7
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x401d1d
mov dword [esp + 4], str.Extract_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [esp + 8], 0x1a4
mov eax, dword [ebp - 0x213c]
or eax, 0x8002
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401da7
mov dword [esp], str.grubinst:_open
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401d95
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
call sym.__errno
mov eax, dword [eax]
mov dword [ebp - 0x256c], eax
jmp 0x403514
mov eax, dword [0x40d310]
and eax, 4
test eax, eax
jne 0x401e54
mov dword [esp + 8], 0x2000
mov dword [esp + 4], 0x408000
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._write
cmp eax, 0x2000
je 0x401e54
mov dword [esp + 8], str.Write_to_output_file_fails
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401e3a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__close
jmp 0x4034a5
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov dword [esp], 0x408200
call sym._memset
mov eax, dword [0x40d330]
mov byte [0x408002], al
mov eax, dword [0x40d320]
mov byte [0x408003], al
mov eax, dword [0x40d280]
mov word [0x408004], ax
mov eax, dword [0x40d260]
mov byte [0x408006], al
mov eax, dword [0x40d2b0]
mov byte [0x408007], al
cmp dword [0x40d270], 0
jne 0x401ed2
cmp dword [0x40d280], 0x3920
jne 0x401ed2
mov dword [0x40d270], 0x40c0ff
cmp dword [0x40d270], 0
je 0x401ef0
mov eax, dword [0x40d270]
mov dword [esp + 4], eax
mov dword [esp], str.hot_key
call sym._strcpy
mov eax, dword [0x40d310]
shr eax, 2
xor eax, 1
and eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._xd_open
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x401f72
mov dword [esp], str.grubinst:_open
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x401f63
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d310]
and eax, 0x40
test eax, eax
je 0x401fa3
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._list
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 0
jmp 0x403514
cmp dword [0x40d250], 0xffffffff
je 0x4020cb
cmp dword [0x40d2f0], 0xffffffff
je 0x401fc9
mov eax, dword [0x40d2f0]
mov dword [ebp - 0x202c], eax
jmp 0x4020ea
mov byte [ebp - 0x2158], 0xff
mov eax, dword [0x40d250]
mov byte [ebp - 0x2157], al
lea eax, [ebp - 0x2158]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_enum
test eax, eax
je 0x40206f
mov dword [esp + 8], str.Partition_not_found
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402055
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x2154]
mov dword [ebp - 0x202c], eax
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x4020ea
movzx eax, byte [ebp - 0x2156]
mov dword [esp], eax
call sym._dfs2str
mov edx, eax
mov eax, dword [ebp - 0x2150]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
movzx eax, byte [ebp - 0x2156]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Part_Fs:__02X___s__nPart_Leng:__lu_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
jmp 0x4020ea
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x202c], eax
cmp dword [ebp - 0x202c], 0
je 0x4020ea
mov dword [0x40d250], 0
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x402118
mov eax, dword [ebp - 0x202c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Start_sector:_0x_lX_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
cmp eax, dword [ebp - 0x202c]
je 0x4021be
mov eax, dword [ebp - 0x202c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_seek
test eax, eax
je 0x4021be
mov dword [esp + 8], str.Cant_seek_to_the_start_sector
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4021a4
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x2028]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_read
test eax, eax
je 0x40225a
mov dword [esp + 8], str.Read_error
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402240
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
lea eax, [ebp - 0x2028]
mov dword [esp], eax
call sym._get_fstype
mov dword [ebp - 0x18], eax
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x4022ea
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._fst2str
mov dword [esp + 8], eax
mov dword [esp + 4], str.Image_type:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
cmp dword [ebp - 0x18], 1
jne 0x4022ce
mov eax, dword [0x40d370]
mov dword [esp + 0xc], eax
mov eax, dword [0x40d360]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Num_of_heads:__d_nSectors_per_track:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
cmp dword [ebp - 0x18], 1
je 0x4022dc
cmp dword [ebp - 0x18], 2
je 0x4022dc
jmp 0x4022ea
lea eax, [ebp - 0x2028]
mov dword [esp], eax
call sym._print_mbr
cmp dword [ebp - 0x18], 2
jne 0x4023b1
mov eax, dword [0x40d310]
and eax, 0x1000
test eax, eax
je 0x40230e
mov dword [ebp - 0x18], 1
jmp 0x4023b1
mov eax, dword [0x40d310]
xor eax, 1
and eax, 1
test eax, eax
je 0x40232b
lea eax, [ebp - 0x2028]
mov dword [esp], eax
call sym._print_mbr
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._list
mov dword [esp + 8], str.Bad_partition_table__if_youre_sure_that_the_partition_list_is_ok__please_run_this_program_again_with___skip_mbr_test_option.
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402397
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [ebp - 0x18], 0
jne 0x402432
mov dword [esp + 8], str.Unknown_image_type
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402418
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [0x40d250], 0xffffffff
jne 0x40244b
mov eax, dword [0x40d310]
and al, 0x80
test al, al
jne 0x40244b
jmp 0x4024cc
cmp dword [ebp - 0x18], 1
jne 0x4024cc
mov dword [esp + 8], str.Should_be_a_file_system_image
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4024b2
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [0x40d250], 0xffffffff
jne 0x402569
mov eax, dword [0x40d310]
and al, 0x80
test al, al
jne 0x402569
cmp dword [ebp - 0x18], 1
je 0x402569
mov dword [esp + 8], str.Should_be_a_disk_image
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40254f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [ebp - 0x18], 1
jne 0x40283c
mov dword [ebp - 0x215c], 0xffffffff
mov dword [ebp - 0x213c], 0x1be
cmp dword [ebp - 0x213c], 0x1fd
jg 0x4025d9
lea eax, [ebp - 0x2024]
add eax, dword [ebp - 0x213c]
cmp byte [eax], 0
je 0x4025ce
lea eax, [ebp - 0x2020]
add eax, dword [ebp - 0x213c]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x215c]
jae 0x4025ce
lea eax, [ebp - 0x2020]
add eax, dword [ebp - 0x213c]
mov eax, dword [eax]
mov dword [ebp - 0x215c], eax
lea eax, [ebp - 0x213c]
add dword [eax], 0x10
jmp 0x402587
cmp dword [ebp - 0x215c], 0xf
ja 0x40265d
mov dword [esp + 8], str.Not_enough_room_to_install_mbr
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402643
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov dword [ebp - 0x1c], 0x2000
mov eax, dword [0x40d310]
and eax, 0x2000
test eax, eax
je 0x402852
mov eax, dword [ebp - 0x215c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_seek
test eax, eax
je 0x40270a
mov dword [esp + 8], str.Cant_seek_to_the_first_partition
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4026f0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov dword [esp + 8], 2
lea eax, [ebp - 0x2568]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_read
test eax, eax
je 0x4027a6
mov dword [esp + 8], str.Fail_to_read_boot_sector
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40278c
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
lea eax, [ebp - 0x2568]
mov dword [esp], eax
call sym._get_fstype
mov dword [ebp - 0x2160], eax
cmp dword [ebp - 0x2160], 4
jne 0x4027cf
mov dword [ebp - 0x2164], 0x4f
jmp 0x4027ee
cmp dword [ebp - 0x2160], 3
jne 0x4027e4
mov dword [ebp - 0x2164], 0x33
jmp 0x4027ee
mov dword [ebp - 0x2164], 0
cmp dword [ebp - 0x2164], 0
je 0x402852
mov eax, dword [ebp - 0x2164]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2568]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40800b
call sym._memcpy
mov dword [0x40801c], 0
mov eax, dword [ebp - 0x215c]
movzx edx, word [0x40800e]
lea eax, [edx + eax]
mov word [0x40800e], ax
jmp 0x402852
cmp dword [ebp - 0x18], 5
jne 0x40284b
mov dword [ebp - 0x1c], 0x800
jmp 0x402852
mov dword [ebp - 0x1c], 0x200
mov eax, dword [ebp - 0x202c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_seek
test eax, eax
je 0x4028e6
mov dword [esp + 8], str.Cant_seek_to_the_start_sector
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4028cc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [0x40d350], 0
je 0x402ac6
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8302
mov eax, dword [0x40d350]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x2164], eax
cmp dword [ebp - 0x2164], 0xffffffff
jne 0x402986
mov dword [esp], str.grubinst:_open_save_file
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40296c
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2028]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sym._write
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x402a23
mov dword [esp], str.grubinst:_write_save_file
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x4029fb
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x1c]
jge 0x402ab8
mov dword [esp + 8], str.Cant_write_the_whole_MBR_to_the_save_file
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402a90
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [0x40d310]
and eax, 0x20
test eax, eax
je 0x402d0e
cmp dword [ebp - 0x18], 1
je 0x402b57
mov dword [esp + 8], str.Not_a_disk_image
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402b3d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
lea eax, [ebp - 0x2028]
add eax, 0x403
mov dword [esp + 8], 5
mov dword [esp + 4], str.GRLDR
mov dword [esp], eax
call sym._strncmp
test eax, eax
je 0x402bf9
mov dword [esp + 8], str.GRLDR_is_not_installed
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402bdf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp word [ebp - 0x1c2a], 0xaa55
je 0x402c7f
mov dword [esp + 8], str.No_previous_saved_MBR
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402c65
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov dword [esp + 8], 0x2000
mov dword [esp + 4], 0
mov dword [esp], section..data
call sym._memset
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x2028]
add eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], section..data
call sym._memcpy
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x2028]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4081b8
call sym._memcpy
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x4033c6
mov dword [esp + 4], str.Restore_previous_MBR_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
jmp 0x4033c6
cmp dword [0x40d340], 0
je 0x403008
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x8000
mov eax, dword [0x40d340]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x2164], eax
cmp dword [ebp - 0x2164], 0xffffffff
jne 0x402dae
mov dword [esp], str.grubinst:_open_restore_file
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402d94
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408000
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sym._read
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x402e49
mov dword [esp], str.grubinst:_read_restore_file
call sym._perror
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402e21
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [ebp - 0x14], 0x1ff
jle 0x402e76
mov eax, dword [ebp - 0x14]
and eax, 1
test eax, eax
jne 0x402e76
cmp dword [ebp - 0x18], 6
je 0x402eff
cmp word [0x4081fe], 0xaa55
jne 0x402e76
jmp 0x402eff
mov dword [esp + 8], str.Invalid_restore_file
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402ed7
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [ebp - 0x2164]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x1c]
jge 0x402f39
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
sub eax, edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
add eax, section..data
mov dword [esp], eax
call sym._memset
cmp dword [ebp - 0x18], 6
je 0x402fdb
mov dword [esp], section..data
call sym._get_fstype
mov dword [ebp - 0x2160], eax
mov eax, dword [ebp - 0x2160]
cmp eax, dword [ebp - 0x18]
je 0x402fdb
mov dword [esp + 8], str.Invalid_restore_file
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x402fc1
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x4032fe
mov dword [esp + 4], str.Restore_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
jmp 0x4032fe
cmp dword [ebp - 0x18], 1
jne 0x40309b
mov eax, dword [0x40d310]
and eax, 8
test eax, eax
jne 0x403073
lea eax, [ebp - 0x2028]
mov dword [esp], eax
call sym._is_grldr_mbr
test eax, eax
jne 0x403050
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x2028]
mov dword [esp + 4], eax
mov dword [esp], 0x408200
call sym._memcpy
jmp 0x403073
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x2028]
add eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], 0x408200
call sym._memcpy
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x2028]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4081b8
call sym._memcpy
jmp 0x40328c
cmp dword [ebp - 0x18], 3
jne 0x4030cb
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408600
mov dword [esp], section..data
call sym._memcpy
mov eax, dword [0x40d250]
mov byte [0x408041], al
jmp 0x40328c
cmp dword [ebp - 0x18], 4
jne 0x4030fb
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408400
mov dword [esp], section..data
call sym._memcpy
mov eax, dword [0x40d250]
mov byte [0x40805d], al
jmp 0x40328c
cmp dword [ebp - 0x18], 5
jne 0x40312b
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408a00
mov dword [esp], section..data
call sym._memcpy
mov eax, dword [0x40d250]
mov byte [0x408057], al
jmp 0x40328c
cmp dword [ebp - 0x18], 6
jne 0x403211
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408800
mov dword [esp], section..data
call sym._memcpy
mov eax, dword [0x40d250]
mov byte [0x408025], al
mov eax, dword [0x40d310]
and eax, 0x100
test eax, eax
je 0x403171
mov byte [0x408002], 0x42
jmp 0x403186
mov eax, dword [0x40d310]
and eax, 0x200
test eax, eax
je 0x403186
mov byte [0x408002], 2
cmp dword [0x40d290], 0xffffffff
je 0x40319c
mov eax, dword [0x40d290]
mov word [0x408018], ax
jmp 0x4031b0
mov eax, dword [0x40d310]
and al, 0x80
test al, al
jne 0x4031b0
mov word [0x408018], 0x3f
cmp dword [0x40d300], 0xffffffff
je 0x4031c6
mov eax, dword [0x40d300]
mov word [0x40801a], ax
jmp 0x4031da
mov eax, dword [0x40d310]
and al, 0x80
test al, al
jne 0x4031da
mov word [0x40801a], 0xff
cmp dword [0x40d2e0], 0xffffffff
je 0x4031ed
mov eax, dword [0x40d2e0]
mov dword [0x408020], eax
mov eax, dword [ebp - 0x202c]
mov dword [0x40801c], eax
mov eax, dword [ebp - 0x1c00]
mov dword [0x408028], eax
mov eax, dword [ebp - 0x1c14]
inc eax
mov dword [0x40802c], eax
jmp 0x40328c
mov dword [esp + 8], str.Invalid_file_system
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x403272
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
cmp dword [ebp - 0x18], 3
je 0x4032a0
cmp dword [ebp - 0x18], 4
je 0x4032a0
cmp dword [ebp - 0x18], 5
je 0x4032a0
jmp 0x4032da
mov eax, dword [0x40d310]
and eax, 0x100
test eax, eax
je 0x4032b7
mov byte [0x408002], 0xe
jmp 0x4032da
mov eax, dword [0x40d310]
and eax, 0x200
test eax, eax
je 0x4032ce
mov byte [0x408002], 0x90
jmp 0x4032da
movzx eax, byte [ebp - 0x2026]
mov byte [0x408002], al
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x4032fe
mov dword [esp + 4], str.Install_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
cmp dword [ebp - 0x18], 1
jne 0x40332c
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x2028]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4081b8
call sym._memcpy
jmp 0x4033c6
cmp dword [ebp - 0x18], 3
jne 0x403360
mov dword [esp + 8], 0x33
lea eax, [ebp - 0x2028]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40800b
call sym._memcpy
mov eax, dword [ebp - 0x202c]
mov dword [0x40801c], eax
jmp 0x4033c6
cmp dword [ebp - 0x18], 4
jne 0x403394
mov dword [esp + 8], 0x4f
lea eax, [ebp - 0x2028]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40800b
call sym._memcpy
mov eax, dword [ebp - 0x202c]
mov dword [0x40801c], eax
jmp 0x4033c6
cmp dword [ebp - 0x18], 5
jne 0x4033c6
mov dword [esp + 8], 0x49
lea eax, [ebp - 0x2028]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40800b
call sym._memcpy
mov eax, dword [ebp - 0x202c]
mov dword [0x40801c], eax
mov eax, dword [0x40d310]
and eax, 4
test eax, eax
jne 0x403476
mov eax, dword [ebp - 0x1c]
sar eax, 9
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408000
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_write
test eax, eax
je 0x40349a
mov dword [esp + 8], str.Write_error
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40345c
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov dword [ebp - 0x256c], 1
jmp 0x403514
mov eax, dword [0x40d310]
and eax, 1
test eax, eax
je 0x40349a
mov dword [esp + 4], str.Read_only_mode_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._xd_close
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40350a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.The_MBR_BS_has_been_successfully_installed_n
call sym._fputs
mov eax, dword [0x40d310]
and eax, 2
test eax, eax
je 0x40350a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press__ENTER__to_continue_..._n
call sym._fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fgetc
mov dword [ebp - 0x256c], 0
mov eax, dword [ebp - 0x256c]
leave
ret