In Mono mode, game C# code is compiled into IL (Intermediate Language) and packaged into DLL files, which are then embedded within the game files.
However, since IL is highly susceptible to analysis and reverse engineering by decompilation software, its security is extremely poor without protection, making hack and analysis remarkably easy. How to effectively encrypt it has become a major industry challenge.

Script compilation and execution in Mono mode
This article will demonstrate through case studies the characteristics of the decompilation tool dnSpy, analyse how games should counter reverse engineering and hack issues, and propose effective solutions.
dnSpy is a free, open-source, cross-platform .NET debugging tool and decompiler that enables code debugging and modification without source code. Leveraging support for multiple languages including IL and C#, dnSpy can decompile .NET programme binary files back into source code.

dnspy function parsing results
To prevent reverse engineering, some games employ DLL function encryption. This approach has the advantage that decryption occurs only when a method is invoked. Since games typically do not utilise all methods during execution, a complete DLL never resides in memory.

function encryption causes dnSpy parsing errors
However, DLL hardening solution still has drawbacks. Using disassembly tools, function names and some functions can be viewed, making them susceptible to analysis and exploitation by hackers, posing certain security risks.
To safeguard game code, the paramount objective is to eliminate clues for hackers. To this end, JikGuard has developed the "DLL Structure Virtualisation" features:
The file structure of DLLs can be customised and restructured, with the structural data subjected to high-strength encryption. Once processed, no tools can extract any data whatsoever; even for professional hack reverse-engineering analysts, decrypting the internal structural data presents an immense challenge.

Virtualised DLL structure cannot be properly parsed by 010 Editor
Additionally, the JikGuard game hardening solution offers encryption features for files such as global-metadata.dat and libil2cpp.so, alongside a cross-platform Unity Assetbundle resource encryption solution.
To ensure comprehensive game protection, our solution incorporates multiple features including anti-cheat, anti-hack, anti speed hack, and anti-debugging, effectively addressing various security challenges faced by games.