HWBP GetGUIDFromToken issue menu

User Tag List

Results 1 to 2 of 2
  1. #1
    aeo's Avatar Contributor
    Reputation
    135
    Join Date
    Apr 2007
    Posts
    286
    Thanks G/R
    97/68
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    HWBP GetGUIDFromToken issue

    So, Im trying to hook this function using HWBPs. I found the following example and am trying to replicate it.

    http://www.ownedcore.com/forums/worl...ml#post1774064 (Question: Target Unit By GUID in Addons, Possible?)

    However, I cannot get it to return the correct guid. I set it and its fine if the function flow doesn't get altered. However as soon as i try to set the second param and return true it crashes/returns incirrect (nil,nil) in the example of UnitName(guid). This is the part I;m having trouble understanding.
    Code:
                    ExceptionInfo->ContextRecord->Esp += 0x14;
                    ExceptionInfo->ContextRecord->Eip = 0x005A154A;
    
                    /*3.2.2a
    
                    .text:005900DB                 mov     al, 1 <-- return true
    
                    .text:005900DD                 pop     edi 
    
                    .text:005900DE                 mov     esp, ebp
    
                    .text:005900E0                 pop     ebp
    
                    .text:005900E1                 retn
    
                    */
     return EXCEPTION_CONTINUE_EXECUTION;
    From what I have read ( im doing this in x64) I should increase rsp by the size of the number of arguments passed so 3 in x64 at 8 each so rsp+24?
    Then set the RIP to wow.exe + 0x000657F34

    Code:
    .text:0000000140657F34 B0 01                                                  mov     al, 1
    .text:0000000140657F36 48 83 C4 50                                            add     rsp, 50h
    .text:0000000140657F3A 41 5D                                                  pop     r13
    .text:0000000140657F3C 5F                                                     pop     rdi
    .text:0000000140657F3D 5E                                                     pop     rsi
    .text:0000000140657F3E 5B                                                     pop     rbx
    .text:0000000140657F3F 5D                                                     pop     rbp
    .text:0000000140657F40 C3                                                     retn
    My Code

    Code:
    else if (E->ContextRecord->Rip ==  getGUIDByKeyword)
        {
            /*RCX, RDX, R8 and R9*/
            char* UnitID;
            WOWGUID** pGUID;
            UnitID = (char*)E->ContextRecord->Rcx;
            pGUID = (WOWGUID**)(E->ContextRecord->Rdx);
    
    
            if (UnitID)
            {
                WOWGUID *orig = new WOWGUID();
                int result = orig->fromString((char*)UnitID);
                if (result != 0)
                {
                    CGObject_C* unit = findObjectByGuid(orig);
                    if (unit)
                    {
                        Log("Name %s", unit->GetObjectName());
                         *pGUID = orig;
    
    
                        ///script local t = ObjectCount() for i = 1,t do print(UnitName(GetObjectById(i)))  end
                        DWORD_PTR jmpAddress = (DWORD_PTR)GetModuleHandle(NULL) + (0x0000000140657F34 - 0x140000000);
                        E->ContextRecord->Rip = jmpAddress;
                    }
    
    
                }
            }
            
            return EXCEPTION_CONTINUE_EXECUTION;
        }
    I've tried to find an old 3.2.2a binary to look at but that near impossible. Really at a loss here. I know i could just inline hook/detour it but I just want to try an complete this

    Thanks for any help.

    Ace
    Last edited by aeo; 07-21-2015 at 03:47 PM.

    HWBP GetGUIDFromToken issue
  2. #2
    aeo's Avatar Contributor
    Reputation
    135
    Join Date
    Apr 2007
    Posts
    286
    Thanks G/R
    97/68
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I never got this to work but also realized its incredibly slow for how many times this function is called. I ended up just inline hooking the function.

    EDIT: Right after I posted this I resolved it. I just want to shout out to DarthTon for BlackBone.

    Code:
    det2.Hook(t, &hookGetGUIDFromToken, HookType::HWBP, CallOrder::HookLast, ReturnMethod::UseOriginal)
    Works perfectly
    Last edited by aeo; 07-21-2015 at 08:12 PM.

Similar Threads

  1. Issues with Deeprun Tram exploit
    By shade599 in forum World of Warcraft Exploration
    Replies: 3
    Last Post: 03-25-2007, 08:01 AM
  2. !xSpeednet Issues
    By Taldeer in forum World of Warcraft General
    Replies: 5
    Last Post: 01-28-2007, 06:32 PM
  3. DBC More issues.
    By dela in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 09-29-2006, 07:46 PM
  4. patching issue
    By Marlo in forum World of Warcraft General
    Replies: 0
    Last Post: 07-22-2006, 07:35 PM
  5. [Patch 1.11] - Known Issues (6-20-06)
    By Cypher in forum World of Warcraft General
    Replies: 1
    Last Post: 06-24-2006, 12:42 AM
All times are GMT -5. The time now is 06:37 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