erni_hax

GateWay 3.0 Decryptor

Jan 17th, 2015
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS true
  2.  
  3. #include <cstdio>
  4. #include <memory>
  5.  
  6. void main() {
  7.     FILE *IFile = fopen("Launcher.dat", "rb+");
  8.     int *buffer = (int*)malloc(0x4000);
  9.     fseek(IFile, 0x00012000, SEEK_SET);
  10.     fread(buffer, 1, 0x4000, IFile);
  11.     fclose(IFile);
  12.     int state = 0;
  13.     for (auto i = 0; i < 0x4000 / 4; i++) {
  14.         state += 0xD5828281;
  15.         buffer[i] += state;
  16.     }
  17.     IFile = fopen("first_stage_launcher_dec.dat", "wb+");
  18.     fwrite(buffer, 0x1, 0x4000, IFile);
  19.     fclose(IFile);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment