Ejemplo n.º 1
0
 private Dictionary <ILogicalConstruct, HashSet <ISingleEntrySubGraph> > GetValidCases(DominatorTree dominatorTree, ILogicalConstruct switchCFGBlock)
 {
     V_0 = new SwitchBuilder.u003cu003ec__DisplayClass9_0();
     V_0.caseEntriesToDominatedNodesMap = new Dictionary <ILogicalConstruct, HashSet <ISingleEntrySubGraph> >();
     V_1       = new HashSet <ISingleEntrySubGraph>();
     dummyVar0 = V_1.Add(switchCFGBlock);
     V_4       = switchCFGBlock.get_SameParentSuccessors().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = (ILogicalConstruct)V_4.get_Current();
             if (V_5 == switchCFGBlock || dominatorTree.GetImmediateDominator(V_5) != switchCFGBlock)
             {
                 continue;
             }
             V_6 = dominatorTree.GetDominatedNodes(V_5);
             V_0.caseEntriesToDominatedNodesMap.Add(V_5, V_6);
             V_1.UnionWith(V_6);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     stackVariable34 = DFSTBuilder.BuildTree(switchCFGBlock.get_Parent(), switchCFGBlock).get_ReversePostOrder();
     stackVariable35 = SwitchBuilder.u003cu003ec.u003cu003e9__9_0;
     if (stackVariable35 == null)
     {
         dummyVar1       = stackVariable35;
         stackVariable35 = new Func <DFSTNode, ILogicalConstruct>(SwitchBuilder.u003cu003ec.u003cu003e9.u003cGetValidCasesu003eb__9_0);
         SwitchBuilder.u003cu003ec.u003cu003e9__9_0 = stackVariable35;
     }
     V_2 = new List <ILogicalConstruct>(stackVariable34.Select <DFSTNode, ILogicalConstruct>(stackVariable35).Where <ILogicalConstruct>(new Func <ILogicalConstruct, bool>(V_0.u003cGetValidCasesu003eb__1)));
     do
     {
         V_3 = false;
         V_7 = V_2.GetEnumerator();
         try
         {
             while (V_7.MoveNext())
             {
                 V_8 = V_7.get_Current();
                 if (!V_0.caseEntriesToDominatedNodesMap.TryGetValue(V_8, out V_9) || this.IsCaseValid(V_8, V_1))
                 {
                     continue;
                 }
                 V_1.ExceptWith(V_9);
                 dummyVar2 = V_0.caseEntriesToDominatedNodesMap.Remove(V_8);
                 V_3       = true;
             }
         }
         finally
         {
             ((IDisposable)V_7).Dispose();
         }
     }while (V_3);
     return(V_0.caseEntriesToDominatedNodesMap);
 }
