Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > Soldier Front > Soldier Front Philippines
You last visited: Today at 12:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Source]SF Shader WH (not finish)

Discussion on [Source]SF Shader WH (not finish) within the Soldier Front Philippines forum part of the Soldier Front category.

Closed Thread
 
Old   #1
 
larongpating's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 38
Received Thanks: 51
[Source]SF Shader WH (not finish)

Code:
#include <stdafx.h>
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define _WIN32_WINDOWS 0x0410
#define _WIN32_IE 0x0600
#include <windows.h>
#include <detours.h>
#include <d3d8.h>
#include "d3dx8.h"
#include <process.h>
#pragma comment( lib, "d3d8" )
#pragma comment( lib, "d3dx8" )
#pragma warning( disable: 4312 )

#define ForceRecon (NumVertices == 83 && primCount == 137 || NumVertices == 79 && primCount == 105 || NumVertices == 142 && primCount == 174 || NumVertices == 278 && primCount == 462 || NumVertices == 263 && primCount == 290 || NumVertices == 316 && primCount == 556)
#define ForceReconAddons (NumVertices == 432 && primCount == 354 || NumVertices == 144 && primCount == 136 || NumVertices == 299 && primCount == 311 || NumVertices == 167 && primCount == 252 || NumVertices == 298 && primCount == 506 || NumVertices == 168 && primCount == 254 || NumVertices == 860 && primCount == 778 || NumVertices == 648 && primCount == 710 || NumVertices == 113 && primCount == 189 || NumVertices == 142 && primCount == 172 || NumVertices == 87 && primCount == 90 || NumVertices == 79 && primCount == 105 || NumVertices == 84 && primCount == 110 || NumVertices == 70 && primCount == 70 || NumVertices == 860 && primCount == 778 || NumVertices == 85 && primCount == 137)
#define Mulan (NumVertices == 118 && primCount == 126|| NumVertices == 121 && primCount == 180|| NumVertices == 124 && primCount == 126|| NumVertices == 295 && primCount == 482|| NumVertices == 299 && primCount == 452|| NumVertices == 474 && primCount == 728)
#define MulanAddons (NumVertices == 162 && primCount == 200|| NumVertices == 120 && primCount == 188|| NumVertices == 167 && primCount == 276|| NumVertices == 108 && primCount == 198|| NumVertices == 512 && primCount == 728|| NumVertices == 790 && primCount == 881|| NumVertices == 619 && primCount == 800|| NumVertices == 399 && primCount == 532|| NumVertices == 402 && primCount == 580|| NumVertices == 102 && primCount == 170|| NumVertices == 125 && primCount == 98|| NumVertices == 116 && primCount == 128|| NumVertices == 160 && primCount == 174)


IDirect3DDevice8** pGameDev = NULL;    //(IDirect3DDevice8**)0x00720BE4;
IDirect3DDevice8* pDev = NULL;
int texnum;
int NumVertices;
int primCount;
bool bInit = false;
bool bPlayers = false;
bool bItems = false;
const char InvD[]=    "ps.1.0\n\
def c0, 1.0f, 1.0f,1.0f, 1.0f\n\
tex t0\n\
sub r0,c0,t0";

DWORD InvPS = NULL;

void release_stuff()
{
    bInit = false;
    if( InvPS )
        pDev->DeletePixelShader( InvPS );
    InvPS = NULL;
}

void init_stuff()
{
    
    LPD3DXBUFFER pCode = NULL;
    LPD3DXBUFFER pErrorMsgs = NULL;

    D3DXAssembleShader( InvD,sizeof(InvD) -1, 0, NULL, &pCode, &pErrorMsgs );
    pDev->CreatePixelShader( (DWORD *)pCode->GetBufferPointer(), &InvPS );
    bInit = true;
   
}


