6

I have a problem with decompiling .net assembly. When I open the assembly in dotPeek there is class called frmMain with few hundred variables declared like this:

[SpecialName]
private static int \u0024STATIC\u0024SortByLengthAsc\u002402811241124\u0024xlen;

When i try to export it to project all those lines give errors (STATIC is not defined) even if I change all the \u0024 to $. Am I doing something wrong?

Jan Polak
  • 111
  • 3
  • 10

2 Answers2

3

No, the assembly has been obfuscated to prevent people (like you) to take a peek in the code and possibly 'steal' it. Those variable names are allowed in IL, but not in actual C# code, so that is why it fails.

The only remedy I know is a reverse-obfuscation tool that knows how the obfuscator obfuscates and tries to turn that around. Or you can do it by hand, which will take a lot of time usually, which proves obfuscation pays off.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
1

Quick tip for anyone got this question in Google: Try ILSpy (for example) instead of dotPeek.

Got this unicode stuff with dotPeek in a non obfuscated dll, but everything is fine with ILSpy

Gleb S
  • 152
  • 2
  • 13