bueno amigos tengo este proyecto a ver si así voy bien
#include <windows.h>
// Defines .
#define MyCShell_Base 0
#define MyCShell_Length 1
#define MyDrawBoxes_P_V 2 // Pointer Base Value .
#define MyP_V_Offset 3
#define MyDrawBoxes_Offset 4
#define GeneratedPointer 5
#define MyArraySize 6
// Other functions .
int Search_Func(int []);
void Wall_Hack(int , short , char );
int (__stdcall *Wall_Func)(int);
// My Function
int MyFunction()
{
// My Definitions :
bool Switch = 0;
int MyArray[MyArraySize] = {0x34000000,0x200000,-1862335894,-4,0x1F8,0};
// Message to show
MessageBoxA(0, "My Wolfteam WallHack", "My DLL Message", MB_OK | MB_ICONINFORMATION);
// Wait for Wolfteam window & CShell execution .
while(!FindWindowA(0,"WolfTeam"))Sleep(5000);
// Get The final Pointer
MyArray[GeneratedPointer] = *(int*)Search_Func(MyArray);
// Infinite loop for the user .
for(;
{
if(MyArray[GeneratedPointer] < MyArray[MyCShell_Base])
break; // if Found a false pointer
// User Hotkey
// F12 Turn on/off
if(GetAsyncKeyState(VK_F12)){
char ch = (Switch = !Switch) ? '1' : '0';
Wall_Hack(MyArray[GeneratedPointer],MyArray[MyDrawBoxes_Offset],ch);
}
Sleep( 200 ); // Reduce CPU Usage .
}
MessageBoxA(0, "Error", "My DLL Message", MB_OK | MB_ICONSTOP);
ExitThread(0); // End of my main function .
return -1;
}
int Search_Func(int Array[]){
static int Result , Dump;
for(int i = 0 ; i < Array[MyCShell_Length] ; i++)
if(*(DWORD*)(Array[MyCShell_Base]+i) == Array[MyDrawBoxes_P_V])
{
Result = Array[MyCShell_Base]+i+Array[MyP_V_Offset];
break;
}
if(Result)return Result;
else return (int)&Dump;
}
void Wall_Hack(int Pointer , short Offset , char ch){
static char Module_DrawBoxes[30] = "ModelDebug_DrawBoxes X.000000";
Wall_Func = *(int (__stdcall **)(int))(Offset + *(int *)Pointer);
Module_DrawBoxes[21] = ch; // Replace the 'X' with 1 or 0
// Call The function inside Wolfteam
Wall_Func((int)&Module_DrawBoxes);
Sleep ( 100 ); // delay between two hotkeys .
}
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
// attach to process
OutputDebugStringA("Starting MyFunction");
CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)MyFunction,hinstDLL, 0, 0 );
OutputDebugStringA("Exiting This Thread");
break;
}
return TRUE; // succesful