Example #1
0
        private NashaMethodBody DisassembleMethodBody(NashaMethod method)
        {
            var body = new NashaMethodBody(method);

            body.Instructions = InstructionDisassembler.DisassembleAllInstructions(method);
            return(body);
        }
Example #2
0
        public NashaMethod DisassembleMethod(NashaMethodInfo methodInfo)
        {
            var method = new NashaMethod(methodInfo);

            method.MethodBody = DisassembleMethodBody(method);
            return(method);
        }
        public List <NashaInstruction> DisassembleAllInstructions(NashaMethod nashaMethod)
        {
            var instructions = new List <NashaInstruction>();

            InstructionReader.BaseStream.Position = nashaMethod.Parent._methodKey;
            int count = InstructionReader.ReadInt32();

            Disassembler.Context.Logger.Success($"Disassembling Method {nashaMethod.Parent.Method.Name} With Key {nashaMethod.Parent._methodKey} - Instructions ({count})");
            for (int i = 0; i < count; i++)
            {
                instructions.Add(DisassembleInstruction());
            }
            return(instructions);
        }
Example #4
0
 public void RecompileMethod(NashaMethod nashaMethod)
 {
     nashaMethod.Parent.Method.CilMethodBody = RecompileCilMethodBody(nashaMethod.MethodBody);
 }