Function at 0x401986
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a58
call fcn.00404950
cmp dword [ebp + 8], 0
jne 0x4019a8
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8002
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x401a13
mov dword [esp], str.grubinst:_open
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401a01
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
mov eax, dword [0x409330]
and eax, 0x20
test eax, eax
je 0x401a44
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00401928
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 0
jmp 0x402a64
cmp dword [0x4092b0], 0xffffffff
je 0x401b48
cmp dword [0x409310], 0xffffffff
je 0x401a6a
mov eax, dword [0x409310]
mov dword [ebp - 0x1a1c], eax
jmp 0x401b52
mov byte [ebp - 0x1a38], 0xff
mov eax, dword [0x4092b0]
mov byte [ebp - 0x1a37], al
lea eax, [ebp - 0x1a38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00403c8f
test eax, eax
je 0x401af8
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401ade
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov eax, dword [ebp - 0x1a34]
mov dword [ebp - 0x1a1c], eax
mov eax, dword [0x409330]
and eax, 1
test eax, eax
je 0x401b52
movzx eax, byte [ebp - 0x1a36]
mov dword [esp], eax
call fcn.0040439e
mov edx, eax
mov eax, dword [ebp - 0x1a30]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
movzx eax, byte [ebp - 0x1a36]
mov dword [esp + 4], eax
mov dword [esp], str.Part_Fs:__02X___s__nPart_Leng:__u_n
call sub.msvcrt.dll_printf
jmp 0x401b52
mov dword [ebp - 0x1a1c], 0
mov eax, dword [0x409330]
and eax, 1
test eax, eax
je 0x401b74
mov eax, dword [ebp - 0x1a1c]
mov dword [esp + 4], eax
mov dword [esp], str.Start_sector:__u_n
call sub.msvcrt.dll_printf
cmp dword [ebp - 0x1a1c], 0
je 0x401bf9
mov eax, dword [ebp - 0x1a1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00403c20
test eax, eax
je 0x401bf9
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401bdf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov dword [esp + 8], 0x1a00
lea eax, [ebp - 0x1a18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__read
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401c71
mov dword [esp], str.grubinst:_read
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401c54
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
cmp dword [ebp - 0x10], 0x19ff
ja 0x401cdd
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401cc3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov eax, dword [ebp - 0x1a1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00403c20
test eax, eax
je 0x401d59
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401d3f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
lea eax, [ebp - 0x1a18]
mov dword [esp], eax
call fcn.0040416a
mov dword [ebp - 0x14], eax
mov eax, dword [0x409330]
and eax, 1
test eax, eax
je 0x401d91
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.00404342
mov dword [esp + 4], eax
mov dword [esp], str.Image_type:__s_n
call sub.msvcrt.dll_printf
cmp dword [ebp - 0x14], 0
jne 0x401dfa
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401de0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [ebp - 0x14], 4
jne 0x401e63
mov dword [esp + 8], str.NTFS_not_supported
mov dword [esp + 4], str.grubinst:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401e49
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [0x4092b0], 0xffffffff
jne 0x401e7a
mov eax, dword [0x409330]
and eax, 0x40
test eax, eax
jne 0x401e7a
jmp 0x401ee3
cmp dword [ebp - 0x14], 1
jne 0x401ee3
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401ec9
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [0x4092b0], 0xffffffff
jne 0x401f61
mov eax, dword [0x409330]
and eax, 0x40
test eax, eax
jne 0x401f61
cmp dword [ebp - 0x14], 1
je 0x401f61
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401f47
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [ebp - 0x14], 1
jne 0x401f73
mov dword [ebp - 0x1a48], 0x1a00
jmp 0x401f7d
mov dword [ebp - 0x1a48], 0x200
mov eax, dword [ebp - 0x1a48]
mov dword [ebp - 0x18], eax
cmp dword [0x409370], 0
je 0x402120
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8302
mov eax, dword [0x409370]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov dword [ebp - 0x1a3c], eax
cmp dword [ebp - 0x1a3c], 0xffffffff
jne 0x402011
mov dword [esp], str.grubinst:_open_save_file
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x401ff4
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1a18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__write
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x402099
mov dword [esp], str.grubinst:_write_save_file
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x40206e
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jge 0x402112
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x4020ea
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [0x409330]
and eax, 0x10
test eax, eax
je 0x4022f8
cmp dword [ebp - 0x14], 1
je 0x402199
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x40217f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
lea eax, [ebp - 0x1a18]
add eax, 0x403
mov dword [esp + 8], 5
mov dword [esp + 4], str.MTLDR
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
je 0x402223
mov dword [esp + 8], str.MTLDR_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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402209
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp word [ebp - 0x161a], 0xaa55
je 0x402291
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402277
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov dword [esp + 8], 0x1a00
mov dword [esp + 4], 0
mov dword [esp], section..data
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x1a18]
add eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], section..data
call sub.msvcrt.dll_memcpy
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x1a18]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4051b8
call sub.msvcrt.dll_memcpy
jmp 0x4028fd
cmp dword [0x409360], 0
je 0x40256f
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x8000
mov eax, dword [0x409360]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov dword [ebp - 0x1a3c], eax
cmp dword [ebp - 0x1a3c], 0xffffffff
jne 0x402383
mov dword [esp], str.grubinst:_open_restore_file
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402366
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405000
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__read
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x402409
mov dword [esp], str.grubinst:_read_restore_file
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x4023de
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
cmp dword [ebp - 0x10], 0x1ff
jle 0x40242f
mov eax, dword [ebp - 0x10]
and eax, 1
test eax, eax
jne 0x40242f
cmp dword [ebp - 0x14], 5
je 0x4024a0
cmp word [0x4051fe], 0xaa55
jne 0x40242f
jmp 0x4024a0
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402478
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov eax, dword [ebp - 0x1a3c]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jge 0x4024da
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
sub eax, edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10]
add eax, section..data
mov dword [esp], eax
call sub.msvcrt.dll_memset
cmp dword [ebp - 0x14], 2
je 0x4024eb
cmp dword [ebp - 0x14], 3
je 0x4024eb
jmp 0x40286c
mov dword [esp], section..data
call fcn.0040416a
mov dword [ebp - 0x1a40], eax
mov eax, dword [ebp - 0x1a40]
cmp eax, dword [ebp - 0x14]
je 0x40286c
mov dword [esp + 8], str.Mismatch_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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402555
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [ebp - 0x14], 1
jne 0x40264a
mov eax, dword [0x409330]
and eax, 8
test eax, eax
jne 0x4025ef
lea eax, [ebp - 0x1a18]
add eax, 0x403
mov dword [esp + 8], 5
mov dword [esp + 4], str.MTLDR
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4025d1
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x1a18]
add eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], 0x405200
call sub.msvcrt.dll_memcpy
jmp 0x4025ef
mov dword [esp + 8], 0x200
lea eax, [ebp - 0x1a18]
mov dword [esp + 4], eax
mov dword [esp], 0x405200
call sub.msvcrt.dll_memcpy
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x1a18]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4051b8
call sub.msvcrt.dll_memcpy
mov eax, dword [0x409350]
mov byte [0x405002], al
mov eax, dword [0x409340]
mov byte [0x405003], al
mov eax, dword [0x4092d0]
mov word [0x405004], ax
mov eax, dword [0x4092c0]
mov byte [0x405006], al
mov eax, dword [0x4092f0]
mov byte [0x405007], al
jmp 0x40286c
cmp dword [ebp - 0x14], 2
jne 0x4026b7
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405600
mov dword [esp], section..data
call sub.msvcrt.dll_memcpy
mov eax, dword [0x4092b0]
mov byte [0x405041], al
mov eax, dword [0x409330]
and al, 0x80
test al, al
je 0x40268c
mov byte [0x405002], 0xe
jmp 0x40286c
mov eax, dword [0x409330]
and eax, 0x100
test eax, eax
je 0x4026a6
mov byte [0x405002], 0x90
jmp 0x40286c
movzx eax, byte [ebp - 0x1a16]
mov byte [0x405002], al
jmp 0x40286c
cmp dword [ebp - 0x14], 3
jne 0x402724
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405400
mov dword [esp], section..data
call sub.msvcrt.dll_memcpy
mov eax, dword [0x4092b0]
mov byte [0x40505d], al
mov eax, dword [0x409330]
and al, 0x80
test al, al
je 0x4026f9
mov byte [0x405002], 0xe
jmp 0x40286c
mov eax, dword [0x409330]
and eax, 0x100
test eax, eax
je 0x402713
mov byte [0x405002], 0x90
jmp 0x40286c
movzx eax, byte [ebp - 0x1a16]
mov byte [0x405002], al
jmp 0x40286c
cmp dword [ebp - 0x14], 5
jne 0x402809
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405800
mov dword [esp], section..data
call sub.msvcrt.dll_memcpy
mov eax, dword [0x4092b0]
mov byte [0x405025], al
mov eax, dword [0x409330]
and al, 0x80
test al, al
je 0x402767
mov byte [0x405002], 0x42
jmp 0x40277c
mov eax, dword [0x409330]
and eax, 0x100
test eax, eax
je 0x40277c
mov byte [0x405002], 2
cmp dword [0x4092e0], 0xffffffff
je 0x402792
mov eax, dword [0x4092e0]
mov word [0x405018], ax
jmp 0x4027a7
mov eax, dword [0x409330]
and eax, 0x40
test eax, eax
jne 0x4027a7
mov word [0x405018], 0x3f
cmp dword [0x409320], 0xffffffff
je 0x4027bd
mov eax, dword [0x409320]
mov word [0x40501a], ax
jmp 0x4027d2
mov eax, dword [0x409330]
and eax, 0x40
test eax, eax
jne 0x4027d2
mov word [0x40501a], 0xff
cmp dword [0x409300], 0xffffffff
je 0x4027e5
mov eax, dword [0x409300]
mov dword [0x405020], eax
mov eax, dword [ebp - 0x1a1c]
mov dword [0x40501c], eax
mov eax, dword [ebp - 0x15f0]
mov dword [0x405028], eax
mov eax, dword [ebp - 0x1604]
inc eax
mov dword [0x40502c], eax
jmp 0x40286c
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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402852
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
cmp dword [ebp - 0x14], 1
jne 0x402897
mov dword [esp + 8], 0x48
lea eax, [ebp - 0x1a18]
add eax, 0x1b8
mov dword [esp + 4], eax
mov dword [esp], 0x4051b8
call sub.msvcrt.dll_memcpy
jmp 0x4028fd
cmp dword [ebp - 0x14], 2
jne 0x4028cb
mov dword [esp + 8], 0x33
lea eax, [ebp - 0x1a18]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40500b
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x1a1c]
mov dword [0x40501c], eax
jmp 0x4028fd
cmp dword [ebp - 0x14], 3
jne 0x4028fd
mov dword [esp + 8], 0x4f
lea eax, [ebp - 0x1a18]
add eax, 0xb
mov dword [esp + 4], eax
mov dword [esp], 0x40500b
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x1a1c]
mov dword [0x40501c], eax
mov eax, dword [0x409330]
and eax, 4
test eax, eax
jne 0x4029ea
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405000
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__write
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x402982
mov dword [esp], str.grubinst:_write
call sub.msvcrt.dll_perror
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402965
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x1a44], eax
jmp 0x402a64
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jge 0x402a02
mov dword [esp + 8], str.Cant_write_the_whole_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 sub.msvcrt.dll_fprintf
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x4029d3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [ebp - 0x1a44], 1
jmp 0x402a64
mov eax, dword [0x409330]
and eax, 1
test eax, eax
je 0x402a02
mov dword [esp], str.Read_only_mode_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402a5a
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 sub.msvcrt.dll_fputs
mov eax, dword [0x409330]
and eax, 2
test eax, eax
je 0x402a5a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], str.Press_any_key_to_continue_..._n
call sub.msvcrt.dll_fputs
call sub.msvcrt.dll__getch
mov dword [ebp - 0x1a44], 0
mov eax, dword [ebp - 0x1a44]
leave
ret