PdcPortOpenCommon

NTSTATUS __stdcall PdcPortOpenCommon(
        INT64 a1,
        INT64 a2,
        INT64 a3,
        INT64 *a4,
        INT64 a5,
        INT64 a6,
        INT64 a7,
        INT64 a8,
        CHAR **a9){
  VOID **v11; 
  VOID **PoolWithTag; 
  VOID **v13; 
  INT64 v14; 
  VOID **v15; 
  int v16; 
  UINT64 v18; 
  _QWORD v19[100]; 

  memset(v19, 0i64, sizeof(v19));
  v11 = 0i64;
  *a9 = 0i64;
  PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x6E8ui64, 1348691024i64);
  v13 = PoolWithTag;
  if( !PoolWithTag )
    goto LABEL_9;
  memset(PoolWithTag, 0i64, 0x6E8u);
  v13[1] = 0i64;
  v14 = *a4;
  *((_DWORD *)v13 + 4) = 68;
  *((_DWORD *)v13 + 5) = 4;
  *(_DWORD *)v13 = 1348691024;
  v13[218] = (VOID *)a3;
  v13[219] = (VOID *)v14;
  v19[1] = 0i64;
  v19[2] = 0i64;
  v19[7] = 0x400000044i64;
  HIDWORD(v19[5]) = 5;
  v19[0] = 52429560i64;
  v15 = ExAllocatePoolWithTag(1ui64, 0xB8ui64, 1348691024i64);
  v11 = v15;
  if( !v15 )
  {
LABEL_9:
    v16 = -1073741801;
LABEL_10:
    if( v13 )
      PdcpPortReleaseResources(v13);
    goto LABEL_6;
  }
  LODWORD(v18) = 0;
  *(_DWORD *)v15 = 1;
  v15[2] = v13;
  v15[1] = v19;
  v16 = ZwPowerInformation(PdcInvocation, v15, 0xB8ui64, 0i64, v18);
  if( v16 >= 0 )
  {
    *a9 = (CHAR *)v13;
    v16 = 0;
  }
  if( v16 < 0 )
    goto LABEL_10;
LABEL_6:
  if( v11 )
    ExFreePoolWithTag(v11, 0);
  return v16;
}

Referenced by:

PdcTaskClientRegister