public InstructionCollection Disassemble(long rawStartOffset, long length)
{
reader.BaseStream.Position = rawStartOffset;
InstructionCollection instructions = new InstructionCollection();
long offset = rawStartOffset;
long endOffset = rawStartOffset + length;
while (reader.BaseStream.Position < endOffset)
{
x86Instruction instruction = DisassembleNextInstruction();
instructions.Add(instruction);
offset += instruction.Size;
reader.BaseStream.Position = offset;
}
// reader.Dispose();
return instructions;
}