Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions de4dot.code/deobfuscators/ArrayFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ public static byte[] GetArray(IList<Instruction> instrs, ref int index, out ITyp
}

public static byte[] GetInitializedByteArray(MethodDef method, int arraySize) {
int newarrIndex = FindNewarr(method, arraySize);
if (newarrIndex < 0)
return null;
return GetInitializedByteArray(arraySize, method, ref newarrIndex);
for (int newarrIndex = 0; FindNewarr(method, ref newarrIndex, out int size); newarrIndex++) {
if (size != arraySize)
continue;
var initializedArray = GetInitializedByteArray(arraySize, method, ref newarrIndex);
if (initializedArray != null)
return initializedArray;
}
return null;
}

public static byte[] GetInitializedByteArray(int arraySize, MethodDef method, ref int newarrIndex) {
Expand Down
Loading