If your opinion, if I store a procedure in my source as a sequence of bytes (that is the real machine code -> I'd use a HEX editor for this to retrieve the values) , then I load such procedure in memory (in an allocated memory area) and I pass the pointer of that area to CreateThread (the PB version or the API version) would that work ? Any ideas ? I saw the VirtualAlloc() call accepts the PAGE_EXECUTE flag to be passed.
I know that it can sound silly, but I think it could be useful for copy protection functions that would be created at run-time (the machine code could be crypted too).
Weird idea about threads
Ok, little update. I included some code in IncludeBinary and then I passed it to CreateThread and ALL Windows blocked !! 8O Impressive, nothing was reacting anymore (I use Win98SE). I guess because the code was loaded in the data section and not the code section. I'll try what happens using VirtualAlloc.
There is a code snip at the german forum, that creates and executes a
Procedure on runtime.
http://robsite.de/php/pureboard/viewtopic.php?p=573#573
Unfortunately, i don't understand anything in this code, so you'll have to
find some other german speaking geek to help you on this.
Timo
Procedure on runtime.
http://robsite.de/php/pureboard/viewtopic.php?p=573#573
Unfortunately, i don't understand anything in this code, so you'll have to
find some other german speaking geek to help you on this.
Timo
quidquid Latine dictum sit altum videtur

