Class Platform
- Namespace
- AsmResolver.PE.Platforms
- Assembly
- AsmResolver.PE.dll
Provides information and services for a particular target platform.
public abstract class Platform
- Inheritance
-
Platform
- Derived
- Inherited Members
Properties
Is32Bit
Gets a value indicating whether the platform is a 32-bit platform.
public abstract bool Is32Bit { get; }
Property Value
Is64Bit
Gets a value indicating whether the platform is a 64-bit platform.
public bool Is64Bit { get; }
Property Value
IsClrBootstrapperRequired
Gets a value indicating whether PEs with a .NET image embedded requires a CLR bootstrapper.
public abstract bool IsClrBootstrapperRequired { get; }
Property Value
PointerSize
Gets a value indicating the size of a single pointer.
public int PointerSize { get; }
Property Value
TargetMachine
Gets the machine type associated to the platform.
public abstract MachineType TargetMachine { get; }
Property Value
Methods
CreateAddressTableInitializer(ISymbol)
Creates a new address table initializer stub.
public abstract AddressTableInitializerStub CreateAddressTableInitializer(ISymbol virtualProtect)
Parameters
virtualProtect
ISymbolThe symbol to
kernel32.dll!VirtualProtect
to use for temporarily adjusting the memory protection bits while initializing the address table.
Returns
- AddressTableInitializerStub
The initializer stub.
CreateThunkStub(ISymbol)
Creates a new thunk stub that transfers control to the provided symbol.
public abstract RelocatableSegment CreateThunkStub(ISymbol entryPoint)
Parameters
entryPoint
ISymbolThe symbol to jump to.
Returns
- RelocatableSegment
The created stub.
Get(MachineType)
Gets a target platform by its machine type.
public static Platform Get(MachineType machineType)
Parameters
machineType
MachineTypeThe machine type.
Returns
- Platform
The target platform.
Exceptions
- NotSupportedException
Occurs when the platform is not supported.
TryExtractThunkAddress(PEImage, BinaryStreamReader, out uint)
Attempts to extract the original RVA from the code at the provided thunk address reader.
public abstract bool TryExtractThunkAddress(PEImage image, BinaryStreamReader reader, out uint rva)
Parameters
image
PEImageThe image containing the thunk.
reader
BinaryStreamReaderThe thunk reader.
rva
uintThe extracted RVA.
Returns
- bool
true
if the RVA was extracted successfully from the code,false
otherwise.
TryGet(MachineType, out Platform?)
Gets a target platform by its machine type.
public static bool TryGet(MachineType machineType, out Platform? platform)
Parameters
machineType
MachineTypeThe machine type.
platform
PlatformThe target platform.
Returns
- bool
true
if the platform was found,false
otherwise.