I googled so much but I just couldn't find a real answer to my question. Im currently writing a packer which encrypts the sections of an exe or dll file and modifies the Entry Point so my decrypter stub can decrypt the file at runtime, after that I jump to the OEP of the program. That works just fine with native exe and dll files, but it won't work with .net files / managed code... As soon as I change the entry point of a .net file in the pe header the file won't run (not even my decryption stub in entry point). I was using OllyDbg to see whats going on and I noticed that the file is loading mscoree.dll from the Import Table. This file does some checkings on my exe before run it and it seems it doesnt like my native decryption stub so it simply exits the program with this error message:
---------------------------
Launcher2.exe - This application could not be started.
---------------------------
This application could not be started.
Do you want to view information about this issue?
---------------------------
Ja Nein
---------------------------
Would be nice if someone could enlight me on how to finish my packer :) Thanks in advance!