diff options
Diffstat (limited to 'plugins/pe/format.h')
-rw-r--r-- | plugins/pe/format.h | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/plugins/pe/format.h b/plugins/pe/format.h index f757d26..a48e04d 100644 --- a/plugins/pe/format.h +++ b/plugins/pe/format.h @@ -21,16 +21,19 @@ */ -#ifndef _FORMAT_PE_PE_H -#define _FORMAT_PE_PE_H +#ifndef _PLUGINS_PE_FORMAT_H +#define _PLUGINS_PE_FORMAT_H #include <glib-object.h> #include <stdbool.h> -#include <sys/types.h> -#include "../../core/formats.h" +#include <analysis/content.h> +#include <format/executable.h> + + +#include "pe_def.h" @@ -49,15 +52,30 @@ typedef struct _GPeFormat GPeFormat; typedef struct _GPeFormatClass GPeFormatClass; -/* Indique si le format peut être pris en charge ici. */ -bool pe_is_matching(GBinContent *); +/* Valide un contenu comme étant un format PE. */ +bool check_pe_format(const GBinContent *); /* Indique le type défini pour un format d'exécutable PE. */ GType g_pe_format_get_type(void); /* Prend en charge un nouveau format PE. */ -GBinFormat *g_pe_format_new(const bin_t *, off_t); +GExeFormat *g_pe_format_new(GBinContent *); + +/* Présente l'en-tête MS-DOS du format chargé. */ +const image_dos_header *g_pe_format_get_dos_header(const GPeFormat *); + +/* Présente l'en-tête NT du format chargé. */ +const image_nt_headers *g_pe_format_get_nt_headers(const GPeFormat *); + +/* Indique si le format PE est en 32 bits ou en 64 bits. */ +bool g_pe_format_get_is_32b(const GPeFormat *); + +/* Offre un raccourci vers les répertoires du format PE. */ +const image_data_directory *g_pe_format_get_directories(const GPeFormat *, size_t *); + +/* Extrait le contenu d'un répertoire du format PE. */ +void *g_pe_format_get_directory(const GPeFormat *, size_t); -#endif /* _FORMAT_PE_PE_H */ +#endif /* _PLUGINS_PE_FORMAT_H */ |