Ejemplo n.º 2
0
 protected virtual void BuildUpHardNodesHierarchy(IEnumerable <ClassHierarchyNode> hardNodes)
 {
     V_0 = new Queue <ClassHierarchyNode>(hardNodes);
     V_1 = new HashSet <ClassHierarchyNode>();
     while (V_0.get_Count() > 0)
     {
         V_2       = V_0.Dequeue();
         dummyVar0 = V_1.Add(V_2);
         dummyVar1 = this.resultingGraph.Add(V_2);
         V_3       = V_2.get_NodeType().Resolve();
         V_4       = null;
         if (V_3 == null)
         {
             continue;
         }
         V_4 = V_3.get_BaseType();
         if (V_4 != null)
         {
             V_5 = this.GetTypeNode(V_4);
             V_2.AddSupertype(V_5);
             if (!V_1.Contains(V_5))
             {
                 V_0.Enqueue(V_5);
             }
         }
         if (V_3.get_IsInterface())
         {
             V_2.AddSupertype(this.GetTypeNode(this.typeSystem.get_Object()));
         }
         V_7 = V_2.get_NodeType().Resolve().get_Interfaces().GetEnumerator();
         try
         {
             while (V_7.MoveNext())
             {
                 V_8 = V_7.get_Current();
                 V_9 = this.GetTypeNode(V_8);
                 V_2.AddSupertype(V_9);
                 if (V_1.Contains(V_9))
                 {
                     continue;
                 }
                 V_0.Enqueue(V_9);
             }
         }
         finally
         {
             if (V_7 != null)
             {
                 V_7.Dispose();
             }
         }
     }
     this.AddObjectClassNodeIfMIssing();
     return;
 }
 private Dictionary <string, List <string> > GetModuleCollisionTypesData(ModuleDefinition module, ILanguage language)
 {
     V_0 = new Dictionary <string, List <string> >(language.get_IdentifierComparer());
     V_1 = new Dictionary <string, string>(language.get_IdentifierComparer());
     this.UpdateCollisionTypesDataWithTypes(V_0, V_1, module.get_Types());
     V_2 = this.GetModuleDependsOnAnalysis(module);
     if (Mono.Cecil.AssemblyResolver.Extensions.IsReferenceAssembly(module))
     {
         stackVariable16 = 1;
     }
     else
     {
         stackVariable16 = 0;
     }
     V_3 = stackVariable16;
     V_4 = V_2.get_Keys().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             V_6 = module.get_AssemblyResolver().Resolve(V_5, "", ModuleDefinitionExtensions.GetModuleArchitecture(module), V_3, true);
             if (V_6 == null)
             {
                 this.UpdateCollisionTypesDataWithTypes(V_0, V_1, V_2.get_Item(V_5));
             }
             else
             {
                 V_7 = V_6.get_Modules().GetEnumerator();
                 try
                 {
                     while (V_7.MoveNext())
                     {
                         V_8 = V_7.get_Current();
                         this.UpdateCollisionTypesDataWithTypes(V_0, V_1, V_8.get_Types());
                     }
                 }
                 finally
                 {
                     V_7.Dispose();
                 }
             }
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_0);
 }
 private WriterContext GetWriterContextForType(TypeDefinition type, ILanguage language)
 {
     V_0 = Utilities.GetOuterMostDeclaringType(type);
     if (!this.cacheService.AreNestedDecompiledTypesInCache(V_0, language, this.renameInvalidMembers))
     {
         V_1 = this.GetNestedDecompiledTypes(V_0, language);
         this.cacheService.AddNestedDecompiledTypesToCache(V_0, language, this.renameInvalidMembers, V_1);
     }
     else
     {
         V_1 = this.cacheService.GetNestedDecompiledTypesFromCache(V_0, language, this.renameInvalidMembers);
     }
     V_2 = this.GetTypeContext(V_0, language, V_1);
     this.AddTypeContextsToCache(V_1, V_0, language);
     V_3 = new Dictionary <string, MethodSpecificContext>();
     V_4 = new Dictionary <string, Statement>();
     if (!V_1.TryGetValue(type.get_FullName(), out V_5))
     {
         throw new Exception("Decompiled type missing from DecompiledTypes cache.");
     }
     if (V_2.get_GeneratedFilterMethods().get_Count() > 0)
     {
         this.AddGeneratedFilterMethodsToDecompiledType(V_5, V_2, language);
     }
     V_7 = V_5.get_DecompiledMembers().get_Values().GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             V_3.Add(V_8.get_MemberFullName(), V_8.get_Context());
             V_4.Add(V_8.get_MemberFullName(), V_8.get_Statement());
         }
     }
     finally
     {
         ((IDisposable)V_7).Dispose();
     }
     stackVariable63 = this.GetAssemblyContext(V_0.get_Module().get_Assembly(), language);
     V_6             = this.GetModuleContext(V_0.get_Module(), language);
     return(new WriterContext(stackVariable63, V_6, V_2, V_3, V_4));
 }
