#include#define INFILE "REX0E28ED0175CE2F7C.DAT" #define OUTFILE "decrypt.out" unsigned char xor_tab[] = { 0x01, 0xed, 0x28, 0x0e, 0x7c, 0x2f, 0xce, 0x75}; main() { FILE *fh_in, *fh_out; int index; int ch; if (!(fh_in = fopen(INFILE, "rb"))) { printf("Cannot open %s\n", INFILE); exit(1); } if (!(fh_out = fopen(OUTFILE, "wb"))) { printf("Cannot create %s\n", OUTFILE); fclose(fh_in); exit(1); } index = 0; while((ch = fgetc(fh_in)) >= 0) { ch ^= xor_tab[index++]; fputc(ch, fh_out); if (index >= sizeof(xor_tab)) { index = 0; } } fclose(fh_in); fclose(fh_out); }