Sign in to follow this  
Followers 0

ResHacker project

176 posts in this topic

Posted (edited)

Resources viewer and compiler.

You can drop file (dll, exe ...) on treeview or use menu control to load file, or drop file on executable after compiled or just run and use it as a resource dll compiler.

Constructive comments are always welcomed.

New script attached (16th April 2009)

How to use compiling option:

- click on Action menu.

- choose Initialize Compiler.

- go to menu again and choose Generate Initial DLL

- any file that you want to add to your resource dll drop on tree view or use Add Resource button. New window pops up. You need to chose type, name and language of resource. You can choose to use predifined values, only name is required in that case.

- when you are done with modifications save new dll file. File menu will have Save as... option

- that's it. You have your resource dll compiled with AutoIt

Supported resources:

- RT_CURSOR

- RT_BITMAP

- RT_ICON

- RT_MENU

- RT_DIALOG

- RT_STRING

- RT_ACCELERATOR

- RT_GROUP_CURSOR

- RT_GROUP_ICON

- RT_VERSION

- RT_ANICURSOR

- RT_ANIICON

- RT_HTML

- RT_MANIFEST

- AVI (special)

- WAV (special)

- JPEG (special)

- PNG (special)

- GIF (special)

By supported I mean that resource can be viewed and/or saved. Other resources are shown as hexadecimals, with ASCII character and address display.

Download script (zip format due to upload size limit):

ResourcesViewerAndCompiler.zip

edit: had to remove the old attachment to make more space in my attachment folder.

Edited by trancexx
1 person likes this

Share this post


Link to post
Share on other sites



Posted

Nice work trancexx,

Thank You for sharing.

Cheers

Share this post


Link to post
Share on other sites

Posted

Thanks guys (girls? :) )

I've noticed that Vista is arguing about combination of FileOpenDialog() and GlobalSize function from kernel32.dll, so script is modified to avoid that.

Also, you can drop files on TreeView to load them now and if you compile the script you can drop on it (...you know) to load the dropped file.

Resources that I'm currently working on to show properly are shown as hexadecimals, with ASCII character and address display.

Btw, Im trying to keep the functions as standaloneable (word?) as possible. That's why some parts of the code may be or look the same as in some other function.

Parallel with this I'm working on "compiling" part of the final script and it's at about the same stage as this is.

I'm inviting everyone to join me in this. Post suggestions and codes (no includes so that we all learn something about DllCall() and other nice functions), or don't. It's ok.

It would be incredibly cool to have the ultimate PE Viewer and resource compiler written in AutoIt.

Share this post


Link to post
Share on other sites

Posted

Nice Work!

Share this post


Link to post
Share on other sites

Posted

I'm attaching new script (first post). Now it's able to process wav and avi resources if stored properly.

I have to comment on the great interest for this here. Last attachment had 8000x10^-3 downloads. Incredible! That speaks something.

Poor code -> poor interest. Right? Yes, right.

Share this post


Link to post
Share on other sites

Posted

Looking really good! I like the interface, and you handle the icons nicely. Only thing I could see now, is to be able to resize the two halves of the GUI separately by dragging the divider bar.

Share this post


Link to post
Share on other sites

Posted

Looking really good! I like the interface, and you handle the icons nicely. Only thing I could see now, is to be able to resize the two halves of the GUI separately by dragging the divider bar.

What icons??

Except of that incredibly beautiful half naked female body that get drawn on screen when... you know, I'm not seeing any icons.

Do you see icons somewhere? Do you see icons?

Share this post


Link to post
Share on other sites

Posted

incredibly beautiful half naked female body

Where...? I have to judge for myself.
1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Umm, yeah, icons....

Edited by wraithdu

Share this post


Link to post
Share on other sites

Posted (edited)

It'll be even better with features like extracting of icons and editing of the resources =)

Nevertheless, awesome job !

EDIT : I see those string tables , is it possible to know what string is it ? Because it's all in unreadable text o.O

Edited by xVivoCity

Share this post


Link to post
Share on other sites

Posted

This is great, ovbiously not as great as REShacker but, very very good start, keep it up and It will be one of the bes :)

Share this post


Link to post
Share on other sites

Posted

Umm, yeah, icons....

aaaahhh, that icons :)

I thought you meant icons :)

Yes, you are right about that ones.

@Firestorm, bug maybe?

anyway... I couldn't find appropriate resizing value for bitmaps (current one is changing the size of the shown bitmap when resizing GUI), so I added it to that function that is handling positioning of the mci window.

Accelerators tables are over and can be shown, seen as they are. Some data types are more correct now.

Will update... eventually.

Extracting icons and other resources are already prepared if you look at the posted code deeply.

Share this post


Link to post
Share on other sites

Posted

Wow, this is nice.

Would be awesome to see some more functions for saving / editing :)

Share this post


Link to post
Share on other sites

Posted (edited)

one of the better things i have seen, very nice.

can it save like reshacker could?

maby add a feture to extract icons or other partd of the target program

Edited by corgano

Share this post


Link to post
Share on other sites

Posted

New script (first post) have ability to extract resources.

I've added support for RT_ACCELERATOR resource and progress control for gui and generally it's much powerful now.

Share this post


Link to post
Share on other sites

Posted

Really looking good!

Share this post


Link to post
Share on other sites

Posted (edited)

OP: this would take alot of work but maby a feture to convert and export parts of the program to autoit?

*edit*

what i mean is you select a gui or peice of code in the program you are veiwing, and it will convert it to autoit for you

Edited by corgano

Share this post


Link to post
Share on other sites

Posted

@corgano

That....makes no sense. I don't think you have any idea what you're asking.

Share this post


Link to post
Share on other sites

Posted

After the edit (I don't know what was the original post :) ) it has sense... for RT_MENU and RT_DIALOG. I suppose those two could be converted to AutoIt code, but I'm currently focused on getting sense out of binary data of the resources.

Anyway, I did it for RT_STRING resource. I was struggling about determining string ID, but It turned to be kind of obvious how to get it :o

Also, sometimes some bitmaps are not stored inside PE file properly, few of them inside shell32.dll (XP for sure), and that caused them not to be extracted properly (bitmap offset was not right). Improved BMP header generating algorithm.

Improvement arround file saving dialog too.

Will update soon. If you are interested peek up.

Share this post


Link to post
Share on other sites

Posted

Looks very good trancexx!! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.