Offsets: not how but why! menu

User Tag List

Results 1 to 3 of 3
  1. #1
    0xd5d's Avatar Member
    Reputation
    11
    Join Date
    Mar 2021
    Posts
    20
    Thanks G/R
    22/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Offsets: not how but why!

    Why do static addresses have always the same offset every time a program is run? (I'm thinking about WOW, but I think this question can apply to all programs).
    Also, are static addresses the location of static variables?

    I have seen many posts asking for offsets location, but I'm unable to find an explanation on why those addresses are always the same. As per my understanding, each time an allocation is made, it should be in a different address, thus a different offset from "WOWBase" (if referring to WOW).

    Thank you for your answers!
    Last edited by 0xd5d; 03-31-2021 at 05:23 AM.

    Offsets: not how but why!
  2. #2
    0xd5d's Avatar Member
    Reputation
    11
    Join Date
    Mar 2021
    Posts
    20
    Thanks G/R
    22/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After days of research, I found part of the answer here: C++ , Cheat Engine / OllyDBG finding base "static" address from multi-level pointers - Stack Overflow
    I'm writing here my findings, it may be useful for other people!

    Let's take the example of the "current player" object in the world of warcraft game. Its static address (=offset from the game base address), which is probably the address of the address of the "current player" object could refer to an address on the stack that does not change due to the call stack state being the same each time the game is launched.
    However the adress of the "current player" object can indeed change with new allocations.
    In other words, at some point the adress of the adress of the "current player" object will get stored to the stack, to a relative position from the program's base adress which is always the same because the call stack is always the same.

    I have seen (here: Where are static variables stored in C and C++? - Stack Overflow) that the static variables in c++ are stored in the .BSS or .Data region. I still need to figure out whether their offset (from the program base address) are the same each time the program runs (I may try a test with a sample program in c++)
    Last edited by 0xd5d; 03-31-2021 at 12:37 PM.

  3. #3
    0xd5d's Avatar Member
    Reputation
    11
    Join Date
    Mar 2021
    Posts
    20
    Thanks G/R
    22/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

Similar Threads

  1. Replies: 13
    Last Post: 08-30-2016, 01:04 PM
  2. Replies: 7
    Last Post: 09-13-2013, 08:33 AM
  3. [ArcEmu] How i can connet to server with not ip but like name of site?
    By hoool123 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-17-2011, 02:59 PM
  4. Replies: 8
    Last Post: 11-26-2006, 01:17 PM
  5. I'm not sure, but I think I have news.
    By A_Snake01 in forum World of Warcraft Model Editing
    Replies: 20
    Last Post: 11-08-2006, 01:54 AM
All times are GMT -5. The time now is 06:55 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search