PnpAllocateMultiSZ
__int64 __fastcall PnpAllocateMultiSZ(VOID *Src, __int64 a2, __int64 a3, _QWORD *a4){
int MultiSzLength;
UINT64 v7;
VOID **PoolWithTag;
__int64 v9;
__int64 v10;
UINT64 pullResult;
UINT64 ullMultiplicand;
ullMultiplicand = 0i64;
pullResult = 0i64;
MultiSzLength = 0;
*a4 = 0i64;
if( Src )
{
MultiSzLength = PnpGetMultiSzLength((__int64)Src, a2, &ullMultiplicand);
if( MultiSzLength >= 0 )
{
v7 = ullMultiplicand;
if( ullMultiplicand > 2 )
{
MultiSzLength = RtlULongLongMult(ullMultiplicand, 2ui64, &pullResult);
if( MultiSzLength >= 0 )
{
PoolWithTag = ExAllocatePoolWithTag(1ui64, pullResult, 1466986064i64);
*a4 = PoolWithTag;
if( PoolWithTag )
{
memmove(PoolWithTag, Src, pullResult);
v9 = 2 * v7;
v10 = 2i64;
do
{
v9 -= 2i64;
*(_WORD *)(v9 + *a4) = 0;
--v10;
}
while( v10 );
}
else
{
return(unsigned int)-1073741670;
}
}
}
}
}
return(unsigned int)MultiSzLength;
}Referenced by:
PiSwPdoPnPDispatch
PiSwPnPInfoInit