Ejemplo n.º 5
0
 private void EliminateViaDoWhile(IfStatement gotoStatement, Statement labeledStatement)
 {
     V_0 = new List <BreakStatement>();
     V_1 = new List <ContinueStatement>();
     V_2 = this.GetOuterBlock(labeledStatement);
     V_3 = V_2.get_Statements().IndexOf(labeledStatement);
     V_4 = V_2.get_Statements().IndexOf(gotoStatement);
     V_5 = this.CollectStatements(V_3, V_4, V_2);
     if (this.ShouldCheck(gotoStatement))
     {
         stackVariable127 = new ContinueAndBreakFinder();
         stackVariable127.Visit(V_5);
         V_0 = stackVariable127.get_Breaks();
         V_1 = stackVariable127.get_Continues();
     }
     V_7 = V_0.GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8                    = V_7.get_Current();
             stackVariable29        = this.GetOuterBlock(V_8);
             V_9                    = stackVariable29.get_Statements().IndexOf(V_8);
             this.usedBreakVariable = true;
             V_10                   = new ExpressionStatement(new BinaryExpression(26, new VariableReferenceExpression(this.breakVariable, null), this.GetLiteralExpression(true), this.typeSystem, null, false));
             stackVariable29.AddStatementAt(V_9, V_10);
         }
     }
     finally
     {
         if (V_7 != null)
         {
             V_7.Dispose();
         }
     }
     V_11 = V_1.GetEnumerator();
     try
     {
         while (V_11.MoveNext())
         {
             V_12                      = V_11.get_Current();
             stackVariable60           = this.GetOuterBlock(V_12);
             V_13                      = stackVariable60.get_Statements().IndexOf(V_12);
             this.usedContinueVariable = true;
             V_14                      = new ExpressionStatement(new BinaryExpression(26, new VariableReferenceExpression(this.continueVariable, null), this.GetLiteralExpression(true), this.typeSystem, null, false));
             stackVariable60.get_Statements().RemoveAt(V_13);
             stackVariable60.AddStatementAt(V_13, new BreakStatement(null));
             stackVariable60.AddStatementAt(V_13, V_14);
         }
     }
     finally
     {
         if (V_11 != null)
         {
             V_11.Dispose();
         }
     }
     V_6 = new DoWhileStatement(gotoStatement.get_Condition(), V_5);
     V_4 = V_2.get_Statements().IndexOf(gotoStatement);
     V_2.AddStatementAt(V_4, V_6);
     dummyVar0 = V_2.get_Statements().Remove(gotoStatement);
     if (V_0.get_Count() > 0)
     {
         this.AddBreakContinueConditional(V_4 + 1, V_2, new BreakStatement(null), this.breakVariable);
     }
     if (V_1.get_Count() > 0)
     {
         this.AddBreakContinueConditional(V_4 + 1, V_2, new ContinueStatement(null), this.continueVariable);
     }
     return;
 }
