View Single Post
Old 31.07.2005, 19:49   #63
kolya7k
Архивный участник
 
Join Date: Jul 2005
Posts: 6
Default

I have time... and can explain evertything
But... i know english bad...
If you understand russian

Short explanation: We have .rdata section, which contains constants in .exe file...
Our string is constant and locates in .rdata section
We need to change it... but our new string is longer that old and if we chenge it to new with increasing file size we distrub all data offset dependencies, because other constanst, locates after oyr string will be at his_old_offset+string_length_difference offset... and in code they used as push offset his_old_offset
And to correct this we need to change all push offset XXXXX to new strings offset (very long job).
But .rdata section at the end contains 00 00 00... bytes (fsee space) which (as i think) reserved by compiler for new constants (or/and for align, maybe)...
And we can add our string to any place of this "reserved" block (it didn't used) and change push offset XXXX of our old string to offset our new string....
Keep in mind that offset is not offset in file - it is image_base + offset in file
image_base usually is 0x400001H
kolya7k is offline