SepSetProcessUniqueAttribute
NTSTATUS __stdcall SepSetProcessUniqueAttribute(PVOID Token){
NTSTATUS result;
WCHAR v3;
_DWORD *v4;
UINT64 Index;
UINT64 Luid;
int v7[2];
struct _UNICODE_STRING *p_DestinationString;
struct _UNICODE_STRING DestinationString;
__int128 v10;
UINT64 *p_Index;
int v12;
_SEP_LUID_TO_INDEX_MAP_ENTRY *RefEntry;
p_Index = 0i64;
RefEntry = 0i64;
DestinationString = 0i64;
v10 = 0i64;
Luid = ExpLuidIncrement + _InterlockedExchangeAdd64(&ExpLuid, ExpLuidIncrement);
result = SepAddLuidToIndexEntry(&Luid, &Index, &RefEntry);
if( result >= 0 )
{
SepRefDerefLuidToIndexEntryIfNecessary(Token, 1u);
*((_QWORD *)Token + 142) = RefEntry;
RtlInitUnicodeString(&DestinationString, L"TSA:
v4 = (_DWORD *)*((_QWORD *)Token + 97);
DWORD2(v10) = 2;
*(_QWORD *)&v10 = 0x4100000002i64;
p_Index = &Index;
p_DestinationString = &DestinationString;
v12 = 4;
v7[0] = 1;
v7[1] = 1;
return AuthzBasepSetSecurityAttributesToken(v4, &v12, (__int64)v7);
}
return result;
}Referenced by:
SeSubProcessToken