Jump to content

Is there any 64-bit tool that can patch hex bytes in MBR.bin at specific Offset location similiar to 32-bit bytepatch.exe ?


Recommended Posts

Posted

Hi MSFN Members...

I use .cmd which  map Partition Image to a Partition entry of USB Drive which uses 'bytepatch.exe'. Bytepatch.exe is a 32-bit program and does not work in 64-bit boot.wim environment. I want to run .cmd in 64-bit boot.wim environment in order to patch bytes of MBR.BIN and PBR.bin of USB Drive.

Is there any tool that can patch hex bytes in MBR.bin at a specific Offset location similiar to bytepatch.exe ?

I use following bytepatch.exe commands in my Imgptn.cmd -

--------------------------------------------------------------------------------------------------------------------------------------

bytepatch.exe my_MBR.mbr -a %MBR_Offset% %Active% %BHd% %BSec% %BCyl% %Parttype% %EHd% %ESec% %ECyl% %StartLBA:~0,2% %StartLBA:~2,2% %StartLBA:~4,2% %StartLBA:~6,2% %SectorsLBA:~0,2% %SectorsLBA:~2,2% %SectorsLBA:~4,2% %SectorsLBA:~6,2% >nul 2>nul
bytepatch.exe my_PBR.pbr -a 0x01C %StartLBA:~0,2% %StartLBA:~2,2% %StartLBA:~4,2% %StartLBA:~6,2% >nul 2>nul
IF %Partnum%==2 IF %7==65536 bytepatch.exe my_MBR.mbr -a 458 %P1LENMOD:~0,2% %P1LENMOD:~2,2% %P1LENMOD:~4,2% %P1LENMOD:~6,2% >nul 2>nul--------------------------------------------------------------------------------------------------------------------------------------

Please suggest a similiar tool which we can use in our .cmd files to modify MBR.bin and PBR.bin in boot.wim environment to switch various Disk Images into different Partitions of USB Drive..?

Thanks & Regards...

 

-------------------------------------------------------------------------------------------------------------------------------------

bytepatch.exe Usage -

==============

Byte Patcher (bytepatch) v1.3 build 1809180 - simple binary and PE patch tool
copyright (c) bytepointer.com 2016-2018

syntax:
  bytepatch.exe [options] <input_file> [data_bytes]

[data_bytes]
  patch data may be specified directly as 0-padded hex digits, where two hex
  digits delineate each byte - spaces optional; e.g.: 33 C0 83 C4 04

[options]
  -f <file> - load binary data from file instead of command-line
  -a <uint> - specify patch start address; by default this value designates
              the base-0 file offset for which to beging patching specified
              data.
  -p        - this option designates that address argument (-a) is a pointer
              into specified input file rather than a file offset; the
              input file must specify a valid Windows PE image (EXE/DLL); when
              this option is used and no address argument is specified, general
              PE and section information is displayed for the input file.
  -b <uint> - in pe pointer mode, overrides preferred load address (base) of
              image for address calculations.
  -l <uint> - loglevel number (0=quiet, 1=normal/default, 2=verbose/debug)
  -t        - trial-run; execute normally, but patch is not written to file
  -?        - this help

NOTE: numbers given for the options above default to base-10; to specify hex or
binary values, please prefix with "0x" or "0b" respectively.

IMPORTANT: disasmdump.exe not found in path "E:\_SMART\SMART_SWITCH"
disassembler functionality disabled; to enable this functionality (x86 32-bit
code only), please download it free from bytepointer.com.

--------------------------------------------------------------------------------------------------------------------------------------


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...