ViInitializePadding

VOID __stdcall ViInitializePadding(
        VOID *RealBufferStart,
        UINT64 RealBufferLength,
        VOID *AdvertisedBufferStart,
        UINT64 AdvertisedBufferLength){
  UINT16 v4; 
  unsigned __int64 v5; 
  __int64 v6; 
  UINT16 v9; 

  HIBYTE(v4) = 0;
  v5 = (unsigned int)RealBufferLength;
  v6 = (unsigned int)AdvertisedBufferLength;
  if( (_DWORD)AdvertisedBufferLength )
  {
    memset(RealBufferStart, 15i64, (_DWORD)AdvertisedBufferStart - (_DWORD)RealBufferStart);
    memset(
      (char *)AdvertisedBufferStart + v6,
      15i64,
      (_DWORD)RealBufferStart + v5 - ((_DWORD)AdvertisedBufferStart + v6));
    LOBYTE(v4) = (char *)RealBufferStart + 8 <= AdvertisedBufferStart;
    v9 = v4 | 2;
    if( (_BYTE *)AdvertisedBufferStart + v6 - (_BYTE *)RealBufferStart + 8 > v5 )
      v9 = v4;
    ViTagBuffer(AdvertisedBufferStart, (unsigned int)v6, v9);
  }
  else
  {
    memset(RealBufferStart, 15i64, RealBufferLength);
  }
}

Referenced by:

ViAllocateMapRegisterFile
ViSpecialAllocateCommonBuffer