Ejemplo n.º 6
0
 internal static CFGBlockLogicalConstruct FindGuardedBlockCFGFollowNode(ExceptionHandlingLogicalConstruct construct, HashSet <CFGBlockLogicalConstruct> outOfconsideration)
 {
     V_0 = new Dictionary <CFGBlockLogicalConstruct, uint>();
     GuardedBlocksFollowNodesFinder.AddSuccessorsToCount(construct.get_Try(), V_0);
     V_1 = 1;
     if (construct as TryCatchFilterLogicalConstruct == null)
     {
         if (construct as TryFaultLogicalConstruct == null)
         {
             if (construct as TryFinallyLogicalConstruct != null)
             {
                 GuardedBlocksFollowNodesFinder.AddSuccessorsToCount((construct as TryFinallyLogicalConstruct).get_Finally(), V_0);
                 V_1 = V_1 + 1;
             }
         }
         else
         {
             GuardedBlocksFollowNodesFinder.AddSuccessorsToCount((construct as TryFaultLogicalConstruct).get_Fault(), V_0);
             V_1 = V_1 + 1;
         }
     }
     else
     {
         V_5 = (construct as TryCatchFilterLogicalConstruct).get_Handlers();
         V_6 = 0;
         while (V_6 < (int)V_5.Length)
         {
             GuardedBlocksFollowNodesFinder.AddSuccessorsToCount(V_5[V_6], V_0);
             V_1 = V_1 + 1;
             V_6 = V_6 + 1;
         }
     }
     V_7 = outOfconsideration.GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             if (!V_0.ContainsKey(V_8))
             {
                 continue;
             }
             dummyVar0 = V_0.Remove(V_8);
         }
     }
     finally
     {
         ((IDisposable)V_7).Dispose();
     }
     if (V_0.get_Count() == 0)
     {
         return(null);
     }
     V_2       = new HashSet <CFGBlockLogicalConstruct>();
     V_3       = V_0.get_Keys().FirstOrDefault <CFGBlockLogicalConstruct>();
     dummyVar1 = V_2.Add(V_3);
     V_4       = V_0.get_Item(V_3);
     V_9       = V_0.get_Keys().GetEnumerator();
     try
     {
         while (V_9.MoveNext())
         {
             V_10 = V_9.get_Current();
             if (V_0.get_Item(V_10) <= V_4)
             {
                 if (V_0.get_Item(V_10) != V_4)
                 {
                     continue;
                 }
                 dummyVar3 = V_2.Add(V_10);
             }
             else
             {
                 V_4 = V_0.get_Item(V_10);
                 V_2.Clear();
                 dummyVar2 = V_2.Add(V_10);
             }
         }
     }
     finally
     {
         ((IDisposable)V_9).Dispose();
     }
     if (V_2.get_Count() == 1)
     {
         return(V_2.FirstOrDefault <CFGBlockLogicalConstruct>());
     }
     V_11 = new HashSet <CFGBlockLogicalConstruct>();
     V_12 = 0;
     V_7  = V_2.GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_14 = V_7.get_Current();
             V_15 = 0;
             V_16 = construct.get_CFGBlocks();
             V_17 = V_14.get_CFGPredecessors().GetEnumerator();
             try
             {
                 while (V_17.MoveNext())
                 {
                     V_18 = V_17.get_Current();
                     if (!V_16.Contains(V_18))
                     {
                         continue;
                     }
                     V_15 = V_15 + 1;
                 }
             }
             finally
             {
                 ((IDisposable)V_17).Dispose();
             }
             if (V_15 < V_12)
             {
                 continue;
             }
             if (V_15 > V_12)
             {
                 V_12 = V_15;
                 V_11.Clear();
             }
             dummyVar4 = V_11.Add(V_14);
         }
     }
     finally
     {
         ((IDisposable)V_7).Dispose();
     }
     V_13 = V_11.FirstOrDefault <CFGBlockLogicalConstruct>();
     if (V_13.get_Index() < construct.get_Entry().get_Index())
     {
         V_19 = null;
         V_7  = V_11.GetEnumerator();
         try
         {
             while (V_7.MoveNext())
             {
                 V_20 = V_7.get_Current();
                 if (V_20.get_Index() <= construct.get_Entry().get_Index() || V_19 != null && V_19.get_Index() < V_20.get_Index())
                 {
                     continue;
                 }
                 V_19 = V_20;
             }
         }
         finally
         {
             ((IDisposable)V_7).Dispose();
         }
         if (V_19 != null)
         {
             V_13 = V_19;
         }
     }
     return(V_13);
 }
