Results 1 to 1 of 1

Thread: cMem .net

  1. #1
    iam_clint
    iam_clint is offline
    New member
    Join Date
    2010 Sep
    Posts
    33
    Thanks Thanks Given 
    2
    Thanks Thanks Received 
    9
    Thanked in
    0 Posts
    Rep Power
    0

    Post cMem .net

    This is a dll written by me to make memory handling in .net much simpler.
    Suggestions are welcome, Donators suggestions are implemented first.
    Please list details when giving me a bug report.

    Features:
    Code:
     -Handles multiple instances of a game for you.
     -Reads/Writes memory by type casting
     -Ability to parse a string for memory addresses
     -Get module start addresses
    Usage: Initialize [Getting Started]
    Code:
    cMem.main.findGames("Game Name", Player Name Memory Address) //Does not work with evaluate string at this level
    Usage: List the games it found and select one
    Code:
     For Each item As cMem.GameList In cMem.main.Games.Values
                  console.writeline(item.handle)
                  console.writeline(item.proc.id)
                  console.writeline(item.character)
                  cMem.main.setGame(item.proc)
    Next
    //This tells the dll to select the last instance of the game it has found. You will have to write your own code for telling it which game to select
    Usage: getModule
    Code:
    cmem.main.getModule("Aion.exe") //will return the start address of that module within the process
    Usage: Memory Helpers [This will probably be changed in future releases so you don't have to initiate it through new]
    Code:
    Public mh as cmem.memoryhelpers
    
    sub readvalues()
      mh=new cmem.memoryhelpers(cmem.main.preader)
      mh.EvaluateString("Aion.exe+ff0")
      mh.readLong(Address) //returns a long value from the address provided (4 bytes)
      mh.readInt(Address) //returns an integer value from the address provided (4 bytes)
      mh.readIntPtr(Address) //returns an IntPtr value from the address provided (4 bytes)
      mh.readShort(Address) //returns a Short value from the address provided (2 bytes)
      mh.readFloat(Address) //returns a Floating point [Single] value from the address provided (4 bytes)
      mh.readByte(Address) //returns a byte value from the address provided (1 byte)
     mh.readByteArray(Address, size) //returns a byte array value from the address provided (? bytes)
     mh.readString(Address, size) //returns a string value from the address provided (? bytes) //method 1
     mh.readString2(Address, size) //returns a string value from the address provided (? bytes) //method 2
     mh.readUniString(Address, size) //returns a unicode string value from the address provided (? bytes) //method 2
    end sub
    Usage: Memory writing
    Code:
    cmem.main.preader.writememory(Address, value) //To write the byte length all you have to do is type cast your variable you are writing.. Example
    Dim x as integer=0
    Dim y as single=1
    dim z as byte=2
    cmem.main.preader.writememory(Address, x) //Writes 4 bytes
    cmem.main.preader.writememory(Address, y) //Writes 4 bytes
    cmem.main.preader.writememory(Address, z) //Writes 1 byte
    Usage: String Evaluator [Alpha] has not been fully tested
    Code:
      + obviously adds
      - obviously subtracts
      > is for a pointer
    
    Example: //Not actual memory addresses
    ######Single level pointer#####
    cmem.main.preader.writememory(mh.EvaluateString("Aion.exe+f82c>34"), 1)
    This would take aion.exe find its base address add f82c to it read that memory address for the pointer then add the offset 32 to it
    
    ######Multilevel pointer######
    cmem.main.preader.writememory(mh.EvaluateString("Aion.exe+f82c>34>8>c"), 1)
    This is how a multilevel pointer could be handled

    Donate here for future development

    Please register or login to download attachments.


Posting Permissions

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