# MD5 Checksum

NETGuard.IO prevent tampered obfuscated file from running by performing complex pre-calculations about your file's MD5 checksum and compare to its correct value<br>

```csharp
string location = Assembly.GetExecutingAssembly().Location;
Stream baseStream = new StreamReader(location).BaseStream;
BinaryReader binaryReader = new BinaryReader(baseStream);
string arg_5A_0 = BitConverter.ToString(MD5.Create().ComputeHash(binaryReader.ReadBytes(File.ReadAllBytes(location).Length - 16)));
baseStream.Seek(-16L, SeekOrigin.End);
string b = BitConverter.ToString(binaryReader.ReadBytes(16));
if (arg_5A_0 != b)
{
	throw new BadImageFormatException();
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://netguard.gitbook.io/help/5.8.1.1/protections/antis-and-integrity/md5-checksum.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
