1
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-12-12 05:41:21 +04:00
Files
parkan-playground/X86Disassembler/Program.cs

27 lines
871 B
C#
Raw Normal View History

2025-04-18 16:29:53 +03:00
using X86Disassembler.Analysers;
using X86Disassembler.PE;
2025-04-19 02:12:46 +03:00
using X86Disassembler.ProjectSystem;
namespace X86Disassembler;
public class Program
2025-04-12 16:42:44 +03:00
{
private const string FilePath = @"C:\Program Files (x86)\Nikita\Iron Strategy\Terrain.dll";
2025-04-19 02:12:46 +03:00
public static void Main(string[] args)
{
byte[] fileBytes = File.ReadAllBytes(FilePath);
2025-04-13 00:21:01 +03:00
PeFile peFile = new PeFile(fileBytes);
peFile.Parse();
2025-04-19 02:12:46 +03:00
var projectPeFile = new ProjectPeFile()
{
ImageBase = new VirtualAddress(0, peFile.OptionalHeader.ImageBase),
Architecture = peFile.OptionalHeader.Is64Bit()
? "64-bit"
: "32-bit",
Name = Path.GetFileName(FilePath),
EntryPointAddress = new FileAbsoluteAddress(peFile.OptionalHeader.AddressOfEntryPoint, peFile.OptionalHeader.ImageBase)
};
2025-04-12 16:42:44 +03:00
}
}