Example #1
0
        private void ResolveNewMscrolibMethods(DebugModule mscorlib)
        {
            var assemblyLoadMethods = mscorlib.ResolveAllFunctionName("System.Reflection.Assembly", "Load");
            if (assemblyLoadMethods != null)
            {
                foreach (var method in assemblyLoadMethods)
                {
                    var methodParams = method.MetaData.GetParameters();
                    if (methodParams.Length == 1 && methodParams[0].Name == "rawAssembly")
                    {
                        _loadAssemblyMethod = method;

                        _byteCorType = mscorlib.FindType("System.Byte").GetDebugType();

                        Logger.WriteLine("Assembly.Load(byte[] rawAssembly) - method address resolved.");
                    }
                }
            }
            else
            {
                Logger.WriteLine("Could not find Assembly.Load() method in mscorlib. Something is wrong.");
            }
        }