27 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
32 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
33 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
34 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
38static const unsigned char UTF8Mask[6] = {0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
42 {0, 0x80, 0x800, 0x10000, 0x200000, 0x2000000, 0xFFFFFFFF};
97 DPRINT1(
"Failed to create basic NLS SD (Status 0x%08x)\n",
Status);
111 DPRINT1(
"Failed to create Admins SID (Status 0x%08x)\n",
Status);
122 DPRINT1(
"Failed to get DACL from descriptor (Status 0x%08x)\n",
Status);
134 DPRINT1(
"Failed to add allowed access ACE for Admins SID (Status 0x%08x)\n",
Status);
175 DPRINT1(
"Failed to create NLS directory security (Status 0x%08x)\n",
Status);
265 CurrentEntry = CurrentEntry->
Flink)
296 CHAR SectionName[40];
298 PBYTE SectionMapping;
320 sizeof(CodePage) /
sizeof(
WCHAR)))
333 sizeof(CodePage) /
sizeof(
WCHAR)))
342 if (CodePageEntry !=
NULL)
344 return CodePageEntry;
358 "\\Nls\\NlsSectionCP",
360 sizeof(SectionName)))
383 DPRINT1(
"CreateNlsSecurityDescriptor FAILED! (Status 0x%08x)\n",
Status);
450 if (SectionMapping ==
NULL)
458 if (CodePageEntry ==
NULL)
475 return CodePageEntry;
496 LPCSTR MbsEnd, MbsPtrSave;
497 UCHAR Char, TrailLength;
500 BOOL CharIsValid, StringIsValid =
TRUE;
501 const WCHAR InvalidChar = 0xFFFD;
510 if (WideCharCount == 0)
522 if ((Char & 0xC0) == 0x80)
525 StringIsValid =
FALSE;
530 if (TrailLength == 0)
532 StringIsValid =
FALSE;
538 WideChar = Char &
UTF8Mask[TrailLength];
544 CharIsValid = StringIsValid =
FALSE;
561 StringIsValid =
FALSE;
570 return WideCharCount;
580 *WideCharString++ = Char;
584 if ((Char & 0xC0) == 0x80)
586 *WideCharString++ = InvalidChar;
588 StringIsValid =
FALSE;
593 if (TrailLength == 0)
595 *WideCharString++ = InvalidChar;
596 StringIsValid =
FALSE;
602 WideChar = Char &
UTF8Mask[TrailLength];
608 CharIsValid = StringIsValid =
FALSE;
618 *WideCharString++ = WideChar;
622 *WideCharString++ = InvalidChar;
624 StringIsValid =
FALSE;
630 *WideCharString = InvalidChar;
678 if (CodePageEntry ==
NULL)
709 while (TempString < MbsEnd)
716 if (((TempString + 1) == MbsEnd) || (*(TempString + 1) == 0))
735 WideChar = MultiByteTable[(
UCHAR)*TempString];
740 (WideChar >= 0xE000 && WideChar <= 0xF8FF))
752 if (WideCharCount == 0)
767 return WideCharCount;
778 *WideCharString++ = MultiByteTable[Char];
807 TempString++, TempLength--)
809 WideChar = MultiByteTable[(
UCHAR)*TempString];
814 (WideChar >= 0xE000 && WideChar <= 0xF8FF))
823 if (WideCharCount == 0)
824 return MultiByteCount;
827 for (TempLength = (WideCharCount < MultiByteCount) ? WideCharCount : MultiByteCount;
835 if (WideCharCount < MultiByteCount)
837 MultiByteCount = WideCharCount;
841 return MultiByteCount;
873 if (WideCharCount == 0)
875 return MultiByteCount;
878 WideCharMaxLen = WideCharCount > MultiByteCount ? MultiByteCount : WideCharCount;
885 WideCharString[
Count] = Char;
889 WideCharString[
Count] = Char + 0xf000;
892 if (MultiByteCount > WideCharMaxLen)
898 return WideCharMaxLen;
928 if (MultiByteCount == 0)
930 return WideCharCount;
933 MaxLen = MultiByteCount > WideCharCount ? WideCharCount : MultiByteCount;
936 Char = WideCharString[
Count];
943 if ((Char >= 0xf020) && (Char < 0xf100))
955 if (WideCharCount > MaxLen)
992 if (MultiByteCount == 0)
994 for (TempLength = 0; WideCharCount;
995 WideCharCount--, WideCharString++)
998 if (*WideCharString >= 0x80)
1001 if (*WideCharString >= 0x800)
1004 if (*WideCharString >= 0xd800 && *WideCharString < 0xdc00 &&
1005 WideCharCount >= 1 &&
1006 WideCharString[1] >= 0xdc00 && WideCharString[1] <= 0xe000)
1018 for (TempLength = MultiByteCount; WideCharCount; WideCharCount--, WideCharString++)
1020 Char = *WideCharString;
1048 if (Char >= 0xd800 && Char < 0xdc00 &&
1049 WideCharCount >= 1 &&
1050 WideCharString[1] >= 0xdc00 && WideCharString[1] < 0xe000)
1061 Char = (Char - 0xd800) << 10;
1062 Char |= *WideCharString - 0xdc00;
1065 ASSERT(Char <= 0x10ffff);
1089 return MultiByteCount - TempLength;
1174 if (CodePageEntry ==
NULL)
1187 if (
Flags || DefaultChar || UsedDefaultChar)
1189 BOOL TempUsedDefaultChar;
1194 if (!UsedDefaultChar)
1195 UsedDefaultChar = &TempUsedDefaultChar;
1197 *UsedDefaultChar =
FALSE;
1201 DefChar = DefaultChar[1] ? ((DefaultChar[0] << 8) | DefaultChar[1]) : DefaultChar[0];
1206 if (!MultiByteCount)
1208 for (TempLength = 0; WideCharCount; WideCharCount--, WideCharString++, TempLength++)
1215 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1224 *UsedDefaultChar =
TRUE;
1236 for (TempLength = MultiByteCount;
1237 WideCharCount && TempLength;
1238 TempLength--, WideCharString++, WideCharCount--)
1245 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1254 *UsedDefaultChar =
TRUE;
1261 if (TempLength == 1)
1278 return MultiByteCount - TempLength;
1282 if (!MultiByteCount)
1284 for (TempLength = 0; WideCharCount; WideCharCount--, WideCharString++, TempLength++)
1295 for (TempLength = MultiByteCount;
1296 WideCharCount && TempLength;
1297 TempLength--, WideCharString++, WideCharCount--)
1305 if (TempLength == 1)
1322 return MultiByteCount - TempLength;
1329 if (
Flags || DefaultChar || UsedDefaultChar)
1331 BOOL TempUsedDefaultChar;
1336 if (!UsedDefaultChar)
1337 UsedDefaultChar = &TempUsedDefaultChar;
1339 *UsedDefaultChar =
FALSE;
1342 if (!MultiByteCount)
1345 for (TempLength = 0; WideCharCount; TempLength++, WideCharString++, WideCharCount--)
1350 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1353 if (!*UsedDefaultChar)
1365 DefChar = *DefaultChar;
1370 for (TempLength = MultiByteCount;
1371 WideCharCount && TempLength;
1377 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1385 *UsedDefaultChar =
TRUE;
1396 return MultiByteCount - TempLength;
1400 if (!MultiByteCount)
1401 return WideCharCount;
1404 if (MultiByteCount < WideCharCount)
1407 WideCharCount = MultiByteCount;
1414 nReturn = WideCharCount;
1418 for (TempLength = WideCharCount; --TempLength >= 0; WideCharString++,
MultiByteString++)
1444 if (
Byte >= TableInfo->
LeadByte[
i] && Byte <= TableInfo->LeadByte[
i+1])
1530 WCHAR ValueNameBuffer[11];
1543 ValueName.MaximumLength =
sizeof(ValueNameBuffer);
1550 L"CurrentControlSet\\Control\\Nls\\CodePage");
1570 Kvpi, KvpiSize, &KvpiSize);
1606 if (CodePage == 0)
return FALSE;
1631 static const signed char base64_decoding_table[] =
1633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1634 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
1636 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
1637 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1638 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
1639 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1640 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
1646 DWORD byte_pair = 0;
1649 while (
src < source_end)
1654 if (
src >= source_end)
1671 signed char sextet = *
src;
1688 sextet = base64_decoding_table[sextet];
1698 byte_pair = (byte_pair << 6) | sextet;
1714 while (
src < source_end);
1772 MultiByteCount == 0 || WideCharCount < 0 ||
1773 (WideCharCount && (WideCharString ==
NULL ||
1781 if (MultiByteCount < 0)
1802 WideCharString, WideCharCount);
1822 static const BOOL directly_encodable_table[] =
1824 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
1825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1826 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1827 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
1828 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1829 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
1830 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1831 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1834 return codepoint <= 0x7A ? directly_encodable_table[codepoint] :
FALSE;
1854 static const char base64_encoding_table[] =
1855 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1860 while (
src < source_end)
1888 DWORD byte_pair = 0;
1898 byte_pair = (byte_pair << 16) | *
src;
1922 byte_pair <<= (6 -
offset);
1999 for (
i = 0;
i < (uID & 0x0F);
i++)
2006 if (*
p + 1 > cchDest)
2029 DPRINT1(
"Resource not found: uID = %lu\n", uID);
2051 if (CodePageEntry ==
NULL)
2064 DPRINT1(
"Invalid CP!: %lx\n", CodePage);
2128 if (CodePageEntry ==
NULL)
2130 DPRINT1(
"Could not get CodePage Entry! CodePageEntry = NULL\n");
2226 if (WideCharString ==
NULL ||
2227 WideCharCount == 0 ||
2237 if (WideCharCount < 0)
2239 WideCharCount =
lstrlenW(WideCharString) + 1;
2245 if (DefaultChar !=
NULL || UsedDefaultChar !=
NULL)
2260 if (DefaultChar !=
NULL || UsedDefaultChar !=
NULL)
2274 if ((DefaultChar!=
NULL) || (UsedDefaultChar!=
NULL))
2342 if (CodePageEntry !=
NULL)
2406 DPRINT1(
"Security descriptor size too small\n");
2414 0, 0, 0, 0, 0, 0, 0,
2418 DPRINT1(
"Failed to create World SID (Status 0x%08x)\n",
Status);
2427 DPRINT1(
"Failed to create security descriptor (Status 0x%08x)\n",
Status);
2447 DPRINT1(
"Failed to add allowed access ACE for World SID (Status 0x%08x)\n",
Status);
2455 DPRINT1(
"Failed to set DACL into descriptor (Status 0x%08x)\n",
Status);
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
NTSTATUS NTAPI NtOpenSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
ACPI_SIZE strlen(const char *String)
static SID_IDENTIFIER_AUTHORITY NtAuthority
#define NLS_SIZEOF_ACE_AND_SIDS(n)
#define NLS_SECTION_SECURITY_DESCRIPTOR_SIZE
_In_ PFCB _In_ PCD_NAME DirName
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define ERROR_INSUFFICIENT_BUFFER
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
LPVOID WINAPI LockResource(HGLOBAL handle)
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
LCID WINAPI GetThreadLocale(void)
UINT WINAPI GetOEMCP(void)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
LCID WINAPI ConvertDefaultLocale(LCID lcid)
static INT WINAPI IntWideCharToMultiByteCP(UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
BOOL WINAPI GetNLSVersion(IN NLS_FUNCTION Function, IN LCID Locale, IN OUT LPNLSVERSIONINFO lpVersionInformation)
static BOOL IntIsValidSBCSMapping(PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, UCHAR ch)
static const char UTF8Length[128]
static BOOL utf7_can_directly_encode(WCHAR codepoint)
BOOL WINAPI GetCPInfo(UINT CodePage, LPCPINFO CodePageInfo)
VOID FASTCALL NlsUninit(VOID)
BOOL WINAPI IsNLSDefinedString(IN NLS_FUNCTION Function, IN DWORD dwFlags, IN LPNLSVERSIONINFO lpVersionInformation, IN LPCWSTR lpString, IN INT cchStr)
VOID WINAPI NlsConvertIntegerToString(ULONG Value, ULONG Base, ULONG strsize, LPWSTR str, ULONG strsize2)
static INT WideCharToUtf7(const WCHAR *src, int srclen, char *dst, int dstlen)
BOOL WINAPI IsDBCSLeadByteEx(UINT CodePage, BYTE TestByte)
static BOOL utf7_write_c(char *dst, int dstlen, int *index, char character)
BOOL WINAPI ValidateLCType(int a1, unsigned int a2, int a3, int a4)
PCODEPAGE_ENTRY FASTCALL IntGetCodePageEntry(UINT CodePage)
UINT GetLocalisedText(IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest, IN LANGID lang)
BOOL WINAPI IsValidCodePage(UINT CodePage)
PCODEPAGE_ENTRY FASTCALL IntGetLoadedCodePageEntry(UINT CodePage)
BOOL WINAPI GetNLSVersionEx(IN NLS_FUNCTION function, IN LPCWSTR lpLocaleName, IN OUT LPNLSVERSIONINFOEX lpVersionInformation)
static CODEPAGE_ENTRY AnsiCodePage
ULONG WINAPI NlsGetCacheUpdateCount(VOID)
static const unsigned long UTF8LBound[]
UINT WINAPI SetCPGlobal(UINT CodePage)
static BOOL utf7_write_w(WCHAR *dst, int dstlen, int *index, WCHAR character)
BOOL WINAPI GetNlsSectionName(UINT CodePage, UINT Base, ULONG Unknown, LPSTR BaseName, LPSTR Result, ULONG ResultSize)
NTSTATUS WINAPI CreateNlsSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SIZE_T DescriptorSize, _In_ ULONG AccessMask)
Creates a security descriptor for each NLS section. Typically used by BASESRV to give Everyone (World...
BOOL WINAPI IsValidUILanguage(LANGID langid)
BOOL FASTCALL NlsInit(VOID)
static INT WINAPI IntWideCharToMultiByteUTF8(UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
static RTL_CRITICAL_SECTION CodePageListLock
VOID WINAPI GetLinguistLangSize(LPVOID lpUnknown)
BOOL WINAPI ValidateLocale(IN ULONG LocaleId)
static INT Utf7ToWideChar(const char *src, int srclen, WCHAR *dst, int dstlen)
static NTSTATUS CreateNlsDirectorySecurity(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SIZE_T DescriptorSize)
Creates a security descriptor for the NLS object directory.
static BOOL IntIsValidDBCSMapping(PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, USHORT ch)
BOOL WINAPI GetCPFileNameFromRegistry(UINT CodePage, LPWSTR FileName, ULONG FileNameSize)
static INT WINAPI IntMultiByteToWideCharUTF8(DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
BOOL WINAPI NlsResetProcessLocale(VOID)
static CODEPAGE_ENTRY OemCodePage
static LIST_ENTRY CodePageListHead
static BOOL WINAPI IntIsLeadByte(PCPTABLEINFO TableInfo, BYTE Byte)
BOOL WINAPI GetCPInfoExA(UINT CodePage, DWORD dwFlags, LPCPINFOEXA lpCPInfoEx)
BOOL WINAPI GetCPInfoExW(UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx)
VOID WINAPI GetDefaultSortkeySize(LPVOID lpUnknown)
static INT WINAPI IntWideCharToMultiByteSYMBOL(DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount)
static INT WINAPI IntMultiByteToWideCharCP(UINT CodePage, DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
BOOL WINAPI IsDBCSLeadByte(BYTE TestByte)
static const unsigned char UTF8Mask[6]
static INT WINAPI IntMultiByteToWideCharSYMBOL(DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
static SID_IDENTIFIER_AUTHORITY WorldAuthority
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
IN PDCB IN POEM_STRING IN PUNICODE_STRING UnicodeName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
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
#define WC_COMPOSITECHECK
#define MB_ERR_INVALID_CHARS
#define WC_NO_BEST_FIT_CHARS
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define MAXIMUM_LEADBYTES
static const struct update_accum a1
static const struct update_accum a2
static const struct update_accum a3
static const struct update_accum a4
static DWORD LPDWORD LPCSTR DWORD srclen
#define InitializeObjectAttributes(p, n, a, r, s)
struct _SECURITY_DESCRIPTOR SECURITY_DESCRIPTOR
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
_In_ ACCESS_MASK AccessMask
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
_Out_ PCPTABLEINFO CodePageTable
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToChar(_In_ ULONG Value, _In_ ULONG Base, _In_ ULONG Length, _Out_ PCHAR String)
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG DaclSize
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define DIRECTORY_CREATE_OBJECT
@ KeyValuePartialInformation
#define DIRECTORY_TRAVERSE
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define DIRECTORY_ALL_ACCESS
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define FILE_GENERIC_READ
#define LOCALE_SYSTEM_DEFAULT
NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid(IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount, IN ULONG SubAuthority0, IN ULONG SubAuthority1, IN ULONG SubAuthority2, IN ULONG SubAuthority3, IN ULONG SubAuthority4, IN ULONG SubAuthority5, IN ULONG SubAuthority6, IN ULONG SubAuthority7, OUT PSID *Sid)
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define LANGIDFROMLCID(l)
#define SUBLANG_ENGLISH_US
VOID NTAPI RtlInitCodePageTable(IN PUSHORT TableBase, OUT PCPTABLEINFO CodePageTable)
#define STATUS_BUFFER_TOO_SMALL
base of all file and directory entries
CPTABLEINFO CodePageTable
UCHAR LeadByte[MAXIMUM_LEADBYTES]
USHORT MaximumCharacterSize
USHORT TransUniDefaultChar
struct _LIST_ENTRY * Flink
BYTE LeadByte[MAX_LEADBYTES]
BYTE DefaultChar[MAX_DEFAULTCHAR]
CHAR CodePageName[MAX_PATH]
WCHAR CodePageName[MAX_PATH]
_In_ SIZE_T DescriptorSize
#define CONTAINING_RECORD(address, type, field)
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_OBJECT_NAME_NOT_FOUND
static const WCHAR lang[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING _In_ LCID LocaleId
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_NO_UNICODE_TRANSLATION
#define ERROR_INVALID_FLAGS
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_IDEFAULTMACCODEPAGE
#define MAKEINTRESOURCEW(i)
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
*BytesInMultiByteString PCHAR MultiByteString
#define SECURITY_BUILTIN_DOMAIN_RID
#define SECURITY_WORLD_SID_AUTHORITY
#define SECURITY_WORLD_RID
#define SECURITY_NT_AUTHORITY
#define SECURITY_DESCRIPTOR_REVISION
#define DOMAIN_ALIAS_RID_ADMINS