25#define WIN32_NO_STATUS
39#define TableFromToken(tk) (TypeFromToken(tk) >> 24)
40#define TokenFromTable(idx) (idx << 24)
42#define MAX_CLR_TABLES 64
44#define MD_STRINGS_BIT 0x1
45#define MD_GUIDS_BIT 0x2
46#define MD_BLOBS_BIT 0x4
88 if (rva < img->PointerToRawData)
93 if (
img[
i].SizeOfRawData)
101 if (
img[
i].PointerToRawData != 0)
116 if ((*
pData & 0x80) == 0x00)
118 *pLength = (*
pData & 0x7f);
122 if ((*
pData & 0xC0) == 0x80)
124 *pLength = ((*
pData & 0x3f) << 8 | *(
pData + 1));
128 if ((*
pData & 0xE0) == 0xC0)
130 *pLength = ((*
pData & 0x1f) << 24 | *(
pData + 1) << 16 |
135 *pLength = (
ULONG)-1;
144#define MAX_TABLES_WORD 0xFFFF
145#define MAX_TABLES_1BIT_ENCODE 32767
146#define MAX_TABLES_2BIT_ENCODE 16383
147#define MAX_TABLES_3BIT_ENCODE 8191
148#define MAX_TABLES_5BIT_ENCODE 2047
536 rva =
assembly->corhdr->MetaData.VirtualAddress;
573 rva =
assembly->corhdr->MetaData.VirtualAddress;
578 for (
i = 0;
i <
assembly->metadatahdr->Streams;
i++)
764 static const WCHAR format[] = {
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',0};
790 if ((
assembly->corhdr->MajorRuntimeVersion == 2) && (
assembly->corhdr->MinorRuntimeVersion == 0))
845 size =
sizeof(hashdata);
847 tokbytes[
size -
i - 1] = hashdata[
i];
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static WCHAR * strdupW(const WCHAR *src)
#define MS_PRIMITIVE_PROVIDER
#define BCRYPT_SHA1_ALGORITHM
NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG secretlen, UCHAR *input, ULONG inputlen, UCHAR *output, ULONG outputlen)
NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags)
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE handle, DWORD flags)
PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID)
PVOID WINAPI ImageRvaToVa(_In_ PIMAGE_NT_HEADERS, _In_ PVOID, _In_ ULONG, _In_opt_ PIMAGE_SECTION_HEADER *)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
static const WCHAR version[]
static const WCHAR pubkey[]
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
struct nls_table * tables
#define TableFromToken(tk)
static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset)
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
static ULONG get_table_size(const ASSEMBLY *assembly, DWORD index)
#define TokenFromTable(idx)
static VOID * assembly_data_offset(ASSEMBLY *assembly, ULONG offset)
#define MAX_TABLES_3BIT_ENCODE
HRESULT assembly_release(ASSEMBLY *assembly)
static HRESULT parse_metadata_header(ASSEMBLY *assembly, DWORD *hdrsz)
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path)
static BYTE * GetData(BYTE *pData, ULONG *pLength)
static HRESULT parse_pe_header(ASSEMBLY *assembly)
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token)
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
static HRESULT parse_clr_metadata(ASSEMBLY *assembly)
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file)
#define MAX_TABLES_2BIT_ENCODE
#define MAX_TABLES_5BIT_ENCODE
#define MAX_TABLES_1BIT_ENCODE
static LPWSTR assembly_dup_str(const ASSEMBLY *assembly, DWORD index)
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count)
static BYTE * assembly_get_blob(ASSEMBLY *assembly, DWORD index, ULONG *size)
struct tagCLRTABLE CLRTABLE
static DWORD rva_to_offset(IMAGE_NT_HEADERS *nthdrs, DWORD rva)
PEKIND assembly_get_architecture(ASSEMBLY *assembly)
static void token_to_str(BYTE *bytes, LPWSTR str)
GLuint GLuint GLsizei count
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 token
int JSAMPARRAY int int num_rows
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC
#define IMAGE_FIRST_SECTION(NtHeader)
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
METADATATABLESHDR * tableshdr
CLRTABLE tables[MAX_CLR_TABLES]
IMAGE_COR20_HEADER * corhdr
METADATAHDR * metadatahdr
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
DWORD WINAPI GetLastError(void)
#define HRESULT_FROM_WIN32(x)
@ COMIMAGE_FLAGS_32BITREQUIRED
_Must_inspect_result_ _In_ ULONG Flags