Disassembleback

OllyDbg Plugin API

Disassembleback

Calculates address of assembler instruction which is n instructions (maximally 127) back from instruction at specified address. Returns address of found instruction. In case of error, it may be less than n instructions apart.

80x86 commands have variable length. Disassembleback use heuristical methods to separate commands and in some (astoundingly rare!) cases may return invalid answer. To avoid risks of invaling backward walking, or correctly walk through constants and strings, use results of code analysis.

ulong Disassembleback(char *block,ulong base,ulong size,ulong ip,int n,int usedec);

Parameters:

block - pointer to copy of code. If block is NULL, Disassembleback assumes memory of debugged process and if necessary reads it;

base - address of first byte of code block;

size - size of code block;

ip - address of current instruction;

n - number of instructions to walk back;

usedec - flag indicating whether Disassembleback should try to use decoding data.

See also: Disassembleforward, Followcall, Findmemory, Readmemory