MCPcopy Create free account
hub / github.com/dobin/SuperMega / write_code_section_data

Method write_code_section_data

pe/superpe.py:138–143  ·  view source on GitHub ↗
(self, data: bytes)

Source from the content-addressed store, hash-verified

136
137
138 def write_code_section_data(self, data: bytes):
139 sect = self.get_code_section()
140 if len(data) != sect.SizeOfRawData:
141 logger.error(f'New code section data is larger than the original! {len(data)} != {sect.SizeOfRawData}')
142 return
143 self.pe.set_bytes_at_offset(sect.PointerToRawData, data)
144
145
146 def patch_subsystem(self):

Calls 1

get_code_sectionMethod · 0.95

Tested by

no test coverage detected