diff --git a/src/process/ntapi_tt_map_image_as_data.c b/src/process/ntapi_tt_map_image_as_data.c index d7171e4..3ab1a7c 100644 --- a/src/process/ntapi_tt_map_image_as_data.c +++ b/src/process/ntapi_tt_map_image_as_data.c @@ -97,7 +97,7 @@ int32_t __stdcall __ntapi_tt_exec_map_image_as_data(nt_executable_image * image) return 0; sec = pe_get_image_section_tbl_addr(base); - pi16 = (uint16_t *)coff->num_of_sections; + pi16 = (uint16_t *)coff->cfh_num_of_sections; if (((size_t)sec-(size_t)base + *pi16 * sizeof(*sec)) > view_size) return __tt_exec_unmap_image( image,base,NT_STATUS_INVALID_IMAGE_FORMAT); @@ -106,10 +106,10 @@ int32_t __stdcall __ntapi_tt_exec_map_image_as_data(nt_executable_image * image) pi16 = (uint16_t *)opt; image->magic = *pi16; - pi16 = (uint16_t *)opt->opt_hdr_32.subsystem; + pi16 = (uint16_t *)opt->opt_hdr_32.coh_subsystem; image->subsystem = *pi16; - pi16 = (uint16_t *)coff->characteristics; + pi16 = (uint16_t *)coff->cfh_characteristics; image->characteristics = *pi16; image->hsection = hsection;