KiTpFetchInstructionBytes

INT64 __fastcall KiTpFetchInstructionBytes(INT64 a1, _BYTE *a2, INT64 a3, _DWORD *a4){
  __int64 v4; 
  INT64 v6; 
  INT64 v7; 
  v4 = (unsigned int)*a4;
  if( (int)v4 + (int)a3 > (unsigned int)*(unsigned __int8 *)(a1 + 5) )
    return 3221225990i64;
  *a4 = v4 + a3;
  v6 = v4 + a1 + 6;
  if( (_DWORD)a3 )
  {
    v7 = v6 - (_QWORD)a2;
    do
    {
      *a2 = a2[v7];
      ++a2;
      LODWORD(a3) = a3 - 1;
    }
    while( (_DWORD)a3 );
  }
  return 0i64;
}

Referenced by:

KiTpDecodeModRm
KiTpEmulateInstruction
KiTpFetchImmediateOperand
KiTpParseInstructionPrefix