What is an EXE file?

LemonDownload

What is an EXE file? The full name of an EXE file in English is "executable file," which is a file that can be executed. In the Windows system, files with the extension ".exe" are EXE files. Most software on Windows, such as Notepad on the taskbar and 7-Zip, use EXE files. What is the internal structure of an EXE file? In fact, EXE files and common DLL files are both PE files. PE stands for "portable executable file." Simply put, they are composed of various components, making their structure quite complex. There are many types of PE files, and the following are some common ones. If you're interested, you can pause and learn more about them.

The last section, OSRC, is the main focus today, as it contains various resources such as cursors, icon bitmaps, dialogs, strings, audio, and more. If you use 7-Zip to extract an EXE file, you can see these sections, including the resource section. But if we want to modify the resources (EXC) and still keep the EXE file usable, how should we proceed? First, we need to download a software called Resource Hacker, which has built-in file resource compiler and decompiler. It allows us to modify the resources of files like e, x, c, d, m, l, and more. After downloading, extract the compressed file. Then double-click on Resource Hacker to open the software. This software is called "Steven's Christmas Card," but it seems to be unavailable now.

It was probably created by an anonymous internet user around 2004 using C++. The file size is only 0.4 MB, but it has impressive effects. Let's first see what it looks like before modification. It looks good. Clicking on the icon in the taskbar and right-clicking to exit will close it. If we want to keep enjoying the snowflakes and remove the background music (BGM) and the image in the lower right corner, what should we do? We drag this file into Resource Hacker and can see many resources. The first one, "media," is the BGM we just heard. Wait a moment, let's delete it. Then, look for the images in the "beat map" and delete them too.

After that, click on Save. After saving, open the modified file again. Does it no longer have BGM and images? If some files cause errors after deletion, you can meet the requirements by replacing them with resources of the same format.

If we want to change the snowflake to another image, we need to pay special attention to the image format and color depth. The snowflake image has a 32-bit BPP depth with an alpha channel, which cannot be handled by regular painting software. We need professional software like Photoshop to edit it and save it in a special BMP format. If needed, I can create another video in the future to explain it in detail. In addition to deleting and replacing resources, we can also add new resources, such as hiding a file. You can click on this icon and select a file, like the downloaded compressed file. Add the resource, then click Save. Wait a moment, I forgot to exit. Right-click to exit, and then click Save again. The compressed file is now hidden inside. When you need it, save this file outside.

Then use compression software to open it, and you'll discover a hidden file trick. Of course, we can also use Resource Hacker to explore it further.

You can see a wide range of resources, including dialogs. We can freely adjust the size of the dialogs and more. There are many other ways to play around with it. I want to remind you that this software should only be used for legal purposes. It's okay to have some fun with it, but never engage in illegal activities. Also, turning off the music in Steven's Christmas Card was a problem I couldn't solve when I was young. I didn't expect to be able to solve it when I grew up. It seems like I wasn't the only one struggling with this issue. It's been more than a decade, and I wonder what happened to that guy online? Finally, if you're interested in this type of educational video, don't forget to like and subscribe. See you in the next video.