diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-04-06 22:55:54 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-04-06 22:55:54 (GMT) |
commit | c12d6a5d11bf9a2436ff78e393173ca59b6c9c46 (patch) | |
tree | b579b642e301f5d6e6d88fb0213a54db6bf6fd38 /plugins/pe/symbols.c | |
parent | c4d2e0fa48eab453d5c43a3c0938427617449a6a (diff) |
Provide several kinds of hashes for binary files.
Diffstat (limited to 'plugins/pe/symbols.c')
-rw-r--r-- | plugins/pe/symbols.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/pe/symbols.c b/plugins/pe/symbols.c index 9217466..94f97a8 100644 --- a/plugins/pe/symbols.c +++ b/plugins/pe/symbols.c @@ -196,6 +196,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat GBinFormat *base; /* Version basique du format */ GExeFormat *exe; /* Autre vision du format */ const GBinContent *content; /* Contenu binaire à lire */ + size_t counter; /* Compteur d'importations */ image_import_descriptor *iter; /* Boucle de parcours */ vmpa2t dll; /* Nom de la DLL concernée */ bool ret; /* Bilan d'un traitement */ @@ -223,6 +224,8 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat content = G_KNOWN_FORMAT(format)->content; + counter = 0; + for (iter = imports; iter->original_first_thunk != 0; iter++) { /* Bibliothèque impactée */ @@ -262,7 +265,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat if (val64 & 0x8000000000000000) { - routine = g_pe_imported_routine_new(NULL); + routine = g_pe_imported_routine_new(NULL, counter++); g_pe_exported_routine_set_ordinal(G_PE_EXPORTED_ROUTINE(routine), val64 & 0xffff); @@ -280,7 +283,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat hint += 2; //routine = g_binary_format_decode_routine(base, hint); - routine = g_pe_imported_routine_new((char *)hint); + routine = g_pe_imported_routine_new((char *)hint, counter++); } |