Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS true
- #include <cstdio>
- #include <memory>
- void main(int argc, char *argv[]) {
- if (argc < 2)
- return;
- //Load ROP
- FILE *IFile = fopen(argv[1], "rb+");
- fseek(IFile, 0, SEEK_END);
- int bSize = ftell(IFile) > 0x4000 ? 0x4000 : ftell(IFile); //Limit 0x4000 bytes size
- fseek(IFile, 0, SEEK_SET);
- int *buffer = (int*)malloc(0x4000);
- fread(buffer, 1, bSize, IFile);
- fclose(IFile);
- //Encrypt ROP
- for (int state = 0xD5828281, i = 0; i < 0x4000 / 4; i++, state += 0xD5828281)
- buffer[i] -= state;
- //Save ROP
- IFile = fopen("Launcher.dat", "wb+");
- fseek(IFile, 0x00012000, SEEK_SET); //4.X Users
- fwrite(buffer, 1, 0x4000, IFile);
- fseek(IFile, 0x0001A000, SEEK_SET); //5.X+ Users
- fwrite(buffer, 1, 0x4000, IFile);
- fclose(IFile);
- free(buffer);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement