summaryrefslogtreecommitdiff
path: root/internal_rewrite/Source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'internal_rewrite/Source.cpp')
-rw-r--r--internal_rewrite/Source.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal_rewrite/Source.cpp b/internal_rewrite/Source.cpp
index e2c13fb..6d60ce5 100644
--- a/internal_rewrite/Source.cpp
+++ b/internal_rewrite/Source.cpp
@@ -51,7 +51,12 @@ int __stdcall DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) {
//yayo
//SetUnhandledExceptionFilter( exception_handler );
+#ifdef HEADER_MODULE
memcpy( &g_header, inst, sizeof( g_header ) );
+ for( szie_t i = 1; i < sizeof( header_t ); ++i ) {
+ ( uint8_t* )( uintptr_t( &g_header ) + i ) ^= g_header.xor_key;
+ }
+#endif
DisableThreadLibraryCalls( inst );