public CodeSection Handle(PeHeader PeHeader, PeSectionHeader Header, BinaryReader r) { var tls = new TlsSection { SectionHeader=Header, Is64=!PeHeader.Is32BitHeader }; if (tls.Is64) tls.TlsDirectory64 = Misc.FromBinaryReader<IMAGE_TLS_DIRECTORY64>(r); else tls.TlsDirectory = Misc.FromBinaryReader<IMAGE_TLS_DIRECTORY32>(r); return tls; }
public CodeSection Handle(PeHeader PeHeader, PeSectionHeader Header, BinaryReader r) { var tls = new TlsSection { SectionHeader = Header, Is64 = !PeHeader.Is32BitHeader }; if (tls.Is64) { tls.TlsDirectory64 = Misc.FromBinaryReader <IMAGE_TLS_DIRECTORY64>(r); } else { tls.TlsDirectory = Misc.FromBinaryReader <IMAGE_TLS_DIRECTORY32>(r); } return(tls); }