Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Open
- C:\WarZ\src\EclipseStudio\
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- d3d11x.dll
- DirectX.dll
- //////////////////////////////////////////////////////////////////////////////////////////
- Open
- C:\WarZ\src\Eternity\Include
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- CCRC32.h
- //////////////////////////////////////////////////////////////////////////////////////////
- Open
- C:\WarZ\src\Eternity\Source
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- CCRC32.cpp
- //////////////////////////////////////////////////////////////////////////////////////////
- Open Warz.sln
- Open Warz > Eternity > 3D: Source > Botão direito do mouse > Adicionar > Item existente
- Add:
- C:\WarZ\src\Eternity\Source\CCRC32.cpp
- C:\WarZ\src\Eternity\Include\CCRC32.h
- //////////////////////////////////////////////////////////////////////////////////////////
- Open Warz > Eternity > 3D: Source > r3dRender.cpp
- //////////////////////////////////////////////////////////////////////////////////////////
- Add acima de:
- int r3dRenderLayer::SetMode(int XRes, int YRes, int BPP, int Flags, int RenderPath)
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- HINSTANCE LoadME;
- unsigned long* pInterface;
- DWORD XORKEY1 = 0xF95BC105;
- DWORD XORKEY2 = 0xC2FC0091;
- DWORD EndSceneAddress = 0x0;
- DWORD DrawIndexedPrimitiveAddress = 0x0;
- DWORD PresentAddress = 0x0;
- HANDLE hThreadCRC = NULL;
- HANDLE hThreadDBG = NULL;
- typedef unsigned int uint;
- typedef unsigned char BYTE;
- struct Process_Data
- {
- HANDLE hProc;
- uint StartofRegion;
- uint EndofRegion;
- uint Base;
- };
- #include <iostream>
- #include <fstream>
- using namespace std;
- char buf1;
- char buf2;
- byte buf3;
- byte buf4;
- DWORD genrand(){
- DWORD buffer;
- char lowbyte;
- __asm
- {
- rdtsc
- mov dword ptr buffer, eax
- mov byte ptr lowbyte, al
- };
- buffer*=(DWORD)GetTickCount()*(DWORD)lowbyte;
- buffer|=0xf0000000;
- return buffer;
- }
- int crc()
- {
- Process_Data pd;
- ofstream file;
- ofstream Offsets;
- ifstream read;
- uint offset=0;
- DWORD fileXOR = genrand();
- uint tempSize;
- MEMORY_BASIC_INFORMATION mbi;
- tempSize= (DWORD)GetModuleHandle(NULL) + 0x1000; //pe header
- pd.StartofRegion=(DWORD)GetModuleHandle(NULL);
- VirtualQuery((LPVOID)tempSize,&mbi,sizeof(mbi));
- pd.EndofRegion=tempSize+(uint)mbi.RegionSize;
- file.open("WZ_05.bin",ios::out|ios::binary);
- for(uint i=pd.StartofRegion; i<pd.EndofRegion; i++)
- {
- char buffer;
- buffer = *(BYTE*)(i);
- buffer ^= fileXOR;
- file.put(buffer);
- }
- file.close();
- while(true){
- read.open("WZ_05.bin",ios::in|ios::binary);
- Sleep(10000);
- for(uint i=pd.StartofRegion; i<pd.EndofRegion; i++,offset++)
- {
- IsDebuggerPresent();
- read.get(buf1);
- buf2 = *(BYTE*)(i);
- buf2 ^= fileXOR;
- if((buf1)!= buf2)
- {
- DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException");
- __asm{
- mov ESP, 0
- jmp dword ptr addressB
- };
- }
- }
- read.close();
- }
- return 0;
- }
- bool handler_called;
- ULONG excphandler()
- {
- handler_called=true;
- return EXCEPTION_CONTINUE_EXECUTION;
- }
- void DoDebugLoop()
- {
- while(true)
- {
- BOOL bExceptionHit = FALSE;
- __try {
- _asm
- {
- pushfd
- or dword ptr [esp], 0x100
- popfd
- // Set the Trap Flag
- // Load value into EFLAGS register
- nop
- }
- }
- __except(EXCEPTION_EXECUTE_HANDLER) {
- bExceptionHit = TRUE;
- // An exception has been raised –
- // there is no debugger.
- }
- if (bExceptionHit == FALSE)
- {
- DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException");
- __asm{
- mov ESP, 0
- jmp dword ptr addressB
- };
- }
- Sleep(1000);
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////
- Abaxio de:
- int r3dRenderLayer::SetMode(int XRes, int YRes, int BPP, int Flags, int RenderPath)
- {
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- hThreadCRC = CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)crc, NULL, NULL, NULL);
- hThreadDBG = CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)DoDebugLoop, NULL, NULL, NULL);
- //////////////////////////////////////////////////////////////////////////////////////////
- abaixo de:
- if(res != D3D_OK)
- {
- r3dOutToLog("Failed to create d3d device (error=%d), falling back to software vertex processing\n", res);
- res = pd3d->CreateDevice(D3DADAPTER_DEFAULT, DeviceType, HLibWin, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &dev);
- if(res != D3D_OK)
- {
- r3dOutToLog("Failed to init D3D Device with SW processing!\n");
- return FALSE;
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- pInterface = (unsigned long*)*((unsigned long*)dev);
- EndSceneAddress = pInterface[42];
- EndSceneAddress ^= XORKEY1;
- DrawIndexedPrimitiveAddress = pInterface[82];
- DrawIndexedPrimitiveAddress ^= XORKEY1;
- PresentAddress = pInterface[17];
- PresentAddress ^= XORKEY1;
- LoadME = LoadLibrary("d3d11x.dll");
- typedef void (*EntryPointfuncPtr)();
- EntryPointfuncPtr LibMainEntryPoint;
- LibMainEntryPoint = (EntryPointfuncPtr)GetProcAddress(LoadME,"start");
- LibMainEntryPoint();
- //////////////////////////////////////////////////////////////////////////////////////////
- Acima de:
- void r3dRenderLayer::EndFrame()
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- bool checkThreadB(HANDLE hProcessThreadTest){
- DWORD aRet = 0;
- if(GetExitCodeThread(hProcessThreadTest, &aRet) != 0){
- if(aRet == STILL_ACTIVE)
- return false;
- else
- return true;
- }else{
- return false;
- }
- }
- int counter = 0;
- //////////////////////////////////////////////////////////////////////////////////////////
- abaixo de:
- void r3dRenderLayer::EndFrame()
- {
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- counter++;
- if(counter >= 200){
- counter = 0;
- if(checkThreadB(hThreadCRC) || checkThreadB(hThreadDBG) || IsDebuggerPresent() ){
- DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException");
- __asm{
- mov ESP, 0
- jmp dword ptr addressB
- };
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////
- Open Warz > Eternity > 3D: Source > WinMain.cpp
- Procurar :
- #include "r3dDebug.h"
- //////////////////////////////////////////////////////////////////////////////////////////
- Add a baixo:
- #include "CCRC32.h"
- static unsigned antihackNotFound = 1;
- //////////////////////////////////////////////////////////////////////////////////////////
- Procurar :
- r3dWinStyleModify(hWnd, 0, WS_MINIMIZEBOX); // prevent minimize
- //////////////////////////////////////////////////////////////////////////////////////////
- Add a baixo:
- if (antihackNotFound) {
- MessageBox(GetActiveWindow(), "DLL NOT FOUND!", "Error GuardZ PRO", MB_OK);
- ExitProcess(0);
- }
- //////////////////////////////////////////////////////////////////////////////////////////
- Acima de:
- static void startupFunc(DWORD in)
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- HANDLE hThreadAC = NULL;
- #define DLL_CRC 0xD4882F2C // CRC - remember to change
- //////////////////////////////////////////////////////////////////////////////////////////
- Abaixo de:
- static void startupFunc(DWORD in)
- {
- // in = in;
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- CCRC32 crc;
- //////////////////////////////////////////////////////////////////////////////////////////
- Procurar:
- game::PreInit();
- //////////////////////////////////////////////////////////////////////////////////////////
- Add:
- if (LoadLibrary(TEXT("DirectX.dll")) != NULL) {
- unsigned long myCrc = 0;
- if (!crc.FileCRC("DirectX.dll", &myCrc))
- antihackNotFound = 1;
- else {
- if (myCrc == DLL_CRC) {
- antihackNotFound = 0;
- } else {
- antihackNotFound = 1;
- }
- }
- } else
- antihackNotFound = 1;
- //////////////////////////////////////////////////////////////////////////////////////////
- Download: https://mega.nz/#!qsFF1BBY!xMStRUKguw7X0T4VUE8akXMtGaEEszpLX99-7XCD9pU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement