Determine if the flipped code is Obfuscated or n I am not

I have access to an old control system for my client and he wants to add more to it. I was able to reach out to the guy who originally wrote the core DLLs and then took control and started building around them. But now I need to expand on the original as well, and I have no choice but to redesign.

I tried Reflector Pro and JustDecompile, but the source I got was full of errors. ILSpy works well, but still, here's the sample code I get from ILSpy:

    private static object ParseIntoValue(string stringValue, string targetType)
    {
        if (targetType != null)
        {
            if (<PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1 == null)
            {
                <PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1 = new Dictionary<string, int>(12)
                {
                    ...
                };
            }
            int num;
            if (<PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1.TryGetValue(targetType, out num))
            {
                object result;
                switch (num)
                {

                cases are here...

                default:
                    goto IL_2A6;
                }
                return result;
            }
        }
        IL_2A6:
        return null;
    }

      

It is pretty clear that some form of obfuscation is being applied here. The reverse code from JustDecompile and Reflector Pro was completely useless. With ILSpy, I can compile multiple projects without any modification.

I need help to identify this obfuscation (if so). The original developer says it didn't get confused. I'm not sure.

Thank.

+3


source to share


1 answer


PrivateImplementationDetails in decompiled code can be an auto-implemented property.

If you replace with a <PrivateImplementationDetails>{C6507306-5ECF-4D05-8EE4-BD4D7781AC4E}.$$method0x600080f-1

property, the code seems to make sense.



Dictionary<string, int> MyProp { get; set;}

private static object ParseIntoValue(string stringValue, string targetType)
{
    if (targetType != null)
    {
        if (MyProp == null)
        {
           MyProp = new Dictionary<string, int>(12)
            {
                ...
            };
        }
        int num;
        if (MyProp.TryGetValue(targetType, out num))
        {
          ....

      

+6


source







All Articles