Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic

    BF3 - ESP Base For You Guys /gewd

    Hey all
    since this section seems to die a little, i wanted to share something with you...
    I've created a little project containing examples to draw lines, rectangles, filled rectangles and text. There are even more functions to find, but you can reverse them yourself
    I also included a VTable Hook on IDXGISwapChain::Present which is currently Punkbuster Undetected
    So go on and copy the released classes and create some nice ESP :P
    Note: There is no screenshotblocker/cleaner included, so be careful.

    Credits:
    - KingOrgy: some Help and Hints
    - The1Domo: leaked PDBs
    - MSDN
    - InUrFace

    FILES:

    EntryPoint.cpp
    Code:
    #include "includes.h"
    
    DWORD WINAPI DllMain(HMODULE hDll, DWORD dwReasonForCall, LPVOID /* lpReserved*/)
    {
    	static HANDLE hThread=INVALID_HANDLE_VALUE;
    	static DWORD dwExitCode;
    	if(dwReasonForCall==DLL_PROCESS_ATTACH)
    	{
    		hThread=CreateThread(NULL,0,InitThread,NULL,0,NULL);
    		return (hThread!=INVALID_HANDLE_VALUE);
    	}
    	else if(dwReasonForCall==DLL_PROCESS_DETACH)
    	{
    		if(origPresent)
    		{
    			HookVTableFunction((PDWORD*)fb::DxRenderer::Singleton()->pSwapChain,(PBYTE)origPresent,8);
    			return 1;
    		}
    	}
    	return 0;
    }
    
    
    DWORD WINAPI InitThread(LPVOID /* lpReserved*/)
    {
    	while(fb::DxRenderer::Singleton()==0)
    		Sleep(10);
    	while(fb::DebugRenderer2::Singleton()==0)
    		Sleep(10);
    	origPresent=(tPresent)HookVTableFunction((PDWORD*)fb::DxRenderer::Singleton()->pSwapChain,(PBYTE)&hkPresent,8);
    	if(origPresent)
    		return 1;
    	return 0;
    }
    
    
    HRESULT WINAPI hkPresent(IDXGISwapChain* pSwapchain, UINT arg1, UINT arg2)
    {
    	fb::DebugRenderer2::Singleton()->drawText(20,20,fb::Color32(255,0,0,200),"Engine Drawing! ;)", 1.f);
    	fb::DebugRenderer2::Singleton()->drawLine2d(&fb::Tuple2<float>(100,100),&fb::Tuple2<float>(200,200),fb::Color32(0,255,0,255));
    	fb::DebugRenderer2::Singleton()->drawLineRect2d(&fb::Tuple2<float>(50,80),&fb::Tuple2<float>(180,150),fb::Color32(0,0,255,255));
    	fb::DebugRenderer2::Singleton()->drawRect2d(&fb::Tuple2<float>(200,200),&fb::Tuple2<float>(220,220),fb::Color32(0,255,255,255));
    	return origPresent(pSwapchain,arg1,arg2);
    }
    
    PBYTE WINAPI HookVTableFunction(PDWORD* ppVTable, PBYTE pHook, SIZE_T iIndex)
    {
    	DWORD dwOld = 0;
    	VirtualProtect((void*)((*ppVTable) + iIndex), 4, PAGE_EXECUTE_READWRITE, &dwOld);
    	PBYTE pOrig = ((PBYTE)(*ppVTable)[iIndex]); 
    	(*ppVTable)[iIndex] = (DWORD)pHook;
    
    	VirtualProtect((void*)((*ppVTable) + iIndex), 4, dwOld, &dwOld);
    
    	return pOrig;
    }
    Include.h
    Code:
    #ifndef __INCLUDES_HEADER__
    #define __INCLUDES_HEADER__
    
    #include <Windows.h>
    #include <d3d11.h>
    
    #include <iostream>
    #include <stdarg.h>
    
    
    #include "ReversedStructs.h"
    
    PBYTE WINAPI HookVTableFunction(PDWORD* ppVTable, PBYTE pHook, SIZE_T iIndex);
    DWORD WINAPI DllMain(HMODULE hDll, DWORD dwReasonForCall, LPVOID /* lpReserved*/);
    DWORD WINAPI InitThread(LPVOID /* lpReserved*/);
    HRESULT WINAPI hkPresent(IDXGISwapChain* pSwapChain,UINT arg1, UINT arg2);
    
    typedef HRESULT (WINAPI * tPresent)(IDXGISwapChain*, UINT, UINT);
    tPresent origPresent=NULL;
    
    #endif //__INCLUDES_HEADER__
    ReversedStructs.h
    Code:
    #include "includes.h"
    
    namespace fb
    {
    	class Color32
    	{
    	public:
    		union
    		{
    			struct
    			{
    				BYTE R;
    				BYTE G;
    				BYTE B;
    				BYTE A;
    			};
    			DWORD dwColor;
    		};
    
    	public:
    		Color32(const DWORD _Color)
    		{
    			dwColor=_Color;
    		}
    
    		Color32(const BYTE Red,const BYTE Green,const BYTE Blue, const BYTE Alpha)
    		{
    			A=Alpha;
    			R=Red;
    			G=Green;
    			B=Blue;
    		}
    	};
    
    	template <class T>
    	class Tuple2
    	{
    	public:
    		T Element1;
    		T Element2;
    
    	public:
    		Tuple2(T _Element1, T _Element2)
    		{
    			Element1=_Element1;
    			Element2=_Element2;
    		}
    	};
    
    	
    	class RenderScreenInfo
    	{
    	public:
    	};
    
    	class DxRenderer
    	{
    	public:
    		BYTE Pad_000[0x20];				// 0x00
    		UINT m_nWidth;					// 0x20
    		UINT m_nHeight;					// 0x24
    		BYTE Pad_001[0xB0];				// 0x28
    		ID3D11Device* pDevice;			// 0xD8
    		ID3D11DeviceContext* pContext;  // 0xDC
    		BYTE Pad_002[0x14];				// 0xE0
    		IDXGISwapChain* pSwapChain;		// 0xF4
    
    	public:
    		static DxRenderer* Singleton()
    		{
    			return *(DxRenderer**)0x02389C94;
    		}
    	};
    
    
    	class DebugRenderer2
    	{
    	public:
    		static DebugRenderer2* Singleton(void) //Credits to KingOrgy for giving me some hints
    		{
    			typedef fb::DebugRenderer2* (__stdcall* fb__DebugRenderManager_getThreadContext_t)(void);
    			fb__DebugRenderManager_getThreadContext_t fb__DebugRenderManager_getThreadContext=(fb__DebugRenderManager_getThreadContext_t)0x004B27E0;
    			return fb__DebugRenderManager_getThreadContext();
    		}
    
    		void drawText(int x, int y, Color32 color, char* text, float scale)
    		{
    			typedef void (__thiscall *tdrawText)(fb::DebugRenderer2*,int, int, char*, Color32,float);
    			tdrawText mdrawText=(tdrawText)0x004BA0F0;
    			mdrawText(this,x,y,text,color,scale);
    		}
    
    		void drawLine2d(Tuple2<float>* pos1, Tuple2<float>* pos2, Color32 color)
    		{
    			typedef void (__thiscall *tdrawLine2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
    			tdrawLine2d mdrawLine2d=(tdrawLine2d)0x004BCB70;
    			mdrawLine2d(this,pos1,pos2,color);
    		}
    
    		void drawLineRect2d(Tuple2<float>* minpos, Tuple2<float>* maxpos, Color32 color)
    		{
    			typedef void (__thiscall *tdrawLineRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
    			tdrawLineRect2d mdrawLineRect2d=(tdrawLineRect2d)0x004BD6B0;
    			mdrawLineRect2d(this,minpos,maxpos,color);
    		}
    
    		void drawRect2d(Tuple2<float>* minpos, Tuple2<float>* maxpos, Color32 color)
    		{
    			typedef void (__thiscall *tdrawRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
    			tdrawRect2d mdrawRect2d=(tdrawRect2d)0x004BD8C0;
    			mdrawRect2d(this,minpos,maxpos,color);
    		}
    	};
    }

    PS:Forgot to mention. I didn't created this, just leeched (But I'm not a leecher )

    I was going to do one ESP by myself, but I'm traveling atm so I can't
    Last edited by MarkHC; 07-30-2012 at 10:05 PM.


    CoD Minion from 09/19/2012 to 01/10/2013

  2. The Following 3 Users Say Thank You to MarkHC For This Useful Post:

    baccs (07-31-2012),DayZBandit (08-31-2012),zZzeta/S (07-31-2012)

  3. #2
    baccs's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    41
    Reputation
    10
    Thanks
    4
    My Mood
    Amused
    nice find thanks for the share

  4. #3
    ModexLife's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1
    User.cfg and write ?

    Where are you taking files.

  5. #4
    Threadstarter
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    Quote Originally Posted by ModexLife View Post
    User.cfg and write ?
    Errmm I think you're not a programmer.. so this is not for you


    CoD Minion from 09/19/2012 to 01/10/2013

  6. #5
    ModexLife's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1
    You tell me how to operate?

  7. #6
    baccs's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    41
    Reputation
    10
    Thanks
    4
    My Mood
    Amused
    Quote Originally Posted by ModexLife View Post
    You tell me how to operate?
    the only way to use this is to be a programer and compile into a .dll or an .exe

    unless you know how to do this the info in this thread is useless to you
    Last edited by baccs; 07-31-2012 at 05:53 PM.

  8. #7
    iDennis's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    176
    Reputation
    10
    Thanks
    27
    My Mood
    Bored
    does it contain a toggleable button?

  9. #8
    batuhan98's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Under your bed
    Posts
    57
    Reputation
    10
    Thanks
    4
    My Mood
    Sleepy
    i know nothing about coding. can someone make a tutorial or something or explain to me what i have to do?

  10. #9
    hiphippie's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by batuhan98 View Post
    i know nothing about coding. can someone make a tutorial or something or explain to me what i have to do?
    Have you tried looking on Google for how to compile into dll or exe files? Please do. It saves you time while you waiting for a response, and it saves the people responding time from having to explain stuff you can find on Google.

    This looks like C++, I only know Java, Python, Javascript, and CSS, so this is way out of my league, but see what you can find on tutorials for C++. It's a handy language to learn.

  11. #10
    batuhan98's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Under your bed
    Posts
    57
    Reputation
    10
    Thanks
    4
    My Mood
    Sleepy
    Quote Originally Posted by hiphippie View Post
    Have you tried looking on Google for how to compile into dll or exe files? Please do. It saves you time while you waiting for a response, and it saves the people responding time from having to explain stuff you can find on Google.

    This looks like C++, I only know Java, Python, Javascript, and CSS, so this is way out of my league, but see what you can find on tutorials for C++. It's a handy language to learn.
    never mind. i'll just stick with the fact that i'll learn it later because it looks complicated and im sure that it IS complicated. i'll leave it for the people that understand it

  12. #11
    Threadstarter
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    Just a bump to say that this method is still undetected... I'm starting to doubt that there's a real coder on BF3 section Just saying


    CoD Minion from 09/19/2012 to 01/10/2013

  13. #12
    briankilla4's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    EGYPT,cairo
    Posts
    874
    Reputation
    10
    Thanks
    743
    My Mood
    Amazed
    Quote Originally Posted by General Shepherd View Post
    Just a bump to say that this method is still undetected... I'm starting to doubt that there's a real coder on BF3 section Just saying
    i alerady used it and made some useful things with it.

  14. #13
    Threadstarter
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    Quote Originally Posted by briankilla4 View Post
    i alerady used it and made some useful things with it.
    Good to know


    CoD Minion from 09/19/2012 to 01/10/2013

  15. #14
    mertmho1's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    in your imagination
    Posts
    26
    Reputation
    10
    Thanks
    4
    My Mood
    Amazed
    Quote Originally Posted by briankilla4 View Post
    i alerady used it and made some useful things with it.
    So release maybe?








  16. #15
    amazingxx's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    372
    Reputation
    10
    Thanks
    358
    This thread reminded me to install Visual Studio, if nothing else I thank you for that .

Page 1 of 2 12 LastLast

Similar Threads

  1. is CA supper buggy for you guys? CONNECTION HAS ENDED
    By El Narco in forum Combat Arms Discussions
    Replies: 9
    Last Post: 12-15-2009, 11:20 PM
  2. Question for you guys with windows 7
    By djdonn in forum Combat Arms Discussions
    Replies: 7
    Last Post: 11-27-2009, 07:39 PM
  3. I have a story for you guys.
    By redeem3r in forum General
    Replies: 5
    Last Post: 09-27-2009, 04:53 PM
  4. [Pissed] No more hack For you guys
    By jacop in forum Blackshot Hacks & Cheats
    Replies: 4
    Last Post: 06-21-2009, 12:49 PM
  5. CrossHair for you guys.
    By Obey in forum WarRock - International Hacks
    Replies: 7
    Last Post: 04-19-2009, 11:05 AM