Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char buf[4096];
- void decrypt(char *mem, int len, char initial, char step) {
- int i=0;
- char x = initial;
- for(i=0; i<len; i++)
- {
- mem[i] ^= x;
- x+=step;
- }
- }
- int main() {
- int i=0;
- // decode next decrypt code
- FILE *in = fopen("initial", "r");
- fread(buf, 4096, 1, in);
- decrypt(buf+0x100, 0x80, 170, 1); // decrypt first decryptor at 0x100
- decrypt(buf+0x1c0, 0x1F2 - 0x1C0, 50, 3); // decrypt get string
- //dump memory
- for(i = 0; i<4096; i++)
- printf("%c", buf[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement