Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Kayser on March 19, 2006, 12:38:46 pm

Title: compiler and decompiler
Post by: Kayser on March 19, 2006, 12:38:46 pm
i want to extract or modify a jpeg file within a exe program after it has been compiled.
I know it's hard but i was just wondering if it is possible.
I tried reshacker,rc hunter,recstub and no results.
Thanks
Title: Re: compiler and decompiler
Post by: RayB on March 19, 2006, 01:19:11 pm
Have you considered just doing a screen capture?
Title: Re: compiler and decompiler
Post by: Kayser on March 19, 2006, 03:47:02 pm
what i want is to modify the exe picture file.
thanks
Title: Re: compiler and decompiler
Post by: krick on March 19, 2006, 06:13:30 pm
What program?

Are you positive that it has a JPEG imbedded in the exe?
Title: Re: compiler and decompiler
Post by: Kayser on March 19, 2006, 06:58:45 pm
Any program.
I'm not sure if it is jpeg,pcx,bitmap,etc .I might be any kind of pic format.
i tried hexedit but you just see numbers and letters.
thanks

Title: Re: compiler and decompiler
Post by: TalkingOctopus on March 19, 2006, 07:00:51 pm
I think jpegs all have the same header.  I opened one up and got:

ff d8 ff e0      

Also, I think they all have the same last 2 bytes:

ff d9

If you open your executable in a hex editor, you can search for the jpeg header and extract the image.  There might be some false positives though.
Title: Re: compiler and decompiler
Post by: krick on March 19, 2006, 07:45:51 pm
Hmm...  if you have access to a Mac, this looks like an interesting product...
http://echoone.com/filejuicer/
Title: Re: compiler and decompiler
Post by: Kayser on March 20, 2006, 03:36:38 am
thanks.
I've found the file using hex editor.
i 've  replaced the image extract from the program FILE JUICER but i got an error.
How can i replace the jpeg in the hex editor without getting an error?
it is possible to decompile a exe file?
Thanks a lot  guys
Title: Re: compiler and decompiler
Post by: youki on March 20, 2006, 06:00:58 am
HI,

You have to use a resource Editor / or Resource Hacker. It is better than a hex editor for this kind of Thing.

there is lot of of this kind of tools on the web.   google for Resource Hacker  PE     (PE is the EXE format for windows) , you should find some.

But using that is not really legal , i think. But for you personnal use it should be ok it you don't diffuse the modified version of the Exe.



 
Title: Re: compiler and decompiler
Post by: krick on March 20, 2006, 11:25:20 am
How can i replace the jpeg in the hex editor without getting an error?

I'm not sure it's possible without a lot of work.  Is the new jpeg *exactly* the same size in bytes?
Title: Re: compiler and decompiler
Post by: Kayser on March 20, 2006, 01:33:38 pm
I'll give it a try.
No it's not the same size in kb.
Once i edited the jpeg it increases the bytes a little bit.
Thanks for the help guys.
Title: Re: compiler and decompiler
Post by: Kayser on March 20, 2006, 01:35:38 pm
BTW i tried Resource Hacker  but no results.
All i get is the icon and the string value.
Thanks
Title: Re: compiler and decompiler
Post by: krick on March 20, 2006, 01:50:06 pm
If you can't see the image using resource hacker, then it's imbedded into the file in a proprietary way.  The only way I could see that it *might* work is if the replacement image is *exactly* the same size in bytes.  And even then, the program might have some sort of CRC check on the imbedded image to make sure that someone hasn't modified it.

You could extract the image, modify it, save it at a slightly higher jpeg compression level to make sure that it's smaller than the original, then possibly use some of the jpeg header fields to pad the file to the right size in bytes.

Regardless, it's going to be a lot of work.  I sure hope what you're trying to do is really worth all the trouble.
Title: Re: compiler and decompiler
Post by: Kayser on March 20, 2006, 02:58:14 pm
I did extract the jpeg file using FILE JUICER for MAC OSX from the exe file.
Is there any programs that alow you to insert the modified jpeg back into the exe file?
if there is it would be great.
Once again thanks for the help.