Author Topic: PETrim broking InnoSetup files  (Read 10617 times)

Offline jgutierrez

  • New
  • *
  • Posts: 1
PETrim broking InnoSetup files
« on: December 31, 2012, 01:21:21 PM »
PETrim is broking InnoSetup files. Looking for additional switches to preserve overlay information, I have found no clue.
Any hints? Is it a bug on PETrim?



Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5232
  • Gender: Male
  • The Lasso
    • Bitsum
Re: PETrim broking InnoSetup files
« Reply #1 on: December 31, 2012, 07:11:49 PM »
PECompact can handle overlays with its new overlay emulation (in the beta). Try using it with overlay emulation turned on, if that is an option.

The problem is that even if if PETrim puts the overlay back, it ends up at a different physical offset. A small minority of installer/SFX archive decompression stubs dynamically calculate the offset for the overlay at runtime, and they work fine. Unfortunately, the MAJORITY of these stubs use a stupid hard-coded physical offset. Well, after the size of the base PE has been reduced, the overlay is clearly at a different offset.

This hard coded offset problem is what PECompact's overlay emulation addresses.

For the few installers and SFX archives that are available.

I can add a new option to PETrim so that it can preserve the overlay. Whether it then works for Innosetup files, I don't know. There isn't much revenue (well, none) coming in from the freeware PE Suite tools, but this won't take long to amend. If you want to 'sponser' the work, then send $50 and you're more likely to get my attention faster ;p. (sorry, I have bills :o). Otherwise, I have maintenance coming up and will try to slap this on in.

Another option is to find the Innosetup SFX/stub that is used by Innosetup when creating an installer and run PETrim on it. Soimetimes it is sitting around as a stand-alone file, other times it is in the resources. Depending on how InnoSetup works, this may or may not work correctly afterwards.
Software Engineer. Bitsum LLC.

Offline suni93

  • New
  • *
  • Posts: 1
Re: PETrim broking InnoSetup files
« Reply #2 on: September 29, 2014, 06:25:17 AM »
 Unfortunately, the MAJORITY of these stubs use a stupid hard-coded physical offset. Well, after the size of the base PE has been reduced, the overlay is clearly at a different offset.
Check out the latest Testking 501-01 (http://www.testking.org/501-01.htm) exam questions and answers written by our Boston Architectural College (http://www.the-bac.edu/)
dumps certified team to help you pass ARM (http://www.arm.com/)
exam in first try.