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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:10:01+00:00 2026-05-17T18:10:01+00:00

running on windows 7, 32bit home pro I created a very simple few line

  • 0

running on windows 7, 32bit home pro

I created a very simple few line app in visual studio 2008 , compiled and linked with standard libraries in release mode into executable test.exe.

The code in c is as follows:

char* test = "h";
int main()
{
    _asm 
    {
        push 0xFEEDBACC;
    }
    MessageBoxA(0,test,test,0);
}

which results in the following machine code and corresponding assembly as viewed in VS2008 (addresses rebased below, normal starting virtual address of 0x4001000)

char* test = "h";
int main()
{
    _asm 
    {
        push 0xFEEDBACC;
00261000 68 CC BA ED FE   push        0FEEDBACCh 
    }
    MessageBoxA(0,test,test,0);
00261005 6A 00            push        0    
00261007 68 F4 20 26 00   push        offset string "h" (2620F4h) 
0026100C 68 F4 20 26 00   push        offset string "h" (2620F4h) 
00261011 6A 00            push        0    
00261013 FF 15 A4 20 26 00 call        dword ptr [__imp__MessageBoxA@16 (2620A4h)] 
}

Now instead of calling MessageBox I want instead to push another string “h” right after the push 0, so using hexedit I search for the section containing FF15A420… and overwrite it to become

90 68 CC BA ED FE

Now if I open up the executable in IDA free i see the following in my .text section:

.text:00401000                 push    0FEEDBACCh
.text:00401005                 push    0
.text:00401007                 push    offset unk_4020F4
.text:0040100C                 push    offset unk_4020F4
.text:00401011                 push    0FFFFFF90h
.text:00401013                 nop
.text:00401014                 push    0FEEDBACCh
.text:00401019                 retn

this looks good so far , i see at 0x401014 my new push statement.

Now, if I debug the exe in IDA free suddenly I see my code changes (see below) the push 0FEEDBACC becomes push 0FFA4BACC and I cant see why the first 2 bytes are changed.

.text:00F71000 push    0FEEDBACCh
.text:00F71005 push    0
.text:00F71007 push    offset unk_F720F4
.text:00F7100C push    offset unk_F720F4
.text:00F71011 push    0FFFFFF90h
.text:00F71013 nop
.text:00F71014 push    0FFA4BACCh  // im puzzled!

Can anyone explain what is going on here and why the number I am pushing on is getting modified? I tried changing the starting physical byte of this address (suspecting some sort of alignment issue) but it didnt seem to make a difference.

Thanks,

skimon

  • 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-17T18:10:02+00:00Added an answer on May 17, 2026 at 6:10 pm

    The image base was changed too between the last two screens.

    I think that it just got relocated (there used to be an address): the dword at 0x15: A4 20 26 00 points to IAT, so after relocation its high word (bytes 0x17 0x18) will be modified by adding

    0x00F7 – 0x0040 = 0x00B7 to it.

    Try disabling image-base randomization (or just remove the relocations).

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

Sidebar

Related Questions

Using Visual Studio, I have built an C++ application running in 32bit. It will
I recently installed SQL Server 2008 Express on my Windows 7 Ultimate x64 home
I'm running Windows XP SP3 and I do have the latest .NET libraries installed,
Note I'm running windows, the path just looks like it's linus because I typed
My details: custom mobile device running Windows CE 4.2, Compact Framework 2.0 SP1. C#
I have a headless server running Windows Server 2003, and administer it via VNC.
We are migrating to a new server running Windows 2003 and IIS 6. When
I have the Xming X Window Server installed on a laptop running Windows XP
I'm running MySQL 5 on a linux server on my local network. Running windows
I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC

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.