21 {
'K',
'G',
'S',
'!',
'@',
'#',
'$',
'%' };
23 {
'D',
'e',
'f',
'S',
'e',
's',
's',
'i',
'o',
'n',
'K',
'e',
'y',
'!',
'@',
'#'};
128 unsigned int crypt_len, ofs;
133 crypt_len = ((
in->Length+7)&~7);
134 if (
out->MaximumLength < (crypt_len+8))
136 out->Length = crypt_len + 8;
153 for(ofs=0; ofs<(crypt_len-8); ofs+=8)
160 out->Length = crypt_len+8;
191 unsigned int ofs, crypt_len;
209 crypt_len =
data.ui[0];
210 if (crypt_len >
out->MaximumLength)
212 out->Length = crypt_len;
216 for (ofs=0; (ofs+8)<crypt_len; ofs+=8)
225 out->Length = crypt_len;
280 if (!challenge || !response)
614 static ULONG uCounter = 17;
616 if(!pbBuffer || !dwLen)
637 *
pBuffer = (
BYTE)(uPseudoRandom >> 8 * (dwLen % 3) & 0xFF);
639 }
while(--dwLen % 3);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
unsigned char * CRYPT_DESunhash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
unsigned char * CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define ERROR_CALL_NOT_IMPLEMENTED
#define RtlUlongByteSwap(_x)
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
#define FILE_SYNCHRONOUS_IO_NONALERT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
VOID WINAPI MD4Final(MD4_CTX *ctx)
VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
VOID WINAPI MD4Init(MD4_CTX *ctx)
#define OBJ_CASE_INSENSITIVE
#define InterlockedCompareExchangePointer
#define RTL_ENCRYPT_OPTION_SAME_LOGON
#define RTL_ENCRYPT_OPTION_SAME_PROCESS
#define RTL_ENCRYPT_OPTION_CROSS_PROCESS
#define IOCTL_KSEC_ENCRYPT_CROSS_PROCESS
#define IOCTL_KSEC_DECRYPT_SAME_LOGON
#define IOCTL_KSEC_DECRYPT_CROSS_PROCESS
#define IOCTL_KSEC_ENCRYPT_SAME_PROCESS
#define IOCTL_KSEC_ENCRYPT_SAME_LOGON
#define IOCTL_KSEC_DECRYPT_SAME_PROCESS
#define memcpy(s1, s2, n)
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define FILE_SHARE_DELETE
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define STATUS_UNKNOWN_REVISION
#define STATUS_INVALID_PARAMETER_2
#define STATUS_LOCAL_USER_SESSION_KEY
void rc4_init(RC4_CONTEXT *a4i, const unsigned char *key, unsigned int keyLen)
void rc4_crypt(RC4_CONTEXT *a4i, unsigned char *inoutString, unsigned int length)
#define STATUS_BUFFER_TOO_SMALL
NTSTATUS WINAPI SystemFunction012(const BYTE *in, const BYTE *key, LPBYTE out)
BOOL WINAPI SystemFunction035(LPCSTR lpszDllFilePath)
static const unsigned char DefaultSessionKey[16]
INT WINAPI SystemFunction034(INT a, INT b)
NTSTATUS WINAPI SystemFunction040(_Inout_ PVOID Memory, _In_ ULONG MemoryLength, _In_ ULONG OptionFlags)
static NTSTATUS KsecDeviceIoControl(ULONG IoControlCode, PVOID InputBuffer, SIZE_T InputBufferLength, PVOID OutputBuffer, SIZE_T OutputBufferLength)
INT WINAPI SystemFunction029(INT a, INT b)
VOID CloseKsecDdHandle(VOID)
NTSTATUS WINAPI SystemFunction024(const BYTE *in, const BYTE *key, LPBYTE out)
NTSTATUS WINAPI SystemFunction041(_Inout_ PVOID Memory, _In_ ULONG MemoryLength, _In_ ULONG OptionFlags)
NTSTATUS WINAPI SystemFunction013(const BYTE *in, const BYTE *key, LPBYTE out)
NTSTATUS WINAPI SystemFunction010(LPVOID unknown, const BYTE *data, LPBYTE hash)
NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key)
NTSTATUS WINAPI SystemFunction025(const BYTE *in, const BYTE *key, LPBYTE out)
INT WINAPI SystemFunction033(INT a, INT b)
static const unsigned char CRYPT_LMhash_Magic[8]
BOOL WINAPI SystemFunction030(LPCVOID b1, LPCVOID b2)
NTSTATUS WINAPI SystemFunction008(const BYTE *challenge, const BYTE *hash, LPBYTE response)
NTSTATUS WINAPI SystemFunction007(const UNICODE_STRING *string, LPBYTE hash)
NTSTATUS WINAPI SystemFunction001(const BYTE *data, const BYTE *key, LPBYTE output)
NTSTATUS WINAPI SystemFunction028(_In_ PVOID ContextHandle, _Out_ LPBYTE SessionKey)
NTSTATUS WINAPI SystemFunction005(const struct ustring *in, const struct ustring *key, struct ustring *out)
NTSTATUS WINAPI SystemFunction002(const BYTE *data, const BYTE *key, LPBYTE output)
NTSTATUS WINAPI SystemFunction004(const struct ustring *in, const struct ustring *key, struct ustring *out)
BOOLEAN WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen)
NTSTATUS WINAPI SystemFunction009(const BYTE *challenge, const BYTE *hash, LPBYTE response)
static NTSTATUS KsecOpenDevice()
NTSTATUS WINAPI SystemFunction003(const BYTE *key, LPBYTE output)
#define RTL_CONSTANT_STRING(s)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory