I need to find an address in a game and am not sure how segement offsets are handled.
in ollydbg it shows me a datastructure is at:
ss:[esp+28]
esp = 0019DF94
ss = 002B
so what is the actual addres of the structure?
is it ss+esp+28
?
I need to find an address in a game and am not sure how segement offsets are handled.
in ollydbg it shows me a datastructure is at:
ss:[esp+28]
esp = 0019DF94
ss = 002B
so what is the actual addres of the structure?
is it ss+esp+28
?
esp + 28 gives you the virtual address, which is the one you'll use from within your program. In protected mode (which is what you're using in Windows) segment registers are segment selectors, which are indexes for the GDT. If you wanted the global address of your data you would need to look up the value of SS in the GDT, read the base address and then add that to esp + 28 (See this question). In real mode the segment registers are simply shifted left by 4 and then added to your address (see this article).