Results 1 to 4 of 4
  1. #1
    Demiderus's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    1

    Lightbulb How to use cheat engine as a dll library [delphi,c++,c,c# language available]

    Hi guys !

    I would like to present you a project I'm working on. It is a library based on cheat engine a powerfull memory editing software.
    I made this library to give programmers the possibility to make their own cheat engine with only a few lines of code.

    This is really simple, my dll embed the cheat engine core and exports some functions. No more cheat engine software, no more manual updating a trainer ! No more headaches while making a trainer !
    Moreover, you can use your favorite programming language and calls theses functions !

    What you can do for now :
    - inject any asm scripts with theses symbols (ALLOC DEALLOC LABEL DEFINE REGISTERSYMBOL UNREGISTERSYMBOL INCLUDE READMEM LOADLIBRARY).
    - manipulate a virtual cheat table to activate and desactivate any script
    - the memory scanner will come soon !

    And I'm glad to tell you that this project is open source, and available on ****** at this address : ******.com/fenix01/cheatengine-library

    You may found on ******, (samples for delphi, c++, lazarus,a compiled library for 64 bits OS, and the full source code)

    Here it's a c++ example. It takes only 60 lines of code to inject a script.

    Code:
    #include <Windows.h>
    #include <string>
    #include <iostream>
    #include "..\..\wrapper\c++\Connector.hpp"
    
    using namespace std;
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	//load the cheat engine library
    	HINSTANCE libInst;
    
    	//don't forget to put the dll in the same directory
    #ifdef _WIN64
    	libInst = LoadLibraryW(L"ce-lib64.dll");
    #else
    	libInst = LoadLibrary("ce-lib32.dll");
    #endif
    
    	loadFunctions(libInst);
    
    	//get all running processes and print the list
    	BSTR proc;
    	iGetProcessList(proc);
    	wcout << proc;
    
    	BSTR pid = ::SysAllocString(L"00000000");
    	cout << "put the pid of the process\r\n";
    	wcin >> pid; //don't forget to put the eight digit like 00000000
    	wcout << pid << "\r\n";
    	iOpenProcess(pid);//open running process by pid
    
    	//add a script to the virtual table
    	BSTR name = ::SysAllocString(L"example");//name of the script
    
    	//Don't try to run this script or you will get an exception.
    	//this script is just an example. 
    	//It's a hook script for the MessageBox api.
    	BSTR script = ::SysAllocString(
    		L"[enable]\r\n"
    		L"alloc(hook, 1024)\r\n"
    		L"hook:\r\n"
    		L"db 49 4C EB 76\r\n"
    		L"db 68 00 6F 00 6F 00 6B 00 20 00 21 00 00 00\r\n"
    		L"pop eax\r\n"
    		L"add esp, 10\r\n"
    		L"push 30\r\n"
    		L"push hook+4\r\n"
    		L"push hook+4\r\n"
    		L"push 0\r\n"
    		L"push eax\r\n"
    		L"jmp [hook]\r\n"
    		L"0042434C:\r\n"
    		L"dd hook+12\r\n"
    		L"[disable]\r\n"
    		L"0042434C :\r\n"
    		L"db 49 4C EB 76\r\n"
    		L"dealloc(hook)");//the auto assemble script
    	//add the script
    	iAddScript(name, script);
    	//remove the script with index 0 in the virtual table
    	iRemoveScript(0);
    	//add a script
    	iAddScript(name, script);
    	//activate the script
    	iActivateScript(0, true);
    
    	system("PAUSE");
    	FreeLibrary(libInst);
    	return 0;
    }


    In a next stage, I would like to include the lua script engine, the pointer scanner, and the kernelmode driver.
    Attached Thumbnails Attached Thumbnails
    sans_titre_193.png  

    Last edited by Demiderus; 06-08-2014 at 12:04 AM.

  2. The Following User Says Thank You to Demiderus For This Useful Post:


  3. #2
    Diiedha's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Breezy
    How i can add my progam like blabla.exe
    not PID. cz PID can Change Everytime

  4. #3
    Demiderus's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    1
    Hi Diiedha,

    Your program is probably protected because windows assigns a unique ID to each process. It may be possible that your program embed a kernel driver to change the pid. One way would be to hook the call which loads the driver and your pid will remain the same all the time. Another way could be to hook the openprocess api, then suspend the process and call my iOpenProcess(pid) function with the correct ID.

  5. #4
    Demiderus's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    1
    I'm glad to announce you the release of the cheat engine library v1.2
    This new version includes a full support of the memory scanner.
    So now you will be able to search for these types (string, double, float, integer, ...).
    All options are supported (fast scan, start address, stop address, unicode, casesensitive, writable, executable, copyOnWrite).

    I made a memory scanner example in c# and delphi. Here it's a screenshot.



    The library is available on ****** : type cheatengine-library
    Attached Thumbnails Attached Thumbnails
    scanner_c#.png  

    Last edited by Demiderus; 07-28-2014 at 03:12 AM.

Similar Threads

  1. How tu use cheat engine 6.1 to PB IT?
    By IndioBanned in forum Point Blank Hacks
    Replies: 2
    Last Post: 09-19-2011, 01:36 AM
  2. [Tutorial] How to use Cheat Engine with crossfire (X-Trap Bypass)
    By sk83rdood in forum CrossFire Tutorials
    Replies: 11
    Last Post: 06-18-2011, 02:28 PM
  3. How to use Cheat Engine?
    By tryceo in forum Call of Duty Modern Warfare 2 Help
    Replies: 2
    Last Post: 01-18-2010, 09:51 PM
  4. How To Use Cheat Engine 5.5 With Pinball
    By comon trade in forum General Game Hacking
    Replies: 2
    Last Post: 12-20-2009, 08:37 PM
  5. Video how to use cheat engine on DF
    By iowni1 in forum BattleOn Games Hacks, Cheats & Trainers
    Replies: 0
    Last Post: 12-23-2008, 03:22 AM