CmpRestampVersion

INT64 __stdcall CmpRestampVersion(HANDLE KeyHandle){
  __int64 v1; 
  __int64 v2; 
  int v4; 
  int v6; 
  void *Data; 
  int v8; 
  void *v9; 
  int v10; 
  void *v11; 
  int v12; 
  UINT64 DataSize; 
  UINT64 DataSizeb; 
  UINT64 DataSizec; 
  UINT64 DataSizea; 
  wchar_t Dst[128]; 
  v2 = v1;
  v4 = swprintf_s(Dst, 0x80ui64, (WCHAR *)L"%u");
  if( v4 == -1 )
    return 2147483653i64;
  v6 = (unsigned __int16)(2 * v4) + 2;
  LODWORD(DataSize) = v6;
  ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpCurrentBuildNumberString, 0i64, 1ui64, Dst, DataSize);
  LODWORD(DataSizeb) = v6;
  ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpCurrentBuildString, 0i64, 1ui64, Dst, DataSizeb);
  LODWORD(DataSizec) = 4;
  ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpUBRString, 0i64, 4ui64, (PVOID)(v2 + 4), DataSizec);
  Data = *(void **)(v2 + 16);
  if( Data )
  {
    v8 = *(unsigned __int16 *)(v2 + 8);
    if( (_WORD)v8 )
    {
      LODWORD(DataSizea) = v8 + 2;
      ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpBuildBranchString, 0i64, 1ui64, Data, DataSizea);
    }
  }
  v9 = *(void **)(v2 + 32);
  if( v9 )
  {
    v10 = *(unsigned __int16 *)(v2 + 24);
    if( (_WORD)v10 )
    {
      LODWORD(DataSizea) = v10 + 2;
      ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpBuildLabString, 0i64, 1ui64, v9, DataSizea);
    }
  }
  v11 = *(void **)(v2 + 48);
  if( v11 )
  {
    v12 = *(unsigned __int16 *)(v2 + 40);
    if( (_WORD)v12 )
    {
      LODWORD(DataSizea) = v12 + 2;
      ZwSetValueKey(KeyHandle, (UNICODE_STRING *)&CmpBuildLabExString, 0i64, 1ui64, v11, DataSizea);
    }
  }
  return 0i64;
}

Referenced by:

CmpSetVersionData