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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:27:19+00:00 2026-06-08T21:27:19+00:00

I have been messing around with the PE file structure in Assembly Language. I’m

  • 0

I have been messing around with the PE file structure in Assembly Language. I’m pretty sure I have gotten to the the Import Section correctly. I am using this as a reference where each box is equal to 4 bytes:

+-------------------------+-------------------------+
|     RVA to a list of    |       DATE/TIME         |
| pointer to APIs names   |                         |  IMPORT DATA DIRECTORY
+-------------------------+-------------------------+          #1
| .DLL address (unused)   |     RVA to .DLL name    |
+-------------------------+-------------------------+
|RVA to API address list  | 
+-------------------------+

Ollydbg. Notice the value of eax on the right side (00402048) which is the value I looked up in the import section and then look at the value of the highlighted instruction (00402000)

Ollydbg. Notice the value of eax on the right side (00402048) and then look at the value of the highlighted call instruction is jumping to(00402000).

I attempted to call the first first function from the (RVA to API address list) which is ExitProcess however when I tried issuing a call to the address, it caused my program to crash. When I debugged it with Ollydbg, I found out that the address when call ExitProcess was issued was different than the address I found in the list. In Ollydbg the address I found pointed to <&KERNEL32.ExitProcess> while the call ExitProcess pointed to < JMP.&KERNEL32.ExitProcess>. I have read somewhere about some kind of jmp stub. Is that what this is? How am I supposed to call the functions in the “RVA to API address list”?

I know this may be confusing. If you need more clarification let me know.

Here is the code:

extern printf
extern ExitProcess
global _start
section .code
 _start:
    mov eax, [imagebase]
    mov esi, eax
    add eax, 3ch
    mov eax, DWORD [eax]
    add eax, esi; PE header pointer in eax
    add eax, 128; 24 for PE Optional Header offset and then 104 for import RVA
    mov ebx, DWORD [eax]
    add ebx, DWORD [imagebase]; ebx now has import section offset
    mov eax, DWORD [ebx+16]
    add eax, DWORD [imagebase]; has array offset
    mov ecx, ExitProcess
    push 0
    call ecx
    ;call eax
    ;jmp ecx
    ;call ExitProcess

imagebase: db 0,0,64,0; 0x00400000; This is right
  • 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-08T21:27:20+00:00Added an answer on June 8, 2026 at 9:27 pm

    It seems as though I had found array but I never retrieved the value at that address. So I was trying to call the function at the address of the array not the at the first element of the array.

    extern printf
    extern ExitProcess
    global _start
    section .code
    _start:
        mov eax, [imagebase]
        mov esi, eax
        add eax, 3ch
        mov eax, DWORD [eax]
        add eax, esi; PE header pointer in eax
        add eax, 128; 24 for PE Optional Header offset and then 104 for import RVA
        mov ebx, DWORD [eax]
        add ebx, DWORD [imagebase]; ebx now has import section offset
        mov eax, DWORD [ebx+16]
        add eax, DWORD [imagebase]; has array offset
        mov eax, [eax];This is what I needed to do
        push 0
        call eax
    
    imagebase: db 0,0,64,0; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been messing around with writing some stored procedures in .NET code with
I have been messing around with Leaks trying to find which function is not
I have been messing around with my meta descriptions, trying to make them more
I have been messing around with OpenGL lately, and I noticed that the windows
I've just been messing around with file_get_contents() at school and have noticed, it allows
I have been messing around with iTunes COM from python. However, I haven't been
I've recently taken the plunge into DirectX and have been messing around a little
I've been messing around with some x86 assembly as its come up in a
I have been messing around with GWT uploads lately. I want to have the
I have been messing around with recursion today. Often a programming technique that is

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.