Getting attributes in process menu

User Tag List

Results 1 to 6 of 6
  1. #1
    bad6oy30's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Dec 2010
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting attributes in process

    I've been working on getting attributes from actors for a while now, and I can't seem to get it down. Right now, I'm getting access violations when I call GetInt(). Can anyone share some insight?

    For 1.0.3.10485 I have this setup:
    Code:
    int __cdecl GetPlayerGUID() //0x97EBF0 
    void* __cdecl GetActorPtrFromGUID(int) //0x829F90
    int __thiscall GetInt(void*, int) //0x8C7700
    
    #define Hitpoints_Cur 103
    And I'm running in EndScene:
    Code:
    int myGuid = GetPlayerGUID();
    void* myPtr = GetActorPtrFromGUID(myGuid);
    
    // Everything OK up to this point
    // Fails here (access violation)
    int hp = GetInt(myPtr, Hitpoints_Cur);
    
    // Also fails (access violation):
    int hp = GetInt(myPtr, Hitpoints_Cur | 0xfffff000);
    The access violation is in GetAttributeFromFAG (0x870f60)
    Code:
    00870F60  push        ebp  
    00870F61  mov         ebp,esp  
    00870F63  mov         eax,dword ptr [ebp+10h]  
    00870F66  mov         ecx,eax  
    00870F68  sar         ecx,10h  
    00870F6B  xor         ecx,eax  
    00870F6D  push        esi  
    00870F6E  mov         esi,dword ptr [ebp+0Ch]  ; here
    00870F71  and         ecx,dword ptr [esi+0C8h]

    Getting attributes in process
  2. #2
    _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)
    IIrc GetInt wants a pointer to an ACD, not an Actor. I might be wrong though because it's been a while since I used it and I don't have my IDA database on this computer.

  3. #3
    RamirezX's Avatar Member
    Reputation
    2
    Join Date
    Apr 2012
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Calling convention of GetInt is __thiscall .. did you set everything right?
    Did you set correct ECX ?

  4. #4
    Valtharak's Avatar Master Sergeant
    Reputation
    51
    Join Date
    Feb 2011
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as Mike said you need the acd not the RActor

    GetACDPtrFromGUID 8170B0

    int myGuid = GetPlayerGUID();
    void* myPtr = GetActorPtrFromGUID(myGuid);
    int acdguid = read(myPtr +4)
    void* myPtrAcd = GetACDPtrFromGUID(acdguid);

    int hp = GetInt(myPtrAcd, Hitpoints_Cur | 0xfffff000);

  5. #5
    bad6oy30's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Dec 2010
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot Mike & Valtharak... that's definitely got me back on track. I'm now reading a value that changes as my HP changes in-game.

    That value I'm getting however is confusing me... here's how my hit-points correlate to the value read from GetInt:

    31,676 (0x7BBC) reads 0x46f77814 (1,190,623,252)
    30,519 (0x7737) reads 0x46ee6de1 (1,190,030,817)
    25,492 (0x6394) reads 0x46c72714 (1,187,456,788)
    130 (0x82) reads 0x43020000
    140 (0x8c) reads 0x430c0000

    Reading another attribute (Vitality_Total) with GetInt is also giving wacky results:
    9 -> 0x41100000
    10 -> 0x41200000

    Code:
    void WriteText(std::wostream& os)
    {
    	int guid = GetPlayerGUID();
    	void* pActor = GetActorPtrFromGUID(guid);
    	os << "Player GUID: " << std::hex << guid << ", pActor: " << pActor;
    	if (0 != pActor)
    	{
    		int acdGuid = *(int*)((char*)pActor + 4);
    		void* pACD = GetACDPtrFromGUID(acdGuid);
    		os << ", acdGuid: " << acdGuid << ", pACD: " << pACD;
    		if (0 != pACD)
    		{
    			os << ", attr: " << GetInt(pACD, _testAttrib | 0xfffff000);
    		}
    	}
    	os << '\n';
    }

  6. #6
    bad6oy30's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Dec 2010
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry... it looks like those are floats... disregard query, and thanks again.

Similar Threads

  1. Getting hook-returned results to another process
    By xpl0itz in forum Programming
    Replies: 0
    Last Post: 03-24-2010, 12:09 PM
  2. Replies: 47
    Last Post: 03-09-2010, 11:25 AM
  3. Getting Process ID
    By WhiteShizzle in forum Programming
    Replies: 0
    Last Post: 12-25-2009, 03:46 PM
  4. Replies: 0
    Last Post: 09-30-2009, 12:59 PM
  5. How to get read AND write access to wow process?
    By Shutzler in forum WoW Memory Editing
    Replies: 8
    Last Post: 09-26-2009, 04:16 PM
All times are GMT -5. The time now is 08:50 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