KdpCopyCodeStream

NTSTATUS __stdcall KdpCopyCodeStream(UINT64 Address, VOID *Buffer, VOID *TotalSize, UINT64 Flags){
  int v4; 
  unsigned int v5; 
  NTSTATUS result; 
  UINT64 Flagsa; 
  UINT64 Flagsb; 

  v4 = Flags;
  LODWORD(Flagsa) = Flags;
  v5 = (unsigned int)TotalSize;
  result = KdpCopyMemoryChunks(Address, Buffer, (UINT64)TotalSize, (unsigned int)TotalSize, Flagsa, 0i64);
  if( result >= 0 )
    return 0;
  KdpOweBreakpoint = 1;
  if( (v4 & 5) == 5 )
  {
    LODWORD(Flagsb) = v4 | 0x40;
    result = KdpCopyMemoryChunks(Address, Buffer, v5, v5, Flagsb, 0i64);
    if( result >= 0 )
      return 259;
  }
  return result;
}

Referenced by:

KdpAddBreakpoint
KdpInsertBreakpoint
KdpLowRestoreBreakpoint
KdpLowWriteContent
KdpRemoveBreakpoint
KdpSetOwedBreakpoints