[WoW 5.4.8.18414] discussion about memory address variation menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [WoW 5.4.8.18414] discussion about memory address variation

    Hi,

    I'm working on a program that reads specific informations from the memory and does other stuff (that are irrilevent for the purpose of this thread).

    So I have understood that the address read by Cheat Engine has a fixed offset from the address read directly by the program.

    The code that scans every address searching for the build (for debugging purpose only) after connecting to the relative process is:
    Code:
    for (int i = 0; i<0xFFFFFFF; ++i) {
    	if (read<uint32>(hWow, u32WowBase + i) == 18414) {
    		cout << std::hex << i << endl;
    	}
    }
    this is the result that I found:
    [WoW 5.4.8.18414] discussion about memory address variation-offset_build_548-png

    The black part contains the addresses found by the program while the white part obviously contains the addresses found by Cheat Engine.

    As you can see they differ everytime (except the address 0x40ee69e that dunno why it has been found, and if you want please explain me why) by 4 at the 6th number from the right.

    That's good I can translate address, read them and do my job.

    The only "tiny" problem is that the memory addresses are different for every computer that launches the wow 5.4.8 client.

    Here is the result of my program running on another computer:
    [WoW 5.4.8.18414] discussion about memory address variation-offset_build_548_mitsu-jpg

    The addresses are completely different (and I don't need to check those addresses with cheat enginge because my purpose is to find address for all the data I need that are the same for every client that launches the program) from the ones found with the same program but with my computer.

    Note just to give you more info:
    Running the program on Wotlk WoW clients with the version 3.3.5 and searching for its build number that is 12340, the addresses are the same for every computer that runs the program.

    This answer is related to 5.4.8.18414 WoW client only:
    Can you please explain me how can I found memory address that are the same regardlessly the computer that runs the program?

    Please be specific in order to avoid misunderstanding by me (I'm a newbie of this WoW memory editing world), thank you very much!

    [WoW 5.4.8.18414] discussion about memory address variation
  2. #2
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    325
    Thanks G/R
    191/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By using static offsets and pointers. This matter is not related to the patch or anything.
    Check my blog: https://zzuks.blogspot.com

  3. Thanks Link88 (1 members gave Thanks to Corthezz for this useful post)
  4. #3
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Corthezz View Post
    By using static offsets and pointers. This matter is not related to the patch or anything.
    Can you please be more specific is possible? Like linking me some threads in this forum or anything else.

    In the meanwhile, following your tip I'm studying how to work with pointers with Cheat Engine.

    Thank you

  5. #4
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The memory addresses are relative to the location at which Wow.exe is loaded into. In 3.3.5 it is always loaded at 0x00400000 because ASLR is disabled. IIRC 4.0 and onward were compiled with ASLR enabled, so the base address can differ.

  6. #5
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    The memory addresses are relative to the location at which Wow.exe is loaded into. In 3.3.5 it is always loaded at 0x00400000 because ASLR is disabled. IIRC 4.0 and onward were compiled with ASLR enabled, so the base address can differ.
    Clear and interesting.

    So I think that the key is to find the pointer address of the data I'm looking for and read the pointed value instead of the direct address value.

    Admitting that I'm right, have the pointers a fixed value that scales between any computer?

    I must find something that is static and let me start from the same position for every computer that runs the program.

    edit: searching in the forum my friend found this thread (Finding the BaseAddress when ASLR is enabled) that seems to be exactly what I need. I'll give it a try
    Last edited by Link88; 12-13-2016 at 11:47 AM.

  7. #6
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've read that thread and tried the solutions they say.

    Especially this one always returns 0x00400000 as base address even with 5.4.8 client.

    Any idea on how to face this searching for the real base variable address ?

    When I have found the base address should I only add the offset listed here and the job is done right?
    Last edited by Link88; 12-14-2016 at 08:15 AM.

  8. #7
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    The memory addresses are relative to the location at which Wow.exe is loaded into. In 3.3.5 it is always loaded at 0x00400000 because ASLR is disabled. IIRC 4.0 and onward were compiled with ASLR enabled, so the base address can differ.
    I'm using this function:

    Code:
    DWORD GetBaseAddress(DWORD pid, char *procName, DWORD &size)
    {
        WCHAR wmsg[MAX_PATH];
        MultiByteToWideChar(CP_ACP, 0, procName, -1,  wmsg, MAX_PATH);
    
        MODULEENTRY32  pe;
        HANDLE thSnapshot;
        BOOL retval, ProcFound = false;
    
        thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
    
        if(thSnapshot == INVALID_HANDLE_VALUE)
        {
            //cout << "Error: unable to create toolhelp snapshot" << endl;
            return false;
        }
    
        pe.dwSize = sizeof(MODULEENTRY32);
        retval = Module32First(thSnapshot, &pe);
    
    	wcout << "wmsg: " << wmsg << endl;
        while(retval)
    	{
    		wcout << "pe.szModule: " << pe.szModule << endl;
            if(_wcsicmp(pe.szModule, wmsg)==0 )
            {
    			cout << "FOUND" << endl;
                ProcFound = true;
    			// Commented for debugging purpose
    			//break;
    		}
    
    		cout << "modBaseAddr " << std::hex << (DWORD)pe.modBaseAddr << endl;
    
            retval    = Module32Next(thSnapshot,&pe);
    		pe.dwSize = sizeof(MODULEENTRY32);
        }
    
        CloseHandle(thSnapshot);
        if(ProcFound)
        {
            size = pe.modBaseSize;
            return (DWORD)pe.modBaseAddr;
        }
        return false;
    }
    For testing purpose I print every process base address and this is the result:
    [WoW 5.4.8.18414] discussion about memory address variation-base_add-png

    BaseAddress is 0x400000, test made on Windows 10, WoW client 5.4.8.

    Going to read at the given baseaddress (which we assume it is bad since ASLR is enabled) plus the offset found in the relative thread for x64 which is 0x1274FE4 the result is:
    [WoW 5.4.8.18414] discussion about memory address variation-base_add_2-png

    Any idea?

  9. #8
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You're reading a 64 bit offset from a 32 bit process?

  10. #9
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    You're reading a 64 bit offset from a 32 bit process?
    I tried both B94E74 and 1274FE4 without success:
    [WoW 5.4.8.18414] discussion about memory address variation-build_x86-png

  11. #10
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Post your full code.

  12. #11
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is:
    Code:
        DWORD dwWowPid = GetWowProc();
        if (!dwWowPid)              // get wow PID
        {        
            printError ("WoW is not running...\n");
            system("PAUSE");
            exit(0);
    	}
    
        DWORD size;
    
        UINT u32WowBase = GetBaseAddress(dwWowPid,"wow.exe", size);
        HANDLE hWow = NULL;
    
        if ((hWow = OpenProcess(PROCESS_VM_READ, false, dwWowPid)) == NULL)
        {
            printError ("Unable to open WoW process... try running as administrator\n");
            system("PAUSE");
            exit(0);
        }
    
    	InfoDumpAddress *addr = new InfoDumpAddress548();
    
    	cout << "Base " << std::hex << u32WowBase << endl;
    	cout << "Offset " << std::hex << addr->BuildNumber << endl;
    	cout << "Address " << std::hex << u32WowBase + addr->BuildNumber << endl;
    	cout << "Client build " << (read<uint32>(hWow, u32WowBase + addr->BuildNumber)) << endl;
    	system("PAUSE");
    	exit(0);
    where:

    GetWoWProc() calls the following method:
    Code:
    DWORD GetTargetThreadIdFromProcname(char *procName)
    {
        WCHAR wmsg[MAX_PATH];
        MultiByteToWideChar(CP_ACP, 0, procName, -1,  wmsg, MAX_PATH);
    
        PROCESSENTRY32 pe;
        HANDLE thSnapshot;
        BOOL retval, ProcFound = false;
    
        thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    
        if(thSnapshot == INVALID_HANDLE_VALUE)
        {
            //cout << "Error: unable to create toolhelp snapshot" << endl;
            return false;
        }
    
        pe.dwSize = sizeof(PROCESSENTRY32);
    
        retval = Process32First(thSnapshot, &pe);
    
        while(retval)
        {
            if(_wcsicmp(pe.szExeFile, wmsg)==0 )
            {
                ProcFound = true;
                break;
            }
            retval    = Process32Next(thSnapshot,&pe);
            pe.dwSize = sizeof(PROCESSENTRY32);
        }
    
        CloseHandle(thSnapshot);
    
        if(ProcFound)
            return pe.th32ProcessID;
        return false;
    }
    GetBaseAddress():
    Code:
    DWORD GetBaseAddress(DWORD pid, char *procName, DWORD &size)
    {
        WCHAR wmsg[MAX_PATH];
        MultiByteToWideChar(CP_ACP, 0, procName, -1,  wmsg, MAX_PATH);
    
        MODULEENTRY32  pe;
        HANDLE thSnapshot;
        BOOL retval, ProcFound = false;
    
        thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
    
        if(thSnapshot == INVALID_HANDLE_VALUE)
        {
            //cout << "Error: unable to create toolhelp snapshot" << endl;
            return false;
        }
    
        pe.dwSize = sizeof(MODULEENTRY32);
        retval = Module32First(thSnapshot, &pe);
    
    	wcout << "wmsg: " << wmsg << endl;
        while(retval)
    	{
    		wcout << "pe.szModule: " << pe.szModule << endl;
            if(_wcsicmp(pe.szModule, wmsg)==0 )
            {
    			cout << "FOUND" << endl;
                ProcFound = true;
    			// Commented for debugging purpose
    			break;
    		}
    
    		cout << "modBaseAddr " << std::hex << (DWORD)pe.modBaseAddr << endl;
    
            retval    = Module32Next(thSnapshot,&pe);
    		pe.dwSize = sizeof(MODULEENTRY32);
        }
    
        CloseHandle(thSnapshot);
        if(ProcFound)
        {
            size = pe.modBaseSize;
            return (DWORD)pe.modBaseAddr;
        }
        return false;
    }
    addr->BuildNumber is either B94E74 or 1274FE4

    I would like to see "18414" as client build

  13. #12
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Looks fine to me (apart from really ugly,) only thing notice is that you're reading game build as uint32. The ones from Torpedoes' dump is a string. Adjust your code to read a string or test another offset which you know is an integer value.

  14. #13
    Link88's Avatar Member
    Reputation
    1
    Join Date
    Nov 2016
    Posts
    12
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Looks fine to me (apart from really ugly,) only thing notice is that you're reading game build as uint32. The ones from Torpedoes' dump is a string. Adjust your code to read a string or test another offset which you know is an integer value.
    Well I have tried both int32 and string and the result is not satisfying:
    [WoW 5.4.8.18414] discussion about memory address variation-base_add_3-png

    I could try some other data (and I tried without success) but what I need at first before going on is to retrieve at 100% the build number because it is the discriminating that makes the program points to me different address list for different WoW version (the 3.3.5 address list already works correctly).

  15. #14
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Only other thing I can think of is that you have the wrong wow build. Did you try reading it in Cheat Engine? (Wow.exe+B94E74)

  16. Thanks Link88 (1 members gave Thanks to Jadd for this useful post)
  17. #15
    shauren's Avatar Established Member
    Reputation
    65
    Join Date
    Feb 2009
    Posts
    60
    Thanks G/R
    2/28
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using this code since 4.3.4 (x86)
    wow-tools/ProcessTools.cpp at master * Shauren/wow-tools * GitHub
    Reading build from file properties instead of any place in memory has not failed me yet
    Last edited by shauren; 12-16-2016 at 09:54 AM.

  18. Thanks Link88 (1 members gave Thanks to shauren for this useful post)
Page 1 of 2 12 LastLast

Similar Threads

  1. [Discussion] About patch 2.4
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 02-28-2008, 12:42 AM
  2. [Discussion] About the Server Hacking
    By Succy in forum World of Warcraft Emulator Servers
    Replies: 40
    Last Post: 02-27-2008, 11:34 AM
  3. [Discussion] About WoW not loading model edits
    By qwertymana in forum World of Warcraft Model Editing
    Replies: 4
    Last Post: 10-15-2007, 04:20 PM
  4. Stealth > Invisiblity, discussion about how to
    By moreniu in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 05-31-2007, 04:31 PM
  5. [AutoIT3] WoW Cordinator (X,Y,MapID and rotation memory reading)
    By Vladinator in forum World of Warcraft Bots and Programs
    Replies: 22
    Last Post: 05-15-2007, 03:26 AM
All times are GMT -5. The time now is 01:23 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search