TUP.AsmResolver.ASM.x86Disassembler.Disassemble C# (CSharp) Méthode

Disassemble() public méthode

Disassembles bytes to a collection of assembly instructions.
public Disassemble ( long rawStartOffset, long length ) : InstructionCollection
rawStartOffset long The starting offset
length long The length. This value is overwritten when the last instruction's bounds are outside of the bounds.
Résultat InstructionCollection
        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;
        }