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; } }
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; }
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; } }
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; }
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; }