Heya!
In order to improve my knowledge in debuggin applications after compilation i decided to make a first step in finding the place where the score in Win7's Solitaire is stored. I found that it is a member of the class SolitaireGame which gets allocated dynamically so the address of it is not static. But ive found a static address like this:
.data:01097074 ; class SolitaireGame * g_pSolitaireGame
.data:01097074 ?g_pSolitaireGame@@3PAVSolitaireGame@@A dd ?
.data:01097074 ; DATA XREF: ChangeAppearenceDialog::Show(void)+47r
.data:01097074 ; ChangeAppearenceDialog::Show(void)+136r ...
So i see 0x1097074 as the absolute address of g_pSolitaireGame. As i need the RVA for ReadProcessMemory ive looked for the imagebase and thats 0x1000000. That leads me to a RVA of 0x97074. Reading the value at that location gives me 0x30000. This address cannot be a pointer to SolitaireGame. From the name:
.text:01006CC4 ; const SolitaireGame::`vftable'{for `CardSolver::ISolverGame'}
I think SolitaireGame must have virtual functions. But [0x30000] gives me an address which is not within the accessible space of the process. So 0x30000 cannot be the pointer to SolitaireGame.
/Edit:
Ok, i know now that it contains virtual functions, its no longer just a guess :P
.text:0102EB08 ; public: virtual bool __thiscall SolitaireGame::SolverGameOnMoveComplete(class CardSolver::CTable *, struct CardSolver::SMove const &)
What did i wrong?
Greetings
Plerion
[Edited by - Plerion on April 14, 2010 1:58:14 AM]