54#define bcopy(s,d,z) memcpy((d),(s),(z))
65typedef unsigned short WORD;
73#define BOOLEAN boolean
82#define LOWORD(l) ((WORD)(l))
83#define WINAPI __stdcall
89#define IMAGE_DOS_SIGNATURE 0x5A4D
90#define IMAGE_OS2_SIGNATURE 0x454E
91#define IMAGE_OS2_SIGNATURE_LE 0x454C
92#define IMAGE_VXD_SIGNATURE 0x454C
93#define IMAGE_NT_SIGNATURE 0x00004550
157#define IMAGE_SIZEOF_FILE_HEADER 20
159#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
160#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
161#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
162#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
163#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
164#define IMAGE_FILE_32BIT_MACHINE 0x0100
165#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
166#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
167#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800
168#define IMAGE_FILE_SYSTEM 0x1000
169#define IMAGE_FILE_DLL 0x2000
170#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
171#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
173#define IMAGE_FILE_MACHINE_UNKNOWN 0
174#define IMAGE_FILE_MACHINE_I386 0x14c
175#define IMAGE_FILE_MACHINE_R3000 0x162
176#define IMAGE_FILE_MACHINE_R4000 0x166
177#define IMAGE_FILE_MACHINE_R10000 0x168
178#define IMAGE_FILE_MACHINE_ALPHA 0x184
179#define IMAGE_FILE_MACHINE_POWERPC 0x1F0
195#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
259#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
260#define IMAGE_DIRECTORY_ENTRY_IMPORT 1
261#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
262#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
263#define IMAGE_DIRECTORY_ENTRY_SECURITY 4
264#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
265#define IMAGE_DIRECTORY_ENTRY_DEBUG 6
266#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
267#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
268#define IMAGE_DIRECTORY_ENTRY_TLS 9
269#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
270#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
271#define IMAGE_DIRECTORY_ENTRY_IAT 12
277#define IMAGE_SIZEOF_SHORT_NAME 8
300#define IMAGE_SIZEOF_SECTION_HEADER 40
336#define IMAGE_ORDINAL_FLAG 0x80000000
337#define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
361#define RT_NEWRESOURCE 0x2000
362#define RT_ERROR 0x7fff
371#define RT_ACCELERATORS 9
373#define RT_MESSAGETABLE 11
374#define RT_GROUP_CURSOR 12
375#define RT_GROUP_ICON 14
377#define NEWBITMAP (RT_BITMAP|RT_NEWRESOURCE)
378#define NEWMENU (RT_MENU|RT_NEWRESOURCE)
379#define NEWDIALOG (RT_DIALOG|RT_NEWRESOURCE)
395#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
396#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
502#define INACTIVE 0x0002
504#define OWNERDRAW 0x0100
505#define CHECKED 0x0008
507#define MENUBARBREAK 0x0020
508#define MENUBREAK 0x0040
509#define ENDMENU 0x0080
585#define SCROLLBAR 0x84
615#define WS_OVERLAPPED 0x00000000L
616#define WS_POPUP 0x80000000L
617#define WS_CHILD 0x40000000L
618#define WS_CLIPSIBLINGS 0x04000000L
619#define WS_CLIPCHILDREN 0x02000000L
620#define WS_VISIBLE 0x10000000L
621#define WS_DISABLED 0x08000000L
622#define WS_MINIMIZE 0x20000000L
623#define WS_MAXIMIZE 0x01000000L
624#define WS_CAPTION 0x00C00000L
625#define WS_BORDER 0x00800000L
626#define WS_DLGFRAME 0x00400000L
627#define WS_VSCROLL 0x00200000L
628#define WS_HSCROLL 0x00100000L
629#define WS_SYSMENU 0x00080000L
630#define WS_THICKFRAME 0x00040000L
631#define WS_MINIMIZEBOX 0x00020000L
632#define WS_MAXIMIZEBOX 0x00010000L
633#define WS_GROUP 0x00020000L
634#define WS_TABSTOP 0x00010000L
637#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
638#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
639#define WS_CHILDWINDOW (WS_CHILD)
640#define WS_TILED WS_OVERLAPPED
641#define WS_ICONIC WS_MINIMIZE
642#define WS_SIZEBOX WS_THICKFRAME
643#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
645#define WS_EX_DLGMODALFRAME 0x00000001L
646#define WS_EX_NOPARENTNOTIFY 0x00000004L
647#define WS_EX_TOPMOST 0x00000008L
648#define WS_EX_ACCEPTFILES 0x00000010L
649#define WS_EX_TRANSPARENT 0x00000020L
651#define BS_PUSHBUTTON 0x00000000L
652#define BS_DEFPUSHBUTTON 0x00000001L
653#define BS_CHECKBOX 0x00000002L
654#define BS_AUTOCHECKBOX 0x00000003L
655#define BS_RADIOBUTTON 0x00000004L
656#define BS_3STATE 0x00000005L
657#define BS_AUTO3STATE 0x00000006L
658#define BS_GROUPBOX 0x00000007L
659#define BS_USERBUTTON 0x00000008L
660#define BS_AUTORADIOBUTTON 0x00000009L
661#define BS_OWNERDRAW 0x0000000BL
662#define BS_LEFTTEXT 0x00000020L
664#define ES_LEFT 0x00000000L
665#define ES_CENTER 0x00000001L
666#define ES_RIGHT 0x00000002L
667#define ES_MULTILINE 0x00000004L
668#define ES_UPPERCASE 0x00000008L
669#define ES_LOWERCASE 0x00000010L
670#define ES_PASSWORD 0x00000020L
671#define ES_AUTOVSCROLL 0x00000040L
672#define ES_AUTOHSCROLL 0x00000080L
673#define ES_NOHIDESEL 0x00000100L
674#define ES_OEMCONVERT 0x00000400L
675#define ES_READONLY 0x00000800L
676#define ES_WANTRETURN 0x00001000L
678#define LBS_NOTIFY 0x0001L
679#define LBS_SORT 0x0002L
680#define LBS_NOREDRAW 0x0004L
681#define LBS_MULTIPLESEL 0x0008L
682#define LBS_OWNERDRAWFIXED 0x0010L
683#define LBS_OWNERDRAWVARIABLE 0x0020L
684#define LBS_HASSTRINGS 0x0040L
685#define LBS_USETABSTOPS 0x0080L
686#define LBS_NOINTEGRALHEIGHT 0x0100L
687#define LBS_MULTICOLUMN 0x0200L
688#define LBS_WANTKEYBOARDINPUT 0x0400L
689#define LBS_EXTENDEDSEL 0x0800L
690#define LBS_DISABLENOSCROLL 0x1000L
692#define SS_LEFT 0x00000000L
693#define SS_CENTER 0x00000001L
694#define SS_RIGHT 0x00000002L
695#define SS_ICON 0x00000003L
696#define SS_BLACKRECT 0x00000004L
697#define SS_GRAYRECT 0x00000005L
698#define SS_WHITERECT 0x00000006L
699#define SS_BLACKFRAME 0x00000007L
700#define SS_GRAYFRAME 0x00000008L
701#define SS_WHITEFRAME 0x00000009L
702#define SS_SIMPLE 0x0000000BL
703#define SS_LEFTNOWORDWRAP 0x0000000CL
704#define SS_BITMAP 0x0000000EL
723#define IMAGE_DEBUG_TYPE_UNKNOWN 0
724#define IMAGE_DEBUG_TYPE_COFF 1
725#define IMAGE_DEBUG_TYPE_CODEVIEW 2
726#define IMAGE_DEBUG_TYPE_FPO 3
727#define IMAGE_DEBUG_TYPE_MISC 4
728#define IMAGE_DEBUG_TYPE_EXCEPTION 5
729#define IMAGE_DEBUG_TYPE_FIXUP 6
730#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
731#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
788#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
790#define IMAGE_SEPARATE_DEBUG_FLAGS_MASK 0x8000
791#define IMAGE_SEPARATE_DEBUG_MISMATCH 0x8000
800#define SIZE_OF_NT_SIGNATURE sizeof (DWORD)
801#define MAXRESOURCENAME 13
805#define NTSIGNATURE(a) ((LPVOID)((BYTE *)a + \
806 ((PIMAGE_DOS_HEADER)a)->e_lfanew))
810#define PEFHDROFFSET(a) ((LPVOID)((BYTE *)a + \
811 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
812 SIZE_OF_NT_SIGNATURE))
815#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \
816 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
817 SIZE_OF_NT_SIGNATURE + \
818 sizeof (IMAGE_FILE_HEADER)))
821#define SECHDROFFSET(a) ((LPVOID)((BYTE *)a + \
822 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
823 SIZE_OF_NT_SIGNATURE + \
824 sizeof (IMAGE_FILE_HEADER) + \
825 sizeof (IMAGE_OPTIONAL_HEADER)))
1066 if (dwRVA & 0x80000000)
1069 printf (
"\n$$ what is going on $$");
1074 while (
i++ < nSections)
1099 DWORD dwIMAGE_DIRECTORY)
1117 while (
i++ < nSections)
1151 for (
i = 0;
i < nSections;
i++)
1155 ps = *pszSections = (
char *)
calloc (nCnt, 1);
1158 for (
i = 0;
i < nSections;
i++)
1185 for (
i = 0;
i < nSections;
i++)
1225 int nCnt = 0,
nSize = 0,
i;
1226 char *pModule[1024];
1235 while (
pid->dwRVAModuleName)
1250 for (
i = 0;
i < nCnt;
i++)
1268 char **pszFunctions)
1282 int nCnt = 0,
nSize = 0;
1285 DWORD dwFunctionName;
1286 DWORD dwFunctionAddress;
1296 while (
pid->dwRVAModuleName &&
1301 if (!
pid->dwRVAModuleName)
1306 mnlength =
strlen (pszModule);
1307 for (
i = 0;
i < mnlength;
i++)
1314 dwFunctionName =
pid->dwRVAFunctionNameList;
1318 while (dwFunctionName &&
1321 if ((*pdw) & 0x80000000)
1322 nSize += mnlength + 10 + 1 + 6;
1325 dwFunctionName += 4;
1331 psz = *pszFunctions;
1342 dwFunctionName =
pid->dwRVAFunctionNameList;
1343 dwFunctionAddress =
pid->dwRVAFunctionAddressList;
1344 while (dwFunctionName &&
1347 if ((*pdw) & 0x80000000)
1351 *(
short *) psz = *(
short *) pdw;
1366 dwFunctionName += 4;
1367 dwFunctionAddress += 4;
1388 return (*psz -
'0') * 10 + *(psz + 1) -
'0';
1418 printf (
"\n **error PreviousParamString1 char = %c", *
pin);
1426 else if (*
pin ==
'<')
1428 else if (*
pin ==
')')
1449 printf (
"\n **error PreviousParamString2");
1476 char *
pin, *pout, *ps;
1507 strcpy (pout,
"long double");
1534 if (*(
pin + 1) ==
'p')
1557 if (*(
pin + 1) ==
'p')
1575 n = *(
pin + 1) -
'0';
1581 for (
i = 1;
i <
n;
i++)
1609 strcpy (pout,
"static ");
1687 char *
pin, *pout, *ps;
1709 else if (*
pin ==
'o')
1716 else if (*
pin ==
'q')
1723 else if (*
pin ==
't')
1744 strcpy (pout,
"operator ()");
1750 strcpy (pout,
"operator []");
1756 strcpy (pout,
"operator new[]");
1762 strcpy (pout,
"operator delete[]");
1768 strcpy (pout,
"operator new");
1774 strcpy (pout,
"operator delete");
1780 strcpy (pout,
"operator <<");
1786 strcpy (pout,
"operator >>");
1792 strcpy (pout,
"operator ++");
1798 strcpy (pout,
"operator --");
1804 strcpy (pout,
"operator +");
1810 strcpy (pout,
"operator +=");
1816 strcpy (pout,
"operator /");
1822 strcpy (pout,
"operator /=");
1828 strcpy (pout,
"operator *");
1834 strcpy (pout,
"operator *=");
1840 strcpy (pout,
"operator =");
1846 strcpy (pout,
"operator ==");
1852 strcpy (pout,
"operator !=");
1858 strcpy (pout,
"operator |");
1864 strcpy (pout,
"operator |=");
1870 strcpy (pout,
"operator ~");
1876 strcpy (pout,
"operator !");
1882 strcpy (pout,
"operator &");
1888 strcpy (pout,
"operator &=");
1894 strcpy (pout,
"operator ^");
1900 strcpy (pout,
"operator ^=");
1962 static char buff[512];
2014 for (
i = 0;
i < iend;
i++)
2015 if (
pin == endTab[
i])
2020 endTab[
i] = endTab[iend - 1];
2024 tok = sStack[is - 1];
2027 if (tok.
flag !=
'#')
2030 printf (
"\n**some serious error1** %c is = %d char = %c",
2109 else if (stringMode)
2142 endTab[iend++] =
pin +
n;
2155 tok = sStack[is - 1];
2157 if (tok.
flag ==
'%')
2166 if (*(ps - 1) ==
't')
2174 printf (
"\n**some string error3** stack = %c", *(ps - 1));
2178 else if (tok.
flag ==
'A' || tok.
flag ==
'#')
2192 printf (
"\n**some string error5**");
2203 tok = sStack[is - 1];
2253 printf (
"\n** I GIVEUP ***");
2263 else if (*ps ==
'&')
2265 else if (*ps ==
'p')
2270 else if (*ps ==
'r')
2277 printf (
"\n*** SOMETHING IS WRONG1*** char= %c", *
pin);
2288 else if (*ps ==
'&')
2290 else if (*ps ==
'p')
2295 else if (*ps ==
'r')
2302 printf (
"\n*** SOMETHING IS WRONG2***");
2367 char **pszFunctions)
2386 int i, nCnt = 0, ntmp = 0;
2387 int enid = 0, ordBase = 1;
2419 ordBase = ped->
Base;
2423 pdwNames = (
DWORD *)
2446 *pszFunctions = (
char *)
calloc (nCnt, 1);
2453 pfns[(
int) (*pwOrd) + ordBase] =
2459 psz = *pszFunctions;
2464 if (*pdwAddress > 0)
2466 *(
DWORD *) psz = imageBase + *pdwAddress;
2555 *pszResTypes = (
char *)
calloc (nCnt, 1);
2556 if ((pMem = *pszResTypes) ==
NULL)
2565 prdeName = prde->
Name;
2577 strcpy (pMem,
"RT_CURSOR");
2580 else if (prdeName == 2)
2582 strcpy (pMem,
"RT_BITMAP");
2585 else if (prdeName == 3)
2587 strcpy (pMem,
"RT_ICON ");
2590 else if (prdeName == 4)
2592 strcpy (pMem,
"RT_MENU ");
2595 else if (prdeName == 5)
2597 strcpy (pMem,
"RT_DIALOG");
2600 else if (prdeName == 6)
2602 strcpy (pMem,
"RT_STRING");
2605 else if (prdeName == 7)
2607 strcpy (pMem,
"RT_FONTDIR");
2610 else if (prdeName == 8)
2612 strcpy (pMem,
"RT_FONT ");
2615 else if (prdeName == 9)
2617 strcpy (pMem,
"RT_ACCELERATORS");
2620 else if (prdeName == 10)
2622 strcpy (pMem,
"RT_RCDATA");
2625 else if (prdeName == 11)
2627 strcpy (pMem,
"RT_MESSAGETABLE");
2630 else if (prdeName == 12)
2632 strcpy (pMem,
"RT_GROUP_CURSOR");
2635 else if (prdeName == 14)
2637 strcpy (pMem,
"RT_GROUP_ICON ");
2640 else if (prdeName == 16)
2642 strcpy (pMem,
"RT_VERSION");
2645 else if (prdeName == 17)
2647 strcpy (pMem,
"RT_DLGINCLUDE ");
2650 else if (prdeName == 19)
2652 strcpy (pMem,
"RT_PLUGPLAY ");
2655 else if (prdeName == 20)
2657 strcpy (pMem,
"RT_VXD ");
2660 else if (prdeName == 21)
2662 strcpy (pMem,
"RT_ANICURSOR ");
2665 else if (prdeName == 22)
2667 strcpy (pMem,
"RT_ANIICON");
2670 else if (prdeName == 0x2002)
2672 strcpy (pMem,
"RT_NEWBITMAP");
2675 else if (prdeName == 0x2004)
2677 strcpy (pMem,
"RT_NEWMENU");
2680 else if (prdeName == 0x2005)
2682 strcpy (pMem,
"RT_NEWDIALOG");
2685 else if (prdeName == 0x7fff)
2687 strcpy (pMem,
"RT_ERROR ");
2726 *psz = (
char *)
ptr;
2756 if ((
flag & 0x0010) == 0)
2778 if ((
flag & 0x0010) == 0)
2823 if ((
flag & 0x0010) == 0)
2852 if ((
flag & 0x0010) == 0)
2939 int sLength, nMenus;
2968 if (prdName ==
NULL)
2985 ((
DWORD) prdType + (prde->
Name ^ 0x80000000));
2986 sLength += pMenuName->
Length + 1;
2990 if (prdLanguage ==
NULL)
3020 sLength += 16 +
size;
3043 if (prdLanguage ==
NULL)
3063 sLength += 16 +
size;
3083 *pszResTypes = (
char *)
calloc (sLength, 1);
3085 pMem = *pszResTypes;
3095 ((
DWORD) prdType + (prde->
Name ^ 0x80000000));
3106 if (prdLanguage ==
NULL)
3124 strcpy (pMem,
":::::::::::");
3126 *(
int *) pMem =
size;
3153 if (prdLanguage ==
NULL)
3171 strcpy (pMem,
":::::::::::");
3173 *(
int *) pMem =
size;
3218 printf (
"\n#### I don't know why!!!");
3289 for (
k = 0;
k <
l;
k++)
3290 if (
buff[
k] == 0x09)
3292 for (
j = 0;
j <
l -
k;
j++)
3294 for (
j =
k;
j < 32 +
k -
l;
j++)
3299 for (
k = 0;
k <
l;
k++)
3300 if (
buff[
k] == 0x08)
3302 for (
j = 0;
j <
l -
k;
j++)
3304 for (
j =
k;
j < 32 +
k -
l;
j++)
3309 for (
j =
l;
j < 32;
j++)
3311 printf (
"[ID=%04Xh]",
id);
3338 for (
i = 0;
i < (
size / 16) + 1;
i++)
3341 for (
j = 0;
j < 16;
j++)
3369 for (
k = 0;
k <
l;
k++)
3406 int sLength, nDialogs;
3434 if (prdName ==
NULL)
3447 ((
DWORD) prdType + (prde->
Name ^ 0x80000000));
3448 sLength += pDialogName->
Length + 1;
3452 if (prdLanguage ==
NULL)
3464 sLength += 4 +
size;
3473 if (prdLanguage ==
NULL)
3485 sLength += 4 +
size;
3491 *pszResTypes = (
char *)
calloc (sLength, 1);
3493 pMem = *pszResTypes;
3503 ((
DWORD) prdType + (prde->
Name ^ 0x80000000));
3506 for (
j = 0;
j < pDialogName->
Length;
j++)
3514 if (prdLanguage ==
NULL)
3532 *(
int *) pMem =
size;
3547 if (prdLanguage ==
NULL)
3549 printf (
"\nprdLanguage = NULL");
3560 printf (
"\nprData = NULL");
3570 *(
int *) pMem =
size;
3644 if ((
flag & 0xFFFF0000) == 0xFFFF0000)
3647 num = *(
short *) (
ptr + 16);
3653 num = *(
short *) (
ptr + 8);
3656 printf (
", # of Controls=%03d, Caption:%c",
num,
'"');
3690 if (
flag & 0x00000040)
3709 if ((
ptr - *psz) % 4)
3710 ptr += 4 - ((
ptr - *psz) % 4);
3713 for (
i = 0;
i <
num;
i++)
3720 printf (
"\n Control::%03d - ID:",
i + 1);
3773 if ((
ptr - *psz) % 4)
3774 ptr += 4 - ((
ptr - *psz) % 4);
3851 *pszModule = (
char *)
calloc ((nCnt = (
strlen ((
char *)pdm->
Data))) + 1, 1);
3915#define MAXSECTIONNUMBER 16
3916#define MAXNAMESTRNUMBER 40
3942 int nImportedModules;
3946 int nExportedFunctions;
3977 "%s: can not open input file \"%s\".\n",
3987 "%s - PE/COFF file dumper\n"
3988 "Copyright (c) 1993 Randy Kath (MSDN Technology Group)\n"
3989 "Copyright (c) 1997 Sang Cho (CS & Engineering - Chongju University)\n"
3990 "Copyright (c) 2000 Emanuele Aliberti (ReactOS Development Team)\n\n",
3994 "usage: %s input_file_name\n",
4013 "%s: can not allocate memory.\n",
4022 printf (
"\n\nDump of file: %s\n\n",
argv[1]);
4030 "%s: failed to read the file \"%s\".\n",
4047 "%s: This file is not in PE format; it looks like in DOS format.\n",
4057 "%s: This doesn't look like an executable file (magic = 0x%04x).\n",
4070 "%s: This file is not in PE format (magic = 0x%08lx).\n",
4121 "Code Offset = %08lX, Code Size = %08lX \n",
4122 shdr[
i].PointerToRawData,
4123 shdr[
i].SizeOfRawData
4126 if (((shdr[
i].Characteristics) & 0xC0000040) == 0xC0000040)
4129 "Data Offset = %08lX, Data Size = %08lX \n",
4130 shdr[
i].PointerToRawData,
4131 shdr[
i].SizeOfRawData
4140 "Number of Objects = %04d (dec), Imagebase = %08Xh \n",
4157 if (shdr[
i].
Name[
j] == 0)
4162 shdr[
i].
Name[7] = 0;
4164 for (
i = 0;
i < nSections;
i++)
4165 printf (
"\n Object%02d: %8s RVA: %08lX Offset: %08lX Size: %08lX Flags: %08lX ",
4167 shdr[
i].SizeOfRawData, shdr[
i].Characteristics);
4174 printf (
"\n+++++++++++++++++++ RESOURCE INFORMATION +++++++++++++++++++");
4176 if (nResources == 0)
4177 printf (
"\n There are no Resources in This Application.\n");
4180 printf (
"\nNumber of Resource Types = %4d (decimal)\n", nResources);
4181 for (
i = 0;
i < nResources;
i++)
4183 printf (
"\n Resource Type %03d: %s",
i + 1, pst);
4184 pst +=
strlen ((
char *) (pst)) + 1;
4186 free ((
void *) pnstr);
4189 printf (
"\n+++++++++++++++++++ MENU INFORMATION +++++++++++++++++++");
4196 printf (
"\n There are no Menus in This Application.\n");
4201 printf (
"\nNumber of Menus = %4d (decimal)", nMenus);
4204 for (
i = 0;
i < nMenus;
i++)
4209 printf (
"\n-------------");
4210 if (
strncmp (pst,
":::::::::::", 11) == 0)
4221 free ((
void *) pmNameBuff);
4226 printf (
"\n+++++++++++++++++ DIALOG INFORMATION +++++++++++++++++++");
4233 printf (
"\n There are no Dialogs in This Application.\n");
4238 printf (
"\nNumber of Dialogs = %4d (decimal)", nDialogs);
4242 for (
i = 0;
i < nDialogs;
i++)
4245 printf (
"\nName: %s", pst);
4249 free ((
void *) pdNameBuff);
4254 printf (
"\n+++++++++++++++++++ IMPORTED FUNCTIONS +++++++++++++++++++");
4257 if (nImportedModules == 0)
4259 printf (
"\n There are no imported Functions in This Application.\n");
4264 printf (
"\nNumber of Imported Modules = %4d (decimal)\n", nImportedModules);
4265 for (
i = 0;
i < nImportedModules;
i++)
4267 printf (
"\n Import Module %03d: %s",
i + 1, pnstr);
4268 pnstr +=
strlen ((
char *) (pnstr)) + 1;
4272 printf (
"\n+++++++++++++++++++ IMPORT MODULE DETAILS +++++++++++++++++");
4274 for (
i = 0;
i < nImportedModules;
i++)
4276 printf (
"\n\n Import Module %03d: %s \n",
i + 1, pnstr);
4278 pnstr +=
strlen ((
char *) (pnstr)) + 1;
4280 for (
j = 0;
j < nFunctions;
j++)
4282 printf (
"\nAddr:%08X hint(%04X) Name: %s",
4283 (*(
int *) pst), (*(
short *) (pst + 4)),
4286 pst +=
strlen ((
char *) (pst + 6)) + 1 + 6;
4288 free ((
void *) pfNameBuff);
4290 free ((
void *) piNameBuff);
4294 printf (
"\n+++++++++++++++++++ EXPORTED FUNCTIONS +++++++++++++++++++");
4297 printf (
"\nNumber of Exported Functions = %4d (decimal)\n", nExportedFunctions);
4299 if (nExportedFunctions > 0)
4303 for (
i = 0;
i < nExportedFunctions;
i++)
4305 printf (
"\nAddr:%08X Ord:%4d (%04Xh) Name: %s",
4306 (*(
int *) pst), (*(
WORD *) (pst + 4)), (*(
WORD *) (pst + 4)),
4309 pst +=
strlen ((
char *) (pst + 6)) + 6 + 1;
4311 free ((
void *) peNameBuff);
4314 free ((
void *) lpFile);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
void pwd(int argc, const char *argv[])
static const WCHAR indent[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
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 flag
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
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 GLint GLint j
FxContextHeader * pHeader
_CRTIMP void __cdecl rewind(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE *_File)
#define sprintf(buf, format,...)
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES
int WINAPI GetContentsOfDialog(LPVOID lpFile, char **pszResTypes)
struct _IMAGE_RESOURCE_DIRECTORY_STRING * PIMAGE_RESOURCE_DIRECTORY_STRING
int WINAPI GetContentsOfMenu(LPVOID, char **)
struct _IMAGE_MENU_HEADER IMAGE_MENU_HEADER
struct _IMAGE_DEBUG_MISC IMAGE_DEBUG_MISC
LPVOID WINAPI GetModuleEntryPoint(LPVOID)
#define IMAGE_DIRECTORY_ENTRY_EXPORT
struct _IMAGE_NT_HEADERS IMAGE_NT_HEADERS
void WINAPI PrintDialog(char **psz)
int WINAPI GetListOfResourceTypes(LPVOID, char **)
struct _IMAGE_DIALOG_BOX_HEADER1 IMAGE_DIALOG_HEADER
struct _IMAGE_RESOURCE_DIRECTORY * PIMAGE_RESOURCE_DIRECTORY
void WINAPI GetPreviousParamString(char *, char *)
#define IMAGE_DIRECTORY_ENTRY_IMPORT
LPVOID WINAPI ImageDirectorySection(LPVOID, DWORD)
int WINAPI MenuFill(char **, WORD **)
BOOL WINAPI IsDebugFile(LPVOID)
int WINAPI GetStringLength(char *)
int WINAPI dumpMenu(char **psz, int size)
BOOL WINAPI StringExpands(char **, char **, char **, Str_P *)
int WINAPI PrintMenu(int, char **)
struct _IMAGE_RESOURCE_DIR_STRING_U IMAGE_RESOURCE_DIR_STRING_U
BOOL WINAPI IsDebugInfoStripped(LPVOID)
struct _IMAGE_SEPARATE_DEBUG_HEADER * PIMAGE_SEPARATE_DEBUG_HEADER
LPVOID WINAPI GetActualAddress(LPVOID lpFile, DWORD dwRVA)
struct _IMAGE_SECTION_HEADER * PIMAGE_SECTION_HEADER
struct _IMAGE_POPUP_MENU_ITEM IMAGE_POPUP_MENU_ITEM
struct _IMAGE_RESOURCE_DATA_ENTRY * PIMAGE_RESOURCE_DATA_ENTRY
struct _IMAGE_NT_HEADERS * PIMAGE_NT_HEADERS
struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER
struct _IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY
#define IMAGE_OS2_SIGNATURE_LE
int WINAPI GetImportModuleNames(LPVOID, char **)
struct _IMAGE_DIALOG_BOX_HEADER1 * PIMAGE_DIALOG_HEADER
struct _IMAGE_CONTROL_DATA * PIMAGE_CONTROL_DATA
struct _IMAGE_DEBUG_DIRECTORY * PIMAGE_DEBUG_DIRECTORY
LPVOID WINAPI ImageDirectoryOffset(LPVOID, DWORD)
struct _IMAGE_MENU_HEADER * PIMAGE_MENU_HEADER
BOOL WINAPI GetSectionHdrByName(LPVOID, PIMAGE_SECTION_HEADER, char *)
#define IMAGE_DIRECTORY_ENTRY_DEBUG
struct tagImportDirectory * PIMAGE_IMPORT_MODULE_DIRECTORY
void WINAPI TranslateParameters(char **, char **, char **)
struct _IMAGE_FILE_HEADER IMAGE_FILE_HEADER
BOOL WINAPI GetPEFileHeader(LPVOID, PIMAGE_FILE_HEADER)
struct _IMAGE_IMPORT_BY_NAME IMAGE_IMPORT_BY_NAME
struct _IMAGE_CONTROL_DATA IMAGE_CONTROL_DATA
struct _IMAGE_DEBUG_MISC * PIMAGE_DEBUG_MISC
char *WINAPI TranslateFunctionName(char *)
struct _IMAGE_RESOURCE_DIR_STRING_U * PIMAGE_RESOURCE_DIR_STRING_U
DWORD WINAPI ImageFileType(LPVOID)
struct _IMAGE_NORMAL_MENU_ITEM IMAGE_NORMAL_MENU_ITEM
struct _IMAGE_RESOURCE_DIRECTORY_ENTRY IMAGE_RESOURCE_DIRECTORY_ENTRY
#define IMAGE_FILE_DEBUG_STRIPPED
#define IMAGE_NT_SIGNATURE
union _NAME_OR_ORDINAL NAME_OR_ORDINAL
int WINAPI MenuScan(int *, WORD **)
struct _IMAGE_EXPORT_DIRECTORY * PIMAGE_EXPORT_DIRECTORY
struct _IMAGE_DEBUG_DIRECTORY IMAGE_DEBUG_DIRECTORY
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER
BOOL WINAPI GetDosHeader(LPVOID, PIMAGE_DOS_HEADER)
struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER
struct _IMAGE_POPUP_MENU_ITEM * PIMAGE_POPUP_MENU_ITEM
struct _IMAGE_RESOURCE_DIRECTORY_STRING IMAGE_RESOURCE_DIRECTORY_STRING
BOOL WINAPI GetPEOptionalHeader(LPVOID, PIMAGE_OPTIONAL_HEADER)
#define IMAGE_OS2_SIGNATURE
LPVOID WINAPI GetImageBase(LPVOID)
struct tagImportDirectory IMAGE_IMPORT_MODULE_DIRECTORY
struct _IMAGE_RESOURCE_DIRECTORY IMAGE_RESOURCE_DIRECTORY
int WINAPI PrintStrangeMenu(char **)
void WINAPI PrintNameOrOrdinal(char **psz)
#define IMAGE_DEBUG_TYPE_MISC
struct _IMAGE_DATA_DIRECTORY * PIMAGE_DATA_DIRECTORY
struct _IMAGE_EXPORT_DIRECTORY IMAGE_EXPORT_DIRECTORY
union _NAME_OR_ORDINAL * PNAME_OR_ORDINAL
void WINAPI StrangeMenuFill(char **, WORD **, int)
int WINAPI GetExportFunctionNames(LPVOID, char **)
int WINAPI NumOfSections(LPVOID)
struct _IMAGE_IMPORT_BY_NAME * PIMAGE_IMPORT_BY_NAME
#define IMAGE_DOS_SIGNATURE
struct _IMAGE_RESOURCE_DIRECTORY_ENTRY * PIMAGE_RESOURCE_DIRECTORY_ENTRY
struct _IMAGE_SEPARATE_DEBUG_HEADER IMAGE_SEPARATE_DEBUG_HEADER
struct _IMAGE_NORMAL_MENU_ITEM * PIMAGE_NORMAL_MENU_ITEM
struct _IMAGE_RESOURCE_DATA_ENTRY IMAGE_RESOURCE_DATA_ENTRY
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
int WINAPI RetrieveModuleName(LPVOID, char **)
int WINAPI GetImportFunctionNamesByModule(LPVOID, char *, char **)
int WINAPI GetSectionNames(LPVOID, char **)
#define IMAGE_SEPARATE_DEBUG_SIGNATURE
struct _IMAGE_FILE_HEADER * PIMAGE_FILE_HEADER
struct _IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER
#define IMAGE_DIRECTORY_ENTRY_RESOURCE
BOOL WINAPI GetSeparateDebugHeader(LPVOID, PIMAGE_SEPARATE_DEBUG_HEADER)
int WINAPI GetNumberOfResources(LPVOID)
CardRegion * pStack[NUM_STACKS]
PDWORD * AddressOfFunctions
DWORD AddressOfNameOrdinals
PWORD * AddressOfNameOrdinals
WORD NumberOfNamedEntries
DWORD dwRVAFunctionAddressList
DWORD dwRVAFunctionNameList
struct _NAME_OR_ORDINAL::_ORD_ID ORD_ID
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
*nSize LPSTR _Inout_ LPDWORD nSize
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
_Reserved_ PVOID Reserved
#define IMAGE_SIZEOF_SHORT_NAME