What are these symbols in decompiled code

I decompiled the executable and could not understand what kind of characters these were in the source code (C #). I would introduce the original examples here, but as I tried to insert, special characters in the decompiled source cannot be printed here in this editor. So I take a few shots and pasting the links here so that everyone can see, so examples:

Image 1

Image 2

Image 3

I assume this source code is messed up correctly? And that these characters are fine to exist in MSIL, but when they are translated as in C #, they do for illegal characters. It is right? Any suggestions on how I can get past this, as well as a replacement for all this?

+4
source share
3 answers

MSIL has very weak rules for what is allowed as an identifier name. Obfuscators deliberately choose characters that C # cannot represent, so you cannot make a circuit to C #.

You can decompile IL, but you can compile the project.

Also see Unicode identifiers for C # . You may have Unicode exit code inside C # identifiers, which is unexpected for many. Example:

class @class { public static void @static(bool @bool) { if (@bool) System.Console.WriteLine("true"); else System.Console.WriteLine("false"); } } class Class1 { static void M() { cl\u0061ss.st\u0061tic(true); } } 
+9
source

You can look at the file with the hex editor, find out the "rules" of these values, and then you could write yourself a program that converts them into ascii-representations with some prefix - that is, obs_627 or no difference.

Of course, you can only change names that will be referenced only from the database that you are changing. Any external connection with these special names or the internal use of any reflection equivalent will be violated. If there is reason to expect that any of them will take place, then this will be wasted.

+1
source

This is from the old MS-DOS ANSI character set.

The first example you posted contains ASCII line drawing characters. IIRC, they started to about 172 decimal places (0xAC hex) or so.

The second and third contain ASCII characters between 1 and 31 decimal places (0x01-0x1F in hexadecimal notation).

You cannot copy and paste them because the displayed characters do not exist in most modern fonts.

+1
source

Source: https://habr.com/ru/post/1411016/


All Articles