Advertisement
Guest User

Untitled

a guest
May 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <windows.h>
  2. #include <imagehlp.h>
  3.  
  4. #pragma comment(lib, "ImageHlp.lib")
  5.  
  6. bool
  7. DisableASLR (LPSTR path)
  8. {
  9.     LOADED_IMAGE PE;
  10.     if (MapAndLoad(path, 0, &PE, false, false))
  11.     {
  12.         PE.FileHeader->OptionalHeader.DllCharacteristics = NULL;
  13.         UnMapAndLoad(&PE);
  14.         return true;
  15.     }
  16.     return false;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement