Voy a probar a escribirla directamente aquí:
Código Delphi
[-]
function Separar(Str: String): String;
begin
Result:= EmptyStr;
while Length(Str) > 3 then
begin
Result:= Result + Copy(Str,1,3) + '-';
Delete(Str,1,3);
end;
Result:= Result + Str;
end;
Por ejemplo:
Código Delphi
[-]
ShowMessage(Separar('214KGDHJHENB123BAD'));
¿Funciona?