Finding GetName Address + VMT index menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Shenlok's Avatar Active Member
    Reputation
    15
    Join Date
    Jul 2008
    Posts
    42
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Finding GetName Address + VMT index

    Hello!

    I have started trying to figure out how to access unit/object names myself, and I figured that since I'm working from an injected context, finding the instance methods such as CGUnit_C::GetUnitName() would be simplest (rather than trying to reverse the various name caches).

    I started by grabbing the wonderful Mac IDB for version 15662 with the debug symbols, and trying to go from e.g Script_UnitName, matching calls and static offsets to what I had labeled myself in my IDb for the current version of the game [7.2.5.24461 x64]. After a bit of searching around and comparing disassembly listings, I ~think~ I have found CGUnit_C::GetUnitName() at 4AA930. As a side note, I could only find references to two functions for getting the name of the object, CGGameObject_C::GetName and the unit name, Is this all there are?

    Here's what the pseudocode for Script_UnitName looks like with one or two renamings from my findings:
    Finding GetName Address + VMT index-scriptunitname-gif

    Note that I found two possible references for Script_UnitName, based on cross-references to the "Usage: UnitName(..." string. One of those references calls the other, so I figured the latter is the real underlying function. And it does indeed reference what I believe to be GetUnitName().

    However, I tried looking at the VMT for my local player, and didn't see any references to the function at 4AA930. Is there a different function for players? Did I perhaps check the VMT incorrectly? Or am I just way off the mark here?

    Any pointers on where I may have gone wrong/made bad assumptions would be appreciated, as well as tips on where else I could look to try and trace from. Trying to work it out myself rather than just beg for an offset, so I can find it again later when the game is patched etc.

    Cheers.
    Last edited by Shenlok; 07-12-2017 at 06:54 PM.

    Finding GetName Address + VMT index
  2. Thanks tutrakan (1 members gave Thanks to Shenlok for this useful post)
  3. #2
    air999's Avatar Contributor
    Reputation
    131
    Join Date
    Nov 2014
    Posts
    102
    Thanks G/R
    9/62
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi!

    Your assumptions is right.

    For LocalPlayer name is used function ClientServices::GetCharacterName() 0xB2F5C0, it's in the end of Script_UnitName.
    ClientServices::GetCharacterName() just return static address of s_characterName;

    Here is my decompiled Script_UnitName https://hastebin.com/ogeducamus.rb

  4. Thanks Shenlok (1 members gave Thanks to air999 for this useful post)
  5. #3
    Shenlok's Avatar Active Member
    Reputation
    15
    Join Date
    Jul 2008
    Posts
    42
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a bunch air999, that was very helpful. Glad I seem to have stumbled on some truths myself

    So if the function called in the UnitName script is indeed CGUnit_C::GetUnitName() (or rather it appears to be a simple jmp wrapper around the actual function call, the wrapper being at 4AAD60 and the real function at 4AA930), then why would I not be able to find a reference to this function from my local player's VMT? I understand that the Script_UnitName uses a wrapper around the static pointer to the player name, but I assume this is just a convenience or performance thing, and not because the local player object's class doesn't include a virtual function for getting the name. Or am I mistaken, and I shouldn't expect to find it in the VMT for the local player at all? If so, should I expect to find it for ANY player type?

    My goal here is to figure out a general solution for getting the names of the various WoW object types (Items, Units, Players, GameObjects...). I have seen references to a general CGObject_C::GetName() virtual function from very old threads, but from looking at the Mac build with the debug symbols intact I didn't find such a function at the top level of the class hierarchy.
    Last edited by Shenlok; 07-13-2017 at 04:59 AM.

  6. #4
    tutrakan's Avatar Contributor
    Reputation
    134
    Join Date
    Feb 2013
    Posts
    175
    Thanks G/R
    124/52
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shenlok View Post
    ...I started by grabbing the wonderful Mac IDB for version 15662 with the debug symbols...
    Thank you sir! I didn't know that such a beauty had even leaked!
    So sad that the enums and structs are missing.
    Last edited by tutrakan; 07-13-2017 at 08:30 PM.

Similar Threads

  1. Finding the Direct3D VMT table to hook EndScene
    By revertlife in forum WoW Memory Editing
    Replies: 14
    Last Post: 07-07-2010, 07:09 PM
  2. Replies: 6
    Last Post: 03-27-2010, 01:49 PM
  3. Help with finding zone address with Olly please
    By Overflow in forum WoW Memory Editing
    Replies: 11
    Last Post: 05-18-2009, 01:01 PM
  4. Finding TLS addresses (how to?)
    By mrbrdo in forum WoW Memory Editing
    Replies: 3
    Last Post: 06-22-2008, 02:15 PM
  5. 2.4.2 how to find jumphack address?
    By babodx in forum WoW Memory Editing
    Replies: 7
    Last Post: 06-13-2008, 03:58 AM
All times are GMT -5. The time now is 11:15 PM. 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