Make sure enum instance field has proper flags set (make peverify happy)
This commit is contained in:
parent
fb832ca3de
commit
5288b4b3d2
|
@ -209,6 +209,19 @@ namespace de4dot.code.deobfuscators {
|
|||
}
|
||||
}
|
||||
|
||||
protected void fixEnumTypes() {
|
||||
foreach (var type in module.GetTypes()) {
|
||||
if (!type.IsEnum)
|
||||
continue;
|
||||
foreach (var field in type.Fields) {
|
||||
if (field.IsStatic)
|
||||
continue;
|
||||
field.IsRuntimeSpecialName = true;
|
||||
field.IsSpecialName = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual IEnumerable<string> getStringDecrypterMethods() {
|
||||
return new List<string>();
|
||||
}
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace de4dot.code.deobfuscators.Skater_NET {
|
|||
public override void deobfuscateEnd() {
|
||||
if (Operations.DecryptStrings != OpDecryptString.None && stringDecrypter.CanRemoveType)
|
||||
addTypeToBeRemoved(stringDecrypter.Type, "String decrypter type");
|
||||
fixEnumTypes();
|
||||
|
||||
base.deobfuscateEnd();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user