ReactOS  0.4.14-dev-57-g333b8f1
pefixup.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for pefixup.c:

Go to the source code of this file.

Classes

struct  _IMAGE_DOS_HEADER
 
struct  _IMAGE_EXPORT_DIRECTORY
 
struct  _IMAGE_FILE_HEADER
 
struct  _IMAGE_DATA_DIRECTORY
 
struct  _IMAGE_OPTIONAL_HEADER
 
struct  _IMAGE_NT_HEADERS
 
struct  _IMAGE_SECTION_HEADER
 
struct  _export_t
 

Macros

#define O_BINARY   0
 
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES   16
 
#define IMAGE_SIZEOF_SHORT_NAME   8
 
#define IMAGE_DOS_SIGNATURE   0x5A4D
 
#define IMAGE_NT_SIGNATURE   0x00004550
 
#define IMAGE_SCN_MEM_DISCARDABLE   0x2000000
 
#define IMAGE_SCN_MEM_NOT_PAGED   0x8000000
 
#define FIELD_OFFSET(t, f)   ((LONG)(LONG_PTR)&(((t*)0)->f))
 
#define IMAGE_FIRST_SECTION(h)   ((PIMAGE_SECTION_HEADER) ((unsigned long)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
 
#define IMAGE_DIRECTORY_ENTRY_EXPORT   0
 

Typedefs

typedef unsigned char BYTE
 
typedef unsigned charPBYTE
 
typedef unsigned short WORD
 
typedef unsigned int DWORD
 
typedef int LONG
 
typedef long LONG_PTR
 
typedef struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER
 
typedef struct _IMAGE_DOS_HEADERPIMAGE_DOS_HEADER
 
typedef struct _IMAGE_EXPORT_DIRECTORY IMAGE_EXPORT_DIRECTORY
 
typedef struct _IMAGE_EXPORT_DIRECTORYPIMAGE_EXPORT_DIRECTORY
 
typedef struct _IMAGE_FILE_HEADER IMAGE_FILE_HEADER
 
typedef struct _IMAGE_FILE_HEADERPIMAGE_FILE_HEADER
 
typedef struct _IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY
 
typedef struct _IMAGE_DATA_DIRECTORYPIMAGE_DATA_DIRECTORY
 
typedef struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER
 
typedef struct _IMAGE_OPTIONAL_HEADERPIMAGE_OPTIONAL_HEADER
 
typedef struct _IMAGE_NT_HEADERS IMAGE_NT_HEADERS
 
typedef struct _IMAGE_NT_HEADERSPIMAGE_NT_HEADERS
 
typedef struct _IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER
 
typedef struct _IMAGE_SECTION_HEADERPIMAGE_SECTION_HEADER
 
typedef struct _export_t export_t
 

Functions

static WORD dtohs (WORD in)
 
static WORD htods (WORD in)
 
static DWORD dtohl (DWORD in)
 
static DWORD htodl (DWORD in)
 
voidrva_to_ptr (DWORD rva)
 
int export_compare_func (const void *a, const void *b)
 
int main (int argc, char **argv)
 

Variables

unsigned charbuffer
 
PIMAGE_DOS_HEADER dos_header
 
PIMAGE_NT_HEADERS nt_header
 

Macro Definition Documentation

◆ FIELD_OFFSET

#define FIELD_OFFSET (   t,
  f 
)    ((LONG)(LONG_PTR)&(((t*)0)->f))

Definition at line 48 of file pefixup.c.

◆ IMAGE_DIRECTORY_ENTRY_EXPORT

#define IMAGE_DIRECTORY_ENTRY_EXPORT   0

Definition at line 50 of file pefixup.c.

◆ IMAGE_DOS_SIGNATURE

#define IMAGE_DOS_SIGNATURE   0x5A4D

Definition at line 44 of file pefixup.c.

◆ IMAGE_FIRST_SECTION

