Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8912067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:06:29+00:00 2026-06-15T04:06:29+00:00

At first, I’m a newbie on c++ and debuging. I use CreateProcess api with

  • 0

At first, I’m a newbie on c++ and debuging. I use CreateProcess api with DEBUG_ONLY_THIS_PROCESS parameter, then wait for CREATE_PROCESS_DEBUG_EVENT. When recived, i check for the Eip register to get the address of the point. And i tought that this point is the Main function’s address.

To verify this idea i used ollydbg to see the starting address of the exe. But it wasn’t same with mine. The one i found with debug apis is 0x77a364d8, but olly says that it’s 0x00401000. Then i didn’t stop and checked for the address 0x77a364d8 in olly. I found the address and set a breakpoint there.

Then I reloaded the olly and saw that olly firstly goes 0x77a364d8 address and loades the process and then goes to the 0x00401000 address and waits there. 0x77a364d8 address points some ntdll functions to load process to memory as i see.

If it’s true, how can i get the 0x00401000 address by code( c++, i’m a newbie and please cross the t’s 🙂 ), and is it the Main function’s address or what?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:06:30+00:00Added an answer on June 15, 2026 at 4:06 am

    After you receive the CREATE_PROCESS_DEBUG_EVENT you should be able to access the CREATE_PROCESS_DEBUG_INFO member of the union. It has a member called lpStartAddress.

    Your debugging event loop should look something like:

    DWORD dwContinueDebugStatus = DBG_CONTINUE;
    while(dwContinueDebugStatus)
    {
        DEBUG_EVENT debugEvt;
        WaitForDebugEvent(&debugEvt, INFINITE);
        switch(debugEvt.dwDebugEventCode)
        {
        case CREATE_PROCESS_DEBUG_EVENT:
            // Grab the main thread entry point.
            LPTHREAD_START_ROUTINE exentry = debugEvt.u.CreateProcessInfo.lpStartAddress;
            break;
            /* Handle the rest of your debug events here. */
        }
        ContinueDebugEvent(debugEvt.dwProcessId, debugEvt.dwThreadId, dwContinueDebugStatus);
    }
    

    Edit:
    A couple things I forgot to mention…

    Getting the entry point by any of these means will likely be the CRT function that calls your main(). There isn’t a reliable way to get the main() without symbol lookups in using dbghelp.dll.

    Also, the book Debugging Applications by John Robbins has a chapter about creating a small debugger with some example code. It is probably the best documentation/example I’ve found (but I wish it were better). It can be had pretty cheap so it might be worth looking at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First the code (sorry if its not 100%) I am no expert and then
I'm making a simple page using Google Maps API 3. My first. One marker
First I will show you example tables that my issue pertains to, then I
First I'll show my questions and then I'll provide more background details: My Questions
First of all, this isn't for a keylogger, it's for an input in a
first take a look on this picture from localScope app : i have 2
first of all some details: I configured security as below in web.xml view plaincopy
first off I'm a noob to PHP but here is my problem. I am
First off, I'm coming (back) to Java from C#, so apologies if my terminology
First, some context: I'm a Python developer who has written a medium-sized application using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.