HRESULT (__stdcall* or_DrawIndexedPrimitive)(IDirect3DDevice8* dev, D3DPRIMITIVETYPE type,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount) = NULL;
HRESULT __stdcall my_DrawIndexedPrimitive(IDirect3DDevice8* dev, D3DPRIMITIVETYPE type,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
    if( !bInit ) return or_DrawIndexedPrimitive( dev, type, minIndex, NumVertices, startIndex, primCount );
    HRESULT hRet;
    IDirect3DVertexBuffer8* pStreamData;
    UINT Stride;
    dev->GetStreamSource( NULL, &pStreamData, &Stride );
    pStreamData->Release();
	texnum = (NumVertices*100000)+primCount;
    if( (Stride == 40 && bPlayers) ||
		(texnum==34900580)|| // Delta Force Head
		(texnum==36100604)|| // Spetsnaz Head
		(texnum==38000658)|| // Spetsnaz Legs
		(texnum==18300268)|| // Spetsnaz Body
		(texnum==36200604)|| // GIGN Head
		(texnum==21200306)|| // GIGN Body
		(texnum==35500568)|| // GSG9 Head
		(texnum==2200024)|| // GSG9 Bangs
		(texnum==8800105)|| // GSG9 Feet
		(texnum==36900650)|| // GSG9 Legs
		(texnum==19600314)|| // GSG9 Body
		(texnum==36700612)|| // SAS Head
		(texnum==8500105)|| // SAS Feet
		(texnum==37000650)|| // SAS Legs
		(texnum==18000274)|| // SAS Body
		(texnum==35300556)|| // KSF Head
		(texnum==7500121)|| // KSF Arms
		(texnum==9200115)|| // KSF Feet
		(texnum==12400168)|| // KSF Hands
		(texnum==30100522)|| // KSF Legs
		(texnum==18700288)|| // KSF Body
		(texnum==40900594)|| // ARTC Head
		(texnum==11700190)|| // ARTC Arms
		(texnum==9100118)|| // ARTC Feet
		(texnum==12500170)|| // ARTC Hands
		(texnum==37000634)|| // ARTC Legs
		(texnum==41700516)|| // ARTC Body
		(texnum==19400260)|| // ROKMC Body
		(texnum==37900592)|| // ROKMC Head
		(texnum==36500642)|| // ROKMC Legs
		(texnum==44800776)|| // SRG Head
		(texnum==15900200)|| // SRG Left Arm
		(texnum==10500168)|| // SRG Right Arm
		(texnum==80401016)|| // SRG Body
		(texnum==10000121)|| // SRG Feet
		(texnum==13200180)|| // SRG Hands
		(ForceRecon)|| // ForceRecon
		(Mulan)||
		(texnum==33800534)|| // SRG Leg
(texnum==13200212)|| // Delta Force Helmet
(texnum==13200212)|| // Delta Force Helmet 2
(texnum==34700538)|| // Delta Force Gas Mask
(texnum==19500352)|| // Delta Force Balaclava
(texnum==84900778)|| // Delta Force Clan BDU
(texnum==27500442)|| // Delta Force Body Armor
(texnum==42800576)|| // Delta Force Body Armor 2
(texnum==52100658)|| // Delta Force Tactical Vest
(texnum==12200196)|| // Spetsnaz Helmet
(texnum==27100464)|| // Spetsnaz Gas Mask
(texnum==33600552)|| // Spetsnaz Body Armor
(texnum==44100646)|| // Spetsnaz Tactical Vest
(texnum==17800292)|| // GIGN Red Bandana
(texnum==21300290)|| // GIGN Helmet
(texnum==2800036)|| // GIGN Helmet Lens
(texnum==35700558)|| // GIGN Gas Mask
(texnum==22100396)|| // GIGN Balaclava
(texnum==29700492)|| // GIGN Body Armor
(texnum==11200188)|| // ROKMC Beret
(texnum==12000194)|| // ROKMC Helmet
(texnum==29800450)|| // ROKMC Gas Mask
(texnum==27100394)|| // ROKMC Body Armor
(texnum==28700374)|| // ROKMC X Harness
(texnum==34700470)|| // ROKMC X Harness
(texnum==5100056)|| // ROKMC Pouch
(texnum==9900163)|| // ROKMC Left Arm
(texnum==18300163)|| // ROKMC Right Arm
(texnum==16400266)|| // GSG9 Red Bandana
(texnum==16200243)|| // GSG9 Helmet
(texnum==31900466)|| // GSG9 Gas Mask
(texnum==19300342)|| // GSG9 Balaclava
(texnum==83600752)|| // GSG9 Clan BDU
(texnum==33400477)|| // GSG9 Body Armor
(texnum==10500163)|| // GSG9 Rolled Up Sleeves
(texnum==38100666)|| // GSG9 Tactical Knee Pads
(texnum==9600172)|| // SAS Boonie Hat
(texnum==14200236)|| // SAS Helmet
(texnum==37800552)|| // SAS Gas Mask
(texnum==28100486)|| // SAS Balaclava
(texnum==62400752)|| // SAS Clan BDU
(texnum==27900456)|| // SAS Body Armor
(texnum==45700654)|| // SAS Tactical Vest
(texnum==39800532)|| // SAS Tactical Vest 2
(texnum==9200100)|| // SAS Holster
(texnum==4800040)|| // SAS Magazine Pouch
(texnum==4000044)|| // SAS Pouch
(texnum==6500110) || // KSF Boonie Hat
(texnum==12900208)|| // KSF Helmet
(texnum==29600448)|| // KSF Gas Mask
(texnum==31100398)|| // KSF Sunglasses
(texnum==84700776)|| // KSF Clan BDU
(texnum==600004)|| // KSF Clan BDU Logo
(texnum==36500606)|| // KSF Body Armor
(texnum==63100646)|| // KSF Tactical Vest
(texnum==19800163)|| // KSF Rolled Up Sleeves
(texnum==7000066)|| // KSF Holster
(texnum==10400190)|| // SRG Beret
(texnum==23800294)|| // SRG Deer Head
(texnum==11600180)|| // SRG NIJ IIIA Helmet
(texnum==17100278)|| // SRG Red Bandana
(texnum==14600198)|| // SRG Battle Cap
(texnum==18200266)|| // SRG Helmet
(texnum==19100106)|| // SRG Gas Mask
(texnum==54300350)|| // SRG Sunglasses
(texnum==30800380)|| // SRG Mid Class Sunglasses
(texnum==79300995)|| // SRG Clan BDU 1
(texnum==13300138)|| // SRG Clan BDU 2
(texnum==300001)|| // SRG Clan BDU 3
(texnum==1200012)|| // SRG Clan BDU Logo
(texnum==10900110)|| // SRG Bulletproof Vest
(texnum==6200064)|| // SRG Holster
(ForceReconAddons)||
(MulanAddons)||
(texnum==22700250)|| // SRG Pouch
(texnum==187200968)|| // GALIL
(texnum==187200968)|| // GALIL 2
(texnum==149701124)|| // UZI
(texnum==193701304)|| // M249
(texnum==232501431)|| // SIG551
(texnum==161500751)|| // FA-MAS
(texnum==107400724)|| // FR-F2
(texnum==141600900)|| // AN94
(texnum==145900805)|| // G36C
(texnum==42200339)|| // K1
(texnum==23400116)|| // K1 2
(texnum==17500073)|| // K1 3
(texnum==3200012)|| // K1 4
(texnum==2300012)|| // K1 5
(texnum==71900459)|| // MP5
(texnum==1800008)|| // MP5 2
(texnum==20300084)|| // MP5 3
(texnum==16700083)|| // MP5 4
(texnum==79100469)|| // M4A1
(texnum==12000044)|| // M4A1 2
(texnum==16800062)|| // M4A1 3
(texnum==2400008)|| // M4A1 4
(texnum==600002)|| // M4A1 5
(texnum==12800050)|| // M4A1 6
(texnum==2600010)|| // M4A1 7
(texnum==4200014)|| // M4A1 8
(texnum==1400008)|| // M4A1 9
(texnum==80600442)|| // M16A2
(texnum==13400052)|| // M16A2 2
(texnum==17600066)|| // M16A2 3
(texnum==5400018)|| // M16A2 4
(texnum==46200348)|| // STEYR_AUG
(texnum==27000133)|| // STEYR_AUG 2
(texnum==4100025)|| // STEYR_AUG 3
(texnum==1200006)|| // STEYR_AUG 4
(texnum==400002)|| // STEYR_AUG 5
(texnum==46800367)|| // PSG-1
(texnum==9600042)|| // PSG-1 2
(texnum==18800092)|| // PSG-1 3
(texnum==16900071)|| // PSG-1 4
(texnum==3400012)|| // PSG-1 5
(texnum==800004)|| // PSG-1 6
(texnum==40500383)|| // K2
(texnum==15800089)|| // K2 2
(texnum==2200012)|| // K2 3
(texnum==7000034)|| // K2 4
(texnum==60700349)|| // P90
(texnum==5500033)|| // P90 2
(texnum==47700227)|| // P90 3
(texnum==10300047)|| // P90 4
(texnum==3800014)|| // P90 5
(texnum==50300349)|| // AK-74
(texnum==14700071)|| // AK-74 2
(texnum==13100061)|| // AK-74 3
(texnum==194501145)|| // MG36
(texnum==116000670)|| // DESERT EAGLE
(texnum==182101089)|| // MR73
(texnum==62500454)|| // REMINGTON M870
(texnum==95200571)|| // BENELLI M1
(texnum==40700334)|| // GLOCK 23
(texnum==71500449)|| // BERETTA M92F
(texnum==11000044)|| // BERETTA M92F 2
(texnum==16500075)|| // BERETTA M92F 3
(texnum==4400020)|| // BERETTA M92F 4
(texnum==2800014)|| // BERETTA M92F 5
(texnum==92000543)|| // COLT 45
(texnum==239001276)) // DRAGONUV
	{
        dev->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
        dev->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
        dev->SetRenderState( D3DRS_FOGENABLE, D3DZB_FALSE );
        dev->SetPixelShader( InvPS );
    }
    hRet = or_DrawIndexedPrimitive( dev, type, minIndex, NumVertices, startIndex, primCount );
    if( (Stride == 40 && bPlayers)||
	(texnum==34900580)|| // Delta Force Head
		(texnum==36100604)|| // Spetsnaz Head
		(texnum==38000658)|| // Spetsnaz Legs
		(texnum==18300268)|| // Spetsnaz Body
		(texnum==36200604)|| // GIGN Head
		(texnum==21200306)|| // GIGN Body
		(texnum==35500568)|| // GSG9 Head
		(texnum==2200024)|| // GSG9 Bangs
		(texnum==8800105)|| // GSG9 Feet
		(texnum==36900650)|| // GSG9 Legs
		(texnum==19600314)|| // GSG9 Body
		(texnum==36700612)|| // SAS Head
		(texnum==8500105)|| // SAS Feet
		(texnum==37000650)|| // SAS Legs
		(texnum==18000274)|| // SAS Body
		(texnum==35300556)|| // KSF Head
		(texnum==7500121)|| // KSF Arms
		(texnum==9200115)|| // KSF Feet
		(texnum==12400168)|| // KSF Hands
		(texnum==30100522)|| // KSF Legs
		(texnum==18700288)|| // KSF Body
		(texnum==40900594)|| // ARTC Head
		(texnum==11700190)|| // ARTC Arms
		(texnum==9100118)|| // ARTC Feet
		(texnum==12500170)|| // ARTC Hands
		(texnum==37000634)|| // ARTC Legs
		(texnum==41700516)|| // ARTC Body
		(texnum==19400260)|| // ROKMC Body
		(texnum==37900592)|| // ROKMC Head
		(texnum==36500642)|| // ROKMC Legs
		(texnum==44800776)|| // SRG Head
		(texnum==15900200)|| // SRG Left Arm
		(texnum==10500168)|| // SRG Right Arm
		(texnum==80401016)|| // SRG Body
		(texnum==10000121)|| // SRG Feet
		(texnum==13200180)|| // SRG Hands
		(ForceRecon)|| // ForceRecon
		(Mulan)||
		(texnum==33800534)|| // SRG Leg
(texnum==13200212)|| // Delta Force Helmet
(texnum==13200212)|| // Delta Force Helmet 2
(texnum==34700538)|| // Delta Force Gas Mask
(texnum==19500352)|| // Delta Force Balaclava
(texnum==84900778)|| // Delta Force Clan BDU
(texnum==27500442)|| // Delta Force Body Armor
(texnum==42800576)|| // Delta Force Body Armor 2
(texnum==52100658)|| // Delta Force Tactical Vest
(texnum==12200196)|| // Spetsnaz Helmet
(texnum==27100464)|| // Spetsnaz Gas Mask
(texnum==33600552)|| // Spetsnaz Body Armor
(texnum==44100646)|| // Spetsnaz Tactical Vest
(texnum==17800292)|| // GIGN Red Bandana
(texnum==21300290)|| // GIGN Helmet
(texnum==2800036)|| // GIGN Helmet Lens
(texnum==35700558)|| // GIGN Gas Mask
(texnum==22100396)|| // GIGN Balaclava
(texnum==29700492)|| // GIGN Body Armor
(texnum==11200188)|| // ROKMC Beret
(texnum==12000194)|| // ROKMC Helmet
(texnum==29800450)|| // ROKMC Gas Mask
(texnum==27100394)|| // ROKMC Body Armor
(texnum==28700374)|| // ROKMC X Harness
(texnum==34700470)|| // ROKMC X Harness
(texnum==5100056)|| // ROKMC Pouch
(texnum==9900163)|| // ROKMC Left Arm
(texnum==18300163)|| // ROKMC Right Arm
(texnum==16400266)|| // GSG9 Red Bandana
(texnum==16200243)|| // GSG9 Helmet
(texnum==31900466)|| // GSG9 Gas Mask
(texnum==19300342)|| // GSG9 Balaclava
(texnum==83600752)|| // GSG9 Clan BDU
(texnum==33400477)|| // GSG9 Body Armor
(texnum==10500163)|| // GSG9 Rolled Up Sleeves
(texnum==38100666)|| // GSG9 Tactical Knee Pads
(texnum==9600172)|| // SAS Boonie Hat
(texnum==14200236)|| // SAS Helmet
(texnum==37800552)|| // SAS Gas Mask
(texnum==28100486)|| // SAS Balaclava
(texnum==62400752)|| // SAS Clan BDU
(texnum==27900456)|| // SAS Body Armor
(texnum==45700654)|| // SAS Tactical Vest
(texnum==39800532)|| // SAS Tactical Vest 2
(texnum==9200100)|| // SAS Holster
(texnum==4800040)|| // SAS Magazine Pouch
(texnum==4000044)|| // SAS Pouch
(texnum==6500110) || // KSF Boonie Hat
(texnum==12900208)|| // KSF Helmet
(texnum==29600448)|| // KSF Gas Mask
(texnum==31100398)|| // KSF Sunglasses
(texnum==84700776)|| // KSF Clan BDU
(texnum==600004)|| // KSF Clan BDU Logo
(texnum==36500606)|| // KSF Body Armor
(texnum==63100646)|| // KSF Tactical Vest
(texnum==19800163)|| // KSF Rolled Up Sleeves
(texnum==7000066)|| // KSF Holster
(texnum==10400190)|| // SRG Beret
(texnum==23800294)|| // SRG Deer Head
(texnum==11600180)|| // SRG NIJ IIIA Helmet
(texnum==17100278)|| // SRG Red Bandana
(texnum==14600198)|| // SRG Battle Cap
(texnum==18200266)|| // SRG Helmet
(texnum==19100106)|| // SRG Gas Mask
(texnum==54300350)|| // SRG Sunglasses
(texnum==30800380)|| // SRG Mid Class Sunglasses
(texnum==79300995)|| // SRG Clan BDU 1
(texnum==13300138)|| // SRG Clan BDU 2
(texnum==300001)|| // SRG Clan BDU 3
(texnum==1200012)|| // SRG Clan BDU Logo
(texnum==10900110)|| // SRG Bulletproof Vest
(texnum==6200064)|| // SRG Holster
(ForceReconAddons)||
(MulanAddons)||
(texnum==22700250)|| // SRG Pouch
(texnum==187200968)|| // GALIL
(texnum==187200968)|| // GALIL 2
(texnum==149701124)|| // UZI
(texnum==193701304)|| // M249
(texnum==232501431)|| // SIG551
(texnum==161500751)|| // FA-MAS
(texnum==107400724)|| // FR-F2
(texnum==141600900)|| // AN94
(texnum==145900805)|| // G36C
(texnum==42200339)|| // K1
(texnum==23400116)|| // K1 2
(texnum==17500073)|| // K1 3
(texnum==3200012)|| // K1 4
(texnum==2300012)|| // K1 5
(texnum==71900459)|| // MP5
(texnum==1800008)|| // MP5 2
(texnum==20300084)|| // MP5 3
(texnum==16700083)|| // MP5 4
(texnum==79100469)|| // M4A1
(texnum==12000044)|| // M4A1 2
(texnum==16800062)|| // M4A1 3
(texnum==2400008)|| // M4A1 4
(texnum==600002)|| // M4A1 5
(texnum==12800050)|| // M4A1 6
(texnum==2600010)|| // M4A1 7
(texnum==4200014)|| // M4A1 8
(texnum==1400008)|| // M4A1 9
(texnum==80600442)|| // M16A2
(texnum==13400052)|| // M16A2 2
(texnum==17600066)|| // M16A2 3
(texnum==5400018)|| // M16A2 4
(texnum==46200348)|| // STEYR_AUG
(texnum==27000133)|| // STEYR_AUG 2
(texnum==4100025)|| // STEYR_AUG 3
(texnum==1200006)|| // STEYR_AUG 4
(texnum==400002)|| // STEYR_AUG 5
(texnum==46800367)|| // PSG-1
(texnum==9600042)|| // PSG-1 2
(texnum==18800092)|| // PSG-1 3
(texnum==16900071)|| // PSG-1 4
(texnum==3400012)|| // PSG-1 5
(texnum==800004)|| // PSG-1 6
(texnum==40500383)|| // K2
(texnum==15800089)|| // K2 2
(texnum==2200012)|| // K2 3
(texnum==7000034)|| // K2 4
(texnum==60700349)|| // P90
(texnum==5500033)|| // P90 2
(texnum==47700227)|| // P90 3
(texnum==10300047)|| // P90 4
(texnum==3800014)|| // P90 5
(texnum==50300349)|| // AK-74
(texnum==14700071)|| // AK-74 2
(texnum==13100061)|| // AK-74 3
(texnum==194501145)|| // MG36
(texnum==116000670)|| // DESERT EAGLE
(texnum==182101089)|| // MR73
(texnum==62500454)|| // REMINGTON M870
(texnum==95200571)|| // BENELLI M1
(texnum==40700334)|| // GLOCK 23
(texnum==71500449)|| // BERETTA M92F
(texnum==11000044)|| // BERETTA M92F 2
(texnum==16500075)|| // BERETTA M92F 3
(texnum==4400020)|| // BERETTA M92F 4
(texnum==2800014)|| // BERETTA M92F 5
(texnum==92000543)|| // COLT 45
(texnum==239001276)) // DRAGONUV
	{
        dev->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
        dev->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL);
        dev->SetPixelShader( NULL );
        or_DrawIndexedPrimitive( dev, type, minIndex, NumVertices, startIndex, primCount );
        return hRet;
    }

    return hRet;
}

