function AnsiStringPartsCompare_Base(const S1, S2: String;
S1Index, S2Index, StrLength: Integer): Boolean;
begin
 if (CompareStringA(LOCALE_USER_DEFAULT, 0,
  PChar(S1) + S1Index - 1, StrLength,
  PChar(S2) + S2Index - 1, StrLength) = 2) and
  (ByteType(S1,S1Index)=ByteType(S2,S2Index)) then Result:=True
 else
  Result:=False;
end;

これではダメなの?
先頭のByteTypeが一致してれば残りも必ず一致すると思うんだけど。
あと、厳密な比較をしたいならCompareStringよりCompareMemのほうがいいような。