78 ULONG AttributeLength;
90 DPRINT1(
"FIXME: Can only add $BITMAP attribute to the end of a file record.\n");
94 NameOffset = ResidentHeaderLength;
104 BytesAvailable =
Vcb->NtfsInfo.BytesPerFileRecord - FileRecord->
BytesInUse;
105 if (BytesAvailable < AttributeLength)
107 DPRINT1(
"FIXME: Not enough room in file record for index allocation attribute!\n");
115 AttributeAddress->
Length = AttributeLength;
121 AttributeAddress->
Resident.ValueOffset = ValueOffset;
168 DPRINT1(
"FIXME: Can only add $DATA attribute to the end of a file record.\n");
173 AttributeAddress->
Length = ResidentHeaderLength;
175 AttributeAddress->
Resident.ValueLength = 0;
176 AttributeAddress->
Resident.ValueOffset = ResidentHeaderLength;
179 AttributeAddress->
NameOffset = ResidentHeaderLength;
248 DPRINT1(
"FIXME: Can only add $FILE_NAME attribute to the end of a file record.\n");
278 while (Current.
Length != 0)
280 DPRINT1(
"Current: %wZ\n", &Current);
282 if (Remaining.
Length != 0)
299 if (Remaining.
Length == 0 )
312 DPRINT1(
"MFT Index of parent: %I64u\n", CurrentMFTIndex);
316 *ParentMftIndex = CurrentMFTIndex;
340 AttributeAddress->
Length = ResidentHeaderLength +
345 AttributeAddress->
Resident.ValueOffset = ResidentHeaderLength;
398 ULONG BytesAvailable;
402 DPRINT1(
"FIXME: Can only add $INDEX_ALLOCATION attribute to the end of a file record.\n");
410 DataRunOffset = (
sizeof(
WCHAR) * NameLength) + NameOffset;
415 RecordLength = DataRunOffset + 1;
421 FileRecordEnd = AttributeAddress->
Length;
424 BytesAvailable =
Vcb->NtfsInfo.BytesPerFileRecord - FileRecord->
BytesInUse;
425 if (BytesAvailable < RecordLength)
427 DPRINT1(
"FIXME: Not enough room in file record for index allocation attribute!\n");
435 AttributeAddress->
Length = RecordLength;
441 AttributeAddress->
NonResident.MappingPairsOffset = DataRunOffset;
503 ULONG AttributeLength;
510 ULONG BytesAvailable;
514 DPRINT1(
"FIXME: Can only add $DATA attribute to the end of a file record.\n");
518 NameOffset = ResidentHeaderLength;
524 AttributeLength = ValueOffset + RootLength;
528 BytesAvailable =
Vcb->NtfsInfo.BytesPerFileRecord - FileRecord->
BytesInUse;
529 if (BytesAvailable < AttributeLength)
531 DPRINT1(
"FIXME: Not enough room in file record for index allocation attribute!\n");
539 AttributeAddress->
Length = AttributeLength;
544 AttributeAddress->
Resident.ValueLength = RootLength;
545 AttributeAddress->
Resident.ValueOffset = ValueOffset;
607 int DataRunMaxLength;
609 ULONG NextAttributeOffset = AttrOffset + AttrContext->pRecord->Length;
615 if (!AttrContext->pRecord->IsNonResident)
618 if (AttrContext->pRecord->NonResident.AllocatedSize != 0)
619 NextVBN = AttrContext->pRecord->NonResident.HighestVCN + 1;
634 DPRINT1(
"Failed to add LargeMcb Entry!\n");
642 DPRINT1(
"ERROR: Couldn't allocate memory for data runs!\n");
650 DataRunMaxLength = AttrContext->pRecord->Length - AttrContext->pRecord->NonResident.MappingPairsOffset;
653 if (DataRunMaxLength < RunBufferSize)
659 DataRunMaxLength +=
Vcb->NtfsInfo.BytesPerFileRecord - FileRecord->
BytesInUse;
662 if (DataRunMaxLength < RunBufferSize)
664 DPRINT1(
"FIXME: Need to create attribute list! Max Data Run Length available: %d, RunBufferSize: %d\n", DataRunMaxLength, RunBufferSize);
675 ULONG_PTR MoveTo = (
ULONG_PTR)DestinationAttribute + AttrContext->pRecord->NonResident.MappingPairsOffset + RunBufferSize;
678 DPRINT1(
"Moving attribute(s) after this one starting with type 0x%lx\n", NextAttribute->
Type);
681 FinalAttribute =
MoveAttributes(
Vcb, NextAttribute, NextAttributeOffset, MoveTo);
688 NextAttributeOffset = AttrOffset + AttrContext->pRecord->NonResident.MappingPairsOffset + RunBufferSize;
692 DestinationAttribute->
Length = NextAttributeOffset - AttrOffset;
696 RtlCopyMemory(NewRecord, AttrContext->pRecord, AttrContext->pRecord->Length);
703 AttrContext->pRecord = NewRecord;
716 AttrContext->pRecord->NonResident.HighestVCN =
max(NextVBN - 1 + RunLength,
717 AttrContext->pRecord->NonResident.HighestVCN);
776 DPRINT1(
"FIXME: Can only add $STANDARD_INFORMATION attribute to the end of a file record.\n");
784 AttributeAddress->
Resident.ValueOffset = ResidentHeaderLength;
841 while (*DataRun != 0)
843 DataRun =
DecodeRun(DataRun, &DataRunOffset, &DataRunLength);
845 if (DataRunOffset != -1)
848 DataRunStartLCN = LastLCN + DataRunOffset;
849 LastLCN = DataRunStartLCN;
866 *pNextVBN += DataRunLength;
902 ULONG RunBufferOffset = 0;
909 DPRINT(
"\t[Vbn, Lbn, Count]\n");
914 UCHAR DataRunOffsetSize = 0;
915 UCHAR DataRunLengthSize = 0;
916 UCHAR ControlByte = 0;
922 DataRunOffset =
Lbn - LastLCN;
926 DPRINT(
"Determining how many bytes needed to represent %I64x\n", DataRunOffset);
928 DPRINT(
"%d bytes needed.\n", DataRunOffsetSize);
931 DPRINT(
"Determining how many bytes needed to represent %I64x\n",
Count);
933 DPRINT(
"%d bytes needed.\n", DataRunLengthSize);
936 if (RunBufferOffset + 2 + DataRunLengthSize + DataRunOffsetSize > MaxBufferSize)
939 DPRINT1(
"FIXME: Ran out of room in buffer for data runs!\n");
944 ControlByte = (DataRunOffsetSize << 4) + DataRunLengthSize;
945 RunBuffer[RunBufferOffset++] = ControlByte;
949 RunBufferOffset += DataRunLengthSize;
952 RtlCopyMemory(RunBuffer + RunBufferOffset, &DataRunOffset, DataRunOffsetSize);
953 RunBufferOffset += DataRunOffsetSize;
957 RunBuffer[RunBufferOffset++] = 0;
959 *UsedBufferSize = RunBufferOffset;
960 DPRINT(
"New Size of DataRuns: %ld\n", *UsedBufferSize);
970 UCHAR DataRunOffsetSize;
971 UCHAR DataRunLengthSize;
974 DataRunOffsetSize = (*DataRun >> 4) & 0xF;
975 DataRunLengthSize = *DataRun & 0xF;
979 for (
i = 0;
i < DataRunLengthSize;
i++)
981 *DataRunLength += ((
ULONG64)*DataRun) << (
i * 8);
986 if (DataRunOffsetSize == 0)
992 for (
i = 0;
i < DataRunOffsetSize - 1;
i++)
994 *DataRunOffset += ((
ULONG64)*DataRun) << (
i * 8);
998 *DataRunOffset = ((
LONG64)(
CHAR)(*(DataRun++)) << (
i * 8)) + *DataRunOffset;
1001 DPRINT(
"DataRunOffsetSize: %x\n", DataRunOffsetSize);
1002 DPRINT(
"DataRunLengthSize: %x\n", DataRunLengthSize);
1003 DPRINT(
"DataRunOffset: %x\n", *DataRunOffset);
1004 DPRINT(
"DataRunLength: %x\n", *DataRunLength);
1015 if (vcn < NresAttr->NonResident.LowestVCN || vcn > NresAttr->
NonResident.HighestVCN)
1061 ULONG ClustersToFree)
1064 ULONG ClustersLeftToFree = ClustersToFree;
1067 ULONG NextAttributeOffset = AttrOffset + AttrContext->pRecord->Length;
1071 ULONG RunBufferSize = 0;
1078 ULONG LengthWritten;
1080 if (!AttrContext->pRecord->IsNonResident)
1086 BitmapRecord = ExAllocateFromNPagedLookasideList(&
Vcb->FileRecLookasideList);
1087 if (BitmapRecord ==
NULL)
1089 DPRINT1(
"Error: Unable to allocate memory for bitmap file record!\n");
1096 DPRINT1(
"Error: Unable to read file record for bitmap!\n");
1097 ExFreeToNPagedLookasideList(&
Vcb->FileRecLookasideList, BitmapRecord);
1104 DPRINT1(
"Error: Unable to find data attribute for bitmap file!\n");
1105 ExFreeToNPagedLookasideList(&
Vcb->FileRecLookasideList, BitmapRecord);
1111 ASSERT((BitmapDataSize * 8) >=
Vcb->NtfsInfo.ClusterCount);
1115 DPRINT1(
"Error: Unable to allocate memory for bitmap file data!\n");
1117 ExFreeToNPagedLookasideList(&
Vcb->FileRecLookasideList, BitmapRecord);
1126 while (ClustersLeftToFree > 0)
1133 DPRINT1(
"DRIVER ERROR: FreeClusters called to free %lu clusters, which is %lu more clusters than are assigned to attribute!",
1135 ClustersLeftToFree);
1147 AttrContext->pRecord->NonResident.HighestVCN =
min(AttrContext->pRecord->NonResident.HighestVCN, AttrContext->pRecord->NonResident.HighestVCN - 1);
1148 ClustersLeftToFree--;
1157 ExFreeToNPagedLookasideList(&
Vcb->FileRecLookasideList, BitmapRecord);
1163 ExFreeToNPagedLookasideList(&
Vcb->FileRecLookasideList, BitmapRecord);
1171 DPRINT1(
"ERROR: Couldn't allocate memory for data runs!\n");
1179 DestinationAttribute->
NonResident.HighestVCN = AttrContext->pRecord->NonResident.HighestVCN;
1190 DestinationAttribute->
Length =
ALIGN_UP_BY(AttrContext->pRecord->NonResident.MappingPairsOffset + RunBufferSize,
1193 ASSERT(DestinationAttribute->
Length <= AttrContext->pRecord->Length);
1195 AttrContext->pRecord->Length = DestinationAttribute->
Length;
1222 Attribute =
Context->CurrAttr;
1239 if (ListSize > 0xFFFFFFFF)
1282 if (
Context->NonResidentCur->Length == 0)
1284 DPRINT1(
"Broken length list entry length !");
1296 if (NextItem < Context->NonResidentStart ||
NextItem >
Context->NonResidentEnd)
1346 if (
Context->CurrAttr->Length == 0)
1355 if (NextAttribute >
Context->LastAttr || NextAttribute < Context->FirstAttr)
1363 Context->CurrAttr = NextAttribute;
1391 DPRINT(
"FindFistAttribute(%p, %p, %p, %p, %u, %p)\n",
Context,
Vcb, FileRecord, OnlyResident, Attribute);
1394 Context->OnlyResident = OnlyResident;
1416 if (*Attribute ==
NULL)
1423 *Attribute =
Context->CurrAttr;
1439 if (*Attribute ==
NULL)
1456 if (*Attribute ==
NULL)
1498 DbgPrint(
" $STANDARD_INFORMATION ");
1533 DbgPrint(
" NTFS Version %u.%u Flags 0x%04hx ",
1536 VolInfoAttr->
Flags);
1545 ULONG CurrentOffset;
1565 DbgPrint(
" Offset to first index: 0x%lx\n Total size of index entries: 0x%lx\n Allocated size of node: 0x%lx\n",
1572 while (CurrentOffset < IndexRootAttr->
Header.TotalSizeOfEntries)
1575 DbgPrint(
" Index Node Entry %lu", CurrentNode++);
1585 DbgPrint(
" Index Entry Length: 0x%x\n", currentIndexExtry->
Length);
1605 DbgPrint(
" VCN of sub-node: 0x%llx\n", *SubNodeVCN);
1608 CurrentOffset += currentIndexExtry->
Length;
1625 switch (Attribute->
Type)
1640 DbgPrint(
" $SECURITY_DESCRIPTOR ");
1685 DbgPrint(
" $LOGGED_UTILITY_STREAM ");
1710 FindRun(Attribute,0,&lcn, &runcount);
1712 DbgPrint(
" AllocatedSize %I64u DataSize %I64u InitilizedSize %I64u\n",
1714 DbgPrint(
" logical clusters: %I64u - %I64u\n",
1715 lcn, lcn + runcount - 1);
1725 UCHAR DataRunOffsetSize;
1726 UCHAR DataRunLengthSize;
1734 DataRunOffsetSize = (*DataRun >> 4) & 0xF;
1735 DataRunLengthSize = *DataRun & 0xF;
1738 for (
i = 0;
i < DataRunLengthSize;
i++)
1744 for (
i = 0;
i < DataRunOffsetSize;
i++)
1758 PUCHAR DataRun = StartOfRun;
1762 if (CurrentLCN == 0)
1764 DPRINT1(
"Dumping data runs.\n\tData:\n\t\t");
1766 DbgPrint(
"\n\tRuns:\n\t\tOff\t\tLCN\t\tLength\n");
1769 DataRun =
DecodeRun(DataRun, &DataRunOffset, &DataRunLength);
1771 if (DataRunOffset != -1)
1772 CurrentLCN += DataRunOffset;
1774 DbgPrint(
"\t\t%I64d\t", DataRunOffset);
1775 if (DataRunOffset < 99999)
1778 if (CurrentLCN < 99999)
1780 DbgPrint(
"%I64u\n", DataRunLength);
1851 if (NumberToPack >= 0x0100000000000000)
1853 if (NumberToPack >= 0x0001000000000000)
1855 if (NumberToPack >= 0x0000010000000000)
1857 if (NumberToPack >= 0x0000000100000000)
1859 if (NumberToPack >= 0x0000000001000000)
1861 if (NumberToPack >= 0x0000000000010000)
1863 if (NumberToPack >= 0x0000000000000100)
1868 if (NumberToPack > 0)
1871 if (NumberToPack >= 0x0080000000000000)
1873 if (NumberToPack >= 0x0000800000000000)
1875 if (NumberToPack >= 0x0000008000000000)
1877 if (NumberToPack >= 0x0000000080000000)
1879 if (NumberToPack >= 0x0000000000800000)
1881 if (NumberToPack >= 0x0000000000008000)
1883 if (NumberToPack >= 0x0000000000000080)
1889 if (NumberToPack <= 0xff80000000000000)
1891 if (NumberToPack <= 0xffff800000000000)
1893 if (NumberToPack <= 0xffffff8000000000)
1895 if (NumberToPack <= 0xffffffff80000000)
1897 if (NumberToPack <= 0xffffffffff800000)
1899 if (NumberToPack <= 0xffffffffffff8000)
1901 if (NumberToPack <= 0xffffffffffffff80)
1922 DataRun =
DecodeRun(DataRun, &DataRunOffset, &DataRunLength);
1924 if (DataRunOffset != -1)
1927 DataRunStartLCN = LastLCN + DataRunOffset;
1928 LastLCN = DataRunStartLCN;
1929 *LastCluster = LastLCN + DataRunLength - 1;
#define ALIGN_UP_BY(size, align)
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 NameType
struct NTFS_ATTR_RECORD * PNTFS_ATTR_RECORD
#define NTFS_FILE_NAME_DOS
#define NTFS_INDEX_ENTRY_NODE
#define NTFS_FILE_NAME_WIN32
#define NTFS_INDEX_ENTRY_END
#define NTFS_FILE_NAME_POSIX
#define NTFS_FILE_NAME_WIN32_AND_DOS
static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex, PCHAR FileName, ULONGLONG *OutMFTIndex)
#define NT_SUCCESS(StatCode)
static LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
NTSTATUS AddRun(PNTFS_VCB Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, ULONGLONG NextAssignedCluster, ULONG RunLength)
PSTANDARD_INFORMATION GetStandardInformationFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord)
static NTSTATUS InternalReadNonResidentAttributes(PFIND_ATTR_CONTXT Context)
static PNTFS_ATTRIBUTE_LIST_ITEM InternalGetNextAttributeListItem(PFIND_ATTR_CONTXT Context)
PUCHAR DecodeRun(PUCHAR DataRun, LONGLONG *DataRunOffset, ULONGLONG *DataRunLength)
NTSTATUS GetLastClusterInDataRun(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_RECORD Attribute, PULONGLONG LastCluster)
NTSTATUS AddIndexRoot(PNTFS_VCB Vcb, PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress, PINDEX_ROOT_ATTRIBUTE NewIndexRoot, ULONG RootLength, PCWSTR Name, USHORT NameLength)
NTSTATUS ConvertDataRunsToLargeMCB(PUCHAR DataRun, PLARGE_MCB DataRunsMCB, PULONGLONG pNextVBN)
VOID NtfsDumpDataRuns(PVOID StartOfRun, ULONGLONG CurrentLCN)
ULONG GetFileNameAttributeLength(PFILENAME_ATTRIBUTE FileNameAttribute)
NTSTATUS FindFirstAttribute(PFIND_ATTR_CONTXT Context, PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord, BOOLEAN OnlyResident, PNTFS_ATTR_RECORD *Attribute)
static VOID NtfsDumpVolumeInformationAttribute(PNTFS_ATTR_RECORD Attribute)
NTSTATUS FindFirstAttributeListItem(PFIND_ATTR_CONTXT Context, PNTFS_ATTRIBUTE_LIST_ITEM *Item)
NTSTATUS FreeClusters(PNTFS_VCB Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, ULONG ClustersToFree)
NTSTATUS AddFileName(PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress, PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, BOOLEAN CaseSensitive, PULONGLONG ParentMftIndex)
VOID FindCloseAttribute(PFIND_ATTR_CONTXT Context)
static VOID NtfsDumpFileNameAttribute(PNTFS_ATTR_RECORD Attribute)
NTSTATUS AddBitmap(PNTFS_VCB Vcb, PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress, PCWSTR Name, USHORT NameLength)
PFILENAME_ATTRIBUTE GetFileNameFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord, UCHAR NameType)
NTSTATUS AddIndexAllocation(PNTFS_VCB Vcb, PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress, PCWSTR Name, USHORT NameLength)
NTSTATUS ConvertLargeMCBToDataRuns(PLARGE_MCB DataRunsMCB, PUCHAR RunBuffer, ULONG MaxBufferSize, PULONG UsedBufferSize)
VOID NtfsDumpDataRunData(PUCHAR DataRun)
VOID NtfsDumpFileAttributes(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord)
NTSTATUS AddData(PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress)
static VOID NtfsDumpAttribute(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_RECORD Attribute)
static VOID NtfsDumpStandardInformationAttribute(PNTFS_ATTR_RECORD Attribute)
NTSTATUS FindNextAttribute(PFIND_ATTR_CONTXT Context, PNTFS_ATTR_RECORD *Attribute)
NTSTATUS FindNextAttributeListItem(PFIND_ATTR_CONTXT Context, PNTFS_ATTRIBUTE_LIST_ITEM *Item)
UCHAR GetPackedByteCount(LONGLONG NumberToPack, BOOLEAN IsSigned)
static PNTFS_ATTR_RECORD InternalGetNextAttribute(PFIND_ATTR_CONTXT Context)
PFILENAME_ATTRIBUTE GetBestFileNameFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord)
NTSTATUS AddStandardInformation(PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttributeAddress)
BOOLEAN FindRun(PNTFS_ATTR_RECORD NresAttr, ULONGLONG vcn, PULONGLONG lcn, PULONGLONG count)
static VOID NtfsDumpVolumeNameAttribute(PNTFS_ATTR_RECORD Attribute)
static VOID NtfsDumpIndexRootAttribute(PNTFS_ATTR_RECORD Attribute)
struct FILENAME_ATTRIBUTE * PFILENAME_ATTRIBUTE
#define VALUE_OFFSET_ALIGNMENT
#define DATA_RUN_ALIGNMENT
struct INDEX_ENTRY_ATTRIBUTE * PINDEX_ENTRY_ATTRIBUTE
#define COLLATION_FILE_NAME
struct STANDARD_INFORMATION * PSTANDARD_INFORMATION
#define NTFS_FILE_TYPE_DIRECTORY
struct VOLINFO_ATTRIBUTE * PVOLINFO_ATTRIBUTE
struct INDEX_ROOT_ATTRIBUTE * PINDEX_ROOT_ATTRIBUTE
struct NTFS_ATTRIBUTE_LIST_ITEM * PNTFS_ATTRIBUTE_LIST_ITEM
@ AttributeStandardInformation
@ AttributeVolumeInformation
@ AttributeSecurityDescriptor
@ AttributeIndexAllocation
@ AttributeLoggedUtilityStream
#define ATTR_RECORD_ALIGNMENT
#define NTFS_FILE_TYPE_ARCHIVE
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeQuerySystemTime(t)
#define ROUND_UP(n, align)
#define BooleanFlagOn(F, SF)
struct _FileName FileName
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
_Out_ PLONGLONG _Out_ PLONGLONG LargeLbn
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
#define EXCEPTION_EXECUTE_HANDLER
BOOLEAN NTAPI RtlIsNameLegalDOS8Dot3(_In_ PUNICODE_STRING Name, _Inout_opt_ POEM_STRING OemName, _Inout_opt_ PBOOLEAN NameContainsSpaces)
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP, ULONG, ULONG)
VOID NTAPI FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb, IN LONGLONG Vbn)
BOOLEAN NTAPI FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG SectorCount)
VOID NTAPI FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb)
VOID NTAPI FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, IN POOL_TYPE PoolType)
BOOLEAN NTAPI FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn)
BOOLEAN NTAPI FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb, IN ULONG RunIndex, OUT PLONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG SectorCount)
NTSTATUS ReadFileRecord(PDEVICE_EXTENSION Vcb, ULONGLONG index, PFILE_RECORD_HEADER file)
NTSTATUS UpdateFileRecord(PDEVICE_EXTENSION Vcb, ULONGLONG MftIndex, PFILE_RECORD_HEADER FileRecord)
VOID ReleaseAttributeContext(PNTFS_ATTR_CONTEXT Context)
PNTFS_ATTR_CONTEXT PrepareAttributeContext(PNTFS_ATTR_RECORD AttrRecord)
ULONGLONG AttributeDataLength(PNTFS_ATTR_RECORD AttrRecord)
NTSTATUS FindAttribute(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, ULONG Type, PCWSTR Name, ULONG NameLength, PNTFS_ATTR_CONTEXT *AttrCtx, PULONG Offset)
ULONG ReadAttribute(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONG Length)
NTSTATUS WriteAttribute(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, const PUCHAR Buffer, ULONG Length, PULONG RealLengthWritten, PFILE_RECORD_HEADER FileRecord)
VOID SetFileRecordEnd(PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttrEnd, ULONG EndMarker)
PNTFS_ATTR_RECORD MoveAttributes(PDEVICE_EXTENSION DeviceExt, PNTFS_ATTR_RECORD FirstAttributeToMove, ULONG FirstAttributeOffset, ULONG_PTR MoveTo)
#define ExFreePoolWithTag(_P, _T)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
__GNU_EXTENSION typedef __int64 * PLONGLONG
_In_ ULONG _In_ ULONG _In_ ULONG Length
VOID NTAPI FsRtlDissectName(IN UNICODE_STRING Name, OUT PUNICODE_STRING FirstPart, OUT PUNICODE_STRING RemainingPart)
#define STATUS_NOT_IMPLEMENTED
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
#define STATUS_END_OF_FILE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
ULONGLONG DirectoryFileReferenceNumber
struct INDEX_ENTRY_ATTRIBUTE::@772::@773 Directory
union INDEX_ENTRY_ATTRIBUTE::@772 Data
FILENAME_ATTRIBUTE FileName
INDEX_HEADER_ATTRIBUTE Header
UCHAR ClustersPerIndexRecord
struct NTFS_ATTR_RECORD::@169::@171 Resident
struct NTFS_ATTR_RECORD::@169::@172 NonResident
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_FILE_CORRUPT_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength