CmpLoadManufacturingProfileNode

BOOL __fastcall CmpLoadManufacturingProfileNode(INT64 a1, INT64 a2, const WCHAR *a3, INT64 *a4, INT64 a5){
  __int64 v5; 
  unsigned int SubKeyByName; 
  _CM_KEY_NODE *Parent; 
  struct _UNICODE_STRING DestinationString; 
  int v13; 
  int v14; 
  Parent = 0i64;
  LODWORD(v5) = 0;
  v13 = -1;
  v14 = 0;
  DestinationString = 0i64;
  if( a3 )
  {
    LODWORD(v5) = CmpLoadManufacturingModeNode(a1, a2, (INT64 *)&Parent, (INT64)&v13);
    if( (_BYTE)v5 )
    {
      if( (int)RtlInitUnicodeStringEx(&DestinationString, (WCHAR *)a3) >= 0 )
      {
        SubKeyByName = CmpFindSubKeyByName((_HHIVE *)a1, Parent, &DestinationString);
        v5 = (*(__int64(__fastcall **)(INT64, int *))(a1 + 16))(a1, &v13);
        if( SubKeyByName != -1 )
        {
          v5 = (*(__int64(__fastcall **)(INT64, _QWORD, INT64))(a1 + 8))(a1, SubKeyByName, a5);
          *a4 = v5;
          if( v5 )
          {
            LOBYTE(v5) = 1;
            return v5;
          }
        }
      }
      else
      {
        v5 = (*(__int64(__fastcall **)(INT64, int *))(a1 + 16))(a1, &v13);
      }
    }
  }
  LOBYTE(v5) = 0;
  return v5;
}

Referenced by:

CmpLoadManufacturingProfileServicesNode