Everything that the processor can read can also be "decompiled", so there is no complete protection. But, as a rule, it is quite difficult to decompile the compiled Delphi code, and almost all identifiers and all comments are gone, of course.
Published parts of classes, DFM file information, and constants (including string constants) are present in the exe file in an easily readable way. You can reduce this problem by encrypting your lines, rather than using published and unused DFM files. However, all the information will be present in your exe file, so often it will be hard work, which does not provide real protection.
If you just want parts of your source code to be hard to read, complicate your algorithms ...
In the end, everything can be hacked. The only real way to avoid decompiling your application is to save the exe file from those that can execute it, for example, when you deploy it to your own server, but not to the client server.
source share