Extract value via adress

This is a discussion on Extract value via adress within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Hello guys, i'm trying to make a program which should get a value from Warcraft III based on an adress. ...

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    noob_smoke is offline Newbie
    Array
    Join Date
    Apr 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0

    Extract value via adress

    Hello guys, i'm trying to make a program which should get a value from Warcraft III based on an adress. The adress is "079D0C3C" but i don't know how to extract the value from adress.
    Code:
    Public Class Form1    Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
        Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
        Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
        Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
        Const PROCESS_ALL_ACCESS = &H1F0FFF
    
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim address As Integer
            address = &H79D0C3C
            Dim str As Double
            Dim xx As String
            For Each proc In Process.GetProcesses
                If proc.MainWindowTitle = "Warcraft III" Then
                    If ReadProcessMemory(proc.Handle.ToInt32(), address, str, 16, 16) <> 0 Then
                        xx = BitConverter.ToString(BitConverter.GetBytes(Convert.ToSingle(str)))
                        MsgBox(xx)
                    End If
                End If
            Next
        End Sub
    End Class



  2. #2
    ZeD's Avatar
    ZeD
    ZeD is offline RoR 0x266E


    Array
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    1,440
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    698
    079D0C3C isn't a static address.
    This value will change every time you restart Warcraft III.
    You've to find the static address (Game.dll+0x******) where the value is stored in.
    Search for that value again in your MemorySearcher and then Breakpoint it in OllyDbg.
    First address you reach SHOULD be the one you search.
    Then you can read out the value from there.

  3. #3
    thewisp is offline Advanced Hacker
    Array
    Join Date
    Jun 2008
    Posts
    390
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    256
    well, i think he asks about how to get [address] from address.
    in C, this is usually *(DWORD *)address.

  4. #4
    noob_smoke is offline Newbie
    Array
    Join Date
    Apr 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    1. I opened warcraft again, i changed that adress and it worked so it's not dinamic adress (actually that adress it's a variable from my map)
    2. In that script, when i use it to read the value it gives me an error (" Access is denied")

  5. #5
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Search for SeDebugPrivilege and make sure OpenProcess() returns a valid handle ( Make sure it doesn't fail ).

  6. #6
    Darchrow's Avatar
    Darchrow is offline Life's good.



    Array
    Join Date
    Jan 2011
    Location
    Germany
    Posts
    1,855
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    13
    Reputation
    1246
    He doesn't even use OpenProcess() in his snippet. In VB.NET try:

    Code:
    Process.EnterDebugMode()
    In your mainform_load event.

    What kind of value you want to read from that adress? A string or a numeric? I think there are some mistakes at the converting and reading.


  7. #7
    noob_smoke is offline Newbie
    Array
    Join Date
    Apr 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    Can someobody help me with Reading , Writing from Warcraft 3 in VB and some explications - i'm a little noob in VB. I want to read an integer and a string maybe.
    Last edited by noob_smoke; 01-07-2012 at 09:08 AM.

  8. #8
    Darchrow's Avatar
    Darchrow is offline Life's good.



    Array
    Join Date
    Jan 2011
    Location
    Germany
    Posts
    1,855
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    13
    Reputation
    1246
    There are many different ways to do this with VB.NET. For your beginnings I recommend this site (german) where you can find many tutorials, how-to's, codesnippets or other stuff for VB.NET. Search for "Trainermodul.vb" with it you can easy read and write to static adresses without rewriting the declarations and functions.


  9. #9
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    If you are interested i can show you some example for doing this staffs in AutoIt.
    http://faridaghili.ir

  10. #10
    noob_smoke is offline Newbie
    Array
    Join Date
    Apr 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    well, that trainermodul did his job, now the question is how to find the static adress ?

Page 1 of 2 12 LastLast

Similar Threads

  1. [TuT] How to extract the raw code list
    By risker in forum Warcraft 3 Custom Maps
    Replies: 4
    Last Post: 06-08-2009, 08:34 AM
  2. ip adress idenifier
    By 35yeros in forum Operating Systems
    Replies: 0
    Last Post: 01-24-2008, 05:24 PM
  3. Can someone please extract MAPS for me?
    By Ryan in forum WoW Private Servers
    Replies: 8
    Last Post: 11-07-2007, 12:46 AM
  4. [Guide] How TO Extract Maps
    By Acer in forum WoW Private Servers
    Replies: 6
    Last Post: 10-27-2007, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •