Writing bot for Vanilla WoW. I need your help. menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    culino2's Avatar Elite User
    Reputation
    336
    Join Date
    Feb 2013
    Posts
    181
    Thanks G/R
    139/72
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by djanius View Post
    I am writing bot on Delphi. How to insert asm into code of program i know. Before i applied to forum, i tried autoloot via asm, but i constantly get an error "Access violation at address 005F8664 in module 'Project1.exe'. Read of address AC37A437.".

    Did just as you suggested. Can it still be inject to game?

    Code:
    Asm
    **Push AutoLoot;
    **Mov ECX, BaseAddress;
    **Call OnRightClickUnit;
    **Retn;
    End;
    retn is auto generated by the compiler.

    Make sure you're in the right thread. Also there's no need to use asm in delphi, except for inline hooks or other similar stuff.
    For __thiscall functions you can use a small hack (this is from 7.0+):
    Code:
      CGUnit_C__OnRightClick: procedure(
    {$IFDEF CPUX86}
        __eax             : Pointer;
        __edx             : Pointer;
    {$ENDIF}
        __this            : Pointer;
        IsLeftClick       : Boolean
      );
    To call this function use both nil for eax and edx.
    Since there's no aslr enabled before cataclysm, you could even make it const:
    Code:
    const
      CGUnit_C__OnRightClick: procedure(
    {$IFDEF CPUX86}
        __eax             : Pointer;
        __edx             : Pointer;
    {$ENDIF}
        __this            : Pointer;
        IsLeftClick       : Boolean
      ) = Pointer($DEADBEEF);
    Example for msfastcall functions (that's 1.12.1, I used a wrapper to make life easier):
    Code:
    [...]
    type
      TConsoleWrite = procedure(__eax: Pointer; AColor: TWoWConsoleColor; const AMessage: AnsiString);
    [...]
    const
      off_ConsoleWrite                            = $0063CB50;
    
    procedure ConsoleWrite(const AMessage: AnsiString;
      AColor: TWoWConsoleColor = DEFAULT_COLOR);
    var
      fConsoleWrite: TConsoleWrite;
    begin
      if (NostGl.UltraSilent) then
        exit;
    
      fConsoleWrite := Pointer(off_ConsoleWrite);
      fConsoleWrite(nil, AColor, AMessage);
    end;
    By default, delphi uses the "register" calling convention, you should also check x86 calling conventions - Wikipedia to understand above examples.

    edit: Calling your code inside an exe file is completely pointless...
    Last edited by culino2; 03-20-2017 at 12:02 AM.

    Writing bot for Vanilla WoW. I need your help.
  2. Thanks tutrakan (1 members gave Thanks to culino2 for this useful post)
  3. #17
    asdfx123's Avatar Elite User
    Reputation
    455
    Join Date
    Jan 2009
    Posts
    344
    Thanks G/R
    39/36
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if you still need auto-loot, I found this auto-loot address a while somewhere on ownedcore and it worked flawlessly:

    Code:
    void EnableAutoLoot()
    {
      uint32_t addrToNop = 0x004C1ECF;
    
      char nops[2] = { 0x90, 0x90 };
     
      DWORD oldProtect = 0;
      VirtualProtect((LPVOID)addrToNop, sizeof(nops), PAGE_EXECUTE_READWRITE, &oldProtect);
    
      char* patchFunc = (char*)addrToNop;
      *patchFunc = nops[0];
      patchFunc++;
      *patchFunc = nops[1];
    
      DWORD oldProtect2 = 0;
      VirtualProtect((LPVOID)addrToNop, sizeof(nops), oldProtect, &oldProtect2);
    }
    Last edited by asdfx123; 04-21-2017 at 04:53 AM.

  4. #18
    squiggy's Avatar Active Member
    Reputation
    66
    Join Date
    Aug 2007
    Posts
    45
    Thanks G/R
    40/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by asdfx123 View Post
    Not sure if you still need auto-loot, I found this auto-loot address a while somewhere on ownedcore and it worked flawlessly:

    Code:
    void EnableAutoLoot()
    {
      uint32_t addrToNop = 0x004C1ECF;
    
      char nops[2] = { 0x90, 0x90 };
     
      DWORD oldProtect = 0;
      VirtualProtect((LPVOID)addrToNop, sizeof(nops), PAGE_EXECUTE_READWRITE, &oldProtect);
    
      char* patchFunc = (char*)addrToNop;
      *patchFunc = NASM_NOP;
      patchFunc++;
      *patchFunc = NASM_NOP;
    
      DWORD oldProtect2 = 0;
      VirtualProtect((LPVOID)addrToNop, sizeof(nops), oldProtect, &oldProtect2);
    }
    I guess the risk of server operators looking for that patch might be low but to my knowledge such modifications are easily detected with warden scans if they decide to look for it :/, worth being aware of. I would recommend calling one of the other methods mentioned earlier instead if injecting. If not, just send a shiftclick
    Last edited by squiggy; 03-24-2017 at 07:06 AM.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Anarchy-WoW l Needs your help
    By AnarchyWoW in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 01-26-2013, 04:35 AM
  2. LF Leveling Bot for Vanilla WoW
    By mongern in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 09-13-2011, 04:01 PM
  3. WTT: Steam Acct(Team Fortress 2) for Vanilla WoW key!
    By abaraikenshi in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 0
    Last Post: 06-23-2009, 06:26 PM
  4. WTT Scammed Steam ACC for Vanilla WOW-CD-key (US)
    By Jon Lajoie in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 2
    Last Post: 04-15-2009, 02:41 PM
  5. [request] I'm korean, I need your help for mount model change!!!!
    By blueposterz in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-05-2008, 05:43 AM
All times are GMT -5. The time now is 03:02 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