Cheat Engine - Coding

Coding

Two branches of Cheat Engine exist, Cheat Engine Delphi and Cheat Engine Lazarus. Cheat Engine Delphi is primarily for 32-bit versions of Windows XP. Cheat Engine Lazarus is designed for 32 and 64 bit versions of Windows Vista. Cheat Engine is, with the exception of the Kernel Module, coded in Object Pascal.

Cheat Engine exposes an interface to its device driver with dbk32.dll, a wrapper that handles both loading and initializing the Cheat Engine driver and calling alternative Windows kernel functions. Due to a programming bug in Lazarus pertaining to the use of try and except blocks, Cheat Engine Lazarus had to remove the use of dbk32.dll and incorporate the driver functions in the main executable.

The Kernel module, while not essential to normal CE use can be used to set hardware breakpoints and bypass hooked API in Ring 3, even some in Ring 0. It is compiled with the Windows Driver development kit and is written in C.

Cheat Engine also has a plugin architecture for those who do not wish to share their source code with the community. They are more commonly used for game specific features, as Cheat Engine's stated intent is to be a generic cheating tool These plugins can be found in several locations on the cheat engine website, and also other gaming sites.

Cheat Engine Lazarus has the ability to load its unsigned 64-bit device driver on Windows Vista x64 edition, by using DBVM, a virtual machine by the same developers that allows access to kernel space from user mode. It is used to allocate nonpaged memory in kernel mode, manually loading the executable image, and creating a system thread at DriverEntry. However, since the DriverEntry parameters are not actually valid, the driver must be modified for DBVM.

Read more about this topic:  Cheat Engine