Pack calc.exe with UPX

852 Views Asked by At

I want to ask if someone can explain me, why I cannot execute a UPX-packed version of the Windows tool: "calc.exe" (32-bit version) on Windows 7 or Windows 10, but on Windows XP the packed "calc.exe" is running without problems (on all conversions I got no errors messages and good packing ratios from about 50%).

Is the reason for this that calc-versions since Windows 7 are using more dependencies like .NET or are somehow protected by a more sophisticated security mechanism of these operating systems?

I am using the latest UPX version 3.94.

Best Regards,

Andreas

1

There are 1 best solutions below

3
Anders On BEST ANSWER

I would guess the issue is related to the MUI resource and MUI satellite DLLs.

Try using the --compress-resources=0 UPX option. If you want to compress some of the other resources you can try --keep-resource= instead.

If you move/rename Calc.exe you must also make sure you do the same with the .mui file:

md myCompressedCalc
cd myCompressedCalc
copy %windir%\System32\calc.exe .\
md .\en-us
copy %windir%\System32\en-US\calc.exe.mui .\en-us\
upx --compress-resources=0 .\calc.exe