From 0a30442eb6f89401eb5eabf71a1fb87fd478280b Mon Sep 17 00:00:00 2001 From: YagUber Date: Sun, 27 Sep 2026 18:39:29 -0500 Subject: [PATCH] feat(reactor): Keep scanning potential key allocations --- de4dot.code/deobfuscators/ArrayFinder.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/de4dot.code/deobfuscators/ArrayFinder.cs b/de4dot.code/deobfuscators/ArrayFinder.cs index b432978d..efa12c10 100644 --- a/de4dot.code/deobfuscators/ArrayFinder.cs +++ b/de4dot.code/deobfuscators/ArrayFinder.cs @@ -68,10 +68,14 @@ public static byte[] GetArray(IList 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) {