Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version
Go to top

An Analysis of the Windows PE Checksum Algorithm

, 7 Mar 2008
An Analysis Demonstrating the PE Checksum is an Additive Checksum based on RFC 1071
crc32.zip
CRC32.exe
crc32source.zip
CRC32
CRC32
CRC32.suo
notepadaltered.zip
NOTEPAD.EXE
notepadoriginal.zip
NOTEPAD.EXE
pechecksum.zip
PEChecksum.exe
pechecksumsource.zip
PE Checksum
PEChecksum
res
Sample.ico
PEChecksum.suo
Sample.suo
// PEChecksum.h : header file
//

#pragma once


// CPEChecksum dialog
class CPEChecksum: public CDialog
{
    // Construction
public:
    CPEChecksum(CWnd* pParent = NULL); // standard constructor

    // Dialog Data
    enum{ IDD = IDD_PECHECKSUM_DIALOG };

protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support


    // Implementation
protected:
    HICON m_hIcon;

    // Generated message map functions
    virtual BOOL OnInitDialog();
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnBnClickedRetrieve();
    afx_msg void OnBnClickedBrowse();

protected:
    BOOL SelectFile( CString& );
    BOOL RetrieveFilename( CString& );
    BOOL RetrieveAndGenerateChecksum( const CString&, DWORD32&, DWORD32&, DWORD32& );
    BOOL RetrieveNewValue( DWORD32& );
    BOOL GenerateChecksum( const CString&, DWORD32&, DWORD32& );
    BOOL WriteChecksum( const CString&, DWORD32& );

public:
    afx_msg void OnBnClickedBtnWriteNewValue();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jeffrey Walton
Systems / Hardware Administrator
United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 8 Mar 2008
Article Copyright 2007 by Jeffrey Walton
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid