metasm/exe_format/coff_decode.rb in metasm-1.0.3 vs metasm/exe_format/coff_decode.rb in metasm-1.0.4

- old
+ new

@@ -637,10 +637,21 @@ def decode_version(lang=0x409) decode_resources if not resource resource.decode_version(self, lang) end + # decode the exception table, holding the start and end of every function in the binary (x64) + # includes a pointer to the UNWIND_INFO structure for exception handling + def decode_exception_table + if et = @directory['exception_table'] and sect_at_rva(et[0]) + @exception_table = [] + (et[1]/12).times { + @exception_table << ExceptionEntry.decode(self) + } + end + end + # decodes certificate table def decode_certificates if ct = @directory['certificate_table'] @certificates = [] @cursection = self @@ -780,9 +791,10 @@ def decode decode_header decode_exports decode_imports decode_resources + decode_exception_table decode_certificates decode_debug decode_tls decode_loadconfig decode_delayimports