IopSymlinkPropagateToExtensionIfNeeded
NTSTATUS __stdcall IopSymlinkPropagateToExtensionIfNeeded(
FILE_OBJECT *FileObject,
ECP_LIST *EcpList,
UNICODE_STRING *CompleteName){
_WORD *v5;
_FILE_OBJECT *RelatedFileObject;
int v7;
VOID **FileObjectExtension;
FSRTL_ALLOCATE_ECP_FLAGS v10;
VOID **v11;
unsigned int v12;
NTSTATUS v13;
PVOID EcpContext;
EcpContext = 0i64;
v5 = 0i64;
if( EcpList )
{
IopSymlinkRemoveECP(EcpList, (_RELATIVE_SYMLINK_INFO **)&EcpContext);
v5 = EcpContext;
if( EcpContext )
{
if( (*((_BYTE *)EcpContext + 2) & 1) != 0 )
goto LABEL_13;
LABEL_4:
v7 = 0;
goto LABEL_5;
}
}
RelatedFileObject = FileObject->RelatedFileObject;
if( !RelatedFileObject )
goto LABEL_4;
FileObjectExtension = (VOID **)IopGetFileObjectExtension(RelatedFileObject, FoExtTypeSymlink, 0i64);
v11 = FileObjectExtension;
if( !FileObjectExtension )
goto LABEL_4;
v12 = *((unsigned __int16 *)FileObjectExtension + 8) + CompleteName->Length + 2;
if( v12 >= 0xFFFF )
{
v7 = -1073741562;
goto LABEL_5;
}
v13 = FsRtlAllocateExtraCreateParameterFromLookasideList(
&IopSymlinkECPGuid,
(unsigned __int16)v12 + 32,
v10,
(PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK)IopSymlinkCleanupECP,
IopSymlinkInfoLookasideList,
&EcpContext);
v5 = EcpContext;
v7 = v13;
if( v13 < 0 )
goto LABEL_5;
IopSymlinkInitializeSymlinkInfo(
(INT64)EcpContext,
v12 + 32,
CompleteName->Buffer,
CompleteName->Length,
0,
v11[3],
*((_WORD *)v11 + 8),
*((_WORD *)v11 + 2),
*((_WORD *)v11 + 1),
0i64);
*v5 = *(_WORD *)v11 + v5[8] - *((_WORD *)v11 + 8);
LABEL_13:
v7 = IopSymlinkSetFoExtension(FileObject, (INT64)v5);
if( v7 >= 0 )
{
IopSymlinkFreeRelatedMountPointChain((INT64)v5);
return v7;
}
LABEL_5:
if( v5 )
{
IopSymlinkFreeRelatedMountPointChain((INT64)v5);
FsRtlFreeExtraCreateParameter(v5);
}
return v7;
}Referenced by:
IopParseDevice