Go Back   BWHacks > StarCraft > Starcraft Hacking Related > Hacking Tutorials

Reply
 
LinkBack Thread Tools

Old 07-09-2004, 05:25 AM   #1 (permalink)
OverFlow636
Senior Member

Zealot
 
OverFlow636's Avatar
 
Join Date: Apr 2004
Location: San marcos, Texas
Posts: 870
OverFlow636 is a jewel in the rough
Send a message via ICQ to OverFlow636 Send a message via AIM to OverFlow636
Default

Reading/Writing Memory in VB6
Using NAATYE’s ModMemory.bas
Written by: Titan
Date: 7/8/2004


I’m writing this tutorial/guide on how to use the ModMemory module created by NAATYE that allows easy memory editing through VB6. I prefer VB6 to edit memory; it’s a cleaner “WYSIWYG” programming language and, in my opinion, produces a better looking end program. Anyways, here it goes.

Part 1: Basics

What you’ll need:
Visual Basic 6
ModMemory.bas - http://www.gamethreat.com/gt/forum/i...hp?download=13

Optional:
Starcraft Brood War (if you want to test the examples)
TSearch

To start, download the ModMemory.bas from the site above. What it is is a VB6 module that has the functions for reading/writing memory. If you look at it and are confused, it’s ok. You don’t need to what NAATYE is doing; all you need to know is how to use it. This is what I’m here to explain.

Next, start a new Visual Basic 6 project. Go to Project > Add Module and find ModMemory.bas(wherever you downloaded it to). When you add it to your project you should see in the Project Properties window (upper right corner) that you have a new “Modules” folder. If ModMemory.bas is there then you’re ready to move onto the next step.

Part 2: Poking an Integer

Now, I’ll guide you through how to change to Low Latency. Note, I’ll just give you the address no searching needed. First, double click your form to show the code for Form_Load(). You want to make Form_Load() look like this:
Code:
Dim wName as Long
Private Sub Form_Load()
 ? ? wName = FindWindow("SWarClass", "Brood War")
End Sub
This just finds the handle for your currently open Brood War window, you don’t need to know what this means, but it is required. Next, make a button and name it Low_Latency. Then double-click it to write the code for Low_Latency_Click(). Here’s what you need to write an integer value.
Code:
Private Sub Low_Latency_Click()
 ? ? Dim x As Integer
 ? ? x = PokeInteger(wName, 6616248, 0)
End Sub
Well that’s it. Run the program and Brood War. Set network to Extra High Latency and then click your button. When you go back to Network you’ll see it has changed to low. 6616248… that doesn’t look like the address you found in TSearch? Well, keep reading and make note of the Part 4.


Part 3: Using the Other Functions in ModMemory

Well, poking an integer is not the only thing ModMemory can do. Here is a brief look at using the other functions in this module. I’ll only put in the ones I’ve used so far. After you know how to use a few of them, it will be easy to figure out how to use the rest.

PokeInteger(): See above.
PeekInteger():
Code:
 ? ? Dim x As Integer
 ? ? x = PeekInteger(wName, 6616248)
This will “peek” or read from address 6616248 and store it’s value in x.

PokeString():
Code:
 ? ? Dim x As Integer
 ? ? x = PokeString(wName, 19035310, Spoof.Text)
End Sub
This will poke a string into address 190535310. This will spoof your name to whatever is in the textbox “Spoof”.

Others: PeekString(), PeekLong(), PeekByte(), PeekBytes(), PokeLong(), PokeByte(), PokeBytes().
Basically, as long as you get the general idea you can figure out the others.

Part 4: Translating Your Address for ModMemory

Hopefully you have noticed that if you find the offset for latency, it is 64F4B8. If you try to use that offset in the functions it will not work. What needs to be done is(using TSearch), is go to the “Converter”, change “Data Type” to “Long” and type in 64F4B8 under Hex. TSearch will automatically update as you type it in, and when you finish you’ll see the value 6616248 under “Decimal”.

Well, that’s it. Now that I have this tutorial completed I can start writing a tutorial on a more specific topic. Hope it was easy to follow.


-Titan
__________________
OverFlow636 15 0FF11|\|3   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Advertisement


Old 07-09-2004, 09:37 AM   #2 (permalink)
rum
Administrator

Blessed
 
Join Date: Mar 2004
Location: Phoenix
Posts: 2,095
rum is a splendid one to beholdrum is a splendid one to beholdrum is a splendid one to beholdrum is a splendid one to beholdrum is a splendid one to beholdrum is a splendid one to behold
Send a message via AIM to rum
Default

or instead of converting your addresses just put " &H " in front of them to denote hex
__________________
lol
rum 15 0FF11|\|3   Reply With Quote

Old 07-09-2004, 09:46 AM   #3 (permalink)
OverFlow636
Senior Member

Zealot
 
OverFlow636's Avatar
 
Join Date: Apr 2004
Location: San marcos, Texas
Posts: 870
OverFlow636 is a jewel in the rough
Send a message via ICQ to OverFlow636 Send a message via AIM to OverFlow636
Default

you can also use this function to write to the memory
but this one requires you to have public PHandle as long declared in a module somwhere and the process handle of sc already in it

Code:
Public Function WriteMem(address As Long, wut As String)
    'use it like  WriteMem(&H000000, "ff00ff0090")
    If Len(wut) = 1 Then wut = "0" & wut
    leng = Len(wut) / 2
    For i = 1 To leng
        WriteProcessMemory PHandle, address, Chr$("&H" & Left(wut, 2)), 1, &H0
        address = address + 1
        wut = Right(wut, Len(wut) - 2)
    Next
End Function
__________________
OverFlow636 15 0FF11|\|3   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Advertisement

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gamehacking tutorial NickF Starcraft Hacking Related 85 01-08-2008 11:37 PM
Tutorial help NoFinalTruth Programming 29 12-17-2004 05:38 AM
Need tutorial to get started that doesnt ask for TMK Saint(305) Starcraft Hacking Related 0 09-17-2004 05:13 PM
Advanced: Name Spoofer Tutorial OverFlow636 Hacking Tutorials 0 09-05-2004 08:25 PM


All times are GMT. The time now is 02:25 AM.


vBulletin style developed by Transverse Styles

Powered by vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
Copyright © 2004-2008 BWHacksAd Management by RedTyger