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

  • Home
  • SEARCH
  • 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 3616950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:33:43+00:00 2026-05-18T22:33:43+00:00

I have the following code: Func5() { ShowStackTrace();} Func4() { Func5();} Here is the

  • 0

I have the following code:

Func5() { ShowStackTrace();}
Func4() { Func5();}

Here is the stack trace I have –

**Frame for Func5**
EIP : 403899
Function name : Func5
EBP : 12ff0c
ESP : 12fed0
Return address : 4038c8
CS : 23
DS : 9998
ESI : 0
EDI : 0

**Frame for Func4**
Function name : Func4
EBP : 12ff14
ESP : 12ff14
CS : 23
DS : 9998
ESI : 0
EDI : 0

Now using the return address of Func5 I got the first 5 bytes above it

ff ff ff 88 E8

The presence of E8 here means this is a call statement (near) and the next 4 bytes are to be used to calculate the address. So the EIP when we read CALL Func5 will be 4038c3. How do I calculate the starting address of Func5 from this data?
Please do tell if you need any other data. Also how is the calculation done if this is a far call (opcode – FF)?

  • 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-05-18T22:33:44+00:00Added an answer on May 18, 2026 at 10:33 pm

    You are printing the bytes in inverse order. The correct order is:

    E8 88 ff ff ff 
    

    where E8 is opcode for “jump relative imm32”

    That would mean jump relative 0xFFFFFF88, or -0x78 because x86 uses little endiannes.

    EDIT: it’s relative to the next byte after the call instruction. Eg,

    0x100: E8 10 00 00 00 ;// call relative, will call 0x115 (0x105 + 0x10)
                          ;// and will leave 0x105 on the stack as return address
    0x105: 90             ;// next instruction
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.