View Single Post
  #1  
Old 01-06-2006, 20:37
abitofboth
 
Posts: n/a
n00b Quest II(tm)

Hello again.
I've collected the next batch of stupid questions i hope someone could help me shed some light on.

Basicly im trying to enterpret some very helloworld'ish basic code written in c++ code(vs2005, console app).

http://www.geocities.com/iamasciiart/hellow.JPG

Truth be told, im fiddling with some codeinjection, evaluating different approaches, but i figure i'd get a little better at reading asm first.
The idea of this statement "cout<<"address :"<<IAmMethodOne<<endl;" was to print the address entry point of the function (the function i would later try to hook).
However a few shots of this code in olly shows

http://www.geocities.com/iamasciiart/olly_page1.jpg
http://www.geocities.com/iamasciiart/olly_page2.jpg
http://www.geocities.com/iamasciiart/olly_page3.jpg

now, take the first two breakpoints in olly_page1. They're never hit! However the "cout<<"address :"<<IAmMethodOne<<endl;" statements prints those two address points, that is 401000 and 401030.
Why is that?
You'll also see that 4012D0 is called from these two places(and others), wich is the code that actually prints the characters to the console.
I assume 401080 is the 'real' entrypoint of my code/main.

Comments ?
Reply With Quote