#define IMAGE_FIRST_SECTION (   h)    ((PIMAGE_SECTION_HEADER) ((unsigned long)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))

Definition at line 49 of file pefixup.c.

◆ IMAGE_NT_SIGNATURE

#define IMAGE_NT_SIGNATURE   0x00004550

Definition at line 45 of file pefixup.c.

◆ IMAGE_NUMBEROF_DIRECTORY_ENTRIES

#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES   16

Definition at line 42 of file pefixup.c.

◆ IMAGE_SCN_MEM_DISCARDABLE

#define IMAGE_SCN_MEM_DISCARDABLE   0x2000000

Definition at line 46 of file pefixup.c.

◆ IMAGE_SCN_MEM_NOT_PAGED

#define IMAGE_SCN_MEM_NOT_PAGED   0x8000000

Definition at line 47 of file pefixup.c.

◆ IMAGE_SIZEOF_SHORT_NAME

#define IMAGE_SIZEOF_SHORT_NAME   8

Definition at line 43 of file pefixup.c.

◆ O_BINARY

#define O_BINARY   0

Definition at line 30 of file pefixup.c.

Typedef Documentation

◆ BYTE

typedef unsigned char BYTE

Definition at line 36 of file pefixup.c.

◆ DWORD

typedef unsigned int DWORD

Definition at line 38 of file pefixup.c.

◆ export_t

◆ IMAGE_DATA_DIRECTORY

◆ IMAGE_DOS_HEADER

◆ IMAGE_EXPORT_DIRECTORY

◆ IMAGE_FILE_HEADER

◆ IMAGE_NT_HEADERS

◆ IMAGE_OPTIONAL_HEADER

◆ IMAGE_SECTION_HEADER

◆ LONG

typedef int LONG

Definition at line 39 of file pefixup.c.

◆ LONG_PTR

typedef long LONG_PTR

Definition at line 40 of file pefixup.c.

◆ PBYTE

typedef unsigned char * PBYTE

Definition at line 36 of file pefixup.c.

◆ PIMAGE_DATA_DIRECTORY

◆ PIMAGE_DOS_HEADER

◆ PIMAGE_EXPORT_DIRECTORY

◆ PIMAGE_FILE_HEADER

◆ PIMAGE_NT_HEADERS

◆ PIMAGE_OPTIONAL_HEADER

◆ PIMAGE_SECTION_HEADER

◆ WORD

typedef unsigned short WORD

Definition at line 37 of file pefixup.c.

Function Documentation

◆ dtohl()

static DWORD dtohl ( DWORD  in)
inlinestatic

Definition at line 182 of file pefixup.c.

183 {
184  PBYTE in_ptr = (PBYTE)&in;
185  return in_ptr[0] | (in_ptr[1] << 8) | (in_ptr[2] << 16) | (in_ptr[3] << 24);
186 }
unsigned char * PBYTE
Definition: pefixup.c:36
GLuint in
Definition: glext.h:9616
BYTE * PBYTE
Definition: pedump.c:66

Referenced by main(), and rva_to_ptr().

◆ dtohs()

static WORD dtohs ( WORD  in)
inlinestatic

Definition at line 168 of file pefixup.c.

169 {
170  PBYTE in_ptr = (PBYTE)&in;
171  return in_ptr[0] | (in_ptr[1] << 8);
172 }
unsigned char * PBYTE
Definition: pefixup.c:36
GLuint in
Definition: glext.h:9616
BYTE * PBYTE
Definition: pedump.c:66

Referenced by main().

◆ export_compare_func()

int export_compare_func ( const void a,
const void b 
)

Definition at line 218 of file pefixup.c.

219 {
220  const export_t *ap = a;
221  const export_t *bp = b;
222  char *an = rva_to_ptr(ap->name);
223  char *bn = rva_to_ptr(bp->name);
224  return strcmp(an, bn);
225 }
#define a
Definition: ke_i.h:78
void * rva_to_ptr(DWORD rva)
Definition: pefixup.c:197
#define b
Definition: ke_i.h:79
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
DWORD name
Definition: pefixup.c:160

