Interface IUnknownResolver
- Namespace
- Echo.Platforms.AsmResolver.Emulation
- Assembly
- Echo.Platforms.AsmResolver.dll
Provides methods for resolving unknown values in critical points of the emulation process.
public interface IUnknownResolver
Methods
ResolveArrayIndex(CilExecutionContext, CilInstruction, long, StackSlot)
Resolves an unknown index of an element within an array.
long? ResolveArrayIndex(CilExecutionContext context, CilInstruction instruction, long arrayAddress, StackSlot index)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe switch instruction that is being executed.
arrayAddresslongThe address of the array.
indexStackSlotThe index to resolve.
Returns
- long?
The resolved index, or
nullto treat it as an unknown value that is processed successfully.
ResolveBlockSize(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown size for a memory block.
uint ResolveBlockSize(CilExecutionContext context, CilInstruction instruction, StackSlot size)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe instruction that is being executed.
sizeStackSlotThe size to resolve.
Returns
- uint
The resolved size, or
nullto treat it as an unknown value that is processed successfully.
ResolveBranchCondition(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown condition value of a unary conditional branch instruction.
bool ResolveBranchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe branch instruction that is being executed.
argumentStackSlotThe condition to be resolved.
Returns
- bool
trueif the branch should be taken,falseotherwise.
ResolveBranchCondition(CilExecutionContext, CilInstruction, StackSlot, StackSlot)
Resolves an unknown condition value of a binary conditional branch instruction.
bool ResolveBranchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument1, StackSlot argument2)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe branch instruction that is being executed.
argument1StackSlotThe first argument.
argument2StackSlotThe second argument.
Returns
- bool
trueif the branch should be taken,falseotherwise.
ResolveDelegateTarget(CilExecutionContext, ObjectHandle, IList<BitVector>)
IMethodDescriptor? ResolveDelegateTarget(CilExecutionContext context, ObjectHandle delegateObject, IList<BitVector> arguments)
Parameters
contextCilExecutionContextdelegateObjectObjectHandleargumentsIList<BitVector>
Returns
ResolveDestinationPointer(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown destination address to a memory block or object to write data to.
long? ResolveDestinationPointer(CilExecutionContext context, CilInstruction instruction, StackSlot address)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe instruction that is being executed.
addressStackSlotThe address to resolve.
Returns
- long?
The resolved address, or
nullto treat it as an unknown value that is processed successfully.
ResolveExceptionFilter(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown conclusion for an exception filter.
bool ResolveExceptionFilter(CilExecutionContext context, CilInstruction instruction, StackSlot conclusion)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe instruction that is being executed.
conclusionStackSlotThe unknown conclusion value.
Returns
- bool
trueif the exception should be handled,falseotherwise.
ResolveMethod(CilExecutionContext, CilInstruction, IList<BitVector>)
Resolves a method devirtualization on an unknown object instance.
IMethodDescriptor? ResolveMethod(CilExecutionContext context, CilInstruction instruction, IList<BitVector> arguments)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe instruction that is being executed.
argumentsIList<BitVector>
Returns
- IMethodDescriptor
The resolved method, or
nullif devirtualization should be ignored and the default implementation of the method should be used.
ResolveSourcePointer(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown source address to a memory block or object to read data from.
long? ResolveSourcePointer(CilExecutionContext context, CilInstruction instruction, StackSlot address)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe instruction that is being executed.
addressStackSlotThe address to resolve.
Returns
- long?
The resolved address, or
nullto treat it as an unknown value that is processed successfully.
ResolveSwitchCondition(CilExecutionContext, CilInstruction, StackSlot)
Resolves an unknown index value of a switch instruction.
uint? ResolveSwitchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument)
Parameters
contextCilExecutionContextThe context in which the instruction is executed in.
instructionCilInstructionThe switch instruction that is being executed.
argumentStackSlotThe switch index to resolve.
Returns
- uint?
The resolved index to jump to, or
nullto skip the switch instruction.