[C++] Some questions that need answers menu

Shout-Out

User Tag List

Results 1 to 15 of 15
  1. #1
    ejt's Avatar Contributor
    Reputation
    210
    Join Date
    Mar 2008
    Posts
    166
    Thanks G/R
    3/112
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    [C++] Some questions that need answers

    Hello,

    I'm looking to get some of my basic C++ questions answered for dealing with World of Warcraft memory reading.

    First of I know in 4.0.1 patch you need base address of wow.exe for the offsets to work, but I can't seem to find anything pointing me to something useful that could help me find it.
    I started guessing on 0x10000 but that doesn't seem to work and I tried 0x4000000 but doesn't seem to work either. Is this dynamic?

    Secondly I want to read the memory from wow, but can't seem to find anything that I can learn from. I've searched the forum for weeks now and tried to get something cooking and did get my program to print the player name (3.3.5a) but nothing fancy.

    This is my program at the moment:

    Code:
    #include <windows.h>
    #include <tlhelp32.h>
    #include <shlwapi.h> 
    #include <iostream>
    
    #define PROC_NAME "wow.exe"
    
    HANDLE hProc;
    
    unsigned int baseAddress = 0x10000;
    unsigned int PlayerName = baseAddress + 0x008A5C58;
    
    int main() {
        // Enable debug privileges
        EnablePriv();
    
        hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, getTargetProcessIDFromProcName(PROC_NAME));
    
        if(!hProc) {
            std::cout<<"Process could not be found/opened.\n";
            std::cin.get();
            return 0;
        }
        char playerName[16] = {'\0'};
        ReadProcessMemory(hProc, &PlayerName, &playerName, sizeof(playerName), NULL);
        std::cout<<playerName<<std::endl;
        std::cin.get();
        return 0;
    }
    Doesn't print anything, the offset is from the thread in this forum, credits to the one who posted it.
    Removed EnablePriv and getTargetProcessIDFromProcName to make it more readable.

    Thirdly, if anyone could give me a quick example on how to use functions in wow.exe for ex. target function or something cause I got no idea and can't find any informations on how to use them in C++.

    Any help or information you could give me is very much appreciated.

    I wish NOT to switch to C# and most information I could find was for C#, I've downloaded and looked at tons of sourcecode but didn't help me much.

    [C++] Some questions that need answers
  2. #2
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In short - search HadesMem. In long - no one will bother to answer you just because you dont bother to search tons of sources/explanations/etc on this forum. The question you asking being discussed here 1k times.

  3. #3
    caytchen's Avatar Contributor
    Reputation
    138
    Join Date
    Apr 2007
    Posts
    162
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ejt View Post
    First of I know in 4.0.1 patch you need base address of wow.exe for the offsets to work, but I can't seem to find anything pointing me to something useful that could help me find it.
    I started guessing on 0x10000 but that doesn't seem to work and I tried 0x4000000 but doesn't seem to work either.
    Is this dynamic?
    You do the "connect the dots" part.

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't find anything to learn from? Do you suffer from blindness?

  5. #5
    moritzmdm's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /editet >->
    Last edited by moritzmdm; 10-19-2010 at 02:29 PM.

  6. #6
    caytchen's Avatar Contributor
    Reputation
    138
    Join Date
    Apr 2007
    Posts
    162
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by moritzmdm View Post
    Due that Blizzard activated ASLR we need to have relative addresses. If you find addresses post them with an image base of 0x1000 and you can add that address with your base address of WoW.exe.

    The function for the base adress of WoW:
    paste-code - easily share snippets.

    Thanks to Unkn0wn0x from e*pvpers for this!
    Hooray for ****ing up the looping idiom. Oh my.

  7. #7
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sigh, why do people insist on casting pointers to fixed-size integer types. Especially annoying given they're typically the same people who later on complain their code doesn't work under AMD64 or IA64.

  8. #8
    ejt's Avatar Contributor
    Reputation
    210
    Join Date
    Mar 2008
    Posts
    166
    Thanks G/R
    3/112
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by moritzmdm View Post
    Due that Blizzard activated ASLR we need to have relative addresses. If you find addresses post them with an image base of 0x1000 and you can add that address with your base address of WoW.exe.

    The function for the base adress of WoW:
    paste-code - easily share snippets.

    Thanks to Unkn0wn0x from e*pvpers for this!
    Thanks for the link, got playername working now and got the correct baseaddress. Gonna start exploring the offsets now +Rep

  9. #9
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by moritzmdm View Post
    Due that Blizzard activated ASLR we need to have relative addresses. If you find addresses post them with an image base of 0x1000 and you can add that address with your base address of WoW.exe.

    The function for the base adress of WoW:
    paste-code - easily share snippets.

    Thanks to Unkn0wn0x from e*pvpers for this!
    DWORD wowbase = (DWORD)GetModuleHandle("Wow.exe");
    would be too easy?

  10. #10
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    DWORD wowbase = (DWORD)GetModuleHandle("Wow.exe");
    would be too easy?
    That only works if you're injected.

  11. #11
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    That only works if you're injected.
    Also would only work on 32bit, if wow actually had a 64bit executable
    I hacked 127.0.0.1

  12. #12
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    DWORD wowbase = (DWORD)GetModuleHandle("Wow.exe");
    would be too easy?
    Why is everyone passing in static strings to GetModuleHandle? Just pass NULL and it would work even if someone has renamed wow.exe

  13. #13
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    Why is everyone passing in static strings to GetModuleHandle? Just pass NULL and it would work even if someone has renamed wow.exe
    More efficient too.

  14. #14
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ramey View Post
    Indeed they are! But seriously, if more people actually looked up stuff on msdn before they came here asking for help at least half of the threads on this forum should never have been made.

  15. #15
    Unkn0wn0x's Avatar Member
    Reputation
    6
    Join Date
    Aug 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    DWORD wowbase = (DWORD)GetModuleHandle("Wow.exe");
    would be too easy?
    In fact that no one codes injected on that forum (except of 3 members I know), I posted this alternate snippet to be sure that there are no stupid questions in regard to the patch.

    By the way your method is still not the best, but this has been mentioned already.

Similar Threads

  1. a few questions i need answered
    By jedite1000 in forum WoW EMU Questions & Requests
    Replies: 14
    Last Post: 09-11-2008, 08:45 AM
  2. Some questions that need answering!!
    By nickr12 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 07-12-2008, 02:19 AM
  3. New to servers. Need some questions answered.
    By Boge42 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 06-19-2008, 05:16 PM
  4. Some changes that need to be done offering gold
    By Fisherpwn in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 07-27-2007, 10:01 PM
All times are GMT -5. The time now is 11:48 AM. 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