7.2.3.16 Find and Replace Hexmate Option

If the replace form of the -find option (see 7.2.3.14 Find Hexmate Option) is used, any matching sequences will be replaced, or partially replaced, with new codes.

To have the -find option perform replacement, append ,replace=spec to the option in the following manner.
-find=spec,replace=Code[mMask]
where:
  • Code is a hexadecimal code sequence to replace the sequences that match the -find criteria.
  • Mask is an optional bit mask to specify which bits within Code will replace the code sequence that has been matched. This can be useful if, for example, it is only necessary to modify 4 bits within a 16-bit instruction. The remaining 12 bits can masked and left unchanged.
For example:
-find=ff@7fe0-7fff,replace=55
Attention: This function should be used with extreme caution and is not normally recommended for the replacement of data or executable code.