Results 1 to 15 of 15
  1. #1
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh

    making my first Wh

    Code:
    // dllmain.cpp : Defines the entry point for the DLL application.
    #include "stdafx.h"
    
    
    
    BOOL APIENTRY DllMain( HMODULE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
    					 
    					 )
    {
    	switch (ul_reason_for_call)
    	{
    	
    		
    		
    
    
    
    
    	case DLL_PROCESS_ATTACH:
    	case DLL_THREAD_ATTACH:
    	case DLL_THREAD_DETACH:
    	case DLL_PROCESS_DETACH:
    		break;
    	}
    	return TRUE;
    }
    
    
    void ChopperBoxes()
    {
    	
    	DWORD dwCall = 0x49B010;
    	__asm{
    		push 0x0
    		call [dwCall]
    		add esp, 0x4
    	}
    }
    my problem is that how do i call "chopperBoxes" function if I just type "ChopperBoxes();" then it tells "chopperBoxes identifier not found"

  2. #2
          ( ° ͜ʖ͡°)╭∩╮
    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
    Simple:

    A- Learn Programming.
    B- Hook some MW2 rendering function.
    C- Call the Chopper Boxes from the hooked function.


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

  3. #3
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    Code:
    // dllmain.cpp : Defines the entry point for the DLL application.
    #include "stdafx.h"
    #include "Hooking.h"
    
    
    BOOL APIENTRY DllMain( HMODULE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
    					   )
    					 
    
    					 
    {
    
    	switch (ul_reason_for_call)
    	{
    	
    		
    		
    		CallHook(ChopperBoxes);
    
    		
    
    
    
    
    	case DLL_PROCESS_ATTACH:
    	case DLL_THREAD_ATTACH:
    	case DLL_THREAD_DETACH:
    	case DLL_PROCESS_DETACH:
    		break;
    	}
    	return TRUE;
    }
    
    
    void ChopperBoxes()
    {
    	
    	DWORD dwCall = 0x49B010;
    	__asm{
    		push 0x0
    		call [dwCall]
    		add esp, 0x4
    	}
    }
    }
    am I corect now?

    Hooking.h

    Code:
    #define CALL_NEAR32 0xE8U
    #define JMP_NEAR32 0xE9U
    #define NOP 0x90U
    
    struct CallHook {
    	BYTE bOriginalCode[5];
    	PBYTE pPlace;
    	PVOID pOriginal;
    
    	void initialize(PBYTE place);
    	int installHook(void (*hookToInstall)(), bool unprotect);
    	int releaseHook(bool unprotect);
    };
    
    struct PointerHook {
    	PVOID* pPlace;
    	PVOID pOriginal;
    
    	void initialize(PVOID* place);
    	int installHook(void (*hookToInstall)(), bool unprotect);
    	int releaseHook(bool unprotect);
    };
    
    struct StompHook {
    	BYTE bOriginalCode[15];
    	BYTE bCountBytes;
    	PBYTE pPlace;
    
    	void initialize(BYTE countBytes, PBYTE place);
    	int installHook(void (*hookToInstall)(), bool useJump, bool unprotect);
    	int releaseHook(bool unprotect);
    };
    Last edited by mwxplayer; 11-13-2012 at 03:57 AM.

  4. #4
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    194
    My Mood
    Amazed
    You absolutly dont understand what you are doing...

    like Insane said, start by point A -> learning programming.


    cheers

  5. #5
    Unscrewed's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    912
    My Mood
    Blah
    Quote Originally Posted by inmate View Post
    You absolutly dont understand what you are doing...

    like Insane said, start by point A -> learning programming.


    cheers
    If you don't know how to program, then don't feel like you've got to say something.
    You're just making yourself look like a retard to any decent thinker out there.

    What is he right now? He's learning.
    Instead of turning him away you can help him in the right direction.
    No wonder MPGH's community is shit.
    Everyone who actually didn't whine and tried stuff themselves got turned away.
    Look what's left. People like you.. and @-InSaNe-.

    @OP Shoot me a PM if you're still busy.
    Last edited by Unscrewed; 11-18-2012 at 09:32 PM.
    Hacks are made for fun purposes only.
    If you get banned, tell the admin you needed some entertainment in your miserable life.

  6. #6
          ( ° ͜ʖ͡°)╭∩╮
    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 Unscrewed View Post
    What is he right now? He's learning.
    No. He's just leeching code without even stop and try to see what the code does. No one learn that way. And what you want us to do? Give him a full working code so he can put he can compile and release as his own? That's not going to happen. I'd be happy to help when he shows that he has already done some of the "work" on his own. But when someone just come here with a empty main function asking for help... well... dunno about you, but I got other things to do...
    Last edited by MarkHC; 11-18-2012 at 09:54 PM.


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

  7. The Following User Says Thank You to MarkHC For This Useful Post:

    rawr im a tiger (12-05-2012)

  8. #7
    mike3x3's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    ohey its mw2player, why don't you just make another d3d overlay and go to your arev friends and say: "omg i haxed fordeltaons"

  9. #8
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    Quote Originally Posted by mike3x3 View Post
    ohey its mw2player, why don't you just make another d3d overlay and go to your arev friends and say: "omg i haxed fordeltaons"
    look at -InSane-'s signature I hope you understood ;D

  10. #9
    In the immortal words of Clark Whatsisname -- up, up and away!
    MPGH Member
    ZReal's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    In My T-90 tank
    Posts
    1,347
    Reputation
    10
    Thanks
    1,069
    My Mood
    Goofy
    kinda agree i mean if you just give a dll source code dafuq you tryna get i mean thats default code when you make a dll in c++ do you even know what any of it means yet theres more to just hooking you gota learn some directx stuff aswell aswell as if you want your hacks UD then learn external hacks which uses GDI reads process memory and not write so you just get the players coords base health etc and then draw your own tags and boxes sounds easy coz it easy once you learn c++ i swear man its easy just look on youtube for Buckys c++ tuts or anything i mean just dedicate time making like simple little apps first then going to console trainers etc you cant just expect a fuken BoxEsp or lineEsp from the sound of it thats what you want from just a dll source i mean seriously

  11. #10
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic
    Code:
    //////////////////////DLLMAIN.CPP////////////////////////
    
    #include <windows.h>
    #include "Hooks.h"
    
    BOOL APIENTRY DllMain(HMODULE hDllModule, DWORD dwReason, LPVOID lpVoid)
    {
       if(dwReason==DLL_PROCESS_ATTACH)
             CallDetour();
       return TRUE;
    }
    
    ////////////////////////HOOKS.H/////////////////////////
    
    void *DetourFunction (BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwBack;
    
    	VirtualProtect(src, len, PAGE_EXECUTE_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);
    }
    
    void MakeJMP( BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen )
    {
    	DWORD dwOldProtect, dwBkup, dwRelAddr;
    
    	VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    	dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
    	*pAddress = 0xE9;
    
    	*((DWORD *)(pAddress + 0x1)) = dwRelAddr;
    	for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
    	VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
    
    	return;
    }
    
    void CallChopper()
    {
       //Draw2D Boxes here
    }
    
    __declspec(naked) Draw2DHook()
    {
      __asm
      {
        PUSHAD;
        PUSHFD;
      }
      // CallChopper();
      __asm
      {
        POPAD;
        POPFD;
        //Do overwritten shit here
      }
    }
    
    void CallDetour()
    {
        //Hook aCI
        //Hook Draw2D with Draw2D Hook
    }
    Enjoy you lil leecher.

    ---------- Post added at 04:26 AM ---------- Previous post was at 02:33 AM ----------

    Quote Originally Posted by ZReal View Post
    kinda agree i mean if you just give a dll source code dafuq you tryna get i mean thats default code when you make a dll in c++ do you even know what any of it means yet theres more to just hooking you gota learn some directx stuff aswell aswell as if you want your hacks UD then learn external hacks which uses GDI reads process memory and not write so you just get the players coords base health etc and then draw your own tags and boxes sounds easy coz it easy once you learn c++ i swear man its easy just look on youtube for Buckys c++ tuts or anything i mean just dedicate time making like simple little apps first then going to console trainers etc you cant just expect a fuken BoxEsp or lineEsp from the sound of it thats what you want from just a dll source i mean seriously
    Also, coding a wh in MW3 is as easy as this so why not MW2? Same concept for AC130 Boxes:

    Code:
    #include <windows.h>
    #include <iostream>
    
    typedef struct
    {
    	int Valid;                     //0x0 - [0x009FC748]
    	char _0x0004[0x8];             //0x4 - [0x009FC74C]
    	char Name[16];                 //0xC - [0x009FC754]
    	int Team;                      //0x1C - [0x009FC764]
    	char _0x0020[0x4];             //0x20 - [0x009FC768]
    	int Rank;                      //0x24 - [0x009FC76C]
    	char _0x0028[0x10];            //0x28 - [0x009FC770]
    	int Perk;                      //0x38 - [0x009FC780]
    	char _0x003C[0x8];             //0x3C - [0x009FC784]
    	int Score;                     //0x44 - [0x009FC78C]
    	char _0x0048[0x458];           //0x48 - [0x009FC790]
    	int Attacking;                 //0x4A0 - [0x009FBE8]
    	char _0x04A4[0x4];             //0x4A4 - [0x009FBEC]
    	int Zooming;			       //0x4A8 - [0x009FBF0]
    	char _0x04AC[0xB8];            //0x4AC - [0x009FBF4]
    }ClientInfo_T; //[SIZE: 0x560]
    
    ClientInfo_T* Clients[18];
    
    void FixBlindPerks()
    {
    	for(int i = 0; i < 18; i++) 
    	{
    		Clients[i] = (ClientInfo_T*)(0x009FC748 + ((int)0x560*i));
    		if(Clients[i] != Clients[*(int*)0x8FF250])
    		{
    			if(Clients[i]->Perk & 0x20 || Clients[i]->Perk & 0x40)
    				Clients[i]->Perk = 0x0;
    		}
    	}
    }
    void CallChopper()
    {
    	if(*(int*)0x8FF110 != 0)
    	{
    		DWORD dwCall = 0x5AA470;
    		FixBlindPerks();
    		__asm
    		{
    			push 0x0;
    			call [dwCall];
    			add esp, 0x4;
    		}
    	}
    }
    
    void HookUiShowList(int a1, int a2, int a3, int a4)
    {
    	__asm PUSHAD;
    	if(!Chopper) CallChopper();
    	__asm POPAD;
    	uiShowList(a1, a2, a3, a4);
    }
    
    void *DetourFunction (BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwBack;
    
    	VirtualProtect(src, len, PAGE_EXECUTE_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);
    }
    
    BOOL APIENTRY DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH)
    	{
                 uiShowList = (tUiShowList)DetourFunction((PBYTE)OffsetUiShowList, (PBYTE)&HookUiShowList, 5);
            }
            return TRUE;
    }
    And a Namehack as simple as:
    Code:
    typedef void (__cdecl *sub_588A10)(int a1, int a2, float a3);
    sub_588A10 origDrawNameTag = NULL;
    
    //IN Main.cpp
    void __cdecl CG_DrawNameTagsHook(int a1, int a2, float a3)
    {
    	if(drawNameTags)	return origDrawNameTag(a1, a2, 1.0f);
    	else return origDrawNameTag(a1, a2, a3);
    }
    
    //DllMain
    origDrawNameTag = (sub_588A10)DetourFunction((PBYTE)0x588A10, (PBYTE)&CG_DrawNameTagsHook, 6);
    Again, same concept.

  12. #11
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    Quote Originally Posted by Kenshin13 View Post
    Code:
    //////////////////////DLLMAIN.CPP////////////////////////
    
    #include <windows.h>
    #include "Hooks.h"
    
    BOOL APIENTRY DllMain(HMODULE hDllModule, DWORD dwReason, LPVOID lpVoid)
    {
       if(dwReason==DLL_PROCESS_ATTACH)
             CallDetour();
       return TRUE;
    }
    
    ////////////////////////HOOKS.H/////////////////////////
    
    void *DetourFunction (BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwBack;
    
    	VirtualProtect(src, len, PAGE_EXECUTE_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);
    }
    
    void MakeJMP( BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen )
    {
    	DWORD dwOldProtect, dwBkup, dwRelAddr;
    
    	VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    	dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
    	*pAddress = 0xE9;
    
    	*((DWORD *)(pAddress + 0x1)) = dwRelAddr;
    	for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
    	VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
    
    	return;
    }
    
    void CallChopper()
    {
       //Draw2D Boxes here
    }
    
    __declspec(naked) Draw2DHook()
    {
      __asm
      {
        PUSHAD;
        PUSHFD;
      }
      // CallChopper();
      __asm
      {
        POPAD;
        POPFD;
        //Do overwritten shit here
      }
    }
    
    void CallDetour()
    {
        //Hook aCI
        //Hook Draw2D with Draw2D Hook
    }
    Enjoy you lil leecher.

    ---------- Post added at 04:26 AM ---------- Previous post was at 02:33 AM ----------



    Also, coding a wh in MW3 is as easy as this so why not MW2? Same concept for AC130 Boxes:

    Code:
    #include <windows.h>
    #include <iostream>
    
    typedef struct
    {
    	int Valid;                     //0x0 - [0x009FC748]
    	char _0x0004[0x8];             //0x4 - [0x009FC74C]
    	char Name[16];                 //0xC - [0x009FC754]
    	int Team;                      //0x1C - [0x009FC764]
    	char _0x0020[0x4];             //0x20 - [0x009FC768]
    	int Rank;                      //0x24 - [0x009FC76C]
    	char _0x0028[0x10];            //0x28 - [0x009FC770]
    	int Perk;                      //0x38 - [0x009FC780]
    	char _0x003C[0x8];             //0x3C - [0x009FC784]
    	int Score;                     //0x44 - [0x009FC78C]
    	char _0x0048[0x458];           //0x48 - [0x009FC790]
    	int Attacking;                 //0x4A0 - [0x009FBE8]
    	char _0x04A4[0x4];             //0x4A4 - [0x009FBEC]
    	int Zooming;			       //0x4A8 - [0x009FBF0]
    	char _0x04AC[0xB8];            //0x4AC - [0x009FBF4]
    }ClientInfo_T; //[SIZE: 0x560]
    
    ClientInfo_T* Clients[18];
    
    void FixBlindPerks()
    {
    	for(int i = 0; i < 18; i++) 
    	{
    		Clients[i] = (ClientInfo_T*)(0x009FC748 + ((int)0x560*i));
    		if(Clients[i] != Clients[*(int*)0x8FF250])
    		{
    			if(Clients[i]->Perk & 0x20 || Clients[i]->Perk & 0x40)
    				Clients[i]->Perk = 0x0;
    		}
    	}
    }
    void CallChopper()
    {
    	if(*(int*)0x8FF110 != 0)
    	{
    		DWORD dwCall = 0x5AA470;
    		FixBlindPerks();
    		__asm
    		{
    			push 0x0;
    			call [dwCall];
    			add esp, 0x4;
    		}
    	}
    }
    
    void HookUiShowList(int a1, int a2, int a3, int a4)
    {
    	__asm PUSHAD;
    	if(!Chopper) CallChopper();
    	__asm POPAD;
    	uiShowList(a1, a2, a3, a4);
    }
    
    void *DetourFunction (BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwBack;
    
    	VirtualProtect(src, len, PAGE_EXECUTE_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);
    }
    
    BOOL APIENTRY DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH)
    	{
                 uiShowList = (tUiShowList)DetourFunction((PBYTE)OffsetUiShowList, (PBYTE)&HookUiShowList, 5);
            }
            return TRUE;
    }
    And a Namehack as simple as:
    Code:
    typedef void (__cdecl *sub_588A10)(int a1, int a2, float a3);
    sub_588A10 origDrawNameTag = NULL;
    
    //IN Main.cpp
    void __cdecl CG_DrawNameTagsHook(int a1, int a2, float a3)
    {
    	if(drawNameTags)	return origDrawNameTag(a1, a2, 1.0f);
    	else return origDrawNameTag(a1, a2, a3);
    }
    
    //DllMain
    origDrawNameTag = (sub_588A10)DetourFunction((PBYTE)0x588A10, (PBYTE)&CG_DrawNameTagsHook, 6);
    Again, same concept.
    I've Already made it -_-

  13. #12
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic
    from? My source?

  14. #13
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    Quote Originally Posted by Kenshin13 View Post
    from? My source?
    no. >_______>

  15. #14
          ( ° ͜ʖ͡°)╭∩╮
    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
    @Kenshin13 Stop feeding the copy&pasters with copy&pasted stuff. JK


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

  16. #15
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic
    Quote Originally Posted by -InSaNe- View Post
    @Kenshin13 Stop feeding the copy&pasters with copy&pasted stuff. JK
    C&P? Oh No You Didn't.
    LOL Nah Well, structs/offsets were C&P except for name esp (which I happened to find.....after you -_-)

Similar Threads

  1. The Race is on who will make the first free hacks after the patch.
    By EDWINSEE in forum Combat Arms Discussions
    Replies: 22
    Last Post: 05-26-2010, 02:43 PM
  2. Replies: 13
    Last Post: 12-28-2009, 01:13 AM
  3. *DLL* [Tutorial] Make Your first DLL Interacted to a Form Project...
    By Silk[H4x] in forum Visual Basic Programming
    Replies: 14
    Last Post: 06-26-2009, 08:52 PM
  4. Replies: 28
    Last Post: 03-02-2009, 07:44 AM
  5. Replies: 12
    Last Post: 10-24-2007, 04:33 AM