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 9108821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:53:42+00:00 2026-06-17T02:53:42+00:00

I have been scouring the web trying to find an answer to this question,

  • 0

I have been scouring the web trying to find an answer to this question, but it seems to be eluding me. I have consulting the following sources before asking this question.

  • http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/pefile.html
  • http://msdn.microsoft.com/en-us/magazine/cc301805.aspx

I understand the PE format (or at least I think I do). Using the command-line debugger (cdb), I would like to be able to disassemble the address where the RVA is to see what the first call is. For a native application (like Notepad), I would expect to see notepad!WinMainCRTStartup, and for a .NET application, I would expect to see a jmp command to the CLR.

Using Notepad as an example, I executed dumpbin /headers on it, and got a value of 3570 for the entry point. When I execute cdb notepad and perform this command – u [base address in memory]+0x3570 – I do not get the WinMainCRTStartup call.

Am I misinterpreting the PE output from dumpbin? How can I know exactly where to look in memory for the starting function of an application?

Edit (1/7/13): I forgot to mention that I am running this on 64-bit Windows 7. If I try to use cdb in Windows XP Mode (to get results from a 32-bit OS), disassembling the AddressOfEntryPoint that I get from an analysis of the PE file gets me the call to WinMainCRTStartup as I would expect. In other words, the exact address I am told to look at contains what I think it should in a 32-bit OS. Does running the application on a 64-bit machine truly make that much of a difference?

Just to add complexity, if I do a !dh on the ImageBaseAddress in the 64-bit OS in cdb, I get the EXACT AddressOfEntryPoint that I need to use.

  • 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-17T02:53:44+00:00Added an answer on June 17, 2026 at 2:53 am

    Use the Microsoft Symbol Server to obtain symbol debugging information. http://support.microsoft.com/kb/311503/en-us

    0:001> !dh -a notepad
        ....
        3689 address of entry point
        ...
        00ac0000 image base
        ...
    0:001> u ac3689 
    notepad!WinMainCRTStartup:
    

    Edit: add dumpbin output (entry point the same offset, image base may be different because ASLR works when image loads in memory):

    Microsoft (R) COFF/PE Dumper Version 11.00.50727.1
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file c:\windows\notepad.exe
    
    PE signature found
    
    File Type: EXECUTABLE IMAGE
    
    FILE HEADER VALUES
                 14C machine (x86)
                   4 number of sections
            4A5BC60F time date stamp Tue Jul 14 03:41:03 2009
                   0 file pointer to symbol table
                   0 number of symbols
                  E0 size of optional header
                 102 characteristics
                       Executable
                       32 bit word machine
    
    OPTIONAL HEADER VALUES
                 10B magic # (PE32)
                9.00 linker version
                A800 size of code
               22400 size of initialized data
                   0 size of uninitialized data
                3689 entry point (01003689) _WinMainCRTStartup
    

    Edit 2 add output for x64

    dumpbin:

    Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file c:\windows\notepad.exe
    
    PE signature found
    
    File Type: EXECUTABLE IMAGE
    
    FILE HEADER VALUES
                8664 machine (x64)
                   6 number of sections
            4A5BC9B3 time date stamp Tue Jul 14 03:56:35 2009
                   0 file pointer to symbol table
                   0 number of symbols
                  F0 size of optional header
                  22 characteristics
                       Executable
                       Application can handle large (>2GB) addresses
    
    OPTIONAL HEADER VALUES
                 20B magic # (PE32+)
                9.00 linker version
                A800 size of code
               25800 size of initialized data
                   0 size of uninitialized data
                3570 entry point (0000000100003570) WinMainCRTStartup
    

    windbg:

        0:000> !dh -a notepad
    
        File Type: EXECUTABLE IMAGE
        FILE HEADER VALUES
            8664 machine (X64)
            ...
            1000 base of code
                 ----- new -----
        00000000ff0c0000 image base
        ...
    0:000> u ff0c0000+3570
    notepad!WinMainCRTStartup:
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been scouring the web for something like this and being a lazy
I have been scouring the internet trying to figure this one out. Any ideas
I have been scouring for a while about this one but haven't seen a
I have been scouring the net but I can't seem to find any examples
I've been scouring Google for an answer to this problem I'm having and have
If this is a repost, I apologize, but I have been scouring the net
I've been scouring the internet for days, but have been unable to find a
I know this has been asked ALOT on here, but I have been scouring
Now I have been scouring the web for what seems to be a mystery
I have been scouring the web to try to find the perfect technique for

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.