boolTamperDllCharacteristics(DWORD_PTRmoduleBase){// retrieve the module's NT headerconstautodos=reinterpret_cast<PIMAGE_DOS_HEADER>(moduleBase);constautont=reinterpret_cast<PIMAGE_NT_HEADERS>(moduleBase+dos->e_lfanew);// Access the DllCharacteristics and toggle the ASLR & Authenticode if setreturnnt->OptionalHeader.DllCharacteristics&(IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY|IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE)?(nt->OptionalHeader.DllCharacteristics&=~(IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY|IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE),true):false;}