Click here to Skip to main content
12,699,123 members (24,094 online)
Click here to Skip to main content

Stats

104.2K views
6.3K downloads
94 bookmarked
Posted

An Analysis of the Windows PE Checksum Algorithm

, 7 Mar 2008 CPOL
An Analysis Demonstrating the PE Checksum is an Additive Checksum based on RFC 1071
// 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

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170118.1 | Last Updated 8 Mar 2008
Article Copyright 2007 by Jeffrey Walton
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid