SeDuplicateTokenAndAddOriginClaim
INT64 __fastcall SeDuplicateTokenAndAddOriginClaim(INT64 a1, VOID *a2, UINT64 a3, PVOID *a4){
unsigned int v5;
int v7;
struct _DMA_ADAPTER *v8;
int v9;
PADAPTER_OBJECT DmaAdapter;
_OBJECT_ATTRIBUTES ObjectAttributes;
DmaAdapter = 0i64;
memset(&ObjectAttributes.Length + 1, 0, 44);
v5 = a3;
ObjectAttributes.Length = 48;
v7 = SepDuplicateToken(
(_TOKEN *)a1,
&ObjectAttributes,
0,
TokenPrimary,
SecurityAnonymous,
0,
0,
(_TOKEN **)&DmaAdapter);
if( v7 < 0 )
{
v8 = 0i64;
DmaAdapter = 0i64;
goto LABEL_5;
}
v9 = SepAddTokenOriginClaim(a2, v5, DmaAdapter);
v8 = DmaAdapter;
v7 = v9;
if( v9 >= 0 )
{
*a4 = DmaAdapter;
LABEL_5:
if( v7 >= 0 )
return(unsigned int)v7;
}
if( v8 )
HalPutDmaAdapter(v8);
return(unsigned int)v7;
}Referenced by:
NtCreateUserProcess