Many years ago I wrote a software protector called MyAppSecured. Somewhere in the middle of porting it from Delphi to C++ I lost my interest in this project. Just found it on my HDD so I thought it might be helpful for someone.
In short, the GUI of this protector is written in C++ and the protection stub in written in MASM.
The C++ code loads a target in memory and adds 2 PE sections to it. One for the TLS callback code and one for the main code. The MASM stub will be written to those 2 sections.
This protector has just 2 protection features: Analyze Immunity (anti-debug) and Memory Shield (anti debug-tools, OEP relocation).
Note this is not a download-and-use-right-away protector. The code is written years ago so it's not very well written and also for some unknown reason the MASM stub could not be written into the 2 created sections. It did work very well years ago but I don't have the time to investigate why it doesn't work now. To be clear, the compiled exe file you will find in the package should run nicely but once you try to secure a exe file, that exe file is gonna be corrupted.
This project is free for personal and commercial purposes. If you have any questions please ask, but keep in mind I abandoned this project and removed it from my HDD right after posting it here.
Even if you are not gonna use this project it might be interesting to check the code. Some interesting stuff you might find there for your own project, such as emulating the CreateThreadW function in pure MASM, adding PE sections & relocation of OEP.
MyAppSecured v1.00 Beta source.zip
Exactly what i do now a days.
Open your target app. find the xaml code in resource and save it...
then create a wpf application into the visual studio and create a new test or dummy project. insert the saved xaml code into your project that you created.
modify all the changes into the xaml that you edit into the wpf app. then compile the project.
now open your project in the dnspy and go to resource and you will see xaml resources as baml. dont save it directly.
save it with raw save baml resources.
now again go to your target app and then delete your resoueces which you wanna change and create a new system.io resource and select tghe raw baml file which you saved using dnspy from the test or demo wpf project.
now give the same name into the target and boom ///
it will work good. i tested it.