📄 image.h
字号:
#pragma once
struct Module ;
struct Function
{
CString m_strName ;
CString m_strForward ;
CString m_strUnDecorateName ;
BOOL m_bHasName ;
BOOL m_bForward ;
WORD m_wOrdinal ;
DWORD m_dwEntry ;
BOOL m_bExport ;
BOOL m_bHook ;
} ;
struct Module
{
CString m_strPath ;
CString m_strShort ;
CPtrArray m_arFunction ;
BOOL m_bInvalid ;
DWORD m_dwRefCount ;
CMapStringToPtr m_mapName ;
CMapWordToPtr m_mapOrdinal ;
public :
Module ( ) ;
~Module ( ) ;
void AddRef ( ) ;
void Release ( ) ;
void MakeInvalid ( ) ;
void Dispose ( ) ;
} ;
struct Export
{
Module* m_pModule ;
CByteArray m_arHook ;
CWordArray m_arExport ;
DWORD m_dwTableBase ;
CWordArray m_arPatch ;
CPtrArray m_arImport ;
BOOL m_bRepeat ;
BOOL m_bDynamic ;
public :
Export ( ) ;
~Export ( ) ;
void MakeRoom ( ) ;
void Dispose ( ) ;
} ;
struct Type ;
struct Hooked
{
CString m_strImportName ;
CString m_strImportPathName ;
CString m_strExportName ;
CString m_strExportPathName ;
CString m_strFunction ;
BOOL m_bHasName ;
DWORD m_dwOrdinal ;
DWORD m_dwTableBase ;
int m_nIndex ;
int m_nHookedIndex ;
Type* m_pType ;
} ;
// target image file
class CImageFile
{
public :
// attribute
CPtrArray m_arModule ;
Export* m_pRoot ;
public :
CImageFile ( ) ;
~CImageFile ( ) ;
// operation
Export* ParseModule ( LPCTSTR pFile , LPCTSTR pPath ) ; // parsing image file to make a tree
void ParseImage ( LPCTSTR pFile , LPCTSTR pPath ) ;
void ParseImage ( Export* pExport , LPCTSTR pPath , CPtrList &q ) ;
// show to user
void Present ( CTreeCtrl& ctrl ) ;
void Present ( CTreeCtrl& ctrl , Export* pExport , HTREEITEM hParent ) ;
// dymanic module process
void AddModule ( CTreeCtrl& ctrl , LPCTSTR pFile , LPCTSTR pPath ) ;
void RemoveModule ( CTreeCtrl& ctrl ) ;
void GetHooked ( CPtrArray& ar ) ; // get all user-selected items
void GetHooked ( CPtrArray& ar , Export* pExport1 , Export* pExport2 ) ;
void SetImport ( CTreeCtrl& ctrl , BOOL bHook ) ;
void SetTree ( CTreeCtrl& ctrl , BOOL bHook ) ;
void SetTree ( CTreeCtrl& ctrl , HTREEITEM h , BOOL bHook ) ;
void ResetModule ( ) ; // clear all
} ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -