Continue exe organization, start IIF migration

This commit is contained in:
Matt Nadareski
2021-08-27 09:42:05 -07:00
parent 4b5d0980f7
commit 2de4f3f808
33 changed files with 738 additions and 378 deletions

View File

@@ -17,8 +17,8 @@ namespace BurnOutSharp.PackerType
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
// Get the sections from the executable, if possible
PEExecutable pex = PEExecutable.Deserialize(fileContent, 0);
var sections = pex?.SectionHeaders;
PortableExecutable pex = PortableExecutable.Deserialize(fileContent, 0);
var sections = pex?.SectionTable;
if (sections == null)
return null;
@@ -26,7 +26,7 @@ namespace BurnOutSharp.PackerType
var rdataSection = sections.FirstOrDefault(s => Encoding.ASCII.GetString(s.Name).StartsWith(".rdata"));
if (rdataSection != null)
{
int sectionAddr = (int)EVORE.ConvertVirtualAddress(rdataSection.VirtualAddress, sections);
int sectionAddr = (int)rdataSection.PointerToRawData;
int sectionEnd = sectionAddr + (int)rdataSection.VirtualSize;
var matchers = new List<ContentMatchSet>
{