How to dump a file stored at memory offset

Hey, any suggestions on how to dump a file called t3.gif that is stored in a tex.lss at a offset of 0x54dc1 in memory.

Any, code examples or libs I can use Ive always wanted to learn how one would achieve this would be very cool to learn this any help or suggestions would be super helpful guys and gals.
Last edited on
1
2
3
4
5
6
7
FILE *in = fopen("tex.lss","rb");
FILE *out = fopen("t3.gif","wb");
fseek(in,0x54dc1,SEEK_SET);
unsigned char ch;
while ( fread(&ch,1,1,in) == 1 ) {
  fwrite(&ch,1,1,out);
}

This will seek to the given offset, and dump the rest of the file into t3.gif.

If you just want the gif, you need to know the file format.
https://en.wikipedia.org/wiki/GIF#File_format

Thanks salem c
Academically that's correct. I'd suggest nirsoft for this otherwise: https://www.nirsoft.net/utils/resources_extract.html
Topic archived. No new replies allowed.