Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Hooman on March 04, 2017, 02:27:51 AM

Title: OllyDbg UDD and Outpost2.exe Size
Post by: Hooman on March 04, 2017, 02:27:51 AM
Just a quick note, the OllyDbg UDD file remembers the size of Outpost2.exe. It will discard the UDD file and rescan the EXE if it finds the EXE size has changed.

I bring this up because recent updates caused the size of Outpost2.exe to change:
Quote
------------------------------------------------------------------------
r1100 | leeor_net | 2016-10-17 04:23:26 +0800 (Mon, 17 Oct 2016) | 3 lines

- Updated version strings throughout the Outpost2 executable and DLL addons.
- Added NetHelper to OP2 package.
- Updated OP2 executable icon to include a much more modern game icon.
------------------------------------------------------------------------

Backdating the exe to before this change confirms that OllyDbg is able to load and process the UDD file as expected.


Considering the UDD file contains years of reversing information, we'll probably want a way to work around this. This might mean updating the UDD file to match with the updated EXE file, or being aware of this issue and making updates to the EXE in a way that doesn't change the size.

If I had to guess, I'd say the icon update is probably what caused the size change. Can someone confirm the cause? If it is the icon change, is there a way to update the icon and maintain the same size? This might not be possible if the new icon is higher resolution.
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: Arklon on March 04, 2017, 01:55:27 PM
If I had to guess, I'd say the icon update is probably what caused the size change. Can someone confirm the cause? If it is the icon change, is there a way to update the icon and maintain the same size? This might not be possible if the new icon is higher resolution.
The new icon is much higher resolution than the old one  (128x128).
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: Vagabond on March 04, 2017, 10:35:47 PM
How time consuming/practical would it be to transfer the comments from the UDD file to the new executable when a new release of Outpost 2 is made?
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: Arklon on March 05, 2017, 01:00:04 PM
By hand? Not practical at all. I guess we'd just alter the UDD header to match up its recorded filesize of outpost2.exe with the newest exe's size. It's not like the exe filesize should ever really change unless new resources are baked in, like in the case of this past update.
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: leeor_net on March 07, 2017, 10:41:17 AM
Was going to say, guarantee it's because of the updated icon. I didn't realize it would break other things otherwise I wouldn't have touched it.  :-\
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: Vagabond on March 07, 2017, 11:40:51 AM
Leeor_net,

I think the icon looks great and am happy we updated it.

Otherwise we couldn't do stuff like pinning Outpost 2 in Windows 10.

(http://forum.outpost2.net/index.php?action=dlattach;topic=5936.0;attach=788;image)
Title: Re: OllyDbg UDD and Outpost2.exe Size
Post by: Arklon on March 07, 2017, 02:44:12 PM
Was going to say, guarantee it's because of the updated icon. I didn't realize it would break other things otherwise I wouldn't have touched it.  :-\
It's not really that big of a deal. BB once wrote a tool to convert UDD to IDB, so there should be enough information about the file format out there to fix it. Maybe this is relevant? http://www.ollydbg.de/Help/t_module.htm