diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-04-05 22:59:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-04-05 23:11:48 (GMT) |
commit | b0347ca45a08ac63bc6dd6f244b046c6d19a6cdd (patch) | |
tree | 9af1ec9901ddcf696bd3297633faf9fb46712396 /plugins/pe/pe-int.h | |
parent | cf0b5d5f07e8102f2c9a04012bf29cabda9d85e4 (diff) |
Build a partial working support for the PE format.
Diffstat (limited to 'plugins/pe/pe-int.h')
-rw-r--r-- | plugins/pe/pe-int.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/plugins/pe/pe-int.h b/plugins/pe/pe-int.h index 14a6007..ebcf3f0 100644 --- a/plugins/pe/pe-int.h +++ b/plugins/pe/pe-int.h @@ -21,17 +21,15 @@ */ -#ifndef _FORMAT_PE_E_PE_INT_H -#define _FORMAT_PE_E_PE_INT_H - - -#include "pe.h" -#include "pe_def.h" -#include "../executable-int.h" +#ifndef _PLUGINS_PE_PE_INT_H +#define _PLUGINS_PE_PE_INT_H +#include <format/executable-int.h> +#include "pe_def.h" +#include "format.h" @@ -41,9 +39,12 @@ struct _GPeFormat GExeFormat parent; /* A laisser en premier */ image_dos_header dos_header; /* En-tête DOS */ + mrange_t rich_header; /* En-tête enrichi */ image_nt_headers nt_headers; /* En-tête Windows */ - off_t section_offset; /* Début des sections */ + image_section_header *sections; /* Liste des sections */ + + bool loaded; /* Détection partielle menée */ }; @@ -55,30 +56,27 @@ struct _GPeFormatClass }; +/* Procède à la lecture d'un en-tête de programme DOS. */ +bool read_dos_image_header(const GPeFormat *, image_dos_header *); +/* Procède à la lecture d'un en-tête de programme PE (1). */ +bool read_pe_file_header(const GPeFormat *, vmpa2t *, image_file_header *); +/* Procède à la lecture d'un en-tête de programme PE (2). */ +bool read_pe_optional_header(const GPeFormat *, vmpa2t *, image_optional_header *); -/* Procède à la lecture d'une en-tête de programme DOS. */ -bool read_dos_image_header(const GPeFormat *, off_t *, image_dos_header *); - -/* Procède à la lecture d'une en-tête de programme PE (1). */ -bool read_pe_file_header(const GPeFormat *, off_t *, image_file_header *); +/* Procède à la lecture d'un en-tête de programme PE. */ +bool read_pe_nt_header(const GPeFormat *, image_nt_headers *, vmpa2t *); -/* Procède à la lecture d'une en-tête de programme PE (2). */ -bool read_pe_optional_header(const GPeFormat *, off_t *, image_optional_header *); +/* Procède à la lecture d'un en-tête de section PE. */ +bool read_pe_image_section_header(const GPeFormat *, vmpa2t *, image_section_header *); -/* Procède à la lecture d'une en-tête de programme PE. */ -bool read_pe_nt_header(const GPeFormat *, off_t *, image_nt_headers *); - -/* Procède à la lecture d'une en-tête de section PE. */ -bool read_pe_image_section_header(const GPeFormat *, off_t *, image_section_header *); +/* Procède à la lecture d'un répertoire d'exportations. */ +bool read_pe_image_export_directory(const GPeFormat *, vmpa2t *, image_export_directory *); /* Procède à la lecture d'un répertoire de programme PE. */ -bool read_pe_image_import_descriptor(const GPeFormat *, off_t *, image_import_descriptor *); - -/* Procède à la lecture d'une fonction importée par son nom. */ -bool read_pe_image_import_by_name(const GPeFormat *, off_t *, image_import_by_name *); +bool read_pe_image_import_descriptor(const GPeFormat *, vmpa2t *, image_import_descriptor *); -#endif /* _FORMAT_PE_E_PE_INT_H */ +#endif /* _PLUGINS_PE_PE_INT_H */ |