Git
09-10-2010, 08:53 AM
First, I've been round the block a bit but I am a complete newbie when it comes to .NET. I have deobfuscated an exe and got back to sensible names, but spices.net is showing several Exceptions in the decompiled code. I figured these could be bad opcodes so I had a play with "Bad NET OpCodes Finder v0.6beta"
IL_0054: 02 ldarg.0 // ARG: This ; <== IL_001D, IL_004D
IL_0055: 7B13000004 ldfld f00000e
IL_005A: 02 ldarg.0 // ARG: This
IL_005B: 7B10000004 ldfld f00000b
IL_0060: 6F29000006 callvirt Int32 c00000a::m000015(Class c000008)
IL_0065: 25 dup
IL_0066: 0B stloc.1
IL_0067: 2000FFFFFF ldc.i4 0xFFFFFF00
IL_006C: 5F and
IL_006D: 39C5FFFFFF brfalse IL_0037
IL_0072: 07 ldloc.1
IL_0073: 2001010000 ldc.i4 0x00000101
IL_0078: 3C20000000 bge IL_009D
IL_007D: 07 ldloc.1
IL_007E: 16 ldc.i4.0
IL_007F: 3C02000000 bge IL_0086
IL_0084: 16 ldc.i4.0
IL_0085: 2A ret
Bad opcodes finder reckons the C5 in 39C5FFFFFF at IL_006D should be 00 rather than C5. Does that seem reasonable and should I trust it in general. I replaced 3 bad opcodes that it found in another method and spices.net then figured it had many Exceptions.
Git
IL_0054: 02 ldarg.0 // ARG: This ; <== IL_001D, IL_004D
IL_0055: 7B13000004 ldfld f00000e
IL_005A: 02 ldarg.0 // ARG: This
IL_005B: 7B10000004 ldfld f00000b
IL_0060: 6F29000006 callvirt Int32 c00000a::m000015(Class c000008)
IL_0065: 25 dup
IL_0066: 0B stloc.1
IL_0067: 2000FFFFFF ldc.i4 0xFFFFFF00
IL_006C: 5F and
IL_006D: 39C5FFFFFF brfalse IL_0037
IL_0072: 07 ldloc.1
IL_0073: 2001010000 ldc.i4 0x00000101
IL_0078: 3C20000000 bge IL_009D
IL_007D: 07 ldloc.1
IL_007E: 16 ldc.i4.0
IL_007F: 3C02000000 bge IL_0086
IL_0084: 16 ldc.i4.0
IL_0085: 2A ret
Bad opcodes finder reckons the C5 in 39C5FFFFFF at IL_006D should be 00 rather than C5. Does that seem reasonable and should I trust it in general. I replaced 3 bad opcodes that it found in another method and spices.net then figured it had many Exceptions.
Git