FsRtlNotifyUpdateBuffer
UINT8 __stdcall FsRtlNotifyUpdateBuffer(
FILE_NOTIFY_INFORMATION *NotifyInfo,
UINT64 FileAction,
STRING *ParentName,
STRING *TargetName,
STRING *StreamName,
UINT8 UnicodeName,
UINT64 SizeOfEntry){
unsigned int v10;
UINT64 v11;
ULONG Length;
bool v13;
WCHAR *FileName;
STRING *v15;
UINT8 *v16;
__int64 v18;
__int64 v19;
__int64 v20;
UINT64 BytesInOemString;
UINT64 BytesInOemStringa;
UINT64 BytesInUnicodeString[2];
v10 = 0;
NotifyInfo->NextEntryOffset = 0;
NotifyInfo->Action = FileAction;
v11 = (unsigned int)(SizeOfEntry - 12);
if( (_DWORD)SizeOfEntry == 12 )
return 0;
NotifyInfo->FileNameLength = v11;
Length = ParentName->Length;
if( !UnicodeName )
{
LODWORD(BytesInUnicodeString[0]) = 0;
if( (_WORD)Length )
{
LODWORD(BytesInOemString) = Length;
RtlOemToUnicodeN(NotifyInfo->FileName, v11, BytesInUnicodeString, ParentName->Buffer, BytesInOemString);
Length = BytesInUnicodeString[0];
*(WCHAR *)((char *)NotifyInfo->FileName + LODWORD(BytesInUnicodeString[0])) = 92;
v10 = Length + 2;
LOWORD(Length) = ParentName->Length;
}
v13 = (_WORD)Length == 0;
FileName = NotifyInfo->FileName;
if( !v13 )
{
LODWORD(BytesInOemString) = TargetName->Length;
RtlOemToUnicodeN(
(WCHAR *)((char *)FileName + v10),
NotifyInfo->FileNameLength,
BytesInUnicodeString,
TargetName->Buffer,
BytesInOemString);
if( StreamName )
{
v20 = LODWORD(BytesInUnicodeString[0]) + v10;
*(WCHAR *)((char *)NotifyInfo->FileName + v20) = 58;
LODWORD(BytesInOemStringa) = StreamName->Length;
RtlOemToUnicodeN(
(WCHAR *)((char *)&NotifyInfo->FileName[1] + (unsigned int)v20),
NotifyInfo->FileNameLength,
BytesInUnicodeString,
StreamName->Buffer,
BytesInOemStringa);
}
return 1;
}
v15 = StreamName;
v16 = (UINT8 *)FileName + v10;
goto LABEL_7;
}
if( (_WORD)Length )
{
memmove((UINT8 *)NotifyInfo->FileName, (UINT8 *)ParentName->Buffer, ParentName->Length);
v18 = ParentName->Length;
if( NotifyInfo->FileNameLength < (unsigned __int64)(v18 + 2) )
return 0;
*(WCHAR *)((char *)NotifyInfo->FileName + v18) = 92;
v10 = ParentName->Length + 2;
}
memmove((UINT8 *)NotifyInfo->FileName + v10, (UINT8 *)TargetName->Buffer, TargetName->Length);
v15 = StreamName;
if( StreamName )
{
v19 = TargetName->Length + v10;
*(WCHAR *)((char *)NotifyInfo->FileName + v19) = 58;
v16 = (UINT8 *)&NotifyInfo->FileName[1] + (unsigned int)v19;
LABEL_7:
memmove(v16, (UINT8 *)v15->Buffer, v15->Length);
}
return 1;
}Referenced by:
FsRtlNotifyFilterReportChange