I am having a problem with a target I am attempting to reverse. I have added a new section to the file to use to modify some data that is calculated and stored into the program.This code works correctly on XP. However, the feature of random basing that is present in the windows 7 operating system is causing my address references to point to invalid data due to their base not being altered with the rest of the program. Here is my current code:
Code:
01515234 803D 6A525101 0>CMP BYTE PTR DS:[151526A],1
0151523B 0F8D 37010000 JGE Houdini_.01515378
01515241 > B9 30515101 MOV ECX,Houdini_.01515130
01515246 8B0C08 MOV ECX,DWORD PTR DS:[EAX+ECX]
01515249 3E:894C04 18 MOV DWORD PTR DS:[ESP+EAX+18],ECX
0151524E 66:83C0 04 ADD AX,4
01515252 66:3D 0001 CMP AX,100
01515256 ^ 75 E9 JNZ SHORT <Houdini_.myloop>
01515258 C605 6A525101 0>MOV BYTE PTR DS:[151526A],1
My problem is the pointer to 151526a and the pointer to 1515378. When windows 7 applys the rebasing, these addresses are not rebased, resulting in them pointing to invalid data. Is there any method to insure that these addresses are rebased with the rest of the program?