• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 7 of 7
    1. #1
      Newbie
      Learning to hack games!
       
      Coding
       
      XXzPandaBoyzXX's Avatar
      Join Date
      Oct 2013
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      4

      How do i turn this source code into .dll?

      Silent VPN
      This is the main code:

      Spoiler: Code
      #include"stdafx.h"
      #include <windows.h>

      #include <d3d8.h>
      #pragma comment(lib, "d3d8.lib")

      typedef HRESULT (WINAPI* CreateDevice_Prototype) (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
      typedef HRESULT (WINAPI* Reset_Prototype) (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
      typedef HRESULT (WINAPI* EndScene_Prototype) (LPDIRECT3DDEVICE8);
      typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

      CreateDevice_Prototype CreateDevice_Pointer = NULL;
      Reset_Prototype Reset_Pointer = NULL;
      EndScene_Prototype EndScene_Pointer = NULL;
      DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;

      HRESULT WINAPI Direct3DCreate8_VMTable (VOID);
      HRESULT WINAPI CreateDevice_Detour (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
      HRESULT WINAPI Reset_Detour (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
      HRESULT WINAPI EndScene_Detour (LPDIRECT3DDEVICE8);
      HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

      PDWORD Direct3D_VMTable = NULL;

      BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
      {
      if(dwReason == DLL_PROCESS_ATTACH)
      {
      DisableThreadLibraryCalls(hinstModule);

      if(Direct3DCreate8_VMTable() == D3D_OK)
      return TRUE;
      }

      return FALSE;
      }

      HRESULT WINAPI Direct3DCreate8_VMTable(VOID)
      {
      LPDIRECT3D8 Direct3D_Object = Direct3DCreate8(D3D_SDK_VERSION);

      if(Direct3D_Object == NULL)
      return D3DERR_INVALIDCALL;

      Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
      Direct3D_Object->Release();

      DWORD dwProtect;

      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
      *(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[15];
      *(PDWORD)&Direct3D_VMTable[15] = (DWORD)CreateDevice_Detour;

      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
      return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;

      return D3D_OK;
      }

      HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D8 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow,
      DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters,
      LPDIRECT3DDEVICE8* Returned_Device_Interface)
      {
      HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags,
      PresentationParameters, Returned_Device_Interface);

      DWORD dwProtect;

      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
      *(PDWORD)&Direct3D_VMTable[15] = *(PDWORD)&CreateDevice_Pointer;
      CreateDevice_Pointer = NULL;

      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
      return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;

      if(Returned_Result == D3D_OK)
      {
      Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;

      *(PDWORD)&Reset_Pointer = (DWORD)Direct3D_VMTable[14];
      *(PDWORD)&EndScene_Pointer = (DWORD)Direct3D_VMTable[35];
      *(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[71];

      *(PDWORD)&Direct3D_VMTable[14] = (DWORD)Reset_Detour;
      *(PDWORD)&Direct3D_VMTable[35] = (DWORD)EndScene_Detour;
      *(PDWORD)&Direct3D_VMTable[71] = (DWORD)DrawIndexedPrimitive_Detour;
      }

      return Returned_Result;
      }

      HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
      {
      return Reset_Pointer(Device_Interface, PresentationParameters);
      }

      HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE8 Device_Interface)
      {
      return EndScene_Pointer(Device_Interface);
      }

      HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type,
      UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
      {
      LPDIRECT3DVERTEXBUFFER8 Stream_Data;
      UINT Stride = 0;

      if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
      Stream_Data->Release();
      //code
      return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
      }[CODE]

      How to add WALLHACK(I don't think this should be here) Just incase you need to know what is this code below
      Look at this piece of code right here in the base

      [CODE]HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type,
      UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
      {
      LPDIRECT3DVERTEXBUFFER8 Stream_Data;
      UINT Stride;

      if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
      Stream_Data->Release();
      //code
      return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
      }



      END.

      Also,
      How do i add the key to enable it?

      if((GetAsyncKeyState(VK_NUMPAD1)&1)==1)//Numpad 1 wallhack =!wallhack;//Start Wallhack

      I got the code to enable it but where do i add it to?

      Or you can just compile the source code into .dll for me(PM)

      Thank you for reading!
      Last edited by XXzPandaBoyzXX; 03-31-2014 at 10:15 PM.

    2. #2
      Jr.Coder
      <3 D3D
       
      Coding
       
      gnuzim's Avatar
      Join Date
      Nov 2012
      Posts
      67
      Thanks (-->)
      43
      Thanks (<--)
      28
      As far as i can see, this code does not have any strides to make your wallhack work.
      You will need to make a new project on VC++ or VS or ... Attach DX8 lib into your project and compile.

      To make your GetAsyncState you need to create a loop to check for the key press.
      Make a condition to check if its true, turn on your wallhack!

      These tips and this code might not help you, you should watch fleeps tutorials before trying to change anyones code!

      Good luck
      Last edited by gnuzim; 04-01-2014 at 03:26 AM.

    3. Thanks XXzPandaBoyzXX thanked for this post
    4. #3
      Newbie
      Learning to hack games!
       
      Coding
       
      XXzPandaBoyzXX's Avatar
      Join Date
      Oct 2013
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      4
      Quote Originally Posted by gnuzim View Post
      As far as i can see, this code does not have any strides to make your wallhack work.
      You will need to make a new project on VC++ or VS or ... Attach DX8 lib into your project and compile.

      To make your GetAsyncState you need to create a loop to check for the key press.
      Make a condition to check if its true, turn on your wallhack!

      These tips and this code might not help you, you should watch fleeps tutorials before trying to change anyones code!

      Good luck
      I kindly thank you for helping.

      I believe that strides from these follow game might work:
      COD GHOST
      SUDDEN-ATTACK

      And i always watch fleep

    5. #4
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Start with learning programming, from the beginning
      How do i turn this source code into .dll?

    6. #5
      Newbie
      Learning to hack games!
       
      Coding
       
      XXzPandaBoyzXX's Avatar
      Join Date
      Oct 2013
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      4
      Quote Originally Posted by c5 View Post
      Start with learning programming, from the beginning
      I do know that but it's very confusing.

      People say
      "Learn reserve programming and c++,etc."

      I'm not sure which to learn first. Super super confusing.

    7. #6
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Quote Originally Posted by XXzPandaBoyzXX View Post
      I do know that but it's very confusing.

      People say
      "Learn reserve programming and c++,etc."

      I'm not sure which to learn first. Super super confusing.
      C++ first, then reverse engineering (it will come itself with time)
      How do i turn this source code into .dll?

    8. #7
      Newbie
      Learning to hack games!
       
      Coding
       
      XXzPandaBoyzXX's Avatar
      Join Date
      Oct 2013
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      4
      Silent VPN
      Quote Originally Posted by c5 View Post
      C++ first, then reverse engineering (it will come itself with time)
      Thank you for answering, I'll learn C++ first from now on.

    Similar Game Hacker Threads

    1. BlackShot Sea source code
      By fedrick_123 in forum Other Game Hacks
      Replies: 0
      Last Post: 02-06-2016, 07:02 AM
    2. source code c++ ? asm
      By waypointtv in forum C/C++
      Replies: 4
      Last Post: 05-20-2015, 01:52 AM
    3. [Help] C++ ESP AIMBOT SOURCE CODE GDI Drawing Source Code Help Please
      By PimpinRice in forum GH Tutorials Help
      Replies: 10
      Last Post: 10-25-2014, 04:14 PM
    4. [Help] GetAsyncKeyState hotkeys [Turn on] + [Turn off]
      By ZxPwd in forum Visual Basic
      Replies: 10
      Last Post: 06-23-2014, 04:06 AM

    Tags for this Thread