HRESULT (__stdcall* or_EndScene)( IDirect3DDevice8* dev );
HRESULT __stdcall my_EndScene( IDirect3DDevice8* dev )
{
    if( !bInit ) init_stuff();
    
    if( GetAsyncKeyState( VK_HOME ) &1 ) {
        bPlayers = !bPlayers;
    }
     return or_EndScene( dev );
}

HRESULT (__stdcall* or_Reset)( IDirect3DDevice8* dev, D3DPRESENT_PARAMETERS* pPresentationParameters );
HRESULT __stdcall my_Reset( IDirect3DDevice8* dev, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
    release_stuff();
    HRESULT hRet = or_Reset( dev, pPresentationParameters );
    if( SUCCEEDED(hRet) )
        init_stuff();
    return hRet;
}



unsigned char findT[] = "\xA1\xA7\xA7\xA7\xA7\x8B\x08\x6A\x00\x50\xFF\x51\x18\xC3";


char *findText( const char *start, const char *dwEnd, unsigned char *patt, size_t iMax )
{
        char *finder = (char*)start;
    char *pbMaxAddr = (char*)dwEnd;
    size_t i = 0;
    for( ; i < iMax && finder < pbMaxAddr; )
    {
        if( ( (*finder & 0xff) == (patt[i] & 0xff)) || patt[i] == 0xA7 )
            i++;
        else if( i != 0 ) {
            finder -= i;
            i = 0;
        }
        finder++;
    }
    if( i == iMax ) {
        return (finder-i);
    }
        return 0;
}


