Memory reading using Delphi, advise please :-) menu

User Tag List

Results 1 to 2 of 2
  1. #1
    joostvanpoppel's Avatar Corporal
    Reputation
    1
    Join Date
    Apr 2010
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Memory reading using Delphi, advise please :-)

    Hi,

    Just started reading the Memory Editing section of this forum, did some searches, and read some instructions. It's pretty amazing what some people have made, my compliments. My programming language of choice is Delphi(Pascal). I've programmed in Delph about 8 years ago, for 2 years, and I want to pick it up again and make a simple radar tool. So basically a tool that only reads information from the WoW process.

    So far, I started by reading the base memory address from the WoW process. In this test-app i'm filling the edit1-box with the pID.

    I did that doing the following (not yet optimized code):
    Code:
    unit UnitMain;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, PsAPI, StdCtrls;
    
    type
      TForm2 = class(TForm)
        Button1: TButton;
        Edit1: TEdit;
        Memo1: TMemo;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
        function GetModuleBaseAddress(ProcessID: Cardinal; MName: String): Pointer; 
      public
        { Public declarations }
      end;
    
    var
      Form2: TForm2;
    
    implementation
    
    {$R *.dfm}
    
    { TForm2 }
    
    procedure TForm2.Button1Click(Sender: TObject);
    var
       WHandle : HWND;
       Address: DWORD;
       ProcessID : Cardinal;
    begin
      if Edit1.Text <> '' then
      begin
        Address := Integer(GetModuleBaseAddress(StrToInt(Edit1.Text), '')) + Integer($21212);
      end;
      showmessage(IntToStr(Address));
    end;
    
    function TForm2.GetModuleBaseAddress(ProcessID: Cardinal; MName: String): Pointer;
    var
      Modules         : Array of HMODULE;
      cbNeeded, i     : Cardinal;
      ModuleInfo      : TModuleInfo;
      ModuleName      : Array[0..MAX_PATH] of Char;
      PHandle         : THandle;
    begin
      Result := nil;
      SetLength(Modules, 1024);
      PHandle := OpenProcess(PROCESS_QUERY_INFORMATION + PROCESS_VM_READ, False, ProcessID);
      if (PHandle <> 0) then
      begin
        EnumProcessModules(PHandle, @Modules[0], 1024 * SizeOf(HMODULE), cbNeeded);
        SetLength(Modules, cbNeeded div SizeOf(HMODULE));
        for i := 0 to Length(Modules) - 1 do
        begin
          GetModuleBaseName(PHandle, Modules[i], ModuleName, SizeOf(ModuleName));
            GetModuleInformation(PHandle, Modules[i], @ModuleInfo, SizeOf(ModuleInfo));
            Result := ModuleInfo.lpBaseOfDll;
            CloseHandle(PHandle);
            Exit;
        end;
      end;
    end;
    
    end.
    From this point I would like to go further and read the current Playername from the process. From the Info Dump Thread i read the
    playername can be found at memory/hex 0x9BD070.

    My question, hopefully someone can point me in the right direction: What do I do from here? Should I call ReadProcessMemory? Am I forgetting mayor things?

    Any help would be great!

    Grtz,
    J.

    Memory reading using Delphi, advise please :-)
  2. #2
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Readprecessmemory should be fine. Just remember to rebate the addresses


    [[Sent from my iPad using Tapatalk]]
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

Similar Threads

  1. [guide] how to create a wow bot using autoit (memory reading)
    By zamba1587 in forum WoW Memory Editing
    Replies: 17
    Last Post: 01-23-2017, 03:27 PM
  2. How do i know if a Bot is using memory reading / writing?
    By sturmtiger in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 01-06-2011, 06:31 AM
  3. Using UTF-8 in Memory Reading/ Apps (c#)
    By luciferc in forum WoW Memory Editing
    Replies: 15
    Last Post: 08-02-2009, 02:50 PM
  4. Target Postion Using Memory Reading
    By smallbadad in forum WoW Memory Editing
    Replies: 2
    Last Post: 03-08-2009, 03:08 PM
  5. Please read, useful info
    By shade599 in forum Community Chat
    Replies: 1
    Last Post: 01-07-2008, 10:27 PM
All times are GMT -5. The time now is 10:12 AM. 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