ExpConvertSignatureName
INT64 __fastcall ExpConvertSignatureName(
UINT64 OutputType,
_FILE_PATH *OutputPath,
UINT64 *OutputPathLength,
WCHAR *pDeviceName,
WCHAR *pPathName,
UINT64 DeviceNameCount){
int v6;
INT64 result;
char v10;
int v11;
WCHAR *PoolWithTag;
WCHAR *v13;
NTSTATUS v14;
unsigned int OutputNT;
unsigned int v16;
char v17[8];
int v18;
unsigned int v19;
__int64 v20;
__int64 v21;
__int64 v22;
__int64 v23;
PVOID P[2];
GUID v25;
v6 = OutputType;
*(_DWORD *)&v17[4] = 0;
v19 = 0;
v20 = 0i64;
v23 = 0i64;
v21 = 0i64;
v22 = 0i64;
v25 = 0i64;
v17[0] = 0;
v17[1] = 0;
*(_OWORD *)P = 0i64;
LODWORD(result) = ExpParseSignatureName(
pDeviceName,
DeviceNameCount,
&v25,
(int *)&v17[4],
(__int64)&v20,
(__int64)&v21,
(__int64)v17,
(__int64)&v17[1]);
if( (int)result >= 0 )
{
if( v17[1] == 1 && v6 == 4 )
return ExpCreateOutputEFI(
OutputPath,
(unsigned int *)OutputPathLength,
&v25,
(__int64)&v17[4],
(__int64)&v20,
(__int64)&v21,
pPathName,
v17[0]);
v10 = v17[0];
v11 = 0;
if( !v17[0] )
v11 = *(_DWORD *)&v17[4];
v18 = v11;
result = ExpFindDiskSignature((__int64)&v25, &v18, &v19, (__int64)&v23, &v22, v17[0]);
if( (int)result >= 0 )
{
if( v17[1] == 1 && (*(_DWORD *)&v17[4] != v18 || v20 != v23 || v21 != v22) )
return 3221225485i64;
if( v6 == 4 )
return ExpCreateOutputEFI(
OutputPath,
(unsigned int *)OutputPathLength,
&v25,
(__int64)&v18,
(__int64)&v23,
(__int64)&v22,
pPathName,
v10);
PoolWithTag = (WCHAR *)ExAllocatePoolWithTag(NonPagedPoolNx, 0x5Eui64, 0x72766E45ui64);
v13 = PoolWithTag;
if( !PoolWithTag )
return 3221225626i64;
swprintf_s(PoolWithTag, 0x2Fui64, (WCHAR *)L"\\Device\\Harddisk%lu\\Partition%lu");
v14 = ExpTranslateSymbolicLink(v13, (UNICODE_STRING *)P);
ExFreePoolWithTag(v13, 0);
if( v14 < 0 )
return(unsigned int)v14;
if( v6 == 3 )
{
OutputNT = ExpCreateOutputNT((INT64)OutputPath, OutputPathLength, (const WCHAR **)P, pPathName);
}
else
{
if( v6 != 1 )
{
v16 = -1073741811;
goto LABEL_26;
}
OutputNT = ExpCreateOutputARC(OutputPath, OutputPathLength, (UNICODE_STRING *)P, pPathName);
}
v16 = OutputNT;
LABEL_26:
ExFreePoolWithTag(P[1], 0);
return v16;
}
}
return result;
}Referenced by:
ExpTranslateArcPath