bool bRun = true;

void wait_func( void* )
{
    char * find = findText( (const char*)0x401000, (const char *)0x401000 + 0x293000, findT, sizeof(findT)-1 );
    if( !find )
        return;
    DWORD * dwAdd = (DWORD*)*(DWORD*)(find+1);
    pGameDev = (IDirect3DDevice8 **)(dwAdd+1);
    MessageBeep( 0xFFFFFFFF );

    while( !*pGameDev )
        Sleep( 100 );
    while( bRun ) {
        if( pDev != *pGameDev ) {
            pDev = *pGameDev;
            UINT *vTable = (UINT*)pDev;
            vTable = (UINT*)*vTable;
            DWORD dwOld;
            VirtualProtect( vTable, 500, PAGE_EXECUTE_READWRITE, &dwOld );
            *(void**)&or_DrawIndexedPrimitive = (void*)vTable[71];
            *(void**)&vTable[71] = (void*)my_DrawIndexedPrimitive;

            *(void**)&or_EndScene = (void*)vTable[35];
            *(void**)&vTable[35] = (void*)my_EndScene;

            *(void**)&or_Reset = (void*)vTable[14];
            *(void**)&vTable[14] = (void*)my_Reset;
            bInit = false;
        } 
        Sleep( 100 );
    }
    pDev = *pGameDev;
    UINT *vTable = (UINT*)pDev;
    vTable = (UINT*)*vTable;
    DWORD dwOld;
    VirtualProtect( vTable, 500, PAGE_EXECUTE_READWRITE, &dwOld );
    *(void**)&vTable[71] = (void*)or_DrawIndexedPrimitive;
    *(void**)&vTable[35] = (void*)or_EndScene;
    *(void**)&vTable[14] = (void*)or_Reset;
    release_stuff();
}