Referenced by main().

◆ htodl()

static DWORD htodl ( DWORD  in)
inlinestatic

Definition at line 188 of file pefixup.c.

189 {
190  DWORD out;
191  PBYTE out_ptr = (PBYTE)&out;
192  out_ptr[0] = in ; out_ptr[1] = in >> 8;
193  out_ptr[2] = in >> 16; out_ptr[3] = in >> 24;
194  return out;
195 }
unsigned char * PBYTE
Definition: pefixup.c:36
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint in
Definition: glext.h:9616
BYTE * PBYTE
Definition: pedump.c:66

Referenced by main().

◆ htods()

static WORD htods ( WORD  in)
inlinestatic

Definition at line 174 of file pefixup.c.

175 {
176  WORD out;
177  PBYTE out_ptr = (PBYTE)&out;
178  out_ptr[0] = in; out_ptr[1] = in >> 8;
179  return out;
180 }
unsigned char * PBYTE
Definition: pefixup.c:36
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
GLuint in
Definition: glext.h:9616
BYTE * PBYTE
Definition: pedump.c:66

Referenced by main().

◆ main()

int main ( int argc  ,
char **  argv 
)

Definition at line 227 of file pefixup.c.

228 {
229  int fd_in, fd_out;
230  long len;
231  char hdrbuf[4] = { }, elfhdr[4] = { '\177', 'E', 'L', 'F' };
232  PIMAGE_SECTION_HEADER section_header;
233  PIMAGE_DATA_DIRECTORY data_dir;
234  unsigned int i;
235  unsigned long checksum;
236  int fixup_exports = 0;
237  int fixup_sections = 0;
238 
239  /*
240  * Process parameters.
241  */
242 
243  if (argc < 2)
244  {
245  printf("Usage: %s <filename> <options>\n"
246  "Options:\n"
247  " -sections Sets section flags for PE image.\n"
248  " -exports Sort the names in export table.\n",
249  argv[0]);
250  return 1;
251  }
252 
253  for (i = 2; i < argc; i++)
254  {
255  if (!strcmp(argv[i], "-sections"))
256  fixup_sections = 1;
257  else if (!strcmp(argv[i], "-exports"))
258  fixup_exports = 1;
259  else
260  { fprintf(stderr, "Invalid option: %s\n", argv[i]); return 1; }
261  }
262 
263  /*
264  * Nothing to do.
265  */
266  if (fixup_sections == 0 && fixup_exports == 0)
267  return 0;
268 
269  /*
270  * Read the whole file to memory.
271  */
272 
273  fd_in = open(argv[1], O_RDONLY | O_BINARY);
274  if (fd_in == 0)
275  {
276  fprintf(stderr, "Can't open input file.\n");
277  return 1;
278  }
279 
280  /*
281  * PowerPC ReactOS uses elf, so doesn't need pefixup
282  */
283  len = read(fd_in, hdrbuf, sizeof(elfhdr));
284  if (!memcmp(hdrbuf, elfhdr, sizeof(elfhdr)))
285  {
286  close(fd_in);
287  return 0;
288  }
289 
290  len = lseek(fd_in, 0, SEEK_END);
291  if (len < sizeof(IMAGE_DOS_HEADER))
292  {
293  close(fd_in);
294  fprintf(stderr, "'%s' isn't a PE image (too short)\n", argv[1]);
295  return 1;
296  }
297 
298  /* Lower down we overwrite the byte at len, so here, we need at least
299  * one more byte than len. We'll be guaranteed one or two now. */
300  buffer = malloc((len + 2) & ~1);
301  if (buffer == NULL)
302  {
303  close(fd_in);
304  fprintf(stderr, "Not enough memory available.\n");
305  return 1;
306  }
307 
308  /* Read the whole input file into a buffer */
309  lseek(fd_in, 0, SEEK_SET);
310  read(fd_in, buffer, len);
311  /* Here is where the block end overwrite was */
312  if (len & 1)
313  buffer[len] = 0;
314 
315  close(fd_in);
316 
317  /*
318  * Check the headers and save pointers to them.
319  */
320 
323 
326  {
327  fprintf(stderr, "'%s' isn't a PE image (bad headers)\n", argv[1]);
328  free(buffer);
329  return 1;
330  }
331 
332  if (fixup_exports)
333  {
334  /* Sort export directory */
336  if (dtohl(data_dir->Size) != 0)
337  {
338  PIMAGE_EXPORT_DIRECTORY export_directory;
339  DWORD *name_ptr;
340  WORD *ordinal_ptr;
341  export_t *exports;
342 
343  export_directory = (PIMAGE_EXPORT_DIRECTORY)rva_to_ptr(dtohl(data_dir->VirtualAddress));
344  if (export_directory != NULL)
345  {
346  exports = malloc(sizeof(export_t) * dtohl(export_directory->NumberOfNames));
347  if (exports == NULL)
348  {
349  fprintf(stderr, "Not enough memory.\n");
350  free(buffer);
351  return 1;
352  }
353 
354  name_ptr = (DWORD *)rva_to_ptr(dtohl(export_directory->AddressOfNames));
355  ordinal_ptr = (WORD *)rva_to_ptr(dtohl(export_directory->AddressOfNameOrdinals));
356 
357  for (i = 0; i < dtohl(export_directory->NumberOfNames); i++)
358  {
359  exports[i].name = dtohl(name_ptr[i]);
360  exports[i].ordinal = dtohl(ordinal_ptr[i]);
361  }
362 
363  qsort(exports, dtohl(export_directory->NumberOfNames), sizeof(export_t),
365 
366  for (i = 0; i < dtohl(export_directory->NumberOfNames); i++)
367  {
368  name_ptr[i] = htodl(exports[i].name);
369  ordinal_ptr[i] = htodl(exports[i].ordinal);
370  }
371 
372  free(exports);
373  }
374  }
375  }
376 
377  if (fixup_sections)
378  {
379  /* Update section flags */
380  for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header);
382  i++, section_header++)
383  {
384  if (!strcmp((char*)section_header->Name, ".text") ||
385  !strcmp((char*)section_header->Name, ".data") ||
386  !strcmp((char*)section_header->Name, ".idata") ||
387  !strcmp((char*)section_header->Name, ".rdata") ||
388  !strcmp((char*)section_header->Name, ".bss"))
389  {
390  section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED);
391  section_header->Characteristics &= htodl(~IMAGE_SCN_MEM_DISCARDABLE);
392  }
393  else if (!strcmp((char*)section_header->Name, "INIT"))
394  {
395  section_header->Characteristics |= htodl(IMAGE_SCN_MEM_DISCARDABLE);
396  }
397  else if (!strcmp((char*)section_header->Name, "PAGE"))
398  {
399  section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED);
400  }
401  }
402  }
403 
404  /* Recalculate checksum */
406  checksum = 0;
407  for (i = 0; i < len; i += 2)
408  {
409  checksum += *(unsigned short *)(buffer + i);
410  checksum = (checksum + (checksum >> 16)) & 0xffff;
411  }
412  checksum += len;
414 
415  /* Write the output file */
416  fd_out = open(argv[1], O_WRONLY | O_BINARY);
417  write(fd_out, buffer, len);
418  close(fd_out);
419 
420  return 0;
421 }
static int argc
Definition: ServiceArgs.c:12
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntddk_ex.h:178
static DWORD dtohl(DWORD in)
Definition: pefixup.c:182
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define open
Definition: acwin.h:95
#define O_BINARY
Definition: pefixup.c:30
#define free
Definition: debug_ros.c:5
#define IMAGE_FIRST_SECTION(h)
Definition: pefixup.c:49
GLuint buffer
Definition: glext.h:5915
_Check_return_opt_ _CRTIMP long __cdecl lseek(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin)
#define IMAGE_DOS_SIGNATURE
Definition: pefixup.c:44
#define argv
Definition: mplay32.c:18
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
DWORD AddressOfNameOrdinals
Definition: compat.h:155
struct _IMAGE_EXPORT_DIRECTORY * PIMAGE_EXPORT_DIRECTORY
#define write
Definition: acwin.h:97
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PIMAGE_NT_HEADERS nt_header
Definition: pefixup.c:166
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define O_WRONLY
Definition: acwin.h:111
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
smooth NULL
Definition: ftsmooth.c:416
void * rva_to_ptr(DWORD rva)
Definition: pefixup.c:197
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
#define IMAGE_DIRECTORY_ENTRY_EXPORT
Definition: pefixup.c:50
struct _IMAGE_NT_HEADERS * PIMAGE_NT_HEADERS
#define SEEK_SET
Definition: jmemansi.c:26
static WORD dtohs(WORD in)
Definition: pefixup.c:168
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
static DWORD htodl(DWORD in)
Definition: pefixup.c:188
#define IMAGE_NT_SIGNATURE
Definition: pefixup.c:45
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
static WORD htods(WORD in)
Definition: pefixup.c:174
#define IMAGE_SCN_MEM_NOT_PAGED
Definition: pefixup.c:47
GLenum GLsizei len
Definition: glext.h:6722
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
Definition: fdi.c:353
#define close
Definition: acwin.h:98
WORD ordinal
Definition: pefixup.c:161
#define fd_out
Definition: auth_sspi.c:858
BYTE Name[IMAGE_SIZEOF_SHORT_NAME]
Definition: pedump.c:281
PIMAGE_DOS_HEADER dos_header
Definition: pefixup.c:165
Definition: name.c:36
FILE * stderr
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define SEEK_END
Definition: cabinet.c:27
#define malloc
Definition: debug_ros.c:4
DWORD name
Definition: pefixup.c:160
int export_compare_func(const void *a, const void *b)
Definition: pefixup.c:218
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
#define IMAGE_SCN_MEM_DISCARDABLE
Definition: pefixup.c:46
#define printf
Definition: config.h:203
#define O_RDONLY
Definition: acwin.h:108

