Files
BinaryObjectScanner/BurnOutSharp/PackerType/EXEStealth.cs
2020-10-30 09:09:16 -07:00

16 lines
829 B
C#

namespace BurnOutSharp.PackerType
{
public class EXEStealth
{
public static string CheckContents(byte[] fileContent, bool includePosition = false)
{
// "??[[__[[_" + (char)0x00 + "{{" + (char)0x0 + (char)0x00 + "{{" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x0 + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "?;??;??"
byte[] check = new byte[] { 0x3F, 0x3F, 0x5B, 0x5B, 0x5F, 0x5F, 0x5B, 0x5B, 0x5F, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x3B, 0x3F, 0x3F, 0x3B, 0x3F, 0x3F };
if (fileContent.Contains(check, out int position))
return $"EXE Stealth" + (includePosition ? $" (Index {position})" : string.Empty);
return null;
}
}
}