Texture CRC 2013 V2 xDDD

Credits:
UC Forum Assorted
GD
aB
More...

Use:
1 Enable green texture by press HOME key.
2 Choose Base Texture Num with PAGEUP/PAGEDOWN.
3 Press DELETE to Log CRC.
4 Use Wall hack source afterwards.
5 Get CRC of all video texture settings.

Easy way is to face the object you want to get CRC and press END to reset
then Page up/down to look for Green texture.

TEXTURE CRC SOURCE
Code:
#include <windows.h>
#include <fstream>
#include <stdio.h>
#include <vector>
#include <conio.h>
#include "CRC32.h"

#include <d3d9.h>
#include <d3dx9.h>

#pragma comment( lib, "d3d9.lib" )
#pragma comment( lib, "d3dx9.lib" )
#pragma warning( disable : 4996 )

using namespace std;
//-------------------------------------------------------------------

CONST BYTE GREEN[] = { 
	0x42, 0x4D, 0x3C, 0x00,0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 
	0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 
	0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 
	0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 
	0x12, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xB3, 
	0x1B, 0x00, 0x00, 0x00 
};

#define ID3DTX9(PTR) ((IDirect3DTexture9*)PTR)
#define D3D_RELEASE(D3D_PTR) if( D3D_PTR ){ D3D_PTR->Release(); D3D_PTR = NULL; }

typedef struct _TEXTURECRC{
	DWORD BaseTex;
	DWORD DWCRC;
	DWORD Format;
	DWORD Usage;
	D3DPOOL Pool;
}TEXTURECRC,*PTEXTURECRC;

HRESULT ( WINAPI* oReset )
	( LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS* );

HRESULT ( WINAPI* oEndScene ) 
	( LPDIRECT3DDEVICE9 );

HRESULT ( WINAPI* oDrawIdP )
	( LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, 
		INT, UINT, UINT, UINT, UINT );

HRESULT ( WINAPI* oSetTexture )
	( LPDIRECT3DDEVICE9, DWORD, 
		IDirect3DBaseTexture9* );

vector<TEXTURECRC> TCRC;
CDynamicCrc32 *pCrC = NULL;
LPDIRECT3DSURFACE9 oSurf = NULL;
LPDIRECT3DDEVICE9 pDev = NULL;
LPDIRECT3DTEXTURE9 Green = NULL;
LPDIRECT3DTEXTURE9 pTx = NULL;
D3DSURFACE_DESC DESC; 
D3DLOCKED_RECT d3dlr;
DWORD dCrDev = NULL;
LPDIRECT3D9 pDx = NULL;
LPD3DXFONT pFont = NULL;
D3DVIEWPORT9 Vpt;
PDWORD VTab = NULL;
DWORD Old = NULL;
DWORD dwCRC = NULL;
ofstream ofile;	
CHAR dlldir[MAX_PATH];
CHAR strbuff[MAX_PATH];
UINT iBaseTex = 0;
BOOL bTexture = FALSE;

//-------------------------------------------------------------------

__declspec( naked )
VOID WINAPI CREATEDEVICE( VOID )
{
	__asm
	{
		{PUSH EBP}
		{MOV EBP,ESP}
		{PUSH [EBP+0x20]}				{PUSH [EBP+0x1C]}
		{PUSH [EBP+0x18]}				{PUSH [EBP+0x14]}
		{PUSH [EBP+0x10]}				{PUSH [EBP+0xC]}
		{PUSH [EBP+0x8]}				{CALL [dCrDev]}
		{MOV EDX,[EBP+0x20]}			{MOV EDX,[EDX]}
		{MOV [pDev],EDX}
		{POP EBP}
		{RETN 0x1C}
	}
}

//-------------------------------------------------------------------

DWORD WINAPI GETCRC( UINT uiSize, UINT uihSize, PBYTE pBits, D3DFORMAT Format )
{
	DWORD CurrentCRC = NULL;

	if( pBits && uiSize )
	{
		switch( Format )
		{
			case D3DFMT_A8R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case D3DFMT_X8R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case 894720068:
				CurrentCRC = pCrC->GetCrc32( pBits, 1 * uiSize );
				break;
			case D3DFMT_A4R4G4B4:
				CurrentCRC = pCrC->GetCrc32( pBits, 2 * uiSize );
				break;
			case D3DFMT_R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 3 * uiSize );
				break;
			case D3DFMT_X4R4G4B4:
				CurrentCRC = pCrC->GetCrc32( pBits, 2 * uiSize );
				break;
			case D3DFMT_A8B8G8R8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case D3DFMT_X8B8G8R8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			default:
				CurrentCRC = pCrC->GetCrc32( pBits, uihSize );
				break;
		}
	}
	
	return CurrentCRC;
}

//-------------------------------------------------------------------

void __cdecl add_log (const char *fmt, ...)
{
	if(ofile != NULL)
	{
		if(!fmt) { return; }

		va_list va_alist;
		char logbuf[256] = {0};

		va_start (va_alist, fmt);
		_vsnprintf (logbuf+strlen(logbuf), 
			sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
		va_end (va_alist);

		ofile << logbuf << endl;
	}
}

//-------------------------------------------------------------------

HRESULT WINAPI nSetTexture
	( LPDIRECT3DDEVICE9 pDev, DWORD Stage, 
		IDirect3DBaseTexture9* pTexture )
{
	if( pTexture && Stage == 0 )
	{
		for( UINT i = 0;i < TCRC.size();i++ )
		{
			if( TCRC[i].BaseTex == (DWORD)pTexture )
			{
				dwCRC = TCRC[i].DWCRC;

				if( bTexture && i == iBaseTex && Green )
				{
					if( GetAsyncKeyState( VK_DELETE ) &1 )
						add_log( "CRC: 0x%08x", dwCRC );
					return oSetTexture( pDev, 0, Green );
				}
				else
					goto EXIT;
			}
		}

		pDev->GetRenderTarget( 0, &oSurf );
		oSurf->GetDesc( &DESC );
		
		if( DESC.Width == Vpt.Width && 
			DESC.Height == Vpt.Height )
		{
			if( SUCCEEDED(ID3DTX9(pTexture)->
				GetLevelDesc( 0, &DESC )) )
			{
				if( DESC.Pool != D3DPOOL_DEFAULT )
				{
					if( SUCCEEDED(ID3DTX9(pTexture)->LockRect
						( 0, &d3dlr, NULL, D3DLOCK_READONLY )) )
					{
						dwCRC = GETCRC( DESC.Width * DESC.Height, 
										(DESC.Width/2) * (DESC.Height/2), 
											PBYTE(d3dlr.pBits), DESC.Format );

						ID3DTX9(pTexture)->UnlockRect( 0 );
					}
				}
			}
		}
		TEXTURECRC TEXCRC = { (DWORD)pTexture, dwCRC, 
			DESC.Format, DESC.Usage, DESC.Pool };
		TCRC.push_back( TEXCRC );
		D3D_RELEASE( oSurf )
	}

EXIT:
	return oSetTexture
		( pDev, Stage, pTexture );
}

//-------------------------------------------------------------------

HRESULT WINAPI nDrawIdP
	( LPDIRECT3DDEVICE9 pDev, D3DPRIMITIVETYPE Type, 
		INT Base, UINT Min, UINT Num, UINT Start, UINT Prim )
{
	LPDIRECT3DVERTEXBUFFER9 Stream_Data;
	UINT Offset = 0;
	UINT Stride = 0;

	if(pDev->GetStreamSource
		( 0, &Stream_Data, &Offset, &Stride )==S_OK)
			Stream_Data->Release();

	dwCRC = NULL;

	return oDrawIdP( pDev, Type, 
		Base, Min, Num, Start, Prim );
}

//-------------------------------------------------------------------

HRESULT WINAPI nEndScene
	( LPDIRECT3DDEVICE9 pDev )
{
	pDev->GetViewport( &Vpt );

	RECT FRect = { Vpt.Width-250,Vpt.Height/2, 
							Vpt.Width,Vpt.Height };

	if( Green == NULL )
		D3DXCreateTextureFromFileInMemory( pDev, 
			(LPCVOID)&GREEN,  sizeof(GREEN), &Green );

	if( pFont == NULL )
		D3DXCreateFontA( pDev, 16, 0, 700, 0, 0, 1, 0, 
			0, DEFAULT_PITCH | FF_DONTCARE, "Calibri", &pFont );

	sprintf( strbuff, "Num of Textures: %i\nBase Tex Num: %i\n\nCRC LOGGER V2\n\n"
		"HOME: Enable Green Texture\nPAGE UP: BaseTexNum++\nPAGE DOWN: BaseTexNum--\n"
			"END: Reset all\n\nDELETE: Log CRC", TCRC.size(), iBaseTex + 1 );

	if( pFont )
		pFont->DrawTextA( 0, strbuff, -1, &FRect, 
			DT_CENTER|DT_NOCLIP, 0xFF00FF00);

	if( GetAsyncKeyState( VK_PRIOR ) &1 )
	if(iBaseTex < TCRC.size() - 1)iBaseTex++;

	if( GetAsyncKeyState( VK_NEXT ) &1 )
	if( iBaseTex > 0 )
		iBaseTex--;

	if( GetAsyncKeyState( VK_END ) &1 )
	{TCRC.clear();iBaseTex = 0;}

	if( GetAsyncKeyState( VK_HOME ) &1 )
	{
		if( bTexture )
			bTexture = FALSE;
		else
			bTexture = TRUE;
	}

	return oEndScene( pDev );
}

//-------------------------------------------------------------------

HRESULT WINAPI nReset
	( LPDIRECT3DDEVICE9 pDev, 
		D3DPRESENT_PARAMETERS* PresP )
{
	D3D_RELEASE( pFont )
	return oReset( pDev, PresP );
}

//-------------------------------------------------------------------

VOID WINAPI THREAD( )
{
	while( pDev == NULL ) 
		Sleep( 100 );

	pCrC  = new CDynamicCrc32( );

	VTab[16] = dCrDev;
	VirtualProtect( (PVOID)&VTab[16], 4, Old, &Old );

	VTab  = (PDWORD)*(PDWORD)pDev;

	*(PDWORD)&oEndScene			= VTab[42];
	*(PDWORD)&oReset				= VTab[16];
	*(PDWORD)&oDrawIdP			= VTab[82];
	*(PDWORD)&oSetTexture		= VTab[65];

	while( 1 )
	{
		VTab[42] = (DWORD)nEndScene;
		VTab[16] = (DWORD)nReset;
		VTab[82] = (DWORD)nDrawIdP;
		VTab[65] = (DWORD)nSetTexture;
		Sleep( 100 );
	}
}

//-------------------------------------------------------------------

BOOL WINAPI DllMain( HMODULE hModule, 
	DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		DisableThreadLibraryCalls( hModule );
		GetModuleFileNameA( hModule, dlldir, 320 );
		dlldir[strlen(dlldir)-3] = 0;
		strcat(dlldir,"txt");

		ofile.open(dlldir, ios::app);
		add_log("\nxDD Log");

		pDx = Direct3DCreate9
			( D3D_SDK_VERSION );

		if( pDx != NULL )
		{
			VTab  = (PDWORD)*(PDWORD)pDx;
			pDx->Release();

			dCrDev = (DWORD)VTab[16];
			VirtualProtect( (PVOID)&VTab[16], 4, 0x40, &Old );

			VTab[16] = (DWORD)CREATEDEVICE;
			CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)
				THREAD, NULL, NULL, NULL );
		}
	}

	return TRUE;
}

//-------------------------------------------------------------------
WALL HACK SOURCE:

Code:
#include <windows.h>
#include <fstream>
#include <stdio.h>
#include <vector>
#include <conio.h>
#include "CRC32.h"
#include "COD4CRC.h"

#include <d3d9.h>
#include <d3dx9.h>

#pragma comment( lib, "d3d9.lib" )
#pragma comment( lib, "d3dx9.lib" )
#pragma warning( disable : 4996 )

using namespace std;
//-------------------------------------------------------------------

#define ID3DTX9(PTR) ((IDirect3DTexture9*)PTR)
#define D3D_RELEASE(D3D_PTR) if( D3D_PTR ){ D3D_PTR->Release(); D3D_PTR = NULL; }

typedef struct _TEXTURECRC{
	DWORD BaseTex;
	DWORD DWCRC;
	DWORD Format;
	DWORD Usage;
	D3DPOOL Pool;
}TEXTURECRC,*PTEXTURECRC;

HRESULT ( WINAPI* oReset )
	( LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS* );

HRESULT ( WINAPI* oEndScene ) 
	( LPDIRECT3DDEVICE9 );

HRESULT ( WINAPI* oDrawIdP )
	( LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, 
		INT, UINT, UINT, UINT, UINT );

HRESULT ( WINAPI* oSetTexture )
	( LPDIRECT3DDEVICE9, DWORD, 
		IDirect3DBaseTexture9* );

vector<TEXTURECRC> TCRC;
CDynamicCrc32 *pCrC = NULL;
LPDIRECT3DSURFACE9 oSurf = NULL;
LPDIRECT3DDEVICE9 pDev = NULL;
LPDIRECT3DTEXTURE9 Blue;
LPDIRECT3DTEXTURE9 Green;
LPDIRECT3DTEXTURE9 Red;
LPDIRECT3DTEXTURE9 Yellow;
LPDIRECT3DTEXTURE9 Pink;
LPDIRECT3DTEXTURE9 Orange;
LPDIRECT3DTEXTURE9 Violet;
LPDIRECT3DTEXTURE9 Aqua;
LPDIRECT3DTEXTURE9 pTx = NULL;
D3DSURFACE_DESC DESC; 
D3DLOCKED_RECT d3dlr;
DWORD dCrDev = NULL;
LPDIRECT3D9 pDx = NULL;
LPD3DXFONT pFont = NULL;
D3DVIEWPORT9 Vpt;
PDWORD VTab = NULL;
DWORD Old = NULL;
DWORD dwCRC = NULL;
CHAR strbuff[MAX_PATH];
UINT iBaseTex = 0;
BOOL Wallhack = FALSE;
BOOL BTextures = FALSE;

//-------------------------------------------------------------------

__declspec( naked )
VOID WINAPI CREATEDEVICE( VOID )
{
	__asm
	{
		{PUSH EBP}
		{MOV EBP,ESP}
		{PUSH [EBP+0x20]}				{PUSH [EBP+0x1C]}
		{PUSH [EBP+0x18]}				{PUSH [EBP+0x14]}
		{PUSH [EBP+0x10]}				{PUSH [EBP+0xC]}
		{PUSH [EBP+0x8]}				{CALL [dCrDev]}
		{MOV EDX,[EBP+0x20]}			{MOV EDX,[EDX]}
		{MOV [pDev],EDX}
		{POP EBP}
		{RETN 0x1C}
	}
}

//-------------------------------------------------------------------

VOID WINAPI GenTex
	( LPDIRECT3DDEVICE9 pDev, IDirect3DTexture9 
		**ppTex, DWORD colour32 )
{
	if( pDev->CreateTexture( 1, 1, 1, 0, D3DFORMAT(21), 
		D3DPOOL(0), ppTex, NULL ) == S_OK )
	{
		if( pDev->CreateTexture( 1, 1, 1, 0, D3DFORMAT(21), 
			D3DPOOL(2), &pTx, NULL ) == S_OK )
		{
			if( pTx->LockRect( 0, &d3dlr, 0, 0 ) == S_OK )
			{
				((PDWORD)d3dlr.pBits)[0] = colour32;
				pTx->UnlockRect( 0 );
				pDev->UpdateTexture( pTx, *ppTex );
			}
		}
	}

	D3D_RELEASE( pTx )
}

//-------------------------------------------------------------------

DWORD WINAPI GETCRC( UINT uiSize, UINT uihSize, PBYTE pBits, D3DFORMAT Format )
{
	DWORD CurrentCRC = NULL;

	if( pBits && uiSize )
	{
		switch( Format )
		{
			case D3DFMT_A8R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case D3DFMT_X8R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case 894720068:
				CurrentCRC = pCrC->GetCrc32( pBits, 1 * uiSize );
				break;
			case D3DFMT_A4R4G4B4:
				CurrentCRC = pCrC->GetCrc32( pBits, 2 * uiSize );
				break;
			case D3DFMT_R8G8B8:
				CurrentCRC = pCrC->GetCrc32( pBits, 3 * uiSize );
				break;
			case D3DFMT_X4R4G4B4:
				CurrentCRC = pCrC->GetCrc32( pBits, 2 * uiSize );
				break;
			case D3DFMT_A8B8G8R8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			case D3DFMT_X8B8G8R8:
				CurrentCRC = pCrC->GetCrc32( pBits, 4 * uiSize );
				break;
			default:
				CurrentCRC = pCrC->GetCrc32( pBits, uihSize );
				break;
		}
	}
	
	return CurrentCRC;
}

//-------------------------------------------------------------------

HRESULT WINAPI nSetTexture
	( LPDIRECT3DDEVICE9 pDev, DWORD Stage, 
		IDirect3DBaseTexture9* pTexture )
{
	if( pTexture && Stage == 0 )
	{
		dwCRC = NULL;

		for( UINT i = 0;i < TCRC.size();i++ )
		{
			if( TCRC[i].BaseTex == (DWORD)pTexture )
			{
				dwCRC = TCRC[i].DWCRC;
				goto EXIT;
			}
		}

		pDev->GetRenderTarget( 0, &oSurf );
		oSurf->GetDesc( &DESC );
		
		if( DESC.Width == Vpt.Width && 
			DESC.Height == Vpt.Height )
		{
			if( SUCCEEDED(ID3DTX9(pTexture)->
				GetLevelDesc( 0, &DESC )) )
			{
				if( DESC.Pool != D3DPOOL_DEFAULT )
				{
					if( SUCCEEDED(ID3DTX9(pTexture)->LockRect
						( 0, &d3dlr, NULL, D3DLOCK_READONLY )) )
					{
						dwCRC = GETCRC( DESC.Width * DESC.Height, 
										(DESC.Width/2) * (DESC.Height/2), 
											PBYTE(d3dlr.pBits), DESC.Format );

						ID3DTX9(pTexture)->UnlockRect( 0 );
					}
				}
			}
		}
		TEXTURECRC TEXCRC = { (DWORD)pTexture, dwCRC, 
			DESC.Format, DESC.Usage, DESC.Pool };
		TCRC.push_back( TEXCRC );
		D3D_RELEASE( oSurf )
	}

EXIT:
	return oSetTexture
		( pDev, Stage, pTexture );
}

//-------------------------------------------------------------------

HRESULT WINAPI nDrawIdP
	( LPDIRECT3DDEVICE9 pDev, D3DPRIMITIVETYPE Type, 
		INT Base, UINT Min, UINT Num, UINT Start, UINT Prim )
{
	LPDIRECT3DVERTEXBUFFER9 Stream_Data;
	UINT Offset = 0;
	UINT Stride = 0;
	BYTE bOpforces = 0x0;
	BYTE bMarine = 0x0;
	BYTE bSpetz = 0x0;
	BYTE bSas = 0x0;

	if(pDev->GetStreamSource
		( 0, &Stream_Data, &Offset, &Stride )==S_OK)
			Stream_Data->Release();

	if( Stride == 32 && Wallhack && BTextures )
	{
		if( Opforces )		bOpforces = 0x1;
		if( Marine )		bMarine = 0x1;
		if( Spetznas )		bSpetz = 0x1;
		if( SasTeam )		bSas = 0x1;

		if( bOpforces || bMarine || bSpetz || bSas )
		{
			if( bOpforces )	oSetTexture( pDev, 0, Red );
			if( Marine )		oSetTexture( pDev, 0, Blue );
			if( Spetznas )		oSetTexture( pDev, 0, Orange );
			if( SasTeam )		oSetTexture( pDev, 0, Yellow );

			pDev->SetRenderState
				( D3DRS_ZENABLE, FALSE );

			oDrawIdP( pDev, Type, Base, 
				Min, Num, Start, Prim );

			pDev->SetRenderState
				( D3DRS_ZENABLE, TRUE );

			if( bOpforces )	oSetTexture( pDev, 0, Green );
			if( Marine )		oSetTexture( pDev, 0, Violet );
			if( Spetznas )		oSetTexture( pDev, 0, Pink );
			if( SasTeam )		oSetTexture( pDev, 0, Aqua );
		}
	}

	dwCRC = NULL;

	return oDrawIdP( pDev, Type, 
		Base, Min, Num, Start, Prim );
}

//-------------------------------------------------------------------

HRESULT WINAPI nEndScene
	( LPDIRECT3DDEVICE9 pDev )
{
	pDev->GetViewport( &Vpt );

	RECT FRect = { Vpt.Width-250,Vpt.Height/2, 
							Vpt.Width,Vpt.Height };

	if( BTextures == FALSE )
	{
		GenTex( pDev, &Blue, D3DCOLOR_ARGB( 255, 20, 20, 255 ) );
		GenTex( pDev, &Red, D3DCOLOR_ARGB( 255, 255, 20, 20 ) );
		GenTex( pDev, &Green, D3DCOLOR_ARGB( 255, 20, 255, 20 ) );
		GenTex( pDev, &Orange, D3DCOLOR_ARGB( 255, 255, 128, 20 ) );
		GenTex( pDev, &Pink, D3DCOLOR_ARGB( 255, 255, 20, 255 ) );
		GenTex( pDev, &Yellow, D3DCOLOR_ARGB( 255, 255, 255, 20 ) );
		GenTex( pDev, &Violet, D3DCOLOR_ARGB( 255, 128, 20, 255 ) );
		GenTex( pDev, &Aqua, D3DCOLOR_ARGB( 255, 20, 255, 255 ) );

		BTextures = TRUE;
	}

	if( pFont == NULL )
		D3DXCreateFontA( pDev, 16, 0, 700, 0, 0, 1, 0, 
			0, DEFAULT_PITCH | FF_DONTCARE, "Calibri", &pFont );

	sprintf( strbuff, "HOME: Enable Wall hack\nWallhack %i", Wallhack );

	if( pFont )
		pFont->DrawTextA( 0, strbuff, -1, &FRect, 
			DT_CENTER|DT_NOCLIP, 0xFF00FF00);

	if( GetAsyncKeyState( VK_HOME ) &1 )
	{
		if( Wallhack )
			Wallhack = FALSE;
		else
			Wallhack = TRUE;
	}

	return oEndScene( pDev );
}

//-------------------------------------------------------------------

HRESULT WINAPI nReset
	( LPDIRECT3DDEVICE9 pDev, 
		D3DPRESENT_PARAMETERS* PresP )
{
	D3D_RELEASE( pFont )

	D3D_RELEASE( Blue )
	D3D_RELEASE( Green )
	D3D_RELEASE( Red )
	D3D_RELEASE( Yellow )
	D3D_RELEASE( Pink )
	D3D_RELEASE( Orange )
	D3D_RELEASE( Violet )
	D3D_RELEASE( Aqua )

	BTextures = FALSE;
	return oReset( pDev, PresP );
}

//-------------------------------------------------------------------

VOID WINAPI THREAD( )
{
	while( pDev == NULL ) 
		Sleep( 100 );

	pCrC  = new CDynamicCrc32( );

	VTab[16] = dCrDev;
	VirtualProtect( (PVOID)&VTab[16], 4, Old, &Old );

	VTab  = (PDWORD)*(PDWORD)pDev;

	*(PDWORD)&oEndScene			= VTab[42];
	*(PDWORD)&oReset				= VTab[16];
	*(PDWORD)&oDrawIdP			= VTab[82];
	*(PDWORD)&oSetTexture		= VTab[65];

	while( 1 )
	{
		VTab[42] = (DWORD)nEndScene;
		VTab[16] = (DWORD)nReset;
		VTab[82] = (DWORD)nDrawIdP;
		VTab[65] = (DWORD)nSetTexture;
		Sleep( 100 );
	}
}

//-------------------------------------------------------------------

BOOL WINAPI DllMain( HMODULE hModule, 
	DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		DisableThreadLibraryCalls( hModule );

		pDx = Direct3DCreate9
			( D3D_SDK_VERSION );

		if( pDx != NULL )
		{
			VTab  = (PDWORD)*(PDWORD)pDx;
			pDx->Release();

			dCrDev = (DWORD)VTab[16];
			VirtualProtect( (PVOID)&VTab[16], 4, 0x40, &Old );

			VTab[16] = (DWORD)CREATEDEVICE;
			CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)
				THREAD, NULL, NULL, NULL );
		}
	}

	return TRUE;
}

//-------------------------------------------------------------------
CRC32.H:

Code:
// Dynamic Module System Core Interface Library
// David Rittenhouse 2003-2004
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef CRC32_H
#define CRC32_H

#pragma warning( disable: 4786 )
#include <windows.h>

class CDynamicCrc32
{
public:
	CDynamicCrc32		( void );
	~CDynamicCrc32		( void );
	DWORD GetCrc32		( PBYTE pbBuffer, unsigned int uiSize );
	DWORD GetCrc32		( const char * szBuffer );
	DWORD GetCheckSum32	( PBYTE pbBuffer, unsigned int uiSize );

private:
	void Calculate		( PBYTE pbBuffer, unsigned int uiSize, DWORD& dwCrc );
	DWORD Reflect		(  DWORD dw, BYTE by );
	DWORD * dwTable;
};

#endif // CRC32_H
CRC32.CPP:

Code:
// Dynamic Module System Core Interface Library
// David Rittenhouse 2003-2004
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include "CRC32.h"

DWORD CDynamicCrc32::GetCrc32( PBYTE pbBuffer, unsigned int uiSize )
{
	DWORD dwCrc32 = NULL;
	if( pbBuffer == NULL || uiSize == NULL )
	{ 
		return( dwCrc32 ); 
	}
	Calculate( pbBuffer, uiSize, dwCrc32 );
    return( dwCrc32 );
}

DWORD CDynamicCrc32::GetCrc32( const char * szBuffer )
{
	DWORD dwCrc32 = NULL;
	if( szBuffer == NULL ) 
	{ 
		return( dwCrc32 );
	}
	unsigned int uiSize = strlen( szBuffer );
	Calculate( (PBYTE)szBuffer, uiSize, dwCrc32 );
    return( dwCrc32 );
}

DWORD CDynamicCrc32::GetCheckSum32( PBYTE pbBuffer, unsigned int uiSize )
{
	DWORD dwCheckSum32 = NULL;
    if( pbBuffer == NULL || uiSize == NULL )
	{ 
		return( dwCheckSum32 );
	}
	for( DWORD dw = 0; dw < uiSize ; dw++ ) 
	{ 
		dwCheckSum32 += *(DWORD*)( pbBuffer + dw ); 
	}
	return( dwCheckSum32 );
}

void CDynamicCrc32::Calculate( PBYTE pbBuffer, unsigned int uiSize, DWORD& dwCrc32 )
{
	if( dwTable != NULL )
	{
		if( pbBuffer == NULL || uiSize == NULL )
		{ 
			dwCrc32 = NULL;
		}
		PBYTE pbByte = pbBuffer;
		while( uiSize > 0 )
		{
			dwCrc32 = ( (dwCrc32 >> 8) ^ dwTable[(dwCrc32 & 0xFF) ^ *pbByte++] );
			uiSize--;
		}
	}
	else { dwCrc32 = NULL; }
}

DWORD CDynamicCrc32::Reflect( DWORD dw, BYTE by )
{
    DWORD dwValue = NULL;
    for( int i = 1 ; i < (by + 1); i++ )
    {
        if( dw & 1 )
		{ 
			dwValue |= 1 << (by - i);
		}
        dw >>= 1;
    }
    return( dwValue );
}

CDynamicCrc32::CDynamicCrc32( void )
{
	dwTable = new DWORD[257];
    for( int i = 0 ; i <= 256 ; i++ )
    {
        dwTable[i] = (Reflect( i, 8 ) << 24);
        for( int p = 0 ; p < 8 ; p++ )
		{
            dwTable[i] = (dwTable[i] << 1) ^ ((dwTable[i] & (1 << 31)) ? 0x04C11DB7 : 0);
		}
        dwTable[i] = Reflect( dwTable[i], 32 );
    }
}

CDynamicCrc32::~CDynamicCrc32( void )
{
	if( dwTable != NULL )
	{
		delete[] dwTable;
		dwTable = NULL;
	}
}
COD4CRC.H:

Code:
#define Opforces (( Opfor_ass_extra		|| Opfor_spec_extra		|| Opfor_gunner_extra		|| Opfor_demo_extra ) || \
( Opfor_ass_high		|| Opfor_spec_high		|| Opfor_gunner_high			|| Opfor_demo_high ) || \
( Opfor_ass_normal	|| Opfor_spec_normal		|| Opfor_gunner_normal		|| Opfor_demo_normal ) || \
( Opfor_ass_low			|| Opfor_spec_low			|| Opfor_gunner_low			|| Opfor_demo_low ))

#define Marine (( mar_ass_extra		|| mar_spec_extra		|| mar_gunner_extra			|| mar_demo_extra ) || \
( mar_ass_high			|| mar_spec_high		|| mar_gunner_high			|| mar_demo_high ) || \
( mar_ass_normal		|| mar_spec_normal	|| mar_gunner_normal		|| mar_demo_normal ) || \
( mar_ass_low			|| mar_spec_low			|| mar_gunner_low				|| mar_demo_low ))

#define Spetznas (( spetz_ass_extra			|| spetz_spec_extra		|| spetz_gunner_extra			|| spetz_demo_extra ) || \
( spetz_ass_high			|| spetz_spec_high		|| spetz_gunner_high			|| spetz_demo_high ) || \
( spetz_ass_normal		|| spetz_spec_normal	|| spetz_gunner_normal			|| spetz_demo_normal ) || \
( spetz_ass_low			|| spetz_spec_low			|| spetz_gunner_low				|| spetz_demo_low ))

#define SasTeam (( sas_ass_extra		|| sas_spec_extra		|| sas_gunner_extra			|| sas_demo_extra ) || \
( sas_ass_high			|| sas_spec_high		|| sas_gunner_high			|| sas_demo_high ) || \
( sas_ass_normal		|| sas_spec_normal	|| sas_gunner_normal		|| sas_demo_normal ) || \
( sas_ass_low			|| sas_spec_low			|| sas_gunner_low				|| sas_demo_low ))

#define Opfor_ass_extra (( dwCRC ==  0x0f391c5f ) || \
( dwCRC ==  0xc8a47091 ) || ( dwCRC ==  0x9de4ae55 ) || \
( dwCRC ==  0x1e41f678 ))

#define Opfor_spec_extra (( dwCRC ==  0x9de4ae55 ) || \
( dwCRC ==  0xfcc01d4f ) || ( dwCRC ==  0x1e41f678 ))

#define Opfor_gunner_extra (( dwCRC ==  0x0f391c5f ) || \
( dwCRC ==  0x9de4ae55 ) || ( dwCRC ==  0x69258fe7 ) || \
( dwCRC ==  0x1e41f678 ))

#define Opfor_demo_extra (( dwCRC ==  0x9de4ae55 ) || \
( dwCRC ==  0x651f8d5b ) || ( dwCRC ==  0x0f391c5f ) || \
( dwCRC ==  0x8d9c405d ) || ( dwCRC ==  0x1e41f678 ))

#define Opfor_sniper_extra (( dwCRC ==  0x0f391c5f ) || \
( dwCRC ==  0x9de4ae55 ) || ( dwCRC ==  0xc1f47d33 ) || \
( dwCRC ==  0x1e41f678 ))

#define mar_ass_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x0d659b29 ) || ( dwCRC ==  0xeb7fd67b ) || \
( dwCRC ==  0xe00bdcdc ) || ( dwCRC ==  0x02fc7c69 ) || \
( dwCRC ==  0x61091880 ))

#define mar_spec_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x1d5987a8 ) || ( dwCRC ==  0xe00bdcdc ) || \
( dwCRC ==  0x02fc7c69 ) || ( dwCRC ==  0x61091880 ))

#define mar_gunner_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x0d659b29 ) || ( dwCRC ==  0xe00bdcdc ) || \
( dwCRC ==  0x2ce06bbb ) || ( dwCRC ==  0x61091880 ))

#define mar_demo_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0xe00bdcdc ) || ( dwCRC ==  0x1d5987a8 ) || \
( dwCRC ==  0x61091880 ))

#define mar_sniper_extra (( dwCRC ==  0x63aab119 ) || \
( dwCRC ==  0xe00bdcdc ) || ( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x61091880 ))

#define spetz_ass_extra (( dwCRC ==  0xde4792d0 ) || \
( dwCRC ==  0xa912c9cf ) || ( dwCRC ==  0x275ea318 ) || \
( dwCRC ==  0x0d50ccb4 ))

#define spetz_spec_extra (( dwCRC ==  0xde4792d0 ) || \
( dwCRC ==  0x9e8f7985 ) || ( dwCRC ==  0xa912c9cf ) || \
( dwCRC ==  0x7e1d1562 ) || ( dwCRC ==  0x0d50ccb4 ))

#define spetz_gunner_extra (( dwCRC ==  0xde4792d0 ) || \
( dwCRC ==  0xb22f9123 ) || ( dwCRC ==  0xa912c9cf ) || \
( dwCRC ==  0xe3ed2f9f ) || ( dwCRC ==  0x0d50ccb4 ))

#define spetz_demo_extra (( dwCRC ==  0xde4792d0 ) || \
( dwCRC ==  0x9e8f7985 ) || ( dwCRC ==  0xb22f9123 ) || \
( dwCRC ==  0xa912c9cf ) || ( dwCRC ==  0x0d50ccb4 ))

#define spetz_sniper_extra (( dwCRC ==  0xde4792d0 ) || \
( dwCRC ==  0xa912c9cf ) || ( dwCRC ==  0xce5edc4c ) || \
( dwCRC ==  0x0d50ccb4 ))

#define sas_ass_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x0d659b29 ) || ( dwCRC ==  0xeb7fd67b ) || \
( dwCRC ==  0xc1a9e3ba ) || ( dwCRC ==  0x6053b0f4 )|| ( dwCRC ==  0x72da519d ))

#define sas_spec_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x1d5987a8 ) || ( dwCRC ==  0xc1a9e3ba ) || \
( dwCRC ==  0x6053b0f4 )|| ( dwCRC ==  0x72da519d ))

#define sas_gunner_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0x0d659b29 ) || ( dwCRC ==  0xc1a9e3ba ) || \
( dwCRC ==  0x2ce06bbb ) || ( dwCRC ==  0x6053b0f4 )|| ( dwCRC ==  0x72da519d ))

#define sas_demo_extra (( dwCRC ==  0x1094b071 ) || \
( dwCRC ==  0xc1a9e3ba ) || ( dwCRC ==  0x1d5987a8 ) || \
( dwCRC ==  0x6053b0f4 )|| ( dwCRC ==  0x72da519d ))

#define sas_sniper_extra (( dwCRC ==  0xc1a9e3ba ) || \
( dwCRC ==  0x1094b071 ) || ( dwCRC ==  0x1d5987a8 ) || \
( dwCRC ==  0x6053b0f4 )|| ( dwCRC ==  0x72da519d ))

#define Opfor_ass_high (( dwCRC ==  0x08bf50cf ) || \
( dwCRC ==  0x08a7fd57 ) || ( dwCRC ==  0x3d32dcef ) || \
( dwCRC ==  0xf57cc66f ))

#define Opfor_spec_high (( dwCRC ==  0x3d32dcef ) || \
( dwCRC ==  0x7ded9eab ) || ( dwCRC ==  0xf57cc66f ))

#define Opfor_gunner_high (( dwCRC ==  0x08bf50cf ) || \
( dwCRC ==  0x3d32dcef ) || ( dwCRC ==  0x3ddc83db ) || \
( dwCRC ==  0xf57cc66f ))

#define Opfor_demo_high (( dwCRC ==  0x3d32dcef ) || \
( dwCRC ==  0x77343879 ) || ( dwCRC ==  0x08bf50cf ) || \
( dwCRC ==  0xd8d10ccd ) || ( dwCRC ==  0xf57cc66f ))

#define Opfor_sniper_high (( dwCRC ==  0x08bf50cf ) || \
( dwCRC ==  0x3d32dcef ) || ( dwCRC ==  0x8af16b7e ) || \
( dwCRC ==  0xf57cc66f ))

#define mar_ass_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0xf846a0f7 ) || ( dwCRC ==  0xb3b1199c ) || \
( dwCRC ==  0x823ff2f1 ) || ( dwCRC ==  0xe7c86ff5 ))

#define mar_spec_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0x4ed66ac8 ) || ( dwCRC ==  0x823ff2f1 ) || \
( dwCRC ==  0x6439cf99 ) || ( dwCRC ==  0xe7c86ff5 ))

#define mar_gunner_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0xf846a0f7 ) || ( dwCRC ==  0x823ff2f1 ) || \
( dwCRC ==  0x0af277ba ) || ( dwCRC ==  0xe7c86ff5 ))

#define mar_demo_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0x823ff2f1 ) || ( dwCRC ==  0x4ed66ac8 ) || \
( dwCRC ==  0xe7c86ff5 ))

#define mar_sniper_high (( dwCRC ==  0xf36f0803 ) || \
( dwCRC ==  0x823ff2f1 ) || ( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0xe7c86ff5 ))

#define spetz_ass_high (( dwCRC ==  0x5fb267f9 ) || \
( dwCRC ==  0xb5896220 ) || ( dwCRC ==  0xa4d966b5 ) || \
( dwCRC ==  0xdb0da800 ))

#define spetz_spec_high (( dwCRC ==  0x5fb267f9 ) || \
( dwCRC ==  0x3014c374 ) || ( dwCRC ==  0xb5896220 ) || \
( dwCRC ==  0x4e2c0e0f ) || ( dwCRC ==  0xdb0da800 ))

#define spetz_gunner_high (( dwCRC ==  0x5fb267f9 ) || \
( dwCRC ==  0xb5896220 ) || ( dwCRC ==  0x58490254 ) || \
( dwCRC ==  0xdb0da800 ))

#define spetz_demo_high (( dwCRC ==  0x5fb267f9 ) || \
( dwCRC ==  0x3014c374 ) || ( dwCRC ==  0xb5896220 ) || \
( dwCRC ==  0x4e2c0e0f ) || ( dwCRC ==  0xdb0da800 ))

#define spetz_sniper_high (( dwCRC ==  0x5fb267f9 ) || \
( dwCRC ==  0xb5896220 ) || ( dwCRC ==  0x4b384528 ) || \
( dwCRC ==  0xdb0da800 ))

#define sas_ass_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0xf846a0f7 ) || ( dwCRC ==  0xb3b1199c ) || \
( dwCRC ==  0x702da3c6 ) || ( dwCRC ==  0xf2e6e0aa ) || \
( dwCRC ==  0xe7c86ff5 ))

#define sas_spec_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0x4ed66ac8 ) || ( dwCRC ==  0x702da3c6 ) || \
( dwCRC ==  0x6439cf99 ) || ( dwCRC ==  0xe7c86ff5 ) || \
( dwCRC ==  0xf2e6e0aa ))

#define sas_gunner_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0xf846a0f7 ) || ( dwCRC ==  0x702da3c6 ) || \
( dwCRC ==  0x0af277ba ) || ( dwCRC ==  0xe7c86ff5 ) || \
( dwCRC ==  0xf2e6e0aa ))

#define sas_demo_high (( dwCRC ==  0x4a04d423 ) || \
( dwCRC ==  0x702da3c6 ) || ( dwCRC ==  0x4ed66ac8 ) || \
( dwCRC ==  0xe7c86ff5 ) || ( dwCRC ==  0xf2e6e0aa ))

#define sas_sniper_high (( dwCRC ==  0x702da3c6 ) || \
( dwCRC ==  0x4a04d423 ) || ( dwCRC ==  0x4ed66ac8 ) || \
( dwCRC ==  0xe7c86ff5 ) || ( dwCRC ==  0xf2e6e0aa ))

#define Opfor_ass_low (( dwCRC ==  0x80d13a8c ) || \
( dwCRC ==  0x62dce241 ) || ( dwCRC ==  0x27a74367 ) || \
( dwCRC ==  0xe382aa6e ))

#define Opfor_spec_low (( dwCRC ==  0x27a74367 ) || \
( dwCRC ==  0x7a4b2842 ) || ( dwCRC ==  0xe382aa6e ))

#define Opfor_gunner_low (( dwCRC ==  0x80d13a8c ) || \
( dwCRC ==  0x27a74367 ) || ( dwCRC ==  0x31a64a52 ) || \
( dwCRC ==  0xe382aa6e ))

#define Opfor_demo_low (( dwCRC ==  0x27a74367 ) || \
( dwCRC ==  0x869c71cf ) || ( dwCRC ==  0x80d13a8c ) || \
( dwCRC ==  0x7c9dc1f4 ) || ( dwCRC ==  0xe382aa6e ))

#define Opfor_sniper_low (( dwCRC ==  0x80d13a8c ) || \
( dwCRC ==  0x27a74367 ) || ( dwCRC ==  0x3dd0d7e4 ) || \
( dwCRC ==  0xe382aa6e ))

#define mar_ass_low (( dwCRC ==  0xfe0aaf1f ) || \
( dwCRC ==  0x899d1968 ) || ( dwCRC ==  0x96a15948 ) || \
( dwCRC ==  0x7b183c19 ) || ( dwCRC ==  0xc17dd315 ) || \
( dwCRC ==  0x0c95a60d ))

#define mar_spec_low (( dwCRC ==  0xfe0aaf1f ) || \
( dwCRC ==  0x043f69eb ) || ( dwCRC ==  0x7b183c19 ) || \
( dwCRC ==  0xc17dd315 ) || ( dwCRC ==  0x0c95a60d ))

#define mar_gunner_low (( dwCRC ==  0xfe0aaf1f ) || \
( dwCRC ==  0x899d1968 ) || ( dwCRC ==  0x7b183c19 ) || \
( dwCRC ==  0x84f01188 ) || ( dwCRC ==  0x0c95a60d ))

#define mar_demo_low (( dwCRC ==  0xfe0aaf1f ) || \
( dwCRC ==  0x7b183c19 ) || ( dwCRC ==  0x043f69eb ) || \
( dwCRC ==  0x0c95a60d ))

#define mar_sniper_low (( dwCRC ==  0x5402f17b ) || \
( dwCRC ==  0x7b183c19 ) || ( dwCRC ==  0xfe0aaf1f ) || \
( dwCRC ==  0x0c95a60d ))

#define spetz_ass_low (( dwCRC ==  0x4ef64dfa ) || \
( dwCRC ==  0x6bc05625 ) || ( dwCRC ==  0x240e5534 ) || \
( dwCRC ==  0xeb74891f ))

#define spetz_spec_low (( dwCRC ==  0x4ef64dfa ) || \
( dwCRC ==  0x8952e3d6 ) || ( dwCRC ==  0x6bc05625 ) || \
( dwCRC ==  0xba761983 ) || ( dwCRC ==  0xeb74891f ))

#define spetz_gunner_low (( dwCRC ==  0x4ef64dfa ) || \
( dwCRC ==  0x6bc05625 ) || ( dwCRC ==  0x4aebeba9 ) || \
( dwCRC ==  0xeb74891f ))

#define spetz_demo_low (( dwCRC ==  0x4ef64dfa ) || \
( dwCRC ==  0x8952e3d6 ) || ( dwCRC ==  0x6bc05625 ) || \
( dwCRC ==  0xba761983 ) || ( dwCRC ==  0xeb74891f ))

#define spetz_sniper_low (( dwCRC ==  0x4ef64dfa ) || \
( dwCRC ==  0x6bc05625 ) || ( dwCRC ==  0xa7ee5253 ) || \
( dwCRC ==  0xeb74891f ))

#define sas_ass_low (( dwCRC ==  0x645b365f ) || \
( dwCRC ==  0xa77d1d9e ) || ( dwCRC ==  0x9c5ed28e ) || \
( dwCRC ==  0x71605bea ))

#define sas_spec_low (( dwCRC ==  0x645b365f ) || \
( dwCRC ==  0xa77d1d9e ) || ( dwCRC ==  0x71605bea ))

#define sas_gunner_low (( dwCRC ==  0x645b365f ) || \
( dwCRC ==  0xa77d1d9e ) || ( dwCRC ==  0x9c5ed28e ) || \
( dwCRC ==  0x71605bea ))

#define sas_demo_low (( dwCRC ==  0x645b365f ) || \
( dwCRC ==  0xa77d1d9e ) || ( dwCRC ==  0x71605bea ))

#define sas_sniper_low (( dwCRC ==  0x645b365f ) || \
( dwCRC ==  0xa77d1d9e ) || ( dwCRC ==  0x9c5ed28e ) || \
( dwCRC ==  0x71605bea ))

#define Opfor_ass_normal (( dwCRC ==  0xa9c4dcb4 ) || \
( dwCRC ==  0xeddebfad ) || ( dwCRC ==  0x12ec43a6 ) || \
( dwCRC ==  0x15ed433f ))

#define Opfor_spec_normal (( dwCRC ==  0x12ec43a6 ) || \
( dwCRC ==  0x6537df28 ) || ( dwCRC ==  0x15ed433f ))

#define Opfor_gunner_normal (( dwCRC ==  0xa9c4dcb4 ) || \
( dwCRC ==  0x12ec43a6 ) || ( dwCRC ==  0x13b4e2a8 ) || \
( dwCRC ==  0x15ed433f ))

#define Opfor_demo_normal (( dwCRC ==  0x12ec43a6 ) || \
( dwCRC ==  0x1a74f99a ) || ( dwCRC ==  0xa9c4dcb4 ) || \
( dwCRC ==  0x1080793c ) || ( dwCRC ==  0x15ed433f ))

#define Opfor_sniper_normal (( dwCRC ==  0xa9c4dcb4 ) || \
( dwCRC ==  0x12ec43a6 ) || ( dwCRC ==  0xe5c5cbad ) || \
( dwCRC ==  0x15ed433f ))

#define mar_ass_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xb130636c ) || ( dwCRC ==  0x9ebda639 ) || \
( dwCRC ==  0xe568d48c ) || ( dwCRC ==  0xc1c0cb8b ))

#define mar_spec_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0x80a8f647 ) || ( dwCRC ==  0xe568d48c ) || \
( dwCRC ==  0x55e00af7 ) || ( dwCRC ==  0xc1c0cb8b ))

#define mar_gunner_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xb130636c ) || ( dwCRC ==  0xe568d48c ) || \
( dwCRC ==  0x2edde794 ) || ( dwCRC ==  0xc1c0cb8b ))

#define mar_demo_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xe568d48c ) || ( dwCRC ==  0x80a8f647 ) || \
( dwCRC ==  0xc1c0cb8b ))

#define mar_sniper_normal (( dwCRC ==  0x45c96956 ) || \
( dwCRC ==  0xe568d48c ) || ( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xc1c0cb8b ))

#define spetz_ass_normal (( dwCRC ==  0xaad9ff08 ) || \
( dwCRC ==  0xb19127f5 ) || ( dwCRC ==  0xe6cfc518 ) || \
( dwCRC ==  0x51b8b4a0 ))

#define spetz_spec_normal (( dwCRC ==  0xaad9ff08 ) || \
( dwCRC ==  0x81de264c ) || ( dwCRC ==  0xb19127f5 ) || \
( dwCRC ==  0xa22f4aa0 ) || ( dwCRC ==  0x51b8b4a0 ))

#define spetz_gunner_normal (( dwCRC ==  0xaad9ff08 ) || \
( dwCRC ==  0xb19127f5 ) || ( dwCRC ==  0x417fa2f6 ) || \
( dwCRC ==  0x51b8b4a0 ))

#define spetz_demo_normal (( dwCRC ==  0xaad9ff08 ) || \
( dwCRC ==  0x81de264c ) || ( dwCRC ==  0xb19127f5 ) || \
( dwCRC ==  0xa22f4aa0 ) || ( dwCRC ==  0x51b8b4a0 ))

#define spetz_sniper_normal (( dwCRC ==  0xaad9ff08 ) || \
( dwCRC ==  0xb19127f5 ) || ( dwCRC ==  0x9694652e ) || \
( dwCRC ==  0x51b8b4a0 ))

#define sas_ass_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xb130636c ) || ( dwCRC ==  0x9ebda639 ) || \
( dwCRC ==  0x5247996f ) || ( dwCRC ==  0xba544cb0 ) || \
( dwCRC ==  0xc1c0cb8b ))

#define sas_spec_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0x80a8f647 ) || ( dwCRC ==  0x5247996f ) || \
( dwCRC ==  0x55e00af7 ) || ( dwCRC ==  0xc1c0cb8b ) || \
( dwCRC ==  0xba544cb0 ))

#define sas_gunner_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0xb130636c ) || ( dwCRC ==  0x5247996f ) || \
( dwCRC ==  0x2edde794 ) || ( dwCRC ==  0xc1c0cb8b ) || \
( dwCRC ==  0xba544cb0 ))

#define sas_demo_normal (( dwCRC ==  0x30fcbad1 ) || \
( dwCRC ==  0x5247996f ) || ( dwCRC ==  0x80a8f647 ) || \
( dwCRC ==  0xc1c0cb8b ) || ( dwCRC ==  0xba544cb0 ))

#define sas_sniper_normal (( dwCRC ==  0x5247996f ) || \
( dwCRC ==  0x30fcbad1 ) || ( dwCRC ==  0x80a8f647 ) || \
( dwCRC ==  0xc1c0cb8b ) || ( dwCRC ==  0xba544cb0 ))
IMAGES: