SHOW:
|
|
- or go back to the newest paste.
1 | Open | |
2 | C:\WarZ\src\EclipseStudio\ | |
3 | ||
4 | ////////////////////////////////////////////////////////////////////////////////////////// | |
5 | ||
6 | Add: | |
7 | d3d11x.dll | |
8 | DirectX.dll | |
9 | ||
10 | ////////////////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | Open | |
13 | C:\WarZ\src\Eternity\Include | |
14 | ////////////////////////////////////////////////////////////////////////////////////////// | |
15 | Add: | |
16 | CCRC32.h | |
17 | ////////////////////////////////////////////////////////////////////////////////////////// | |
18 | Open | |
19 | C:\WarZ\src\Eternity\Source | |
20 | ////////////////////////////////////////////////////////////////////////////////////////// | |
21 | Add: | |
22 | CCRC32.cpp | |
23 | ////////////////////////////////////////////////////////////////////////////////////////// | |
24 | ||
25 | Open Warz.sln | |
26 | Open Warz > Eternity > 3D: Source > Botão direito do mouse > Adicionar > Item existente | |
27 | Add: | |
28 | C:\WarZ\src\Eternity\Source\CCRC32.cpp | |
29 | C:\WarZ\src\Eternity\Include\CCRC32.h | |
30 | ||
31 | ////////////////////////////////////////////////////////////////////////////////////////// | |
32 | ||
33 | Open Warz > Eternity > 3D: Source > r3dRender.cpp | |
34 | ||
35 | ////////////////////////////////////////////////////////////////////////////////////////// | |
36 | ||
37 | Add acima de: | |
38 | int r3dRenderLayer::SetMode(int XRes, int YRes, int BPP, int Flags, int RenderPath) | |
39 | ||
40 | ////////////////////////////////////////////////////////////////////////////////////////// | |
41 | ||
42 | Add: | |
43 | ||
44 | HINSTANCE LoadME; | |
45 | ||
46 | unsigned long* pInterface; | |
47 | DWORD XORKEY1 = 0xF95BC105; | |
48 | DWORD XORKEY2 = 0xC2FC0091; | |
49 | ||
50 | DWORD EndSceneAddress = 0x0; | |
51 | DWORD DrawIndexedPrimitiveAddress = 0x0; | |
52 | DWORD PresentAddress = 0x0; | |
53 | ||
54 | HANDLE hThreadCRC = NULL; | |
55 | HANDLE hThreadDBG = NULL; | |
56 | ||
57 | typedef unsigned int uint; | |
58 | typedef unsigned char BYTE; | |
59 | struct Process_Data | |
60 | { | |
61 | HANDLE hProc; | |
62 | uint StartofRegion; | |
63 | uint EndofRegion; | |
64 | uint Base; | |
65 | }; | |
66 | ||
67 | #include <iostream> | |
68 | #include <fstream> | |
69 | using namespace std; | |
70 | ||
71 | char buf1; | |
72 | char buf2; | |
73 | byte buf3; | |
74 | byte buf4; | |
75 | ||
76 | DWORD genrand(){ | |
77 | DWORD buffer; | |
78 | char lowbyte; | |
79 | ||
80 | __asm | |
81 | { | |
82 | rdtsc | |
83 | mov dword ptr buffer, eax | |
84 | mov byte ptr lowbyte, al | |
85 | }; | |
86 | ||
87 | buffer*=(DWORD)GetTickCount()*(DWORD)lowbyte; | |
88 | ||
89 | buffer|=0xf0000000; | |
90 | ||
91 | return buffer; | |
92 | } | |
93 | ||
94 | int crc() | |
95 | { | |
96 | Process_Data pd; | |
97 | ofstream file; | |
98 | ofstream Offsets; | |
99 | ifstream read; | |
100 | uint offset=0; | |
101 | ||
102 | DWORD fileXOR = genrand(); | |
103 | ||
104 | uint tempSize; | |
105 | MEMORY_BASIC_INFORMATION mbi; | |
106 | ||
107 | tempSize= (DWORD)GetModuleHandle(NULL) + 0x1000; //pe header | |
108 | ||
109 | pd.StartofRegion=(DWORD)GetModuleHandle(NULL); | |
110 | ||
111 | VirtualQuery((LPVOID)tempSize,&mbi,sizeof(mbi)); | |
112 | ||
113 | pd.EndofRegion=tempSize+(uint)mbi.RegionSize; | |
114 | ||
115 | file.open("WZ_05.bin",ios::out|ios::binary); | |
116 | ||
117 | for(uint i=pd.StartofRegion; i<pd.EndofRegion; i++) | |
118 | { | |
119 | char buffer; | |
120 | ||
121 | buffer = *(BYTE*)(i); | |
122 | buffer ^= fileXOR; | |
123 | file.put(buffer); | |
124 | } | |
125 | ||
126 | file.close(); | |
127 | ||
128 | while(true){ | |
129 | read.open("WZ_05.bin",ios::in|ios::binary); | |
130 | ||
131 | Sleep(10000); | |
132 | ||
133 | for(uint i=pd.StartofRegion; i<pd.EndofRegion; i++,offset++) | |
134 | { | |
135 | IsDebuggerPresent(); | |
136 | ||
137 | read.get(buf1); | |
138 | ||
139 | buf2 = *(BYTE*)(i); | |
140 | buf2 ^= fileXOR; | |
141 | ||
142 | if((buf1)!= buf2) | |
143 | { | |
144 | DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException"); | |
145 | __asm{ | |
146 | mov ESP, 0 | |
147 | jmp dword ptr addressB | |
148 | }; | |
149 | } | |
150 | } | |
151 | read.close(); | |
152 | } | |
153 | return 0; | |
154 | } | |
155 | ||
156 | bool handler_called; | |
157 | ||
158 | ULONG excphandler() | |
159 | { | |
160 | handler_called=true; | |
161 | ||
162 | return EXCEPTION_CONTINUE_EXECUTION; | |
163 | } | |
164 | ||
165 | void DoDebugLoop() | |
166 | { | |
167 | ||
168 | while(true) | |
169 | { | |
170 | BOOL bExceptionHit = FALSE; | |
171 | __try { | |
172 | _asm | |
173 | { | |
174 | pushfd | |
175 | or dword ptr [esp], 0x100 | |
176 | popfd | |
177 | // Set the Trap Flag | |
178 | // Load value into EFLAGS register | |
179 | nop | |
180 | } | |
181 | } | |
182 | __except(EXCEPTION_EXECUTE_HANDLER) { | |
183 | bExceptionHit = TRUE; | |
184 | ||
185 | // An exception has been raised – | |
186 | // there is no debugger. | |
187 | } | |
188 | ||
189 | if (bExceptionHit == FALSE) | |
190 | { | |
191 | DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException"); | |
192 | __asm{ | |
193 | mov ESP, 0 | |
194 | jmp dword ptr addressB | |
195 | }; | |
196 | } | |
197 | ||
198 | Sleep(1000); | |
199 | } | |
200 | } | |
201 | ||
202 | ////////////////////////////////////////////////////////////////////////////////////////// | |
203 | ||
204 | Abaxio de: | |
205 | ||
206 | int r3dRenderLayer::SetMode(int XRes, int YRes, int BPP, int Flags, int RenderPath) | |
207 | { | |
208 | ||
209 | ////////////////////////////////////////////////////////////////////////////////////////// | |
210 | ||
211 | Add: | |
212 | hThreadCRC = CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)crc, NULL, NULL, NULL); | |
213 | hThreadDBG = CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)DoDebugLoop, NULL, NULL, NULL); | |
214 | ||
215 | ////////////////////////////////////////////////////////////////////////////////////////// | |
216 | ||
217 | abaixo de: | |
218 | if(res != D3D_OK) | |
219 | { | |
220 | r3dOutToLog("Failed to create d3d device (error=%d), falling back to software vertex processing\n", res); | |
221 | res = pd3d->CreateDevice(D3DADAPTER_DEFAULT, DeviceType, HLibWin, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &dev); | |
222 | if(res != D3D_OK) | |
223 | { | |
224 | r3dOutToLog("Failed to init D3D Device with SW processing!\n"); | |
225 | return FALSE; | |
226 | } | |
227 | } | |
228 | ||
229 | ////////////////////////////////////////////////////////////////////////////////////////// | |
230 | ||
231 | Add: | |
232 | ||
233 | pInterface = (unsigned long*)*((unsigned long*)dev); | |
234 | ||
235 | EndSceneAddress = pInterface[42]; | |
236 | EndSceneAddress ^= XORKEY1; | |
237 | ||
238 | DrawIndexedPrimitiveAddress = pInterface[82]; | |
239 | DrawIndexedPrimitiveAddress ^= XORKEY1; | |
240 | ||
241 | ||
242 | PresentAddress = pInterface[17]; | |
243 | PresentAddress ^= XORKEY1; | |
244 | ||
245 | LoadME = LoadLibrary("d3d11x.dll"); | |
246 | ||
247 | typedef void (*EntryPointfuncPtr)(); | |
248 | EntryPointfuncPtr LibMainEntryPoint; | |
249 | ||
250 | LibMainEntryPoint = (EntryPointfuncPtr)GetProcAddress(LoadME,"start"); | |
251 | LibMainEntryPoint(); | |
252 | ||
253 | ////////////////////////////////////////////////////////////////////////////////////////// | |
254 | ||
255 | Acima de: | |
256 | void r3dRenderLayer::EndFrame() | |
257 | ||
258 | ////////////////////////////////////////////////////////////////////////////////////////// | |
259 | Add: | |
260 | bool checkThreadB(HANDLE hProcessThreadTest){ | |
261 | DWORD aRet = 0; | |
262 | if(GetExitCodeThread(hProcessThreadTest, &aRet) != 0){ | |
263 | if(aRet == STILL_ACTIVE) | |
264 | return false; | |
265 | else | |
266 | return true; | |
267 | }else{ | |
268 | return false; | |
269 | } | |
270 | } | |
271 | ||
272 | int counter = 0; | |
273 | ||
274 | ////////////////////////////////////////////////////////////////////////////////////////// | |
275 | abaixo de: | |
276 | ||
277 | void r3dRenderLayer::EndFrame() | |
278 | { | |
279 | ||
280 | ////////////////////////////////////////////////////////////////////////////////////////// | |
281 | ||
282 | Add: | |
283 | counter++; | |
284 | ||
285 | if(counter >= 200){ | |
286 | counter = 0; | |
287 | ||
288 | if(checkThreadB(hThreadCRC) || checkThreadB(hThreadDBG) || IsDebuggerPresent() ){ | |
289 | DWORD addressB = (DWORD)GetProcAddress(GetModuleHandle("ntdll"),"NtRaiseException"); | |
290 | __asm{ | |
291 | mov ESP, 0 | |
292 | jmp dword ptr addressB | |
293 | }; | |
294 | } | |
295 | } | |
296 | ||
297 | ////////////////////////////////////////////////////////////////////////////////////////// | |
298 | ||
299 | Open Warz > Eternity > 3D: Source > WinMain.cpp | |
300 | ||
301 | Procurar : | |
302 | #include "r3dDebug.h" | |
303 | ||
304 | ////////////////////////////////////////////////////////////////////////////////////////// | |
305 | Add a baixo: | |
306 | ||
307 | #include "CCRC32.h" | |
308 | static unsigned antihackNotFound = 1; | |
309 | ||
310 | ////////////////////////////////////////////////////////////////////////////////////////// | |
311 | ||
312 | Procurar : | |
313 | r3dWinStyleModify(hWnd, 0, WS_MINIMIZEBOX); // prevent minimize | |
314 | ||
315 | ////////////////////////////////////////////////////////////////////////////////////////// | |
316 | ||
317 | Add a baixo: | |
318 | if (antihackNotFound) { | |
319 | MessageBox(GetActiveWindow(), "DLL NOT FOUND!", "Error GuardZ PRO", MB_OK); | |
320 | ExitProcess(0); | |
321 | } | |
322 | ////////////////////////////////////////////////////////////////////////////////////////// | |
323 | ||
324 | Acima de: | |
325 | static void startupFunc(DWORD in) | |
326 | ||
327 | ////////////////////////////////////////////////////////////////////////////////////////// | |
328 | ||
329 | Add: | |
330 | HANDLE hThreadAC = NULL; | |
331 | #define DLL_CRC 0xD4882F2C // CRC - remember to change | |
332 | ||
333 | ////////////////////////////////////////////////////////////////////////////////////////// | |
334 | ||
335 | Abaixo de: | |
336 | static void startupFunc(DWORD in) | |
337 | { | |
338 | // in = in; | |
339 | ||
340 | ////////////////////////////////////////////////////////////////////////////////////////// | |
341 | Add: | |
342 | CCRC32 crc; | |
343 | ////////////////////////////////////////////////////////////////////////////////////////// | |
344 | ||
345 | Procurar: | |
346 | game::PreInit(); | |
347 | ||
348 | ////////////////////////////////////////////////////////////////////////////////////////// | |
349 | ||
350 | Add: | |
351 | if (LoadLibrary(TEXT("DirectX.dll")) != NULL) { | |
352 | unsigned long myCrc = 0; | |
353 | if (!crc.FileCRC("DirectX.dll", &myCrc)) | |
354 | antihackNotFound = 1; | |
355 | else { | |
356 | if (myCrc == DLL_CRC) { | |
357 | antihackNotFound = 0; | |
358 | } else { | |
359 | antihackNotFound = 1; | |
360 | } | |
361 | } | |
362 | ||
363 | } else | |
364 | antihackNotFound = 1; | |
365 | ||
366 | ////////////////////////////////////////////////////////////////////////////////////////// | |
367 | ||
368 | Download: https://mega.nz/#!qsFF1BBY!xMStRUKguw7X0T4VUE8akXMtGaEEszpLX99-7XCD9pU |