311{
316
317 static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
318 static const GUID cabGUID = { 0xc689aaba, 0x8e78, 0x11d0, {0x8c,0x47,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
319 static const GUID catGUID = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
321 static const BYTE cabHdr[] = {
'M',
'S',
'C',
'F' };
323 WCHAR szFullKey[ 0x100 ];
326
328
329 if (!pgSubject || (!
FileName && !hFileIn))
330 {
333 }
334
335
337
338 if (hFileIn)
339
341 else
342 {
344
346 }
347
353
355 {
358 }
359
361
362 if (!
memcmp(
hdr, &dosHdr,
sizeof(dosHdr)))
363 {
368 }
369
370 if (!
memcmp(
hdr, cabHdr,
sizeof(cabHdr)))
371 {
376 }
377
379 {
381
382 TRACE(
"fileLen = %d\n", fileLen);
383
384 if (
hdr[1] < 0x80 && fileLen == 2 +
hdr[1])
385 {
390 }
391 else if (
hdr[1] == 0x80)
392 {
393
394
395
400 }
401 else
402 {
404
405 if (lenBytes == 1 && fileLen == 2 + lenBytes +
hdr[2])
406 {
411 }
412 else if (lenBytes == 2 && fileLen == 2 + lenBytes +
414 {
419 }
420 else if (fileLen > 0xffff)
421 {
422
423
424
429 }
430 }
431 }
432
433
434
439 {
442
443 do {
448 {
450
453 {
456 &lib);
457
458 if (isMy)
459 {
460 bRet = isMy(
hFile, pgSubject);
462 }
464 }
465 }
468 }
469
470
471 if (!bRet)
472 {
477 {
480
481 do {
486 {
488
491 {
495
496 if (isMy2)
497 {
500 }
502 }
503 }
506 }
507 }
508
509 if (!bRet)
511
513
514
515
516 if (!hFileIn)
518 else
520
521 return bRet;
522}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
static void * CRYPT_LoadSIPFuncFromKey(HKEY key, HMODULE *pLib)
static const WCHAR szOID[]
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
static void cleanup(void)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod)
static const GUID catGUID
static const GUID cabGUID
GLuint GLuint GLsizei count
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
BOOL(WINAPI * pfnIsFileSupportedName)(WCHAR *, GUID *)
BOOL(WINAPI * pfnIsFileSupported)(HANDLE, GUID *)
#define SIP_MAX_MAGIC_NUMBER
#define IMAGE_DOS_SIGNATURE
#define TRUST_E_SUBJECT_FORM_UNKNOWN
#define HKEY_LOCAL_MACHINE