◆ rva_to_ptr()

void* rva_to_ptr ( DWORD  rva)

Definition at line 197 of file pefixup.c.

198 {
199  PIMAGE_SECTION_HEADER section_header;
200  unsigned int i;
201 
202  for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header);
204  i++, section_header++)
205  {
206  if (rva >= dtohl(section_header->VirtualAddress) &&
207  rva < dtohl(section_header->VirtualAddress) +
208  dtohl(section_header->Misc.VirtualSize))
209  {
210  return buffer + rva - dtohl(section_header->VirtualAddress) +
211  dtohl(section_header->PointerToRawData);
212  }
213  }
214 
215  return NULL;
216 }
static DWORD dtohl(DWORD in)
Definition: pefixup.c:182
#define IMAGE_FIRST_SECTION(h)
Definition: pefixup.c:49
GLuint buffer
Definition: glext.h:5915
DWORD PointerToRawData
Definition: pedump.c:290
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PIMAGE_NT_HEADERS nt_header
Definition: pefixup.c:166
smooth NULL
Definition: ftsmooth.c:416
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
union _IMAGE_SECTION_HEADER::@1528 Misc

Referenced by export_compare_func(), and main().

Variable Documentation

◆ buffer

unsigned char* buffer

Definition at line 164 of file pefixup.c.

◆ dos_header

PIMAGE_DOS_HEADER dos_header

Definition at line 165 of file pefixup.c.

Referenced by main(), and SOFTPUB_HashPEFile().

◆ nt_header