Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi packing assistance.

Featured Replies

Posted

Hi,


I ran into a bug with processing Delphi/FreePascal executables. All Delphi versions seem to be affected.


I am unsure as to the problem.


I checked in non Delphi executables and TLS callbacks/tables seem to work correctly, so atm I am at a loss to see what I am missing.


This seems to be a final bug of my exe packer, and the main thing stopping its release.


 


Any help at all would be great.


test.rar

Edited by mudlord

DATA section is not decompressed correctly. As a result, at address 452de4 you have 0, and packed program smashes with AV.

Are you using the exact same version of APLib in packer and program stub?

  • Author

Thanks for the advice, I will double check and rewrite that (I should have checked by unpacking the exe manually instead of just checking just the PE header and things). I'll do some more checks and things.


 


Have to check if this is a similar case for Delphi 2010 and the XE versions, too.


 


Edit: Thanks kao, with this hint discovered yet more bugs. Looks like this might take a while.


Edited by mudlord

if your going to pack your exe i would use a packer caled pacman which is free and just google it


Edited by omar911

  • Author

I fail to see your point. With your logic, I would have stuck with UPX like countless others do, when there is better alternatives. like bero's packer.


 


Anyway, with kao's hint, I did some more testing, doing mainly XORing of bytes so something like aplib did not need to be used. This uncovered plenty more bugs. Found a issue with mingw executables, not sure if its TLS related.


 


edit: found this long standiing bug. The variable in question is a DWORD which is in the TLS table. The AddressofIndex variable funnily enough resides in the DATA section, relocating it fixed it. Seems Windows zeroes that variable on startup, hence it being very difficult to trace when debugging the packer itself.


Edited by mudlord

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.