bz home

UNRC: Resource Decompiler for OS/2

UNRC is the resource decompiler for OS/2 binary resource (.RES) files.

Resource file format is not well documented and I cannot garantee that this program can properly decompile resources. I have used RDC and RESMGR programs written by Martin Lafaix, OS/2 ToolKit documentations, c-compilers include files and my own experiments to understand how RC write compiled resource files.

Supported resource types:

Note: rcdata type of resource now is decoded as set of word values and if originally resource script contained strings in this section UNRC can add one extra byte in the end of this data. UNRC adds the comment line in script file if it happens.

Where to get

The latest version of UNRC is 0.0.1c and it can be downloaded from here or from hobbes archive as part of RESMGR package.

Usage

Please do not forget this is an alpha testing software and commandline options can be changed in any new releases.

You can start UNRC as

  UNRC [options] FILE.RES FILE.RC

Where options are some options, FILE.RES is the binary resource file and FILE.RC is the filename for decompiled resource script.

Currently supported options:

-?get short commandline help.
-p use this string as prefix for decompiled resource files such as bitmaps, pointers and other binary resources.
-debugput debug info in script file.

Examples of using

1. Goal is to change DIALOG resources in file FILE.EXE . This example demonstrates how you can update some resources in executables.

1.1. Unpack binary resources from executable:

  RESMGR -x FILE.EXE *.DIALOG FILE.RES

1.2. Decompile FILE.RES binary file to resource script:

  UNRC FILE.RES FILE.RC

1.3. Make changes in FILE.RC resource script file if you need this.

1.4. Compile resource script into binary resource:

  RC -r FILE.RC FILE.RES

1.5. Merge updated binary resource to FILE.EXE:

  resmgr -a FILE.EXE FILE.RES

2. Goal is to update all resources in FILE.EXE .

2.1. Unpack binary resources from executable:

  RESMGR -x FILE.EXE FILE.RES

2.2. Decompile binary resource to resource script:

  UNRC FILE.RES FILE.RC

2.3. Make necessary changes in FILE.RC resource script.

2.4. Compile resource script into executable:

  RC FILE.RC FILE.EXE