I am working on PE segment encryption(in C++). I completed the PE32 .text segment encryption. I added stub segment to the PE that will decrypt .text segment at runtime. Used inline assembly in the stub function. But I can't implement the same method in PE32+ executable(64bit exe) as it won't support inline assembly. I am able to add the stub and encrypt the text segment.
Issue is with the decryption logic in the stub.
I tried adding separate .asm files but failed as I am new to assembly language. Is it possible to do without assembly language? Please help me with any good documentation or samples on PE32+ segment encryption.
MZ
... then trying to take it from there, carefully parsing the PE (aware that theMZ
may be a false match).