public ITypeDeobfuscator GetTypeDeobfuscator(ClrType type) { ITypeDeobfuscator result; if (m_typeLookup.TryGetValue(type, out result)) { return(result); } if (type.Module != null && type.Module.IsFile) { string moduleName = Path.GetFileName(type.Module.FileName); var key = new TypeKey(moduleName, type.Name); m_obfuscationMap.TryGetValue(key, out result); } if (result == null) { result = DummyTypeDeobfuscator.GetDeobfuscator(type.Name); } m_typeLookup.Add(type, result); return(result); }
public ITypeDeobfuscator GetTypeDeobfuscator(ClrType type) { if (type.Module != null && type.Module.IsFile) { TypeDeobfuscator result; string moduleName = Path.GetFileName(type.Module.FileName); var key = Tuple.Create(moduleName, GetDotFuscatorTypeName(type)); if (m_typeMap.TryGetValue(key, out result)) { return(result); } } return(DummyTypeDeobfuscator.GetDeobfuscator(type.Name)); }
public ITypeDeobfuscator GetTypeDeobfuscator(string typeName) { return((from item in m_typeMap where item.Key.Item2 == typeName select item.Value).FirstOrDefault() ?? DummyTypeDeobfuscator.GetDeobfuscator(typeName)); }