SmKmAllocateMdlForLock
_MDL *__stdcall SmKmAllocateMdlForLock(UINT64 Size){
_MDL *v2;
int v3;
UINT64 v4;
VOID **PoolWithTag;
VOID **v6;
v2 = 0i64;
v3 = SmAcquireReleaseCharges(Size, 3ui64, 0i64);
if( v3 )
{
v4 = (Size + 4095) >> 12;
PoolWithTag = ExAllocatePoolWithTag(0x200ui64, 8 * v4 + 48, 1280339315i64);
v6 = PoolWithTag;
if( PoolWithTag )
{
*PoolWithTag = 0i64;
v2 = (_MDL *)PoolWithTag;
*((_WORD *)PoolWithTag + 4) = 8 * (v4 + 6);
v6 = 0i64;
*((_WORD *)PoolWithTag + 5) = 0;
v3 = 0;
PoolWithTag[4] = 0i64;
*((_DWORD *)PoolWithTag + 11) = 0;
*((_DWORD *)PoolWithTag + 10) = Size;
}
if( v3 )
SmAcquireReleaseCharges(Size, 3ui64, 1ui64);
if( v6 )
ExFreePoolWithTag(v6, 0);
}
return v2;
}Referenced by:
SmFpAllocate
SmFpPreAllocate