28 May
2024
28 May
'24
8:48 p.m.
IMO this can be handled... RtlImageGetNtHeader will do all the DOS+PE validation bits check supported magic values const IMAGE_DATA_DIRECTORY *dir = (nthdr->Magic == 0x10b) ? ((IMAGE_NT_HEADERS32*)nthdr)->DataDirectory : ((IMAGE_NT_HEADERS64*)nthdr) + IMAGE_DIRECTORY_SECURITY; and the rest should be transparent -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5516#note_68193