BOOL APIENTRY DllMain( HMODULE /*hModule*/, DWORD dwReason, LPVOID /*lpReserved*/ )
{
    if( dwReason == DLL_PROCESS_ATTACH ) {
        _beginthread( wait_func, NULL, NULL );
    } else if( dwReason == DLL_PROCESS_DETACH ) {
        bRun = false;
        Sleep( 500 );
    }
    return TRUE;
}
hello i just want to share my dll source code.. there's still some errors so you just have to fix it your self.. edit somethings.. like that hehe..

oh and by the way of your going to compile it dont forget to ignore a specific error like lilbl.lib etc... to do this go to menu bar click...

project>main.cpp properties>Configuration properties>Linker>Input

then in the ignore specific library.. just type ur lib error like lilbl.lib

thanks..

best regards,
larongpating
larongpating is offline  
Old 04/24/2010, 15:37   #2
 
˝IObit˛'s Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 1,401
Received Thanks: 525
good hehe i dont know how to edit this one, but editors there can and create new dlls.
˝IObit˛ is offline  
Old 04/27/2010, 05:44   #3
 
Nostalgia's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 47
Received Thanks: 35
not full WH codes. thnx though. imma try this one.. again -.-
an oh.. its good to be back xD
Nostalgia is offline  
Old 04/27/2010, 06:08   #4
 
