java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator.IREmulator |
IR emulator.
How to use:
- pass an existing EState
to a constructor or use
createStandard(IEGlobalContext)
to create a state and an emulator
- use the settters
to customize the emulator.
- setup()
it
- run()
it
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | defaultAllowOpt | ||||||||||
int | defaultMaxIterCount | ||||||||||
boolean | defaultRecordMemoryWrites | ||||||||||
boolean | defaultResetUnknownRegisters | ||||||||||
long | defaultReturnAddr | ||||||||||
long | defaultStackBase |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IREmulator(EState state) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | addArgument(long val, INativeType t) | ||||||||||
void | addArgument(IEImm val) | ||||||||||
void | addArgument(byte[] val, INativeType t) | ||||||||||
boolean | commitMemoryChanges(boolean commitModifiedPagesOnly) | ||||||||||
static IREmulator |
createStandard(IEGlobalContext gctx, int maxIterationCount)
Create an emulator as well as a standard
emulation state that will be
controlled by the emulator. | ||||||||||
static IREmulator |
createStandard(IEGlobalContext gctx)
Create an emulator as well as a standard
emulation state that will be
controlled by the emulator. | ||||||||||
int | getAddressSize() | ||||||||||
IEGlobalContext | getGlobalContext() | ||||||||||
IEImm | getLastEvaluationResult() | ||||||||||
MemoryWrites | getMemoryWrites() | ||||||||||
long | getPCAddress() | ||||||||||
int | getRegisterSize() | ||||||||||
IEImm | getReturnValue() | ||||||||||
long | getSPAddress() | ||||||||||
int | getStackSlotSize() | ||||||||||
EState | getState() | ||||||||||
IVirtualMemory | getVirtualMemory() | ||||||||||
boolean | isPrimaryEmulator() | ||||||||||
boolean |
processStoredReturnAddress(RoutineIOSlot slot)
ret-addr on stack: pop and return
ret-addr in register: TBI | ||||||||||
Long |
readPointer(long addr)
Convenience method.
| ||||||||||
IEImm | readStorage(RoutineIOSlot slot) | ||||||||||
void | registerExternEmulator(IExternalRoutineExecutionHelper helper) | ||||||||||
static IPrototypeItem |
retrievePrototype(IDecompilerManager decomp, INativeMethodItem routine)
Convenience method used to verify whether or not an emulator object would be able to retrieve
a target method prototype.
| ||||||||||
boolean | run() | ||||||||||
void | setArguments(Collection<IEImm> vals) | ||||||||||
void | setPerformFreshDecompilations(boolean performFreshDecompilations) | ||||||||||
void | setPreferredStackBase(long address) | ||||||||||
void | setPreferredTargetPrototype(IPrototypeItem proto) | ||||||||||
void | setRecordMemoryWrites(boolean recordMemoryWrites) | ||||||||||
void | setResetUnknownRegisters(boolean enabled) | ||||||||||
void | setReturnAddress(long retAddr) | ||||||||||
void | setStubExecution(INativeMethodItem routine, long pcStart, long pcStop) | ||||||||||
void | setStubExecution(IERoutineContext ctx, int irStart, int irStop) | ||||||||||
void | setTargetRoutine(INativeMethodItem routine) | ||||||||||
void | setup() | ||||||||||
void |
teardown()
Clean-up temporary constructs built during
setup() . | ||||||||||
void | unregisterExternEmulator(IExternalRoutineExecutionHelper helper) | ||||||||||
boolean | writePointer(long addr, long ptr) | ||||||||||
boolean | writeStorage(RoutineIOSlot slot, IEImm val) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create an emulator as well as a standard emulation state
that will be
controlled by the emulator.
Create an emulator as well as a standard emulation state
that will be
controlled by the emulator. Set the standard maximum iteration count to
{@value #defaultMaxIterCount}.
ret-addr on stack: pop and return
ret-addr in register: TBI
Convenience method.
Convenience method used to verify whether or not an emulator object would be able to retrieve a target method prototype.
decomp | decompiler unit |
---|---|
routine | candidate target routine |