Users browsing this thread:
How to rip sprites from .exe games?
#1
Hello! I'm new to the forums and ripping in general but I'm in need of help for something.

Recently I got QBeez 2 for Christmas (lovely game btw, would definitely recommend buying.) and since it's a .exe file I'm thinking it would be hard to rip sprites from.

So does anyone know how I can rip them at all? Thank you for helping in advance!
Reply
Thanked by:
#2
I can't guarantee this will work for you, but its something you could try:

If you don't have it already, you will need CheatEngine, and TiledGGD (or classic GGD if you don't mind the Japanese interface and lack of features. )((it is slightly faster and uses less memory))

First thing to try: Open GGD (whichever one you picked) and in GGD, open the EXE file. Search through the EXE in the various modes. If you spot anything you can rip, you might not need the next steps. Failing that, next step....

I won't go into a full tutorial on CheatEngine, but you want to attach it to the game while its running, with the thing you want to rip on the screen, do a search for a 4 byte unknown initial value, Take some small arbitrary action (like one step forward) and do a search for unchanged values. (try not to load any new menus or maps or whatever. )

Now, in theory, this should give you a list of seemingly random numbers. Scroll through and see if you spot any that are green. If you do, right click on one > Browse this memory region.

This will bring up the memory viewer for that part of the game's loaded memory. Green numbers are more likely to be things that the game's program has loaded internally for future use, like code, text files, art assets, etc., but they won't ALWAYS be limited to green areas.

What we're hoping for, is that the game has loaded the particular piece of art into memory and is keeping it there.
What you'll want to do, is create a dump file with as much stuff from that area of RAM as you can, (sometimes the memory reaches a point where it reads ?? ?? ?? ?? repeatedly... that means that memory is allocated to some other program and CheatEngine can't see it. CE will refuse to dump anything in that section and will give you an error.)

Pick a hexadecimal number that is quite a large ways less than the address you browsed to (listed on the left side of the Memory Viewer window) and a number that is quite a bit higher, and use those as your dump range. (or, if you're a bit more learnid and know some hex editing, take a look through the memory viewer and see if you spot any telltale features of image data... that's something you learn to spot with practice and I can't explain it to you..... any way, if you do see it, remember where it starts and search for its end, and dump it.) Otherwise, just dump a bunch of large portions of memory that don't change much, or only change infrequently, (by doing [value unchanged] searches to weed out more frequently changing results)

Once you have a dump file or two, load it into GGD and look through with every Bit Mode, and make sure that when you use the 1, 2, 4, and 8 bits per pixel modes, your palette viewer has some kind of colors in it, to help you see if you're spotting any images. (if it doesn't, scroll down in the palette viewer until it does, or load a file you know has palettes into the viewer and use those palettes for looking around in the dump. More colors is better. Try to avoid a bunch of the same color hue and shade near each other.)



Another way to get memory dumps is to load up a program's memory region in HxD, select it, and save it as a file.

The process is the same for any kind of memory dump.

This is hardly something I'd expect a complete novice to be able to find anything in, but, if you do have any kind of experience, its worth a shot if you don't mind the effort... if you don't have any experience, but are bold and don't mind learning a few new programs along the way, this is a good way to start getting experience.

Other things to look for in Cheat Engine:
String search : "PNG" (without quotes) or Byte Array search : Check the box that says HEX, and search for 89 50 4E 47
That will find you any .png images loaded in RAM by the program. You can do similar things for other filetypes (once you learn what to look for in them. They will usually have some kind of easily identifiable 'tag' at or very close to the beginning of their file.)

PNG files are even kinder in that they also have a tag at the end! "IEND®B`‚" or "49 45 4E 44 AE 42 60 82" in hexadecimal.
Once you start learning how to spot image data or file tags, its fairly easy to do a few quick searches to see if you spot any easy to get files.

After a while in GGD you'll probably also start to see things that may be palettes or compressed data, once you learn what they look like, and that can drastically shorten your searching time, even if it doesn't immediately get you the files you wanted.


Good luck, I hope what I suggested wasn't way over your head or anything. (don't feel bad if it is though... like I said its not really a beginner's tutorial... No one ever even bothered to explain this much to me when I started.)
Reply
Thanked by: Regius
#3
I'm trying to rip sprites from a certain Sans Simulator. https://gamejolt.com/games/sans-simulator/158253 How do I do that?
Reply
Thanked by:
#4
Before you even rip that indie game, do you have explicit permission to do so from the developer? Most indie developers are harsh and simply do not request their graphics to be extracted, so I'd check up on their terms first before ripping it.
Reply
Thanked by:


Forum Jump: