This is a migrated thread and some comments may be shown as answers.

Icorrect decompilation of obfuscated code

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott Shuppert
Top achievements
Rank 1
Scott Shuppert asked on 25 Apr 2012, 09:25 PM

This IL code:

.method public hidebysig virtual
    instance void GetObjectData (
        class [mscorlib]System.Runtime.Serialization.SerializationInfo info,
        valuetype [mscorlib]System.Runtime.Serialization.StreamingContext context
    ) cil managed
    .permissionset demand = {
        [mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {
            property bool SerializationFormatter = bool(true)
    IL_0000: ldarg.1
    IL_0001: brtrue.s IL_001d
    IL_0003: ldc.i4.1
    IL_0004: br.s IL_0009
    IL_0006: ldc.i4.0
    IL_0007: br.s IL_0009
    IL_0009: brfalse.s IL_000b
    IL_000b: br.s IL_000d
    IL_000d: ldstr "info"
    IL_0012: ldstr "Argument 'info' cannot be null."
    IL_0017: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string,  string)
    IL_001c: throw
    IL_001d: ldarg.1
    IL_001e: ldstr "type"
    IL_0023: ldarg.0
    IL_0024: ldfld class [mscorlib]System.Type Atalasoft.Imaging.AtalasoftLicenseException::b
    IL_0029: callvirt instance void [mscorlib]System.Runtime.Serialization.SerializationInfo::AddValue(string,  object)
    IL_002e: ldarg.0
    IL_002f: ldarg.1
    IL_0030: ldarg.2
    IL_0031: call instance void [mscorlib]System.Exception::GetObjectData(class [mscorlib]System.Runtime.Serialization.SerializationInfo,  valuetype [mscorlib]System.Runtime.Serialization.StreamingContext)
    IL_0036: ret

decompiled as:

[SecurityPermission(SecurityAction.Demand, SerializationFormatter=true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
    if (info != null)
        info.AddValue("type", this.b);
        base.GetObjectData(info, context);
        bool flag = true;
        throw new ArgumentNullException("info", "Argument 'info' cannot be null.");

Hint: strange !flag; line of code.

1 Answer, 1 is accepted

Sort by
Yordan Dikov
Telerik team
answered on 04 May 2012, 07:50 AM
Hi Scott,

 Please excuse me for the delayed response. At the moment we don't support decompilation of obfuscated code, so statements like this are not a rare case. However, we've logged the issue and we'll definitely try to fix it at some later stage. Stay tuned for updates and don't hesitate to contact us about anything else that bothers you in JustDecompile.

Yordan Dikov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

General Discussions
Asked by
Scott Shuppert
Top achievements
Rank 1
Answers by
Yordan Dikov
Telerik team
Share this question