mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 13:46:03 +00:00
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System.Linq;
|
|
using BinaryObjectScanner.Interfaces;
|
|
using SabreTools.Serialization.Wrappers;
|
|
|
|
namespace BinaryObjectScanner.Packer
|
|
{
|
|
// TODO: Add extraction
|
|
// TODO: Verify that all versions are detected
|
|
public class AdvancedInstaller : IExtractablePortableExecutable, IPortableExecutableCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public string? CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
|
{
|
|
// Get the sections from the executable, if possible
|
|
var sections = pex.Model.SectionTable;
|
|
if (sections == null)
|
|
return null;
|
|
|
|
// Get the .rdata section strings, if they exist
|
|
var strs = pex.GetFirstSectionStrings(".rdata");
|
|
if (strs != null)
|
|
{
|
|
if (strs.Any(s => s.Contains("Software\\Caphyon\\Advanced Installer")))
|
|
return "Caphyon Advanced Installer";
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string? Extract(string file, PortableExecutable pex, bool includeDebug)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|