xDriftKingx's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 52
Received Thanks: 12
Cool Codes but mine is good also.
xDriftKingx is offline  
Old 04/27/2010, 14:59   #5
 
jiro123's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 182
Received Thanks: 106
its realy that you dll.s i think you just copy that!!
jiro123 is offline  
Old 04/27/2010, 18:07   #6
 
elite*gold: 25
Join Date: Apr 2009
Posts: 3,430
Received Thanks: 2,469
@ TS, I still remember that you already Posted this Ages ago, which makes no difference at all up to this time,
* CLOSED
†DARNOC† is offline  
Closed Thread


Similar Threads Similar Threads
[Source]SF Shader WH (not finish)
04/24/2010 - Soldier Front Hacks, Bots, Cheats & Exploits - 5 Replies
#include <stdafx.h> #define WINVER 0x0501 #define _WIN32_WINNT 0x0501 #define _WIN32_WINDOWS 0x0410 #define _WIN32_IE 0x0600 #include <windows.h> #include <detours.h> #include <d3d8.h> #include "d3dx8.h" #include <process.h>
[HELP]/GM FINISH 5
05/13/2009 - Dekaron Private Server - 9 Replies
Hello . Can U help me ? i just closed my server with that command . /gm finish 5 that server will be ended in 5 mins. but now i cant connect to my server channel .???? any help plz ????? thx
Any 1 Help me Finish this off
07/04/2008 - Dekaron - 9 Replies
Ok I am trying to get the eu hacks to work again. so far i have tryed downgrading the game and bypassing gg with both SECportal and EUR folder :( no succsess also i have tryed editing the mobs with winhex resulting in faliur the only thing i can get to work is a wall hack but thats no good with out vac grrr
properly support Shader
05/26/2008 - General Gaming Discussion - 0 Replies
This generally happens because your video card does not properly support Shader Model 2.0. SM2 is required to be fully supported in order for Conan to launch. You will receive this error with very old nVidia/ATI cards. Your card may not be supported due to this. If it is and you are at the lower end of the system requirements, please do the following: 1. Start the game. When you hear the music starting, a prefs file has been written and you can edit it (in Notepad for example). 2. To find...



All times are GMT +2. The time now is 12:31.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.