Skip to content

Commit

Permalink
Update string decrypter for Smart Assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
mobile46 committed Apr 27, 2022
1 parent 55d566e commit c83cd63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ You should have received a copy of the GNU General Public License

using System;
using System.Collections.Generic;
using System.Linq;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using de4dot.blocks;
Expand Down Expand Up @@ -301,7 +300,7 @@ bool FindDecrypterMethod() {
return true;

var methods = new List<MethodDef>(DotNetUtils.FindMethods(stringsEncodingClass.Methods, "System.String", new string[] { "System.Int32" }));
if (methods.Count != 1)
if (methods.Count == 0)
return false;

stringDecrypterMethod = methods[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ bool CouldBeStringDecrypterClass(ref TypeDef type) {
return false;

var methods = new List<MethodDef>(DotNetUtils.GetNormalMethods(type));
if (methods.Count != 1)
if (methods.Count == 0)
return false;
var method = methods[0];
if (!DotNetUtils.IsMethod(method, "System.String", "(System.Int32)"))
Expand Down

0 comments on commit c83cd63

Please sign in to comment.