Exclamation[Source] DinarBot by Aless

Posts 1–15 of 18 · Page 1 of 2
[Source] DinarBot by Aless
Here is the Dinarbot Source by Aless!

Here is the Source:

//DinarBot by Aless
int CH_1024x768 = 0;
int CH_1152x846 = 0;
int CH_1280x960 = 0;
int CH_1280x1024 = 0;
int CH_1280x800 = 0;
int CH_1440x900 = 0;
int CH_1600x1024 = 0;
int CH_1680x1050 = 0;
int CH_1280x768 = 0;
int CH_1088x612 = 0;
int CH_1280x720 = 0;
int CH_1360x768 = 0;
int CH_1600x900 = 0;
struct:

typedef struct
{
int Dinar;
}tCats;
The chars:
char *AStart[] = {"Start", "Stop"};
The menu:

Quote:
Aless->AddFolder("[Dinar Bot]", OnOffFunction, &Folders.Dinar, 2);
if(Folders.Dinar)
{
Aless->AddItem("1024x768" , AStart , &CH_1024x768 ,2 ,MENUITEM );
Aless->AddItem("1152x846" , AStart , &CH_1152x846 ,2 ,MENUITEM );
Aless->AddItem("1280x960" , AStart , &CH_1280x960 ,2 ,MENUITEM );
Aless->AddItem("1280x1024" , AStart , &CH_1280x1024 ,2 ,MENUITEM );
Aless->AddItem("1280x800" , AStart , &CH_1280x800 ,2 ,MENUITEM );
Aless->AddItem("1440x900" , AStart , &CH_1440x900 ,2 ,MENUITEM );
Aless->AddItem("1600x1024" , AStart , &CH_1600x1024 ,2 ,MENUITEM );
Aless->AddItem("1680x1050" , AStart , &CH_1680x1050 ,2 ,MENUITEM );
Aless->AddItem("1280x768" , AStart , &CH_1280x768 ,2 ,MENUITEM );
Aless->AddItem("1088x612" , AStart , &CH_1088x612 ,2 ,MENUITEM );
Aless->AddItem("1280x720" , AStart , &CH_1280x720 ,2 ,MENUITEM );
Aless->AddItem("1360x768" , AStart , &CH_1360x768 ,2 ,MENUITEM );
Aless->AddItem("1600x900" , AStart , &CH_1600x900 ,2 ,MENUITEM );
}



The functions:

Quote:
if(CH_1024x768==1)
{
//Start Button
SetCursorPos(450,90);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1152x846==1)
{
//Start Button
SetCursorPos(520,124);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1280x960==1)
{
//Start Button
SetCursorPos(586,175);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1280x1024==1)
{
//Start Button
SetCursorPos(586,205);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1280x800==1)
{
//Start Button
SetCursorPos(587,94);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1440x900==1)
{
//Start Button
SetCursorPos(670,145);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1600x1024==1)
{
//Start Button
SetCursorPos(754,207);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1680x1050==1)
{
//Start Button
SetCursorPos(797,219);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1280x768==1)
{
//Start Button
SetCursorPos(587,79);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1088x612==1)
{
//Start Button
SetCursorPos(486,79);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1280x720==1)
{
//Start Button
SetCursorPos(586,80);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1360x768==1)
{
//Start Button
SetCursorPos(628,79);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
if(CH_1600x900==1)
{
//Start Button
SetCursorPos(754,144);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
//----------------------------------------------
//----------------------------------------------
ALL Credits to Aless
CursorPositions search with WinCheat
Good job, thanks!
Dont say it Press it
Quote Originally Posted by ryski123 View Post
Dont say it Press it
yes ofc i forget but one question this can be add in nomenu if i do some changes right?
fail -.-
this is the function to put hack
Nice !! tnx! :d

//I didnt only sayd it, i pressed it
yeah it can be added to a menu, I Didnt make this source btw
Thanks for the effort
Thank you bud
Thanks dude i can make dinar bot now
I have problem
.\WarRock base.cpp(59) : error C2447: '{' : missing function header (old-style formal list?)

Code:
#include "WarRock base.h"
#include "WarRock color.h"
#include "WarRock d3dmenu.h"
#include "WarRock options.h"




D3D9Menu *KarraKa;

LPDIRECT3DTEXTURE9 White, Red, Green, Blue, Black, Purple, Grey, Yellow, Orange;

ID3DXFont* pFont;

bool Color = true, Create = true;

char *Moptfolder[] = {"+", "-"};
char *Moptonoff[] = {"OFF", "ON"};

HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32) 
{
	if(FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)))
		return E_FAIL;

	WORD colour16 =((WORD) ((colour32>>28) &0xF) <<12)
		|(WORD) (((colour32>>20) &0xF) <<8)
		|(WORD) (((colour32>>12) &0xF) <<4)
		|(WORD) (((colour32>>4) &0xF) <<0);

	D3DLOCKED_RECT d3dlr;    
	(*ppD3Dtex) ->LockRect(0, &d3dlr, 0, 0);
	WORD *pDst16 =(WORD*) d3dlr.pBits;

	for(int xy=0; xy < 8*8; xy++) 
	*pDst16++ = colour16;

	(*ppD3Dtex) ->UnlockRect(0);

	return S_OK;
}
int CH_1024x768 = 0;
void RebuildMenu(void) 
{
	KarraKa->AddFolder("[Folder 1]", Moptfolder, &Folders.folder1, 2);
	if(Folders.folder1) {
		KarraKa->AddItem("1024x768", Moptonoff, &CH_1024x768, 2);
		KarraKa->AddItem("Item 2", Moptonoff, &Items.item3, 2);
	}

	KarraKa->AddFolder("[Folder 2]", Moptfolder, &Folders.folder2, 2);
	if(Folders.folder2) {
		KarraKa->AddItem("Item 3", Moptonoff, &Items.item3, 2);
		KarraKa->AddItem("Item 4", Moptonoff, &Items.item4, 2);
	}
}

