Minor updates

This commit is contained in:
de4dot 2011-10-29 20:26:59 +02:00
parent 37a64f77f2
commit efe98949b1
2 changed files with 8 additions and 1 deletions

View File

@ -77,6 +77,7 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
this.fileData = fileData;
encryptedResource.init(simpleDeobfuscator);
Log.v("Adding boolean decrypter. Resource: {0}", Utils.toCsharpString(encryptedResource.EncryptedDataResource.Name));
decryptedData = encryptedResource.decrypt();
}

View File

@ -26,8 +26,12 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
class LocalTypes {
Dictionary<string, int> localTypes = new Dictionary<string, int>(StringComparer.Ordinal);
public IEnumerable<string> Types {
get { return localTypes.Keys; }
}
public LocalTypes(MethodDefinition method) {
if (method.Body != null)
if (method != null && method.Body != null)
init(method.Body.Variables);
}
@ -36,6 +40,8 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
}
void init(IEnumerable<VariableDefinition> locals) {
if (locals == null)
return;
foreach (var local in locals) {
var key = local.VariableType.FullName;
int count;