Ejemplo n.º 7
0
 internal ICollection <ClassHierarchyNode> BuildHierarchy(HashSet <VariableReference> resolvedVariables)
 {
     V_1 = this.methodContext.get_StackData().get_VariableToDefineUseInfo().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = V_2.get_Key();
             if (resolvedVariables.Contains(V_3) || !this.ShouldConsiderVariable(V_3))
             {
                 continue;
             }
             V_4       = this.GetVariableNode(V_3);
             dummyVar0 = this.resultingGraph.Add(V_4);
             V_5       = V_2.get_Value().get_DefinedAt().GetEnumerator();
             try
             {
                 while (V_5.MoveNext())
                 {
                     V_6 = V_5.get_Current();
                     this.OnPhiVariableAssigned(V_6, V_4);
                 }
             }
             finally
             {
                 ((IDisposable)V_5).Dispose();
             }
             V_7 = V_2.get_Value().get_UsedAt().GetEnumerator();
             try
             {
                 while (V_7.MoveNext())
                 {
                     V_8 = V_7.get_Current();
                     this.OnPhiVariableUsed(V_8, V_4);
                 }
             }
             finally
             {
                 ((IDisposable)V_7).Dispose();
             }
         }
     }
     finally
     {
         ((IDisposable)V_1).Dispose();
     }
     this.RemoveImpossibleEdges();
     V_0 = new HashSet <ClassHierarchyNode>();
     V_9 = this.resultingGraph.GetEnumerator();
     try
     {
         while (V_9.MoveNext())
         {
             V_10 = V_9.get_Current();
             if (!V_10.get_IsHardNode())
             {
                 continue;
             }
             dummyVar1 = V_0.Add(V_10);
         }
     }
     finally
     {
         ((IDisposable)V_9).Dispose();
     }
     this.BuildUpHardNodesHierarchy(V_0);
     return(this.resultingGraph);
 }
 private void ManageIsEventOperations(HashSet <Statement> statementsToRemove)
 {
     V_0 = this.isEventIfStatements.GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = V_1.get_Key();
             V_3 = V_1.get_Value();
             if (V_2.get_Condition().get_CodeNodeType() != 23 || (V_2.get_Condition() as UnaryExpression).get_Operator() != 11 || (V_2.get_Condition() as UnaryExpression).get_Operand() != V_3)
             {
                 if (V_2.get_Condition().get_CodeNodeType() != 23 || (V_2.get_Condition() as UnaryExpression).get_Operator() != UnaryOperator.Negate || (V_2.get_Condition() as UnaryExpression).get_Operand() != V_3)
                 {
                     throw new Exception("Invalid invocation of IsEvent operation.");
                 }
                 this.ReplaceIfWith(V_2, V_2.get_Else());
             }
             else
             {
                 V_4 = V_2.get_Then().get_Statements().get_Item(V_2.get_Then().get_Statements().get_Count() - 1);
                 if (V_4.get_CodeNodeType() == 5 && ((ExpressionStatement)V_4).get_Expression().get_CodeNodeType() == 57)
                 {
                     V_5 = (BlockStatement)V_2.get_Parent();
                     V_6 = V_5.get_Statements().IndexOf(V_2) + 1;
                     while (V_6 < V_5.get_Statements().get_Count())
                     {
                         dummyVar0 = statementsToRemove.Add(V_5.get_Statements().get_Item(V_6));
                         V_6       = V_6 + 1;
                     }
                 }
                 this.ReplaceIfWith(V_2, V_2.get_Then());
             }
             V_7 = V_2.get_Then().get_Statements().GetEnumerator();
             try
             {
                 while (V_7.MoveNext())
                 {
                     V_8       = V_7.get_Current();
                     dummyVar1 = statementsToRemove.Remove(V_8);
                 }
             }
             finally
             {
                 if (V_7 != null)
                 {
                     V_7.Dispose();
                 }
             }
             if (V_2.get_Else() == null)
             {
                 continue;
             }
             V_7 = V_2.get_Else().get_Statements().GetEnumerator();
             try
             {
                 while (V_7.MoveNext())
                 {
                     V_9       = V_7.get_Current();
                     dummyVar2 = statementsToRemove.Remove(V_9);
                 }
             }
             finally
             {
                 if (V_7 != null)
                 {
                     V_7.Dispose();
                 }
             }
         }
     }
     finally
     {
         ((IDisposable)V_0).Dispose();
     }
     return;
 }
		public static ICollection<TypeReference> GetAssemblyAttributesUsedTypes(AssemblyDefinition assembly)
		{
			V_0 = new List<TypeReference>();
			V_1 = new List<ICustomAttribute>();
			V_1.Add(AttributesUtilities.GetAssemblyVersionAttribute(assembly));
			V_3 = assembly.get_CustomAttributes().GetEnumerator();
			try
			{
				while (V_3.MoveNext())
				{
					V_4 = V_3.get_Current();
					V_4.Resolve();
					V_1.Add(V_4);
				}
			}
			finally
			{
				V_3.Dispose();
			}
			if (assembly.get_HasSecurityDeclarations())
			{
				V_5 = assembly.get_SecurityDeclarations().GetEnumerator();
				try
				{
					while (V_5.MoveNext())
					{
						V_6 = V_5.get_Current();
						if (!V_6.get_HasSecurityAttributes())
						{
							continue;
						}
						V_7 = V_6.get_SecurityAttributes().GetEnumerator();
						try
						{
							while (V_7.MoveNext())
							{
								V_8 = V_7.get_Current();
								V_1.Add(V_8);
							}
						}
						finally
						{
							V_7.Dispose();
						}
					}
				}
				finally
				{
					V_5.Dispose();
				}
			}
			if (assembly.get_MainModule().get_HasExportedTypes())
			{
				V_9 = assembly.get_MainModule().get_ExportedTypes().GetEnumerator();
				try
				{
					while (V_9.MoveNext())
					{
						V_10 = V_9.get_Current();
						if (V_10.get_Scope() as ModuleReference != null)
						{
							continue;
						}
						V_1.Add(AttributesUtilities.GetExportedTypeAttribute(V_10, assembly.get_MainModule()));
					}
				}
				finally
				{
					V_9.Dispose();
				}
			}
			V_11 = V_1.GetEnumerator();
			try
			{
				while (V_11.MoveNext())
				{
					V_12 = V_11.get_Current();
					if (V_12 as CustomAttribute == null)
					{
						if (V_12 as SecurityAttribute == null)
						{
							continue;
						}
						V_13 = AttributesUtilities.GetSecurityAttributeUsedTypes(V_12 as SecurityAttribute).GetEnumerator();
						try
						{
							while (V_13.MoveNext())
							{
								V_15 = V_13.get_Current();
								V_0.Add(V_15);
							}
						}
						finally
						{
							if (V_13 != null)
							{
								V_13.Dispose();
							}
						}
					}
					else
					{
						V_13 = AttributesUtilities.GetCustomAttributeUsedTypes(V_12 as CustomAttribute).GetEnumerator();
						try
						{
							while (V_13.MoveNext())
							{
								V_14 = V_13.get_Current();
								V_0.Add(V_14);
							}
						}
						finally
						{
							if (V_13 != null)
							{
								V_13.Dispose();
							}
						}
					}
				}
			}
			finally
			{
				((IDisposable)V_11).Dispose();
			}
			return V_0;
		}
