Solved Executing assembly script with C++

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

hiuuhhiih

Newbie
May 12, 2016
2
32
0
So I started coding in C++ last week because I was bored and for the last 2 days I've been looking into assembly, so don't judge if the code is somehow 'bad'. So I simply want to attach a dll to a process and execute an asm script (which was tested in cheat engine's auto-assembly). It doesn't work though lol :SriHead:

C++:
#include <iostream>
#include <windows.h>

UINT_PTR Address1 = 0x0124E493;
UINT_PTR Address2 = 0x012B20FF;

__declspec(naked) void __cdecl Asm()
{
	__asm
	{
		push 0
		push [Address1]
		call [Address2]
	}
}

DWORD WINAPI Func(LPVOID lpParam)
{
//This was in a loop at the beginning but I figured it was useless
		Asm();
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
	if (dwAttached == DLL_PROCESS_ATTACH) CreateThread(NULL, 0, &Func, NULL, 0, NULL);
	return TRUE;
}
 

johnkittz

Newbie
Full Member
Jun 28, 2016
16
108
0
You just want to inject? check out fleeps tut on c++

(i just got into c++ and after watching fleeps video i made my FIRST dll hack)
 
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