title: How to overwrite specific bytes in a binary file with C#?
body: <p>I want to overwrite bytes in an exe.</p>
  
  <p>So I need to generate a random string, convert it, and then write it to the exe.</p>
  
  <p>I need to overwrite the 4 hex strings you see there in this format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  (8-4-4-4-12)  the dashes are needed so that also was a problem for me.</p>
  
  <p>this is the location of the first string.</p>
  
  <p><img src="https://i.stack.imgur.com/Taz24.png" alt="hexdump"></p>
  
  <p><img src="https://i.stack.imgur.com/0TIEN.png" alt="attributes screenshot"></p>
  
  <p>I absolutely got no idea how to start this, how I can overwrite these 4 strings, in the correct format with random strings (hex, so the random can only be 0123456789abcdef)</p>
  
  <p>any help is much appreciated.</p>