{
if(CH_1024x768==1);
{
//Start Button
SetCursorPos(450,90);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
}

HRESULT WINAPI myReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters) 
{
	pFont->OnLostDevice();
	pFont->OnResetDevice();

	return pReset(pDevice, pPresentationParameters);
}

HRESULT WINAPI myEndScene(LPDIRECT3DDEVICE9 pDevice) 
{
	if(Create) {
		D3DXCreateFont(pDevice, 17, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, (LPCSTR) "Trebuchet MS", &pFont);
		Create = false;
	}

	if(pFont == NULL) 
		pFont->OnLostDevice();
	else {
		if(KarraKa == NULL) {
			KarraKa = new D3D9Menu("-=[ KarraKa D3D9 Base ]=-");
		} else {
			if(KarraKa->Mmax==0) RebuildMenu();
			KarraKa->MenuShow(12, 10, pFont, pDevice);
			KarraKa->MenuNav();
		}
	}
	
	return pEndScene(pDevice);
}

HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) 
{
	if(Color) {
		GenerateTexture(pDevice, &White, WHITE2);
		GenerateTexture(pDevice, &Red, RED2);
		GenerateTexture(pDevice, &Green, GREEN2);
		GenerateTexture(pDevice, &Blue, BLUE2);
		GenerateTexture(pDevice, &Black, BLACK2);
		GenerateTexture(pDevice, &Purple, PURPLE2);
		GenerateTexture(pDevice, &Grey, GREY2);
		GenerateTexture(pDevice, &Yellow, YELLOW2);
		GenerateTexture(pDevice, &Orange, ORANGE2);
		Color = false;
	}
	
	return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}

PVOID D3Ddiscover(void *tbl, int size) 
{
	HWND hWnd;
	void *pInterface=0 ;
	D3DPRESENT_PARAMETERS d3dpp; 

	if((hWnd=CreateWindowEx(NULL, WC_DIALOG, "", WS_OVERLAPPED, 0, 0, 50, 50, NULL, NULL, NULL, NULL)) ==NULL) return 0;
	ShowWindow(hWnd, SW_HIDE);

	LPDIRECT3D9 pD3D;
	LPDIRECT3DDEVICE9 pD3Ddev;
	if((pD3D = Direct3DCreate9(D3D_SDK_VERSION)) != NULL) {
		ZeroMemory(&d3dpp, sizeof(d3dpp));
		d3dpp.Windowed         = TRUE;
		d3dpp.SwapEffect       = D3DSWAPEFFECT_DISCARD;
		d3dpp.hDeviceWindow    = hWnd;
		d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
		d3dpp.BackBufferWidth  = d3dpp.BackBufferHeight = 600;
		pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pD3Ddev);
		if(pD3Ddev) {
			pInterface =(PDWORD) *(DWORD *) pD3Ddev;
			memcpy(tbl, (void *) pInterface, size);
			pD3Ddev->Release();
		}
		pD3D->Release();
	}
	DestroyWindow(hWnd);
	return pInterface;
}

