View Single Post
  #6  
Old 10-07-2008, 11:13 AM
ender ender is offline
Member
 
Join Date: Oct 2008
Posts: 9
Default

Quote:
Originally Posted by ender View Post
... if anyone happens to know a way that I could push a string object with the value "3" onto the evaluation stack without having to mess around with the metadata tables, I'd be much obliged.
Well, I googled around some more and found that it's possible to load a constant into a local variable (given that one of the appropriate type is available). After that, the local variable can be indirectly pushed onto the stack with the "ldloca" instruction, and a call to the int32::toString method can be made. That will return a string object with whatever int value was set.

I was able to get around the protection using the above technique, but given that the code for the workaround takes up more bytes than the code it replaces, I'm still very interested to know if there are any good tools or resources to learn more about modifying/adding string constants to the metadata tables of an app. If anyone could point me in the right direction, I'd really appreciate it.
__________________
if you build a man a fire he will be warm for a day; if you set a man on fire he will be warm for the rest of his life. :rolleyes:
Reply With Quote