Support AN 6.0.0.5

This commit is contained in:
de4dot 2012-05-15 19:05:44 +02:00
parent d1c09c3fae
commit c3cdf95fcf

View File

@ -237,8 +237,9 @@ namespace de4dot.code.deobfuscators.CliSecure.vm {
if (csvmMethod.Locals.Length == 0)
return locals;
// v6.0.0.5 sometimes duplicates the last two locals so only check for a negative value.
int numLocals = reader.ReadInt32();
if (numLocals < 0 || numLocals != cilMethod.Body.Variables.Count)
if (numLocals < 0)
throw new ApplicationException("Invalid number of locals");
for (int i = 0; i < numLocals; i++)