I am writing a simple software protection tool which works by reading the input file as array of bytes, then encrypts this array of bytes using AES, and store the result into another file which is responsible to decrypt itself.
Till now, the software works like a charm, but there's only one problem, is that when i encrypt a file, the output file ( protected file ) lose it's icon, i think because all the file's resources are encrypted. And therefore the icon is no longer available.
I tried to use a class which is written in my previous question to change the file's icon after encrypting it, but it seems that is doesn't work with the encrypted file even it works correctly with any other exe file.
So in order to make this works, i decided to first change the input file's icon, then ENCRYPT THE FILE WHITHOUT ENCRYPTING IT'S ICON
This should work, if i can only strip the icon's resources from being encrypted.
How can prevent the input file's icon from being encrypted ?