A couple of questions here... Firstly, how can a Delphi exe read the exe file when it has exclusive access to the file already due to it loading?

The second problem is that the Delphi compiler sticks random data in various parts of the exe to pad it. So how can you work out what the checksum will be, if you see what I mean?