Exp=f
//@p1=a:= aSoft_enc_1.a;
@c1=KeyReturn:= CalculateEx_2(@DecArray,a, b, c, d, PAnsiChar(KeyPath), 16,2000);
//@p2=a:= aSoft_enc_1.a;
@c2=KeyReturn:= CalculateEx_2(@DecArray,a, b, c, d, PAnsiChar(KeyPath),16, 2000);
@va=a
@vb=b
@vc=c
@vd=d
@end
                                        
//YStrCopy_1ãַи
//SƵԴַ
//ؽĿַԴַĿ
//KeyLastError=0ȷΪμֲ
function YStrCopy_1(S: AnsiString): AnsiString;
var
  a, b, c, d: byte;
  aLen, KeyReturn: integer;
  InArray, DecArray: array[0..15] of Byte;
  KeyInPath: array[0..Max_Path] of AnsiChar;
begin
	//칤ɵļܺļܱʽ
	//бܵıʽΪ@exp
	//ñʽֻǳǷڼ
  InArray[0]:=@ak100;InArray[1]:=@ak101;InArray[2]:=@ak102; InArray[3]:=@ak103;
  InArray[4]:=@ak104;InArray[5]:=@ak105;InArray[6]:=@ak106; InArray[7]:=@ak107;
  InArray[8]:=@ak108;InArray[9]:=@ak109;InArray[10]:=@ak110;InArray[11]:=@ak111;
  InArray[12]:=@ak112;InArray[13]:=@ak113;InArray[14]:=@ak114;InArray[15]:=@ak115;
   //ܺıʽ͵ннܲ¼ܣʹӦȨţעת
  //Ȼ󷵻ؼܺݣüܺüӦ
  //ֻбӦȨŽתݲܱӦļܲ
  KeyLastError:= E_Dec_6(PAnsiChar(E_HKey), PAnsiChar(E_LKey), @InArray, @DecArray, PAnsiChar(KeyPath));
  if KeyLastError <> 0 then Exit;
///////////////////////////////////////////////////////////////////////////////////////

  Result:= '';
  a:= 0; b:= 0; c:= 0; d:= 0; //ʼ

//ȽַSм
  if S= '' then
    begin
    KeyLastError:= -46;  //-46ʾЧ
    Exit;
    end;
  aLen:= Length(S); //ȡַSĳ

//ַĳȶʱиֵԱԺмܴ
  if aLen> 0 then a:= byte(S[1]); //ȡַĵһֵa;
  if aLen> 1 then b:= byte(S[2]); //ȡַĵڶֵb;
  if aLen> 2 then c:= byte(S[3]); //ȡַĵֵc;
  if aLen> 3 then d:= byte(S[4]); //ȡַĵĸֵd;

//ⲽa,b,c,d͵ڲм
//@fļе@pλдмʽ
  KeyReturn:= CalculateEx_2(@DecArray, a, b, c, d, PAnsiChar(KeyPath), 16,2000);
  if KeyReturn<> 0 then
    begin
    KeyLastError:= KeyReturn; //ô
    Result:= '';
    Exit;
    end;

//Ҫܺa,b,c,dڼӦĽ㣻
//ΪӦļô󣬾ܷԭֵ
//ҪµĽ
{$R-} //ҪλʱȡԽ
  @1
//{$R+} //ָָʾԽ⣬ɲøü⡣
//a,b,c,dͻصַ
  if aLen> 0 then S[1]:= Chr(a); //aֵŵַ
  if aLen> 1 then S[2]:= Chr(b); //bֵŵַ
  if aLen> 2 then S[3]:= Chr(c); //cֵŵַ
  if aLen> 3 then S[4]:= Chr(d); //dֵŵַ

//ԴַĿ
  Result:= S;
end;
////////////////////////////////////////////////////////////////////////////////