I have made a program that "inject" some code to a PE file. This code will display a dialogbox asking the user for a password but i dont know how to make it. I need info about this, about define .RC values into .ASM file (and later in PE file) and so on ... Excuse my poor english .. Any ideas?!
Hi it will sure help you to read the PE file tutorials and examples on Iczelion's site...also Ewayne has a pretty good PE file viewer available to dl...there are some editors also .. ;) besides what should be done is to add a section to the PE file then put your code there, then start your code first and second the original PE file code... But i suspect this of virus like actions... ;( please tell me i am wrong.....if not....
No, its a security program. I encrypt .CODE section and then add a new section to the file and injects "decryption" code. But for decryption the prog needs the USER key and for this i want to make a dialogbox that ask the user for the password. I dont know how to define .RC values correctly ... because the code is attached to a PE file ... got what i mean? Any ideas?
Unknown, would you mind sending me that Section adding code? =) Could be cool to check out how it's done =) //Phrekie
basically you have two ways to do what you wanna do: 1. add a resource to the resource section/add a resource section and put your dialog there - should be a bitch to code, but i wouldn't know ;) never seen any code that does that, and i dunno if it's possible due to the structure of the resource section. better ask someone that messed with that a bit more than i did. 2. use a dynamically created dialog - this is the easier approach if you don't want to mess anymore with the PE (of course, easy is a relative word :D). just take a look at DialogBoxIndirectParam and the examples and you should be fine. neither of the approaches are fun, but hey, you're the one who chose to mess with it ;) This message was edited by fresh, on 5/12/2001 10:34:53 AM