Don't remove fields if we should keep all types
This commit is contained in:
parent
3b740a4106
commit
d00fcb79e4
|
@ -266,7 +266,7 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void deobfuscateEnd() {
|
public override void deobfuscateEnd() {
|
||||||
if (options.RestoreFields)
|
if (options.RestoreFields && CanRemoveTypes)
|
||||||
fieldsRestorer.cleanUp();
|
fieldsRestorer.cleanUp();
|
||||||
removeInlinedMethods();
|
removeInlinedMethods();
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,10 @@ namespace de4dot.code.deobfuscators {
|
||||||
get { return false; }
|
get { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected bool CanRemoveTypes {
|
||||||
|
get { return !Operations.KeepObfuscatorTypes && !KeepTypes; }
|
||||||
|
}
|
||||||
|
|
||||||
protected bool CanRemoveStringDecrypterType {
|
protected bool CanRemoveStringDecrypterType {
|
||||||
get { return Operations.DecryptStrings != OpDecryptString.None && staticStringInliner.InlinedAllCalls; }
|
get { return Operations.DecryptStrings != OpDecryptString.None && staticStringInliner.InlinedAllCalls; }
|
||||||
}
|
}
|
||||||
|
@ -161,7 +165,7 @@ namespace de4dot.code.deobfuscators {
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void deobfuscateEnd() {
|
public virtual void deobfuscateEnd() {
|
||||||
if (!Operations.KeepObfuscatorTypes && !KeepTypes) {
|
if (CanRemoveTypes) {
|
||||||
removeTypesWithInvalidBaseTypes();
|
removeTypesWithInvalidBaseTypes();
|
||||||
|
|
||||||
deleteEmptyCctors();
|
deleteEmptyCctors();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user