Advertisement
Guest User

Dragomon Hunter Xigncode Bypass

a guest
Feb 2nd, 2016
5,477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.28 KB | None | 0 0
  1. #include <Windows.h>
  2.  
  3. DWORD dwXignInitFnc = 0x006F1DE0;
  4.  
  5. BOOL WriteBytes(DWORD dwAddress, LPBYTE lpBuffer, DWORD nBytes) {
  6.     if (nBytes == 0) {
  7.         OutputDebugString("WriteBytes:: Tried to write 0 bytes to memory.");
  8.         return FALSE;
  9.     }
  10.     DWORD dwOldProtect;
  11.     if (!VirtualProtect((LPVOID)dwAddress, nBytes, PAGE_EXECUTE_READWRITE, &dwOldProtect)) {
  12.         OutputDebugString("WriteBytes:: Failed to change access protection on memory address.");
  13.         return FALSE;
  14.     }
  15.     memcpy((LPVOID)dwAddress, lpBuffer, nBytes);
  16.     if (!VirtualProtect((LPVOID)dwAddress, nBytes, dwOldProtect, &dwOldProtect)) {
  17.         OutputDebugString("WriteBytes:: Failed to change access protection on memory address.");
  18.         return FALSE;
  19.     }
  20.  
  21.     return TRUE;
  22. }
  23.  
  24. BOOL StopXignInit() {
  25.     /*
  26.     Modify code to:
  27.     mov eax, 1
  28.     ret
  29.     nop
  30.     nop
  31.     nop
  32.     */
  33.     return WriteBytes(dwXignInitFnc, (PBYTE)"\xB8\x01\x00\x00\x00\xC3\x90\x90\x90", 9);
  34. }
  35.  
  36. BOOL APIENTRY DllMain(__in HINSTANCE hInstance, __in DWORD fdwReason, __in __reserved LPVOID lpReserved) {
  37.     UNREFERENCED_PARAMETER(lpReserved);
  38.     if (fdwReason == DLL_PROCESS_ATTACH) {
  39.         if (StopXignInit()) {
  40.             OutputDebugString("Successfully stopped XIGNCODE3 from initializing!");
  41.         }
  42.         else {
  43.             OutputDebugString("Failed to stop XIGNCODE3 from initializing!");
  44.         }
  45.     }
  46.     return TRUE;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement