/* W W W . A W A R E N E T W O R K . O R G []===========================================[] WinRAR *ALL* Versions preCracker []===========================================[] [test compiled/linked using msvsc++6sp6] Ey kidz! I'v got a lil somethin' f0 ya! This baby snorts WinRAR.exe to look for the trial protection. Actually it looks for meth-amphetamines, but that's often hard to find in binaries these days! Any who, if the protection is found it will be altered so that you may use WinRAR f0 evha'n'evha'n'evha...evha... ...evha, evha! ..... evha! The sexy thing about all this is that, because we search for the pattern this bad boy should be able to remove the trial protection of every existing as well as every future release of WinRAR, as long as Rarlab don't change the trial protection to much. Though Rarlab seam kind of lazy, so i don't think that will happen any time soon. Enjoy! I added a lil extra to the crack this time! Lame xm playback as well as some abstract'n'wierd looking ogl. Wicked! /iqlord | .aware crew []===========================================[] W W W . A W A R E N E T W O R K . O R G []================================================================[] -=<[HERE WE HAVE THE PRECRACK PATTERN]>=- -------------------------------------------------------------------- :0040DCA2 8D85D0EFFFFF lea eax, dword ptr [ebp+FFFFEFD0] :0040DCA8 8B95D0F3FFFF mov edx, dword ptr [ebp+FFFFF3D0] :0040DCAE E865DBFFFF call 0040B818 -------------------------------------------------------------------- :0040DCB3 84C0 test al, al :0040DCB5 0F85DFFEFFFF jne 0040DB9A :0040DCBB 33C0 xor eax,eax <-- amphetamines! -------------------------------------------------------------------- --- 84C00F85DFFEFFFF33C0 --- :0040DCBD 8B95D4F3FFFF mov edx, dword ptr [ebp+FFFFF3D4] :0040DCC3 64891500000000 mov dword ptr fs:[00000000], edx -------------------------------------------------------------------- --- 84C00F85DFFEFFFF33C08B95D4F3FFFF64891500000000 --- Replacement code will be | mov al,01 [B001] []================================================================[] ...AND HERE COMES THE SRC, ENJOY: */ #include "stdafx.h" /* -------This is h0w "stdafx.h" looks like:---------- #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #pragma comment(lib,"winmm.lib") #pragma comment(linker,"/nodefaultlib:msvcrt.lib") #pragma comment(linker,"/IGNORE:4049") #pragma comment(linker,"/IGNORE:4089") #pragma comment(linker,"/MERGE:.text=be") #pragma comment(linker,"/MERGE:.rdata=aware") #pragma comment(linker,"/MERGE:.data=kidz") #include #include #include #include -----------------------------------[end of h]------- */ #include "resource.h" /* -------This is h0w "resource.h" looks like:------- #define IDD_WinrarOGL 102 #define IDD_WhatsThis 103 #define IDR_MAINFRAME 128 #define IDR_DATA2 136 #define IDD_NoWinrar 139 #define IDD_WinrarCracked 140 #define IDD_NotCrackable 141 #define IDC_INFO 1000 #define IDC_OGL_SHOW 1001 #define ID_OK 1002 #define IDC_KILLME 1003 #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 143 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1005 #define _APS_NEXT_SYMED_VALUE 104 #endif #endif -----------------------------------[end of h]------- */ /*---------------------------------------------------- This is just the raw and masculine code! If you actually want to rebuild this you should get the workspace available in the same directory you found this file in! There you have all the extra resources such as audio, graphics and whatnot... If you have access to msvs you don't even have to understand the code below. Just get the workspace, fire it up in the ide press F7 and voila, you are a mad c0d3r! Very slick! /iqlord | .aware crew ----------------------------------------------------*/ #ifndef _MINIFMOD_H_ #define _MINIFMOD_H_ typedef struct FMUSIC_MODULE FMUSIC_MODULE; #ifdef __cplusplus extern "C" { #endif typedef void (*FMUSIC_CALLBACK)(FMUSIC_MODULE *mod, unsigned char param); typedef void (*SAMPLELOADCALLBACK)(void *buff, int lenbytes, int numbits, int instno, int sampno); signed char FMUSIC_FreeSong(FMUSIC_MODULE *mod), FMUSIC_PlaySong(FMUSIC_MODULE *mod), FMUSIC_StopSong(FMUSIC_MODULE *mod); int FMUSIC_GetOrder(FMUSIC_MODULE *mod), FMUSIC_GetRow(FMUSIC_MODULE *mod); unsigned int FMUSIC_GetTime(FMUSIC_MODULE *mod); FMUSIC_MODULE * FMUSIC_LoadSong(char *data, SAMPLELOADCALLBACK sampleloadcallback); void FSOUND_File_SetCallbacks (unsigned int (*OpenCallback)(char *name), void (*CloseCallback)(unsigned int handle), int (*ReadCallback)(void *buffer, int size, unsigned int handle), void (*SeekCallback)(unsigned int handle, int pos, signed char mode), int (*TellCallback)(unsigned int handle)); #ifdef __cplusplus } #endif #endif FMUSIC_MODULE *mod; typedef struct { int length, pos; void *data; } MEMFILE; unsigned int memopen(char *name) { MEMFILE *mf; mf = (MEMFILE *)calloc(sizeof(MEMFILE),0x01); HRSRC rec = FindResource(0x00, name, (LPSTR)((DWORD)((WORD)(0x0A)))); HGLOBAL handle = LoadResource(0x00, rec); mf->data = LockResource(handle); mf->length = SizeofResource(0x00, rec); mf->pos = 0x00; return (unsigned int)mf; } void memclose(unsigned int handle) { MEMFILE *mf = (MEMFILE *)handle; free(mf); } int memread(void *buffer, int size, unsigned int handle) { MEMFILE *mf = (MEMFILE *)handle; if (mf->pos + size >= mf->length) size = mf->length - mf->pos; memcpy(buffer, (char *)mf->data+mf->pos, size); mf->pos += size; return size; } void memseek(unsigned int handle, int pos, signed char mode) { MEMFILE *mf = (MEMFILE *)handle; if (mode == 0x00) mf->pos = pos; else if (mode == 0x01) mf->pos += pos; else if (mode == 0x02) mf->pos = mf->length + pos; if (mf->pos > mf->length) mf->pos = mf->length; } int memtell(unsigned int handle) { MEMFILE *mf = (MEMFILE *)handle; return mf->pos; } class COpenGLDialogApp : public CWinApp { public: COpenGLDialogApp(); public: virtual BOOL InitInstance(); }; class CAboutDlg : public CDialog { public: CAboutDlg(CWnd* pParent = 0x00); enum { IDD = IDD_WhatsThis }; protected: virtual void DoDataExchange(CDataExchange* pDX); protected: afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); }; class CNoWinrarDlg : public CDialog { public: CNoWinrarDlg(CWnd* pParent = 0x00); enum { IDD = IDD_NoWinrar }; protected: virtual void DoDataExchange(CDataExchange* pDX); protected: afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); }; class CWinrarCrackedDlg : public CDialog { public: CWinrarCrackedDlg(CWnd* pParent = 0x00); enum { IDD = IDD_WinrarCracked }; protected: virtual void DoDataExchange(CDataExchange* pDX); protected: afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); }; class CNotCrackableDlg : public CDialog { public: CNotCrackableDlg(CWnd* pParent = 0x00); enum { IDD = IDD_NotCrackable }; virtual void MurderDeathKill(); protected: virtual void DoDataExchange(CDataExchange* pDX); protected: afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); }; #ifndef OPENGL_DEVICE_H #define OPENGL_DEVICE_H class OpenGLDevice { public: OpenGLDevice(HDC& deviceContext,int stencil = 0x00); OpenGLDevice(HWND& window,int stencil = 0x00); OpenGLDevice(); bool create(HDC& deviceContext,int stencil = 0x00); bool create(HWND& window,int stencil = 0x00); void destroy(); void makeCurrent(bool disableOther = true); virtual ~OpenGLDevice(); protected: bool setDCPixelFormat(HDC& deviceContext,int stencil); HGLRC renderContext; HDC deviceContext; }; #endif class COpenGLControl : public CWnd { public: COpenGLControl(); public: void Create(CRect rect,CWnd* parent); virtual ~COpenGLControl(); protected: void InitGL(); void DrawGLScene(); OpenGLDevice openGLDevice; CClientDC* dc; GLfloat xrot, yrot, zrot; afx_msg void OnPaint(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg BOOL OnEraseBkgnd(CDC* pDC); DECLARE_MESSAGE_MAP() }; class COpenGLDialogDlg : public CDialog { public: COpenGLDialogDlg(CWnd* pParent = 0x00); enum { IDD = IDD_WinrarOGL }; protected: virtual void DoDataExchange(CDataExchange* pDX); protected: HICON m_hIcon; COpenGLControl openGLControl; virtual BOOL OnInitDialog(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnWhat(); afx_msg void OnExit(); afx_msg void OnOk(); DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg(CWnd* pParent) : CDialog(CAboutDlg::IDD, pParent){} void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } void CAboutDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); SetFocus(); } CNoWinrarDlg::CNoWinrarDlg(CWnd* pParent) : CDialog(CNoWinrarDlg::IDD, pParent){} void CNoWinrarDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } void CNoWinrarDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); SetFocus(); } CWinrarCrackedDlg::CWinrarCrackedDlg(CWnd* pParent) : CDialog(CWinrarCrackedDlg::IDD, pParent){} void CWinrarCrackedDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } void CWinrarCrackedDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); SetFocus(); } CNotCrackableDlg::CNotCrackableDlg(CWnd* pParent) : CDialog(CNotCrackableDlg::IDD, pParent){} void CNotCrackableDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } void CNotCrackableDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); SetFocus(); } void CNotCrackableDlg::MurderDeathKill() { CDialog::EndDialog(0x00); } COpenGLControl::COpenGLControl() { dc = 0x00; } COpenGLControl::~COpenGLControl() { if (dc) { delete dc; } } BEGIN_MESSAGE_MAP(COpenGLControl, CWnd) ON_WM_PAINT() ON_WM_SIZE() ON_WM_CREATE() ON_WM_ERASEBKGND() END_MESSAGE_MAP() void COpenGLControl::InitGL() { glShadeModel(0x1D01); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0f); glDepthFunc(0x0203); glHint(0x0C50, 0x1102); } void COpenGLControl::DrawGLScene() { glClear(0x00004000 | 0x00000100); glLoadIdentity(); glRotatef(xrot,1.0f,0.0f,0.0f); glRotatef(yrot,0.0f,1.0f,0.0f); glRotatef(zrot,0.0f,0.0f,1.0f); glBegin(0x0007); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glEnd(); xrot+=0.01140f; yrot+=0.01199f; zrot+=0.01112f; SwapBuffers(dc->m_hDC); } void COpenGLControl::Create(CRect rect, CWnd *parent) { CString className = AfxRegisterWndClass( 0x0002 | 0x0001 | 0x0020, 0x00, (HBRUSH)GetStockObject(0x04), 0x00); CreateEx(0x00,className,"OGL", 0x40000000L | 0x10000000L | 0x04000000L | 0x02000000L, rect,parent,0x00); } void COpenGLControl::OnPaint() { openGLDevice.makeCurrent(); DrawGLScene(); } void COpenGLControl::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); if (cy == 0x00) { cy = 0x01; } glViewport(0x00,0x00,cx,cy); glMatrixMode(0x1701); glLoadIdentity(); glOrtho(-1.0f,1.0f,-1.0f,1.0f,1.0f,-1.0f); glMatrixMode(0x1700); glLoadIdentity(); } int COpenGLControl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; dc = new CClientDC(this); openGLDevice.create(dc->m_hDC); InitGL(); return 0x00; } BOOL COpenGLControl::OnEraseBkgnd(CDC* pDC) { return true; } OpenGLDevice::OpenGLDevice() { renderContext = 0x00; deviceContext = 0x00; } OpenGLDevice::~OpenGLDevice() { destroy(); } OpenGLDevice::OpenGLDevice(HWND& window,int stencil) { create(window,stencil); } OpenGLDevice::OpenGLDevice(HDC& deviceContext,int stencil) { create(deviceContext,stencil); } bool OpenGLDevice::create(HWND& window,int stencil) { HDC deviceContext = ::GetDC(window); if (!create(deviceContext,stencil)) { ::ReleaseDC(window, deviceContext); return false; } ::ReleaseDC(window, deviceContext); return true; } bool OpenGLDevice::create(HDC& deviceContext,int stencil) { if (!deviceContext) { return false; } if (!setDCPixelFormat(deviceContext,stencil)) { return false; } renderContext = wglCreateContext(deviceContext); wglMakeCurrent(deviceContext, renderContext); OpenGLDevice::deviceContext = deviceContext; return true; } void OpenGLDevice::destroy() { if (renderContext != 0x00) { wglMakeCurrent(0x00,0x00); wglDeleteContext(renderContext); } } void OpenGLDevice::makeCurrent(bool disableOther) { if (renderContext != 0x00) { if (disableOther) wglMakeCurrent(0x00,0x00); wglMakeCurrent(deviceContext, renderContext); } } bool OpenGLDevice::setDCPixelFormat(HDC& deviceContext,int stencil) { int pixelFormat; DEVMODE resolution; EnumDisplaySettings(0x00, ((DWORD)-1), &resolution); static PIXELFORMATDESCRIPTOR pixelFormatDesc = { sizeof (PIXELFORMATDESCRIPTOR), 0x01, 0x00000004 | 0x00000020 | 0x00000001, 0x00, resolution.dmBitsPerPel, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,stencil, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; pixelFormat = ChoosePixelFormat (deviceContext,&pixelFormatDesc); if (!SetPixelFormat(deviceContext, pixelFormat, &pixelFormatDesc)) { return false ; } return true; } COpenGLDialogApp::COpenGLDialogApp() { } COpenGLDialogApp theApp; BOOL COpenGLDialogApp::InitInstance() { #ifdef _AFXDLL Enable3dControls(); #else Enable3dControlsStatic(); #endif COpenGLDialogDlg dlg; m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); if (nResponse == 0x01) { } else if (nResponse == 0x02) { } return false; } COpenGLDialogDlg::COpenGLDialogDlg(CWnd* pParent) : CDialog(COpenGLDialogDlg::IDD, pParent) { m_hIcon = AfxGetApp()->LoadIcon(0x80); } void COpenGLDialogDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(COpenGLDialogDlg, CDialog) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_INFO, OnWhat) ON_BN_CLICKED(IDC_KILLME, OnExit) ON_BN_CLICKED(ID_OK, OnOk) END_MESSAGE_MAP() BOOL COpenGLDialogDlg::OnInitDialog() { CDialog::OnInitDialog(); FSOUND_File_SetCallbacks(memopen, memclose, memread, memseek, memtell); mod = FMUSIC_LoadSong((LPSTR)((DWORD)((WORD)(IDR_DATA2))),0x00); if (mod) { FMUSIC_PlaySong(mod); } SetIcon(m_hIcon, true); SetIcon(m_hIcon, false); CRect rect; GetDlgItem(0x03E9)->GetWindowRect(rect); ScreenToClient(rect); openGLControl.Create(rect,this); return true; } void COpenGLDialogDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); SendMessage(0x0027, (WPARAM) dc.GetSafeHdc(), 0x00); int cxIcon = GetSystemMetrics(0x0B); int cyIcon = GetSystemMetrics(0x0C); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 0x01) / 0x02; int y = (rect.Height() - cyIcon + 0x01) / 0x02; dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } } HCURSOR COpenGLDialogDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; } void COpenGLDialogDlg::OnExit() { FMUSIC_FreeSong(mod); CDialog::OnCancel(); } void COpenGLDialogDlg::OnWhat() { CAboutDlg aboutBox; aboutBox.DoModal(); } void COpenGLDialogDlg::OnOk() { #define GC fgetc(fp); CNoWinrarDlg nowrar; CWinrarCrackedDlg finished; CNotCrackableDlg notcrkable; DWORD dwSize; HKEY Regentry; HKEY RegUserName; static char WinRarInstallPath[0x0400], WinRarKeyFile[0x0400], UserName[0x0400]; bool registry_trigger = true; short cb01=0x00,cb02=0x00,cb03=0x00,cb04=0x00,cb05=0x00,cb06=0x00, cb07=0x00,cb08=0x00,cb09=0x00,cb10=0x00; unsigned int x=0x00; FILE* fp; FILE* pKeyFile; RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\WinRAR.exe", 0x00, KEY_QUERY_VALUE, &Regentry ); if (RegQueryValueEx(Regentry, TEXT(""), 0x00, 0x00, (unsigned char *)WinRarInstallPath, &dwSize ) != ERROR_SUCCESS ) { registry_trigger = false; } if(registry_trigger) strncpy(WinRarKeyFile,WinRarInstallPath,strlen(WinRarInstallPath)-10); else { strcpy(WinRarInstallPath, ".\\WinRAR.exe" ); registry_trigger = true; } strcat(WinRarKeyFile,"rarreg.key"); if((fp=fopen(WinRarInstallPath,"r+b"))==0x00) { nowrar.DoModal(); RegCloseKey(Regentry); return; } while(cb10 != -1) { cb01 = GC cb02 = GC cb03 = GC cb04 = GC cb05 = GC cb06 = GC cb07 = GC cb08 = GC cb09 = GC cb10 = GC if ( cb01 == 0x84 && cb02 == 0xC0 && cb03 == 0x0F && cb04 == 0x85 && cb05 == 0xDF && cb06 == 0xFE && cb07 == 0xFF && cb08 == 0xFF && cb09 == 0x33 && cb10 == 0xC0 ){ fseek(fp,ftell(fp)-0x02,0x00); fputs("\xB0\x01",fp); if((pKeyFile=fopen(WinRarKeyFile,"w+b"))==0x00) { registry_trigger = false; } if(registry_trigger) { RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", 0x00, KEY_QUERY_VALUE, &RegUserName ); if ( RegQueryValueEx(RegUserName, TEXT("DefaultUserName"),0x00, 0x00, (unsigned char *)UserName, &dwSize ) != ERROR_SUCCESS ) { strcpy(UserName,"Full version"); } fprintf(pKeyFile,"pure pwnage by the .aware crew\n%s\n" "Single PC usage license.\n",UserName); fclose(pKeyFile); } RegCloseKey(RegUserName); RegCloseKey(Regentry); fclose(fp); finished.DoModal(); return; } fseek(fp,x,0x00); x++; } fclose(fp); notcrkable.DoModal(); return; }