You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if an additional "simple" dead code elimination step could be enabled. Certain obfuscators tend to like inserting blocks of code which will break compilation as-is, like
if (!true)
{
RuntimeMethodHandle arg_43_0 = methodof(CP.V(int)).MethodHandle;
}
Obviously, !true will never be true, but the presence of the code is enough to throw off Microsoft's C# compiler, since methodof doesn't exist.
Slightly harder, but still doable, is something like
while (true)
{
switch (2)
{
case 0:
continue;
}
break;
}
As the switch will never hit a case (no default, only case is not the same as the constant), it can be completely removed, only leaving a while (true) { break; }, which could also be removed.
The text was updated successfully, but these errors were encountered:
I don't think it's a good idea for us to start an arms race with obfuscators. But I'm open to the possibility of allowing plugins to add passes to the decompiler pipeline.
It would be great if an additional "simple" dead code elimination step could be enabled. Certain obfuscators tend to like inserting blocks of code which will break compilation as-is, like
Obviously,
!true
will never betrue
, but the presence of the code is enough to throw off Microsoft's C# compiler, sincemethodof
doesn't exist.Slightly harder, but still doable, is something like
As the switch will never hit a case (no default, only case is not the same as the constant), it can be completely removed, only leaving a
while (true) { break; }
, which could also be removed.The text was updated successfully, but these errors were encountered: