Quote:
Originally Posted by Mikail2244
My Question
What is the best way to make an Last Chaos Hack?
Visual Basic or C++, i think C++ is but dont know sure.
|
If you want a simple trainer, use Visual Basic.
If you want an universal solution, which also works on latest official server, than u need to learn c / c++ / c++&cli or any other native language and make an injected dll.
Quote:
Originally Posted by Mikail2244
CheatEngine or Ollydbg?
Coding with addresses and offsets is with cheat engine, but on Ollydbg u only need the address, so wich one should be better to create an hack.
|
Use CheatEngine for offsets, ollydbg is usefull, but not really needed for making a trainer, but you may need it to debug your dll.
here a simple source (C++/CLI), i can't post interface.h, to much lines, you may get some errors, use google to fix them or find a C++/CLI tutorial.
main.cpp:
Code:
#include "main.h"
#include <process.h>
#include <Psapi.h> // you need to load Psapi.lib in the project settings
extern int UIMain(); // import UIMain from interface.cpp
extern int pEncrypt, pDecrypt; // import int addresses from hacks.h, hacks.h is a generic header, it contains no code, only values/offsets/names...
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask)
return 0;
return (*szMask) == NULL;
}
DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
for(DWORD i=0; i<dwLen; i++)
if (bCompare((BYTE*)(dwAddress+i),bMask,szMask))
return (DWORD)(dwAddress+i);
return 0;
}
void GetOffsets()
{
MODULEINFO mbi;
do { Sleep( 10 ); }while( !GetModuleInformation( GetCurrentProcess(), GetModuleHandle( "Engine.dll" ), &mbi, sizeof( mbi ) ));
hModuleAddress = (DWORD)mbi.lpBaseOfDll;
hModuleSize = mbi.SizeOfImage;
//just an example how it works:
pDecrypt = FindPattern(hModuleAddress, hModuleSize, (PBYTE)"\x8B\x44\x24\x08\x81\xEC\x18\x01\x00\x00\x8B\xC8\x8B\xD0\x53\x55","xxxxxxxxxxxxxxxx");
pEncrypt = FindPattern(hModuleAddress, hModuleSize, (PBYTE)"\x8B\x44\x24\x08\x8B\x4C\x24\x04\x83\xEC\x24\x53\x55\x8B\x6C\x24","xxxxxxxxxxxxxxxx");
}
unsigned __stdcall Game(LPVOID lpParam)
{
GetOffsets(); // <-- get offsets from pattern search
UIMain(); // <-- start CLI (.NET) UI
_endthread();
return S_OK;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
switch(dwReason)
{
case DLL_PROCESS_ATTACH: // we only need attach
if( IsStarted == FALSE) // we start only 1 thread
{
IsStarted = TRUE;
_beginthread(&Game, 0x1000, hModule); // note: xtrap detects this, use another methode to do it...
}
break;
}
return TRUE;
}
main.h:
Code:
#ifndef MAIN_H
#define MAIN_H
#include <windows.h>
bool IsStarted = FALSE;
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask);
unsigned __stdcall Game(LPVOID lpParam);
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved);
#endif
hacks.h:
Code:
#ifndef HACKS_H
#define HACKS_H
#pragma region Variables
int hModuleAddress, hModuleSize;
int pEncrypt, pDecrypt;
#pragma endregion
#endif
interface.cpp:
Code:
#include "Interface.h" //<-- this is the form, add it and do your stuff there
using namespace OffsetScanner; //<-- this is the name of your .NET Form
int UIMain()
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew Interface());
return 1;
}