Lab16A: Using Ollydbg To Analyze Lab09-01.Exe: Finding The Main Entry Point
Lab16A: Using Ollydbg To Analyze Lab09-01.Exe: Finding The Main Entry Point
01.exe
Finding the Main Entry Point
Open the Lab09-01.exe file in IDA Pro.
Press F7 twenty-one times to call a short subroutine and get to 0x402AFD, as shown
below.
This CMP operation is testing to see if the number of command-line arguments is 1.
Press F7 three times to pass the test and jump to 0x00401000, as shown below.
Look at the upper right to see the registers. EAX now contains 2, as shown below.
This is a "non-zero error code", as explained here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724897(v=vs.85).aspx
That means the test failed--it did not find the registry key it was looking for.
Press F7 three times to get to ___location 0x401027.
Press F7 to execute the JMP.
Press F7 three times to step through the subroutine and get to 0x402B08.