Solved Help Reading Float with Multilevel Pointer c#

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

coolestgamer123

Newbie
Full Member
Sep 27, 2014
6
272
0
Hello, I am trying to create a simple aimbot for an online Unity Web game. I am running with firefox and attaching cheat engine to the plugin-container.exe
I have followed Fleeps tutorial for the c# aimbot and got it to work for portable counter strike decayed lite. Unfortunately, for the online unity game, the memory address I've gotten for the player and enemy values have dll base addresses.
Here is an image of cheat engine.



As you can see, it starts off with "mono-1-vc.dll"+001F20AC and then adds the remaining addresses. Please help, thank you.

Notes:
Unity Web game
Attaching to plugin-container.exe
Fleeps c# memory aimbot as reference file
I'm assuming I just need a way to get the address of mono-1-vc.dll
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,153
78,998
2,396
C#:
public static IntPtr FindDMAAddy(IntPtr hProc, IntPtr ptr, int[] offsets)
{
    var buffer = new byte[IntPtr.Size];

    foreach (int i in offsets)
    {
        ReadProcessMemory(hProc, ptr, buffer, buffer.Length, out var read);

        ptr = (IntPtr.Size == 4)
        ? IntPtr.Add(new IntPtr(BitConverter.ToInt32(buffer, 0)), i)
        : ptr = IntPtr.Add(new IntPtr(BitConverter.ToInt64(buffer, 0)), i);
    }
    return ptr;
}
Here is a little source that I used it with to practice:

C#:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace RakeCSharp
{
    internal class Program
    {
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int processId);

        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out IntPtr lpNumberOfBytesRead);

    public static IntPtr FindDMAAddy(IntPtr hProc, IntPtr ptr, int[] offsets)
    {
        var buffer = new byte[IntPtr.Size];

        foreach (int i in offsets)
        {
            ReadProcessMemory(hProc, ptr, buffer, buffer.Length, out var read);

            ptr = (IntPtr.Size == 4)
            ? IntPtr.Add(new IntPtr(BitConverter.ToInt32(buffer, 0)), i)
            : ptr = IntPtr.Add(new IntPtr(BitConverter.ToInt64(buffer, 0)), i);
        }
        return ptr;
    }

        private static void Main(string[] args)
        {
            Process process;

            process = Process.GetProcessesByName("ac_client")[0];

            var hProc = OpenProcess(0x001F0FFF, false, process.Id);

            var addr = FindDMAAddy(hProc, (IntPtr)0x50f4f4, new int[] { 0x374, 0x14, 0 });

            Console.WriteLine("0x" + addr.ToString("X"));
        }
    }
}
Shit man if I can become a C# god in one day by copying other people's code, there is truly no limit to my potential.
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,153
78,998
2,396
Google:
Process.GetProcessesByName
For C#
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods