HalpQueryIdFdo

NTSTATUS __stdcall HalpQueryIdFdo(_DEVICE_OBJECT *DeviceObject, _BUS_QUERY_ID_TYPE IdType, WCHAR **BusQueryId){
  const wchar_t *v4; 
  const wchar_t *v5; 
  unsigned int v6; 
  unsigned __int64 v7; 
  VOID **PoolWithTag; 
  WCHAR *v9; 
  NTSTATUS result; 

  if( IdType < 0 )
    return -1073741637;
  if( IdType <= 1 )
  {
    v4 = L"acpiapic";
    v5 = L"acpiapic";
    do
      ++v5;
    while( *v5 );
    v6 = (_DWORD)v5 - (unsigned int)L"acpiapic" + 2;
    goto LABEL_6;
  }
  if( IdType != 3 )
    return -1073741637;
  v4 = L"0";
  v6 = 4;
LABEL_6:
  v7 = v6;
  PoolWithTag = ExAllocatePoolWithTag(1ui64, v6 + 2i64, 543973704i64);
  v9 = (WCHAR *)PoolWithTag;
  if( !PoolWithTag )
    return -1073741670;
  memmove(PoolWithTag, v4, v7);
  result = 0;
  v9[v7 >> 1] = 0;
  *BusQueryId = v9;
  return result;
}

Referenced by:

HalpDispatchPnp