PspAssignSiloSystemRootPath
INT64 __stdcall PspAssignSiloSystemRootPath(_EJOB *Silo, UINT16 *a2){
__int64 v3;
_WORD *v5;
INT64 result;
PADAPTER_OBJECT v7;
UINT8 *v8;
unsigned int inserted;
PADAPTER_OBJECT DmaAdapter;
DmaAdapter = 0i64;
v3 = *a2;
if( (unsigned int)v3 < 8 )
return 3221225485i64;
if( (unsigned __int64)(v3 - 2) > 0x208 )
return 3221225485i64;
v5 = (_WORD *)*((_QWORD *)a2 + 1);
if( (unsigned __int16)(*v5 - 65) > 0x19u
|| v5[1] != 58
|| v5[2] != 92
|| v5[((unsigned __int64)(unsigned int)v3 >> 1) - 1] == 92 )
{
return 3221225485i64;
}
result = PsCreateSiloContext((__int64)Silo, (int)v3 + 16, 1, 0i64, (__int64 *)&DmaAdapter);
if( (int)result >= 0 )
{
v7 = DmaAdapter;
v8 = (UINT8 *)&DmaAdapter[1];
DmaAdapter->DmaOperations = (_DMA_OPERATIONS *)&DmaAdapter[1];
v7->Version = *a2;
v7->Size = *a2;
memmove(v8, *((UINT8 **)a2 + 1), *a2);
inserted = PsInsertSiloContext(Silo, (unsigned int)PsSystemRootSiloContextSlot, v7);
HalPutDmaAdapter(v7);
return inserted;
}
return result;
}Referenced by:
NtSetInformationJobObject