Make Code For Dll Inject

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat


Nov 16, 2013
Hello Fleep,
first i wanna thx for the tutor, its very helpfull 4 me, btw i already watch how to make any hack game, & and i success to follow ur totur until finish..
btw in ur tutor u make a console for hack & interface for DLL, but i just want to make an Hotkey for the DLL inject, not using a interface, iam sorry
in this case iam a noob in C++ and making hack, i already change some code here but after i build and inject to game AssaultCube nothing happen, cant u help me
whats wrong in that code?
#include <iostream>
#include <Windows.h>
#include <string>
#include <ctime>

DWORD FindDmaAddy (int PointerLevel, HANDLE hProcHandle, DWORD Offset[], DWORD BaseAddress);
void WriteToMemory(HANDLE hProcHandle);

std::string GameName = "AssaultCube";
LPCSTR LGameWindow ="AssaultCube";

bool IsGameAvail;
bool UpdateOnNextRun;

//----------AMMO Base---------------
bool AmmoStatus;
BYTE AmmoValue[] = {0xA3, 0x1C, 0x0, 0x0 };
DWORD AmmoBaseAddress = {0x00509B74};
DWORD AmmoOffset[]= {0x384, 0x14, 0x0};

//----------Helaty Base-----------
bool HealthStatus;
BYTE HealthValue[] = {0x39, 0x5, 0x0, 0x0 };
DWORD HealthBaseAddress = {0x00509B74};
DWORD HealthOffset[]= {0xF8};

DWORD FindDmaAddy (int PointerLevel, HANDLE hProcHandle, DWORD Offset[], DWORD BaseAddress)
    DWORD pointer = BaseAddress;
    DWORD pTemp;

    DWORD pointerAddr;
    for(int c =0; c < PointerLevel; c++)
        if(c == 0)
            ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &pTemp, sizeof (pTemp), NULL);

        pointerAddr = pTemp + Offset[c];
        ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &pTemp, sizeof (pTemp), NULL);
    return pointerAddr;

void WriteToMemory(HANDLE hProcHandle)

    DWORD AddressToWrite;
        AddressToWrite = FindDmaAddy(3, hProcHandle, AmmoOffset, AmmoBaseAddress);
        WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &AmmoValue, sizeof(AmmoValue), NULL);

        AddressToWrite = FindDmaAddy(1, hProcHandle, HealthOffset, HealthBaseAddress);
        WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &HealthValue, sizeof(HealthValue), NULL);

DWORD WINAPI Main_Thread (LPVOID lpParam)
    HWND hGameWindow = NULL;
    int OnePressTMR = clock();

    if(clock() - OnePressTMR > 400)
            MessageBeep (100);
            OnePressTMR = clock();
            AmmoStatus = !AmmoStatus;

    return NULL;

bool APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
    if(dwReason == DLL_PROCESS_ATTACH)
        CreateThread(NULL, NULL, (Main_Thread), NULL, NULL, NULL);
    return TRUE;
thx 4 ur kindness to replay...


Full Member
Mar 14, 2013
main thread returns null just after being created. Your if(IsGameAvail) is messed, set to false jumps over you getasynckeystate loop and returns null
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