void *DetourCreateJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp =(BYTE*)malloc(len+5);
	DWORD dwBack;

	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);	
	jmp += len;
	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1)=(DWORD)(src+len - jmp)- 5;

	src[0] = 0xE9;
	*(DWORD*)(src+1)=(DWORD)(dst - src)- 5;
	for(int i=5; i<len; i++)src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);

	return(jmp-len);
}

int D3D(void) 
{
	HINSTANCE hD3D = 0;
	DWORD vTable[105];
	do {
		hD3D = GetModuleHandle("d3d9.dll");
		if(!hD3D) Sleep(10);
	} while(!hD3D);

	if(D3Ddiscover((void *) &vTable[0], 420) == 0) return 0;
	{
		//You should add ur OWN DETOURS before of UnComment this section
		// Detour JMP Detected, you need bypass Hackshield
		pReset					= (oReset)					DetourCreateJMP((PBYTE) vTable[16], (PBYTE) myReset, 5); 
		pEndScene				= (oEndScene)				DetourCreateJMP((PBYTE) vTable[42], (PBYTE) myEndScene, 5);
		pDrawIndexedPrimitive	= (oDrawIndexedPrimitive)	DetourCreateJMP((PBYTE) vTable[82], (PBYTE) myDrawIndexedPrimitive, 5);

		free((void *) vTable);
	}

	return 0;
}

BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved) 
{
	if(dwReason == DLL_PROCESS_ATTACH) 
	{
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE) D3D, NULL, NULL, NULL);
	}
	return TRUE;
}

Please help me!
Quote Originally Posted by XhakerX View Post
I have problem
.\WarRock base.cpp(59) : error C2447: '{' : missing function header (old-style formal list?)

Code:
#include "WarRock base.h"
#include "WarRock color.h"
#include "WarRock d3dmenu.h"
#include "WarRock options.h"




D3D9Menu *KarraKa;

LPDIRECT3DTEXTURE9 White, Red, Green, Blue, Black, Purple, Grey, Yellow, Orange;

ID3DXFont* pFont;

bool Color = true, Create = true;

char *Moptfolder[] = {"+", "-"};
char *Moptonoff[] = {"OFF", "ON"};

HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32) 
{
	if(FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)))
		return E_FAIL;

	WORD colour16 =((WORD) ((colour32>>28) &0xF) <<12)
		|(WORD) (((colour32>>20) &0xF) <<8)
		|(WORD) (((colour32>>12) &0xF) <<4)
		|(WORD) (((colour32>>4) &0xF) <<0);

	D3DLOCKED_RECT d3dlr;    
	(*ppD3Dtex) ->LockRect(0, &d3dlr, 0, 0);
	WORD *pDst16 =(WORD*) d3dlr.pBits;

	for(int xy=0; xy < 8*8; xy++) 
	*pDst16++ = colour16;

	(*ppD3Dtex) ->UnlockRect(0);

	return S_OK;
}
int CH_1024x768 = 0;
void RebuildMenu(void) 
{
	KarraKa->AddFolder("[Folder 1]", Moptfolder, &Folders.folder1, 2);
	if(Folders.folder1) {
		KarraKa->AddItem("1024x768", Moptonoff, &CH_1024x768, 2);
		KarraKa->AddItem("Item 2", Moptonoff, &Items.item3, 2);
	}

	KarraKa->AddFolder("[Folder 2]", Moptfolder, &Folders.folder2, 2);
	if(Folders.folder2) {
		KarraKa->AddItem("Item 3", Moptonoff, &Items.item3, 2);
		KarraKa->AddItem("Item 4", Moptonoff, &Items.item4, 2);
	}
}

{
if(CH_1024x768==1);
{
//Start Button
SetCursorPos(450,90);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
}

HRESULT WINAPI myReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters) 
{
	pFont->OnLostDevice();
	pFont->OnResetDevice();

	return pReset(pDevice, pPresentationParameters);
}

