IopLiveDumpWriteSecondaryData

__int64 __fastcall IopLiveDumpWriteSecondaryData(HANDLE FileHandle, __int64 a2, union _LARGE_INTEGER *a3, _QWORD *a4){
  __int64 v4; 
  __int64 v5; 
  int v9; 
  UINT64 v10; 
  __int64 v11; 
  int Buffer[2]; 
  unsigned int v14; 
  int v15; 
  unsigned int i; 
  __int128 v17; 
  int v18; 
  int v19; 
  int v20; 
  v4 = *(_QWORD *)(a2 + 8);
  v5 = 0i64;
  if( v4 )
  {
    v14 = 16;
    qmemcpy(Buffer, "DumpBlob", sizeof(Buffer));
    v15 = NtBuildNumber;
    v9 = IopLiveDumpWriteBuffer(FileHandle, Buffer, 0x10ui64, a3);
    if( v9 >= 0 )
    {
      v19 = 0;
      v10 = 32i64;
      v20 = 0;
      v5 = v14;
      for( i = 32; ; v10 = i )
      {
        v17 = *(_OWORD *)v4;
        v18 = *(_DWORD *)(v4 + 24);
        v9 = IopLiveDumpWriteBuffer(FileHandle, &i, v10, a3);
        if( v9 < 0 )
          break;
        v5 += i;
        v9 = IopLiveDumpWriteBuffer(FileHandle, *(VOID **)(v4 + 16), *(unsigned int *)(v4 + 24), a3);
        if( v9 < 0 )
          break;
        v11 = *(unsigned int *)(v4 + 24);
        v4 = *(_QWORD *)(v4 + 32);
        v5 += v11;
        if( !v4 )
          break;
      }
    }
  }
  else
  {
    v9 = 0;
  }
  if( a4 )
    *a4 = v5;
  return(unsigned int)v9;
}

Referenced by:

IopLiveDumpWriteDumpFile