PiDeferSetInterfaceState

NTSTATUS __stdcall PiDeferSetInterfaceState(_DEVICE_NODE *DeviceNode, _UNICODE_STRING *SymbolicLinkName){
  VOID **PoolWithTag; 
  _UNICODE_STRING *v5; 
  int UnicodeString; 
  _LIST_ENTRY *Blink; 

  PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x20ui64, 538996816i64);
  v5 = (_UNICODE_STRING *)PoolWithTag;
  if( !PoolWithTag )
    return -1073741670;
  UnicodeString = IopAllocateUnicodeString((_UNICODE_STRING *)PoolWithTag + 1, SymbolicLinkName->Length);
  if( UnicodeString < 0 )
  {
    UnicodeString = -1073741670;
    ExFreePoolWithTag(v5, 0);
  }
  else
  {
    RtlCopyUnicodeString(v5 + 1, SymbolicLinkName);
    Blink = DeviceNode->PendedSetInterfaceState.Blink;
    if( Blink->Flink != &DeviceNode->PendedSetInterfaceState )
      __fastfail(3u);
    *(_QWORD *)&v5->Length = &DeviceNode->PendedSetInterfaceState;
    v5->Buffer = (wchar_t *)Blink;
    Blink->Flink = (_LIST_ENTRY *)v5;
    DeviceNode->PendedSetInterfaceState.Blink = (_LIST_ENTRY *)v5;
  }
  return UnicodeString;
}

Referenced by:

IopProcessSetInterfaceState