HRESULT WINAPI myEndScene(LPDIRECT3DDEVICE9 pDevice) 
{
	if(Create) {
		D3DXCreateFont(pDevice, 17, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, (LPCSTR) "Trebuchet MS", &pFont);
		Create = false;
	}

	if(pFont == NULL) 
		pFont->OnLostDevice();
	else {
		if(KarraKa == NULL) {
			KarraKa = new D3D9Menu("-=[ KarraKa D3D9 Base ]=-");
		} else {
			if(KarraKa->Mmax==0) RebuildMenu();
			KarraKa->MenuShow(12, 10, pFont, pDevice);
			KarraKa->MenuNav();
		}
	}
	
	return pEndScene(pDevice);
}

HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) 
{
	if(Color) {
		GenerateTexture(pDevice, &White, WHITE2);
		GenerateTexture(pDevice, &Red, RED2);
		GenerateTexture(pDevice, &Green, GREEN2);
		GenerateTexture(pDevice, &Blue, BLUE2);
		GenerateTexture(pDevice, &Black, BLACK2);
		GenerateTexture(pDevice, &Purple, PURPLE2);
		GenerateTexture(pDevice, &Grey, GREY2);
		GenerateTexture(pDevice, &Yellow, YELLOW2);
		GenerateTexture(pDevice, &Orange, ORANGE2);
		Color = false;
	}
	
	return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}

PVOID D3Ddiscover(void *tbl, int size) 
{
	HWND hWnd;
	void *pInterface=0 ;
	D3DPRESENT_PARAMETERS d3dpp; 

	if((hWnd=CreateWindowEx(NULL, WC_DIALOG, "", WS_OVERLAPPED, 0, 0, 50, 50, NULL, NULL, NULL, NULL)) ==NULL) return 0;
	ShowWindow(hWnd, SW_HIDE);

	LPDIRECT3D9 pD3D;
	LPDIRECT3DDEVICE9 pD3Ddev;
	if((pD3D = Direct3DCreate9(D3D_SDK_VERSION)) != NULL) {
		ZeroMemory(&d3dpp, sizeof(d3dpp));
		d3dpp.Windowed         = TRUE;
		d3dpp.SwapEffect       = D3DSWAPEFFECT_DISCARD;
		d3dpp.hDeviceWindow    = hWnd;
		d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
		d3dpp.BackBufferWidth  = d3dpp.BackBufferHeight = 600;
		pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pD3Ddev);
		if(pD3Ddev) {
			pInterface =(PDWORD) *(DWORD *) pD3Ddev;
			memcpy(tbl, (void *) pInterface, size);
			pD3Ddev->Release();
		}
		pD3D->Release();
	}
	DestroyWindow(hWnd);
	return pInterface;
}

void *DetourCreateJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp =(BYTE*)malloc(len+5);
	DWORD dwBack;

	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);	
	jmp += len;
	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1)=(DWORD)(src+len - jmp)- 5;

	src[0] = 0xE9;
	*(DWORD*)(src+1)=(DWORD)(dst - src)- 5;
	for(int i=5; i<len; i++)src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);

	return(jmp-len);
}

int D3D(void) 
{
	HINSTANCE hD3D = 0;
	DWORD vTable[105];
	do {
		hD3D = GetModuleHandle("d3d9.dll");
		if(!hD3D) Sleep(10);
	} while(!hD3D);

	if(D3Ddiscover((void *) &vTable[0], 420) == 0) return 0;
	{
		//You should add ur OWN DETOURS before of UnComment this section
		// Detour JMP Detected, you need bypass Hackshield
		pReset					= (oReset)					DetourCreateJMP((PBYTE) vTable[16], (PBYTE) myReset, 5); 
		pEndScene				= (oEndScene)				DetourCreateJMP((PBYTE) vTable[42], (PBYTE) myEndScene, 5);
		pDrawIndexedPrimitive	= (oDrawIndexedPrimitive)	DetourCreateJMP((PBYTE) vTable[82], (PBYTE) myDrawIndexedPrimitive, 5);

		free((void *) vTable);
	}

	return 0;
}

BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved) 
{
	if(dwReason == DLL_PROCESS_ATTACH) 
	{
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE) D3D, NULL, NULL, NULL);
	}
	return TRUE;
}

Please help me!
Do you know C++? or you just leeched the xKarraka base?
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us