I understand that this may seem like a really obvious question, but bear with me.
I have this compiled game executable written in Borland Delphi 2010, it is based on the Win32 platform and is compiled in x86. It uses Windows Forms for the UI.
I searched heavily and used Resource Hacker and IDR to go through the program. Both seemed to detect all Windows Forms really well (IDR a little bit better) and I am able to view the raw structures here:
There are two types of definition in here: Picture.Data
& Bitmap
. It seems that both are slightly different formats although they are still Bitmaps.
Here is an example form with Bitmap (form_menu): https://pastebin.com/raw/r81sJRyq
Here is an example form with Picture.Data (form_submenu): https://gist.githubusercontent.com/sjain882/d33e261480d0f13c442ffb4b84d1d1ed/raw/0d188b2ed1673757e512236672c6b0c458ea74d1/form_submenu.txt
Scroll down to the Bitmap
or Picture.Data
area. Here there is an ASCII representation of the image in hex. It turns out Delphi has its own custom image headers, and this differs between Bitmap and Picture.Data (the latter being 07 54 42 69 74 6D 61 70
).
However, this is the header for the whole thing, which is a bunch of bitmaps clumped together it seems, in one {} bracketed area. The bitmaps themselves have the normal headers of 42 4D
.
So... given all this information, I opened the assembly in IDA Pro and searched for these headers, many different types, different lengths. But all I found was this:
Given whats right after this "header" i believe its just some string, highly doubt its an actual bitmap.
So, this makes me think that the Windows Forms have their own encoding somewhere, instead of just storing raw bitmaps.
Is there a good way of replacing these? I would be really grateful for any ideas. I came across How can one replace bitmap (image) inside exe?, but nothing much came of it...
It would also be brilliant if I could change the entire windows forms (like dimensions of boxes etc) and the image formats, to allow for transparancy / alpha!
Thanks in advance!