Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- char key[11] = { 'f', 'u', 'c', 'k', 'b', 'i', 't', 'c', 'h', 'e', 's' };
- #define START_ENCRYPTION(num) \
- static DWORD pointer##num; \
- static DWORD endpointer##num; \
- static bool encrypted##num; \
- if(encrypted##num) XOR(pointer##num, endpointer##num, key); \
- else \
- { \
- pointer##num = GetCurAddr(); \
- }
- #define END_ENCRYPTION(num) \
- if(!encrypted##num) \
- { \
- endpointer##num = GetCurAddr(); \
- } \
- encrypted##num = true; \
- XOR(pointer##num, endpointer##num, key);
- void XOR(DWORD start, DWORD end, char theKey[11])
- {
- for(int i = start; start <= end; i++)
- {
- *(byte*)i ^= theKey[i - start];
- }
- }
- DWORD GetCurAddr()
- {
- DWORD result;
- __asm
- {
- PUSH EAX
- Dicks:
- MOV EAX, Dicks
- MOV result, EAX
- POP EAX
- }
- return result;
- }
Add Comment
Please, Sign In to add comment