[Sample Code] EndScene Hook with ASM and blackmagic menu

User Tag List

Page 5 of 6 FirstFirst 123456 LastLast
Results 61 to 75 of 90
  1. #61
    sPeC!'s Avatar Member
    Reputation
    23
    Join Date
    Jun 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JuJuBoSc View Post
    Because 0xAC is Clear func and can be hooked the same way, and is called every frame too.
    I have spent some time debugging because of this one some days ago, only to find that using 0xAC was making CheckPermissions fail when trying to use protected lua functions.
    0xA8 is the correct index.

    Cheers,
    Edit: Posted wrong info!
    Last edited by sPeC!; 11-20-2010 at 05:37 PM.

    [Sample Code] EndScene Hook with ASM and blackmagic
  2. #62
    CrimeTime's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2007
    Posts
    83
    Thanks G/R
    16/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could kiss you, it works

  3. #63
    _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)
    Originally Posted by JuJuBoSc View Post
    Because 0xAC is Clear func and can be hooked the same way, and is called every frame too.
    Yes it works, but there's 3 calls to Clear() per frame so the performance hit is bigger than hooking EndScene.

  4. #64
    Millow's Avatar Member
    Reputation
    5
    Join Date
    Mar 2007
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To whoever trying to get this to work and it does not work, http://www.mmowned.com/forums/world-...ne-hook-3.html go there.
    I've used ahook and updated the console app to get it working ! I never managed to get the version of the hook in this thread working, so I used Ahook.
    Credits goes to Juju for the DLL (source someday plz ? ) and RivaLFr for some of the the memory reading code !
    Enjoy

    PS: fukmeimbroken, ur pm box is full, tried pming you to no avail !
    Last edited by Millow; 11-20-2010 at 07:08 PM.
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

  5. #65
    CrimeTime's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2007
    Posts
    83
    Thanks G/R
    16/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still have Problems with the GetLocalizedText!
    im trying to get data out of the Auctionhouse with this code:
    Code:
                        LuaDoString("Totauctions = GetNumAuctionItems(\"list\")");
                        Totauctions = GetLocalizedText("Totauctions");
    but all what i get back is "5" (i have search at AH before i have used the code)
    i mean i should get much more data as only the "5" = 5 Auctions.

    someone a Idea what im doing wrong?

    Greets CrimeTime

  6. #66
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by CrimeTime View Post
    still have Problems with the GetLocalizedText!
    im trying to get data out of the Auctionhouse with this code:
    Code:
                        LuaDoString("Totauctions = GetNumAuctionItems(\"list\")");
                        Totauctions = GetLocalizedText("Totauctions");
    but all what i get back is "5" (i have search at AH before i have used the code)
    i mean i should get much more data as only the "5" = 5 Auctions.

    someone a Idea what im doing wrong?

    Greets CrimeTime
    Code:
      numBatchAuctions, totalAuctions = GetNumAuctionItems("list")
    GetNumAuctionItems - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

  7. #67
    Ozius's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried to use ENDSCENE_IDX = 0xAC;//0xA8;
    Doesn't work. Can somehow influences that I use the russian wow?
    edit file: http://dl.dropbox.com/u/7381029/Program2.cs

  8. #68
    fukmeimbroken's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ozius View Post
    Tried to use ENDSCENE_IDX = 0xAC;//0xA8;
    Doesn't work. Can somehow influences that I use the russian wow?
    edit file: http://dl.dropbox.com/u/7381029/Program2.cs
    We didn'T get it work too. Take a look into AHook http://www.mmowned.com/forums/world-...ne-hook-3.html ([C# DLL] aHook, use ASM through EndScene hook) like millow said, worked for us.

  9. #69
    CrimeTime's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2007
    Posts
    83
    Thanks G/R
    16/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by miceiken View Post
    Code:
      numBatchAuctions, totalAuctions = GetNumAuctionItems("list")
    GetNumAuctionItems - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
    thanks that works, but i see i have write the wrong problem, the current problem is
    Code:
                LuaDoString("count = GetAuctionItemInfo(\"list\"," + index + ")");
                return GetLocalizedTextInt("count");
    i get only the Name of the Item, and not the other Data, i've see that some people do Split the incoming Data but i cant Split something because i get only the Name and not the full Data String.

    Edit: Got it workin, a shame that i didnt know how to do that ^^
    Last edited by CrimeTime; 11-21-2010 at 10:25 AM.

  10. #70
    Millow's Avatar Member
    Reputation
    5
    Join Date
    Mar 2007
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone knows what the step variable stands for ? It's equal to 0xE9 and is used to determine if the process is hooked.
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

  11. #71
    Scorpiona's Avatar Active Member
    Reputation
    17
    Join Date
    Mar 2009
    Posts
    42
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Millow View Post
    Anyone knows what the step variable stands for ? It's equal to 0xE9 and is used to determine if the process is hooked.
    0xE9 is JMP. It's checking if the detour has been applied.

  12. #72
    reggggg's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind I worked it out

    Might as well post what my problem was. I couldn't figure out why the OP was adding 0xc to the stack pointer in DoString. Turns out you need to increment the sp by the size of the parameter list for the stack pointer to be in the right place and for code to to keep going smoothly, or something? I needed to do the same thing for ConsoleWriteA("lala", 4) and ended up adding 0x8 to esp for the char* and int, or execution would screw up afterwards.
    Last edited by reggggg; 01-22-2011 at 11:43 PM.

  13. #73
    Ozius's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind I worked it out

    Might as well post what my problem was. I couldn't figure out why the OP was adding 0xc to the stack pointer in DoString. Turns out you need to increment the sp by the size of the parameter list for the stack pointer to be in the right place and for code to to keep going smoothly, or something? I needed to do the same thing for ConsoleWriteA("lala", 4) and ended up adding 0x8 to esp for the char* and int, or execution would screw up afterwards.
    Hasn't understood, where it is necessary to add?
    Specify please a line.

  14. #74
    FenixTX2's Avatar Active Member
    Reputation
    22
    Join Date
    Mar 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The original 'Hooking()" function was wrong. There was an error in the ASM.

    Code:
            application.Asm.Clear();
    
            application.Asm.AddLine("mov edi, edi");
            application.Asm.AddLine("push ebp");
            application.Asm.AddLine("mov ebp, esp");
    
            application.Asm.AddLine("pushfd");
            application.Asm.AddLine("pushad");
                        
            //Test for waiting code
            application.Asm.AddLine("mov eax, [" + addresseInjection + "]");
            application.Asm.AddLine("test eax, ebx");
            application.Asm.AddLine("je @out");
    
            //Execute waiting code
            application.Asm.AddLine("mov eax, [" + addresseInjection + "]");
            application.Asm.AddLine("call eax");
    
            //Copy pointer to return value
            application.Asm.AddLine("mov [" + retnInjectionAsm + "], eax");
    
            application.Asm.AddLine("mov edx, " + addresseInjection);
            application.Asm.AddLine("mov ecx, 0");
            application.Asm.AddLine("mov [edx], ecx");
    
            //Close Function
            application.Asm.AddLine("@out:");
    
            //Inject Code
            uint sizeAsm = (uint)(application.Asm.Assemble().Length);
    
            application.Asm.Inject(injected_code);
    
            int sizeJumpBack = 5;
    
            // create jump back stub
            application.Asm.Clear();
            application.Asm.AddLine("jmp " + (pEndScene + sizeJumpBack));
            application.Asm.Inject(injected_code + sizeAsm);// + (uint)sizeJumpBack);
    
            // create hook jump
            application.Asm.Clear(); // $jmpto
            application.Asm.AddLine("jmp " + (injected_code));
            application.Asm.Inject(pEndScene);

  15. #75
    Ozius's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FenixTX2, thx.
    Has corrected the code as you have offered. Cycling in the same place:
    Code:
    while (Memory.ReadInt(addresseInjection) > 0) { Thread.Sleep(5); } // Wait to launch code
    The code entirely: http://dl.dropbox.com/u/7381029/Program.cs

Page 5 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. [C# DLL] aHook, use ASM through EndScene hook
    By JuJuBoSc in forum WoW Memory Editing
    Replies: 80
    Last Post: 11-26-2011, 03:29 AM
  2. Sample Code - Another way of getting the EndScene address
    By _Mike in forum WoW Memory Editing
    Replies: 22
    Last Post: 05-14-2011, 08:30 PM
  3. [C#] CLR hosting using C# and BlackMagic (ASM)
    By JuJuBoSc in forum WoW Memory Editing
    Replies: 9
    Last Post: 05-10-2011, 08:44 AM
  4. Replies: 11
    Last Post: 12-23-2010, 09:30 PM
  5. [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
All times are GMT -5. The time now is 12:43 AM. 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