EndScene Hook not changing anything menu

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand the structure, but my pointers are just returning zero. I don't see why. This is causing way too much grief.

    EndScene Hook not changing anything
  2. #17
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    typedef HRESULT ( __stdcall * tEndScene )( LPDIRECT3DDEVICE9 pThis );
    tEndScene oEndScene;
    
    HRESULT __stdcall myEndScene(LPDIRECT3DDEVICE9 pThis)
    {    
        return oEndScene(pThis);
    }
    
    void InstallDetours()
    {
        //[[[[0x1135270] + 0x38A8]] + 0xA8] 3.1.1
        //[[[[0x113C290] + 0x38A8]] + 0xA8] 3.1.2
    
        unsigned long pFoo = *(unsigned long*)(0x0113C290);
        unsigned long pBar = *(unsigned long*)(pFoo + 0x38A8);
        unsigned long pFoobar = *(unsigned long*)(*(DWORD*)pBar + 0xA8);
        
        oEndScene = (tEndScene)DetourFunction((PBYTE)pFoobar, (PBYTE)myEndScene);
    }
    This works. I dunno why you would do it with ASM

  3. #18
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure why the asm wasnt working. Oh well. this does. I'll go with it.

  4. #19
    Ugge's Avatar Member
    Reputation
    6
    Join Date
    Aug 2008
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its because your asm is wrong

    Originally Posted by lanman92 View Post
    Code:
     
    __asm {
    pushad;
    mov eax, [0x113C290]; <-- this is the same as "mov eax, 0x113C290". The brackets does nothing when you have a constant or a variable. add this:
    mov eax, [eax]
    mov eax, [eax + 0x38A8];
    mov eax, [eax];
    mov edx, 0x42 * 0x4;
    mov eax, [eax + edx];
    mov eax, [eax];
    mov endScene, eax;
    popad;
    }
    oEndScene = (tEndScene)DetourFunction((PBYTE)endScene, (PBYTE)mEndScene);
    yes, the visual studio assembler is weird :/

  5. #20
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sigh. Thanks for the info, I'll remember it

  6. #21
    jockel's Avatar Member
    Reputation
    4
    Join Date
    Mar 2009
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    [code]
    //[[[[0x1135270] + 0x38A8]] + 0xA8] 3.1.1
    //[[[[0x113C290] + 0x38A8]] + 0xA8] 3.1.2
    Thanks for the offsets Nesox,

    can you give me a hint on how to find out the last two parts "0x38A8" and "0xA8" through reverse engineering Wow?

  7. #22
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read Sillyboy's thread.

    EDIT: Hell, I'm bored. You can reverse the first value through the double-pointer passed to CreateDevice. Wow uses GetProcAddress() to get the addy of the Direct3DCreate9 func. Search for d3d9_dll and you'll see it. Using a debugger you can find the value from here. It should give you the info you need. 0xA8 is simply the offset to the virtual function(hence the reading of the first four bytes of the object). I think this is how I replicated his results =/ might be wrong tho.
    Last edited by lanman92; 05-31-2009 at 05:22 PM.

  8. #23
    ziinus's Avatar Member
    Reputation
    2
    Join Date
    Nov 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, sorry for hijacking this thread but it's not that off topic.

    My injected dll successfully hook endscene and can communicate with my c# process through named pipes.
    But now i'm a little lost on how to call interact function and lua_dostring from my hook.

    Any help would be greatly appreciated

  9. #24
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My hook works 100% fine


  10. #25
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use a function pointer to DoString in your DLL.

    EDIT: Screw hooking this in a DLL, ill just do it in C# and communicate through memory writes :P

  11. #26
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can easily get and draw to a device; But it won't be in sync, and as soon as you draw when a scene is open the game will crash.

    Although you can 100% detour Out of process; and you can use C# to do it.


  12. #27
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't mean drawing a UI out of process, just doing functions and casting etc.

  13. #28
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aha. Well you can still do a simple DLL to inject, and returning true in your DllMain will cause WoW's mainthread to call your DLL.

    Whatever you'd be doing would be updated when WoW is updated and be in-process.


  14. #29
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not really sure what you mean there.

  15. #30
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been slowly converting all of my stuff to C#. But my C# is executed inside WoW, In WoW's main thread.

    It's easy to do and very useful. How To Inject a Managed .NET Assembly (DLL) Into Another Process - Coding the Wheel

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. All my friends got HotS, but not me. Anything I could do to change that?
    By Hyperbeist in forum Heroes of the Storm General
    Replies: 7
    Last Post: 11-03-2014, 05:31 PM
  2. EndScene hook does not work
    By kingdeking in forum WoW Memory Editing
    Replies: 7
    Last Post: 08-05-2012, 04:32 PM
  3. Replies: 17
    Last Post: 09-25-2008, 07:53 AM
  4. [Race Change] Anything --> Skeleton
    By Scrubs in forum World of Warcraft Model Editing
    Replies: 14
    Last Post: 05-15-2008, 11:33 PM
All times are GMT -5. The time now is 05:57 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