EndScene Hook - Read UInt Failed menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    CptJesus's Avatar Site Donator
    Reputation
    25
    Join Date
    May 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    EndScene Hook - Read UInt Failed

    I've been trying to get an EndScene hook working using aHook in 4.2. Heres my code:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using aHook;
    
    namespace CJR_plua_hack
    {
        class plua
        {
            static void Main(string[] args)
            {
                Hook es = new Hook(aProcess.GetProcessIdByName("Wow"));
                
                IntPtr wowb = es.BlackMagic.MainModule.BaseAddress;
    
    
                System.Diagnostics.Process.EnterDebugMode();
    
    
                UInt32 pDevicePTR = es.BlackMagic.ReadUInt(0xA7E20C);
                Console.WriteLine(pDevicePTR.ToString());
                pDevicePTR = es.BlackMagic.ReadUInt(pDevicePTR + 0x27E8);
    
    
                UInt32 esa = es.BlackMagic.ReadUInt(pDevicePTR);
                esa = es.BlackMagic.ReadUInt(esa + 0xA8);
    
    
                //Hook Installed
                Console.WriteLine(es.Hook_Install(esa).ToString());
    
    
                String command = "DoEmote(\"dance\")";
    
    
                uint dspace = es.BlackMagic.AllocateMemory(Encoding.UTF8.GetBytes(command).Length + 1);
    
    
                es.BlackMagic.WriteBytes(dspace, Encoding.UTF8.GetBytes(command));
    
    
                uint dostring = (uint)wowb + 0x425A30;
    
    
                es.Hook_AsmAddLine("mov eax, " + dspace);
                es.Hook_AsmAddLine("push 0");
                es.Hook_AsmAddLine("push eax");
                es.Hook_AsmAddLine("push eax");
                es.Hook_AsmAddLine("mov eax, " + dostring);
                es.Hook_AsmAddLine("call eax");
                es.Hook_AsmAddLine("add esp,0xC");
                es.Hook_AsmAddLine("retn");
    
    
                es.Hook_AsmInject();
    
    
                es.BlackMagic.FreeMemory(dspace);
    
    
                es.Hook_Remove();
            }
        }
    }
    Yes its a copy paste from the aHook thread. Unfortunately, I get an exception, Read UInt failed at the following line:

    Code:
    pDevicePTR = es.BlackMagic.ReadUInt(pDevicePTR + 0x27E8);
    Unless I'm mistaken and just cant read, that is the proper offset for D3D9 OffsetA. What am I doing wrong?

    EndScene Hook - Read UInt Failed
  2. #2
    Thongs's Avatar Member
    Reputation
    10
    Join Date
    Oct 2006
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to add the BaseAddress when you read the DevicePtr

    Code:
    UInt32 pDevicePTR = es.BlackMagic.ReadUInt(wowb + 0xA7E20C);

  3. #3
    CptJesus's Avatar Site Donator
    Reputation
    25
    Join Date
    May 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I do that, the program hangs at the Hook_Install

  4. #4
    CptJesus's Avatar Site Donator
    Reputation
    25
    Join Date
    May 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It was a problem with aHook. Used iHook and it works perfectly.

  5. #5
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Err aHook work fine, you just fail at adding base address

  6. #6
    CptJesus's Avatar Site Donator
    Reputation
    25
    Join Date
    May 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I added the base address and it completely hung up on Hook_Install.

    When it reached the Hook_Install, there would be no output to the console, and it would step any further through the program.

Similar Threads

  1. [C# DLL] aHook, use ASM through EndScene hook
    By JuJuBoSc in forum WoW Memory Editing
    Replies: 81
    Last Post: 04-22-2024, 02:55 PM
  2. Is EndScene hooking detectable?
    By xLeo123 in forum WoW Memory Editing
    Replies: 9
    Last Post: 01-13-2010, 03:49 PM
  3. Custom rendering in endscene hook
    By ggg898 in forum WoW Memory Editing
    Replies: 3
    Last Post: 09-11-2009, 09:38 AM
  4. [Test Theory] EndScene hook without Native Code (Kinda)
    By Apoc in forum WoW Memory Editing
    Replies: 7
    Last Post: 09-04-2009, 12:46 PM
  5. EndScene Hook not changing anything
    By lanman92 in forum WoW Memory Editing
    Replies: 32
    Last Post: 06-01-2009, 11:46 PM
All times are GMT -5. The time now is 02:41 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