Lines Matching refs:nt

795     IMAGE_NT_HEADERS *nt;  in get_nt_header()  local
805 if ((dos->e_lfanew + sizeof (*nt)) > mapping_size) in get_nt_header()
808 nt = (void*) ((BYTE*)base + dos->e_lfanew); in get_nt_header()
810 if (nt->Signature != IMAGE_NT_SIGNATURE) in get_nt_header()
813 return nt; in get_nt_header()
818 IMAGE_NT_HEADERS *nt; in get_section_header() local
821 nt = get_nt_header( base, mapping_size ); in get_section_header()
822 if (!nt) in get_section_header()
826 …section_ofs = FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + nt->FileHeader.SizeOfOptionalHeader; in get_section_header()
827 …if ((nt->FileHeader.NumberOfSections * sizeof (IMAGE_SECTION_HEADER) + section_ofs) > mapping_size) in get_section_header()
831 *num_sections = nt->FileHeader.NumberOfSections; in get_section_header()
834 return (void*) ((BYTE*)nt + section_ofs); in get_section_header()
839 const IMAGE_NT_HEADERS32 *nt; in check_pe_exe() local
858 nt = (IMAGE_NT_HEADERS32 *)get_nt_header( base, mapping_size ); in check_pe_exe()
859 if (!nt) in check_pe_exe()
862 nt64 = (IMAGE_NT_HEADERS64*)nt; in check_pe_exe()
863 dd = &nt->OptionalHeader.DataDirectory[0]; in check_pe_exe()
864 if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) in check_pe_exe()
1018 const IMAGE_NT_HEADERS *nt; in read_mapped_resources() local
1022 nt = get_nt_header( base, mapping_size ); in read_mapped_resources()
1023 if (!nt) in read_mapped_resources()
1344 IMAGE_NT_HEADERS *nt; in get_resource_section() local
1347 nt = get_nt_header( base, mapping_size ); in get_resource_section()
1348 if (!nt) in get_resource_section()
1389 IMAGE_NT_HEADERS32 *nt; in write_raw_resources() local
1427 nt = (IMAGE_NT_HEADERS32*)get_nt_header( write_map->base, write_map->size ); in write_raw_resources()
1428 if (!nt) in write_raw_resources()
1431 nt64 = (IMAGE_NT_HEADERS64*)nt; in write_raw_resources()
1432 if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) { in write_raw_resources()
1437 PeSectionAlignment = nt->OptionalHeader.SectionAlignment; in write_raw_resources()
1438 PeFileAlignment = nt->OptionalHeader.FileAlignment; in write_raw_resources()
1439 PeSizeOfImage = nt->OptionalHeader.SizeOfImage; in write_raw_resources()
1464 nt->FileHeader.NumberOfSections++; in write_raw_resources()
1512 nt = (IMAGE_NT_HEADERS32*)get_nt_header( write_map->base, mapping_size ); in write_raw_resources()
1513 if (!nt) in write_raw_resources()
1518 nt64 = (IMAGE_NT_HEADERS64*)nt; in write_raw_resources()
1549 nt = (IMAGE_NT_HEADERS32*)get_nt_header( write_map->base, mapping_size ); in write_raw_resources()
1550 if (!nt) in write_raw_resources()
1555 nt64 = (IMAGE_NT_HEADERS64*)nt; in write_raw_resources()
1565 if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) { in write_raw_resources()
1575 nt->OptionalHeader.SizeOfImage += rva_delta; in write_raw_resources()
1576nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = sec->VirtualAddr… in write_raw_resources()
1577nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = res_size.total_size; in write_raw_resources()
1578nt->OptionalHeader.SizeOfInitializedData = get_init_data_size( write_map->base, mapping_size ); in write_raw_resources()
1580 for (i=0; i<nt->OptionalHeader.NumberOfRvaAndSizes; i++) in write_raw_resources()
1581 if (nt->OptionalHeader.DataDirectory[i].VirtualAddress > sec->VirtualAddress) in write_raw_resources()
1582 nt->OptionalHeader.DataDirectory[i].VirtualAddress += rva_delta; in write_raw_resources()