ExpCreateOutputARC
NTSTATUS __stdcall ExpCreateOutputARC(
_FILE_PATH *OutputPath,
UINT64 *OutputPathLength,
_UNICODE_STRING *pDeviceNameString,
WCHAR *pPathName){
NTSTATUS result;
wchar_t *v8;
__int64 v9;
__int64 v10;
int v11;
unsigned int v12;
unsigned int v13;
unsigned int v14;
unsigned int v15;
unsigned __int8 *FilePath;
unsigned int v17;
PVOID P;
P = 0i64;
result = ExpFindArcName(pDeviceNameString, (WCHAR **)&P);
if( result >= 0 )
{
v8 = (wchar_t *)P;
v9 = -1i64;
v10 = -1i64;
do
++v10;
while( *((_WORD *)P + v10) );
v11 = 2 * v10;
v12 = v11 + 2;
if( pPathName )
{
do
++v9;
while( pPathName[v9] );
v12 += 2 * v9;
}
v13 = v12;
v14 = v12 + 12;
v15 = v13 >> 1;
if( *(_DWORD *)OutputPathLength >= v14 )
{
OutputPath->Length = v14;
OutputPath->Version = 1;
OutputPath->Type = 1;
FilePath = OutputPath->FilePath;
v17 = v15;
wcscpy_s((PWCHAR)FilePath, v15, v8);
ExFreePoolWithTag(v8, 0);
if( pPathName )
wcscpy_s((PWCHAR)&FilePath[v11], v17, pPathName);
*(_DWORD *)OutputPathLength = v14;
return 0;
}
else
{
*(_DWORD *)OutputPathLength = v14;
ExFreePoolWithTag(v8, 0);
return -1073741789;
}
}
return result;
}Referenced by:
ExpConvertSignatureName
ExpTranslateEfiPath
ExpTranslateNtPath