C# easy Memory Writing/Reading with Black Magic

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Shame

Newbie
Full Member
Mar 10, 2014
6
174
0
Credits to Shynd for making this great DLL.

Requirements: Net 3.5, Build set to x86 CPU.

Get Black Magic here: https://fbe.am/rCH
Virus scan: https://www.virustotal.com/hr/file/...369b179a07b0ba5e8d580a22/analysis/1395172100/

When you start your project go to Project, Add Reference and include those 2 dlls from file you just downloaded.
then add in your code using Magic;

Note that blackmagic is injection, therefore you can get addresses by finding byte patterns etc..
Btw 1 note, I'm still newb at this, but I'm pretty sure that this will help mass people out there :).

Small example code for Plants vs. Zombies that should get you going

C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Magic;

namespace WindowsFormsApplication5
{

    public partial class Form1 : Form
    {
        BlackMagic plants = new BlackMagic();
        uint sun;
        int Base;

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                plants.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle("Plants vs. Zombies")); //Attaches to game note Black Magic is injection
            }
            catch
            {           
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                sun = plants.ReadUInt(plants.ReadUInt(plants.ReadUInt(0x729670) + 0x868) + 0x5578); //Reads sun count
                label1.Text = "Sun: " + sun.ToString();
                Base = plants.MainModule.BaseAddress.ToInt32();  // What you would get plants vs zombies.exe + Address in cheat engine
            }
            catch
            { 
            
            }
        }

        private void MoreSun_Click(object sender, EventArgs e)
        {
            plants.WriteUInt(plants.ReadUInt(plants.ReadUInt(0x729670) + 0x868) + 0x5578, 9999); //Sets sun count to 9999
        }

        private void instaKill_Click(object sender, EventArgs e)
        {
            byte[] instaKill = { 0xC7, 0x87, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90 };
            plants.WriteBytes(0x541CE4, instaKill);  //Writes bytes
        }
    }
}
 
Last edited:

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
It's much easier just to use WriteProcessMemory and ReadProcessMemory imported so you could get rid of these 2 dlls

EDIT: no offence ofc
 
Last edited:

Shame

Newbie
Full Member
Mar 10, 2014
6
174
0
Black Magic Dll is being injected into process allowing you to do asm executing and other stuff.

And for some weird reason, my first post disappeared

Now doing this again:
Get BlackMagic here: https://fbe.am/rCH

When starting the project, make sure its set to Net Framework 3.5
Later go to project and set properties set Platform Target: x86
Also include those 2 dlls you have just downloaded by going to Project > Add Reference and Browse for them.

Example code:

C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Magic;
 
namespace WindowsFormsApplication5
{
 
    public partial class Form1 : Form
    {
        BlackMagic plants = new BlackMagic();
        uint sun;
        int Base;
 
        public Form1()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                plants.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle("Plants vs. Zombies")); //Attaches to game note Black Magic is injection
            }
            catch
            {          
            }
        }
 
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                sun = plants.ReadUInt(plants.ReadUInt(plants.ReadUInt(0x729670) + 0x868) + 0x5578); //Reads sun count
                label1.Text = "Sun: " + sun.ToString();
                Base = plants.MainModule.BaseAddress.ToInt32();  // What you would get plants vs zombies.exe + Addres in cheat engine
            }
            catch
            {
             
            }
        }
 
        private void MoreSun_Click(object sender, EventArgs e)
        {
            plants.WriteUInt(plants.ReadUInt(plants.ReadUInt(0x729670) + 0x868) + 0x5578, 9999); //Sets sun count to 9999
        }
 
        private void instaKill_Click(object sender, EventArgs e)
        {
            byte[] instaKill = { 0xC7, 0x87, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90 };
            plants.WriteBytes(0x541CE4, instaKill);  //Writes bytes
        }
    }
}
 
Last edited:
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