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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:27:26+00:00 2026-05-31T05:27:26+00:00

Have found a function address in a DLL. Have no source code for this

  • 0

Have found a function address in a DLL. Have no source code for this DLL, not mine. This DLL is not really changed frequently, but when changed, it is a problem for me to find it by disassembling. Saw some notes in web about making it signature and then find it by this saved signature. Can you, please, give some ideas or working example on how to implement this?

  • 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-31T05:27:26+00:00Added an answer on May 31, 2026 at 5:27 am

    You can achieve this by code signature scanning, which is something I have done in the past. The concept mainly works by relying on the fact that functions often do not change too much between updates, but simply relocate because they were pushed forward or back by other functions being expanded or shrunk.

    Let’s take the example of MessageBoxA, who’s disassembly looks like this for me:

    765DEA11 > 8BFF             MOV EDI,EDI
    765DEA13   55               PUSH EBP
    765DEA14   8BEC             MOV EBP,ESP
    765DEA16   833D 749A5E76 00 CMP DWORD PTR DS:[765E9A74],0
    765DEA1D   74 24            JE SHORT USER32.765DEA43
    765DEA1F   64:A1 18000000   MOV EAX,DWORD PTR FS:[18]
    765DEA25   6A 00            PUSH 0
    765DEA27   FF70 24          PUSH DWORD PTR DS:[EAX+24]
    765DEA2A   68 A49E5E76      PUSH USER32.765E9EA4
    765DEA2F   FF15 34145876    CALL DWORD PTR DS:[<&KERNEL32.Interlocke>; kernel32.InterlockedCompareExchange
    765DEA35   85C0             TEST EAX,EAX
    765DEA37   75 0A            JNZ SHORT USER32.765DEA43
    765DEA39   C705 A09E5E76 01>MOV DWORD PTR DS:[765E9EA0],1
    765DEA43   6A 00            PUSH 0
    765DEA45   FF75 14          PUSH DWORD PTR SS:[EBP+14]
    765DEA48   FF75 10          PUSH DWORD PTR SS:[EBP+10]
    765DEA4B   FF75 0C          PUSH DWORD PTR SS:[EBP+C]
    765DEA4E   FF75 08          PUSH DWORD PTR SS:[EBP+8]
    765DEA51   E8 73FFFFFF      CALL USER32.MessageBoxExA
    765DEA56   5D               POP EBP
    765DEA57   C2 1000          RETN 10
    

    The trick is to guess at some block of code which you think is likely to stay the same in an update, but more importantly is unique to this function. Typically, it is useless to scan for the epilogue/prologue. I would probably take the following block:

    765DEA16   833D 749A5E76 00 CMP DWORD PTR DS:[765E9A74],0
    765DEA1D   74 24            JE SHORT USER32.765DEA43
    765DEA1F   64:A1 18000000   MOV EAX,DWORD PTR FS:[18]
    765DEA25   6A 00            PUSH 0
    765DEA27   FF70 24          PUSH DWORD PTR DS:[EAX+24]
    765DEA2A   68 A49E5E76      PUSH USER32.765E9EA4
    765DEA2F   FF15 34145876    CALL DWORD PTR DS:[<&KERNEL32.Interlocke>; 
    

    You have to make a balance when choosing the length of the block. The longer the block, the more likely it is to uniquely identify a function, but also the more likely it is that some code will be inserted during the update which means it is split, etc. Note that the block I have chosen has multiple memory references. We can not rely on any data or function addresses since these may be relocated on the next update, so we fill those bytes with wildcards:

    765DEA16   833D XXXXXXXX 00 CMP DWORD PTR DS:[XXXXXXXX],0
    765DEA1D   74 XX            JE SHORT XXXXXXXX
    765DEA1F   64:A1 18000000   MOV EAX,DWORD PTR FS:[18]
    765DEA25   6A 00            PUSH 0
    765DEA27   FF70 24          PUSH DWORD PTR DS:[EAX+24]
    765DEA2A   68 XXXXXXXX      PUSH XXXXXXXX
    765DEA2F   FF15 XXXXXXXX    CALL DWORD PTR DS:[XXXXXXXX] 
    

    This means our byte signature is now:

    0x83 0x3D 0x? 0x? 0x? 0x? 0x74 0x? 0x64 0xA1 0x18 0x00 0x00 0x00 0x6A
    0x00 0xFF 0x70 0x24 0x68 0x? 0x? 0x? 0x? 0xFF 0x15 0x? 0x? 0x? 0x?

    The 0x? bytes indicate wildcards which are bytes we expect to change. The other ones are bytes we expect will not change in the update. To use the bytes to locate the function at runtime, you need to scan for these bytes (taking into account the wildcards). The process is approximately so:

    • Enumerate all executable pages of the process (VirtualQueryEx)
    • Scan for the byte signature we found (taking into account the wildcards – this is trivial to implement as a for loop which skips wildcard bytes)
    • To obtain the true function address, fix up the address you get with the offset of the block from the original function (in this case, 0x765DEA16 - 0x765DEA11 => 0x5)

    Actually, rather than enumerating all executable pages, it is often enough to find what module the function lies within (user32.dll) in this case, and search within that module only.

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

Sidebar

Related Questions

I have found this Related entry and a few others but I have not
I have found some in the Cappuccino website (vim, textmate and SubEthaEdit), but not
I'm learning JQuery and have found the factory function $() with its selectors quite
I have done various tests and I have found that the jQuery validate function
So: I have the following function, adapted from a formula found online, which takes
I have found a few libraries to edit MP3 tags (UltraID3Lib is great) but
I have found a code to show Google maps with multiple markers using JQuery
I have the following code in my webpage - the map div is not
Alright, I presented this question on the MSDN forums but have yet to receive
I have a virtual machine, which on VM_Create passes the address of a function

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.