Advertisement
Guest User

Untitled

a guest
Jan 18th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. void addcipher(){
  2. unsigned int buffer;
  3. unsigned int key = 0;
  4. FILE *input = fopen("encrypted_payload.bin", "rb");
  5. FILE *output = fopen("decrypted_payload.bin", "wb");
  6. fseek(input, 0, SEEK_SET);
  7. fseek(output, 0, SEEK_SET);
  8. for(int i = 0; i < 0x1000; i++)
  9. {
  10. key += 0xD5828281;
  11. fread(&buffer, sizeof(int), 1, input);
  12. buffer += key;
  13. fwrite(&buffer, sizeof(int), 1, output);
  14. }
  15. fclose(input);
  16. fclose(output);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement