I am designing some software and it needs to search a .bin file (a dump of memory from a processor inside a automotive control unit) and search for a collection (array) of UShorts (i may be mistaken correct me if im wrong) and if it finds it, to replace it with something other, and possibly if there is a option, return the address of where it is found.
Bare in mind that the files that need to be searched are very large, from 512kb to 4mb in size, I figured out a way to read with binary reader but only in 8bit not in (16bit HiLo or Ushort as they name it?).
I know it's too much to ask if somebody can paste some example code it would be nice!
Example:
Memory dump:
Code:
60735 62783 35136 32320 27968 35389 07231 40767 45119 4332827967 59964 00316 42555 63291 35389 07231 40767 45119 43328 35389 07231 40767 45119 43328 35389 07231 40767 45119 43328
Find: 42555 63291 and replace with FFFFF FFFFF