#include <pepatch.h>
Classes | |
struct | _IMAGE_DATA_DIRECTORY |
class | ImportTable |
Public Member Functions | |
ImportTablePatcher (void *pAddr, void *pContext) | |
LPVOID | QueryImportedFunction (const char *pszLibName, const char *pszFuncName) |
LPVOID | PatchImportedFunction (const char *pszLibName, const char *pszFuncName, LPVOID pNewPointer) |
Protected Member Functions | |
char * | LocatePEHeader () |
char * | LocateSectionList () |
char * | LocateObjectDirectory (int *pSectionCount) |
ImportTable | LocateImportsSection (int *pSize=NULL) |
Private Types | |
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY | IMAGE_DATA_DIRECTORY |
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY * | PIMAGE_DATA_DIRECTORY |
Private Attributes | |
char * | m_pAddr |
void * | m_pContext |
This class is used to patch image import table after the image is loaded to memory. It allows analyzing PE headers, finding the import table pointers, and modifying them.
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::IMAGE_DATA_DIRECTORY [private] |
typedef struct BazisLib::Win32::ImportTablePatcher::_IMAGE_DATA_DIRECTORY * BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::PIMAGE_DATA_DIRECTORY [private] |
BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::ImportTablePatcher | ( | void * | pAddr, | |
void * | pContext | |||
) | [inline] |
ImportTable BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateImportsSection | ( | int * | pSize = NULL |
) | [inline, protected] |
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateObjectDirectory | ( | int * | pSectionCount | ) | [inline, protected] |
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocatePEHeader | ( | ) | [inline, protected] |
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::LocateSectionList | ( | ) | [inline, protected] |
LPVOID BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::PatchImportedFunction | ( | const char * | pszLibName, | |
const char * | pszFuncName, | |||
LPVOID | pNewPointer | |||
) | [inline] |
LPVOID BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::QueryImportedFunction | ( | const char * | pszLibName, | |
const char * | pszFuncName | |||
) | [inline] |
char* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::m_pAddr [private] |
void* BazisLib::Win32::ImportTablePatcher< _LocateImportsSectionFunc, rdfunc, wrfunc >::m_pContext [private] |