예제 #1
0
        public int decrypt(Blocks theBlocks)
        {
            if (!HasHandlers)
                return 0;
            try {
                blocks = theBlocks;
                callResults = new List<CallResult>();
                allBlocks = new List<Block>(blocks.MethodBlocks.getAllBlocks());

                findAllCallResults();
                inlineAllCalls();
                inlineReturnValues();
                return callResults.Count;
            }
            finally {
                blocks = null;
                callResults = null;
                allBlocks = null;
                variableValues = null;
            }
        }
예제 #2
0
		bool GetLocalVariableValue(Local variable, out object value) {
			if (variableValues == null)
				variableValues = new VariableValues(theMethod.Body.Variables, allBlocks);
			var val = variableValues.GetValue(variable);
			if (!val.IsValid()) {
				value = null;
				return false;
			}
			value = val.Value;
			return true;
		}
예제 #3
0
		public int Decrypt(MethodDef method, List<Block> allBlocks) {
			if (!HasHandlers)
				return 0;
			try {
				theMethod = method;
				callResults = new List<CallResult>();
				this.allBlocks = allBlocks;

				FindAllCallResults();
				InlineAllCalls();
				InlineReturnValues();
				return callResults.Count;
			}
			catch {
				errors++;
				throw;
			}
			finally {
				theMethod = null;
				callResults = null;
				this.allBlocks = null;
				variableValues = null;
			}
		}
예제 #4
0
 void getLocalVariableValue(VariableDefinition variable, out object value)
 {
     if (variableValues == null)
         variableValues = new VariableValues(blocks.Locals, allBlocks);
     var val = variableValues.getValue(variable);
     if (!val.isValid())
         throw new ApplicationException("Could not get value of local variable");
     value = val.Value;
 }
예제 #5
0
 bool getLocalVariableValue(VariableDefinition variable, out object value)
 {
     if (variableValues == null)
         variableValues = new VariableValues(blocks.Locals, allBlocks);
     var val = variableValues.getValue(variable);
     if (!val.isValid()) {
         value = null;
         return false;
     }
     value = val.Value;
     return true;
 }