Ejemplo n.º 10
0
 internal void RemoveBlockAt(int index)
 {
     V_0 = this.get_Blocks()[index];
     V_1 = V_0.get_Last().get_Next();
     if (V_0.get_Predecessors().get_Count() > 0)
     {
         throw new Exception("The block to be removed cannot have predecessors");
     }
     V_2 = this.get_Blocks();
     this.set_Blocks(new InstructionBlock[(int)this.get_Blocks().Length - 1]);
     V_3 = 0;
     while (V_3 < (int)this.get_Blocks().Length)
     {
         if (V_3 >= index)
         {
             stackVariable29 = 1;
         }
         else
         {
             stackVariable29 = 0;
         }
         V_4 = stackVariable29;
         this.get_Blocks()[V_3] = V_2[V_3 + V_4];
         this.get_Blocks()[V_3].set_Index(V_3);
         dummyVar0 = this.get_Blocks()[V_3].get_Predecessors().Remove(V_0);
         if ((object)this.get_Blocks()[V_3].get_First().get_Previous() == (object)V_0.get_Last())
         {
             this.get_Blocks()[V_3].get_First().set_Previous(V_0.get_First().get_Previous());
         }
         if ((object)this.get_Blocks()[V_3].get_Last().get_Next() == (object)V_0.get_First())
         {
             this.get_Blocks()[V_3].get_Last().set_Next(V_0.get_Last().get_Next());
         }
         V_3 = V_3 + 1;
     }
     dummyVar1 = this.get_InstructionToBlockMapping().Remove(V_0.get_First().get_Offset());
     dummyVar2 = this.get_SwitchBlocksInformation().Remove(V_0);
     V_0.set_Successors(new InstructionBlock[0]);
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6       = V_5.get_Current();
             dummyVar3 = this.get_OffsetToInstruction().Remove(V_6.get_Offset());
         }
     }
     finally
     {
         if (V_5 != null)
         {
             V_5.Dispose();
         }
     }
     V_7 = this.get_MethodBody().get_ExceptionHandlers().GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             if ((object)V_8.get_TryStart() == (object)V_0.get_First())
             {
                 V_8.set_TryStart(V_1);
             }
             if ((object)V_8.get_TryEnd() == (object)V_0.get_First())
             {
                 V_8.set_TryEnd(V_1);
             }
             if ((object)V_8.get_HandlerStart() == (object)V_0.get_First())
             {
                 V_8.set_HandlerStart(V_1);
             }
             if ((object)V_8.get_HandlerEnd() == (object)V_0.get_First())
             {
                 V_8.set_HandlerEnd(V_1);
             }
             if ((object)V_8.get_FilterStart() == (object)V_0.get_First())
             {
                 V_8.set_FilterStart(V_1);
             }
             if ((object)V_8.get_FilterEnd() != (object)V_0.get_First())
             {
                 continue;
             }
             V_8.set_FilterEnd(V_1);
         }
     }
     finally
     {
         V_7.Dispose();
     }
     V_0.set_Index(-1);
     return;
 }
 private void ProcessBlock(BlockStatement node)
 {
     V_0 = 0;
     while (V_0 < node.get_Statements().get_Count() - 1)
     {
         V_1 = null;
         V_2 = new List <VariableReference>();
         V_3 = node.get_Statements().get_Item(V_0);
         V_1 = this.GetFixedStatement(V_3, V_2);
         if (V_1 != null)
         {
             V_7 = V_2.GetEnumerator();
             try
             {
                 while (V_7.MoveNext())
                 {
                     V_8 = V_7.get_Current();
                     this.methodContext.RemoveVariable(V_8);
                 }
             }
             finally
             {
                 ((IDisposable)V_7).Dispose();
             }
             node.get_Statements().RemoveAt(V_0);
             node.AddStatementAt(V_0, V_1);
             V_4             = node.get_Statements().get_Item(V_0 + 1) as ExpressionStatement;
             V_5             = node.get_Statements().get_Count();
             V_6             = null;
             stackVariable47 = new RebuildFixedStatements.VariableReferenceVisitor();
             stackVariable47.Visit(V_1.get_Expression());
             V_6 = stackVariable47.get_Variable();
             V_9 = V_0 + 1;
             while (V_9 < V_5)
             {
                 stackVariable56 = new RebuildFixedStatements.VariableReferenceVisitor();
                 stackVariable56.Visit(node.get_Statements().get_Item(V_9));
                 V_10 = stackVariable56.get_Variable();
                 if (V_10 != null && !this.variables.Contains(V_10))
                 {
                     this.variables.Add(V_10);
                 }
                 if (node.get_Statements().get_Item(V_9).get_CodeNodeType() == 5)
                 {
                     V_4 = node.get_Statements().get_Item(V_9) as ExpressionStatement;
                     if (V_10 != null && (object)V_10 == (object)V_6 && V_4.get_Expression().get_CodeNodeType() == 24 && (V_4.get_Expression() as BinaryExpression).get_IsAssignmentExpression() && (V_4.get_Expression() as BinaryExpression).get_Right().get_CodeNodeType() == 22 && ((V_4.get_Expression() as BinaryExpression).get_Right() as LiteralExpression).get_Value() == null)
                     {
                         node.get_Statements().RemoveAt(V_9);
                         V_9 = V_9 - 1;
                         V_5 = V_5 - 1;
                         break;
                     }
                 }
                 V_1.get_Body().AddStatement(node.get_Statements().get_Item(V_9));
                 node.get_Statements().RemoveAt(V_9);
                 V_9 = V_9 - 1;
                 V_5 = V_5 - 1;
                 V_9 = V_9 + 1;
             }
             this.ProcessBlock(V_1.get_Body());
             return;
         }
         V_0 = V_0 + 1;
     }
     return;
 }
 private Dictionary <AssemblyNameReference, List <TypeReference> > GetModuleDependsOnAnalysis(ModuleDefinition module)
 {
     stackVariable1 = module.get_Types();
     V_0            = new HashSet <TypeReference>();
     V_3            = stackVariable1.GetEnumerator();
     try
     {
         while (V_3.MoveNext())
         {
             V_4 = V_3.get_Current();
             if (V_0.Contains(V_4))
             {
                 continue;
             }
             dummyVar0 = V_0.Add(V_4);
         }
     }
     finally
     {
         V_3.Dispose();
     }
     V_5 = module.GetTypeReferences().GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6 = V_5.get_Current();
             if (V_0.Contains(V_6))
             {
                 continue;
             }
             dummyVar1 = V_0.Add(V_6);
         }
     }
     finally
     {
         if (V_5 != null)
         {
             V_5.Dispose();
         }
     }
     V_2 = Utilities.GetAssembliesDependingOnToUsedTypesMap(module, Utilities.GetExpandedTypeDependanceList(V_0));
     V_7 = module.get_AssemblyReferences().GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             if (V_2.ContainsKey(V_8))
             {
                 continue;
             }
             V_2.Add(V_8, new List <TypeReference>());
         }
     }
     finally
     {
         V_7.Dispose();
     }
     return(V_2);
 }