⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sunplus.pas

📁 sunplus firmware decrypt tool
💻 PAS
字号:
{
usage: sunplus.exe <filename.bin>
it will generate encoded/decoded _filename.bin
it just creates the file - without saying anything

version 0.02
bugfix
32bit compile (with LFN support!)


version 0.01:
first version
doesn't support long filenames (sorry)
says "runtime error 100" at end

}

program sunplus_decode_encode;
type l2=array[1..2]of longint;
     l4=array[1..2]of l2;
var z:array[1..2]of l4;
    y:l4;
    i:longint;
    f1,f2:file;

procedure xor_swap(var a:l2);
var b:longint;
begin
  b   :=a[1] xor $A5A5A5A5;
  a[1]:=a[2] xor $A5A5A5A5;
  a[2]:=b;
end;


begin
assign(f1,paramstr(1));
reset(f1,1);
assign(f2,'_'+paramstr(1));
rewrite(f2,1);
for i:=1 to filesize(f1) div sizeof(z)
 do
  begin
    blockread (f1,z,sizeof(z));
    xor_swap(z[1,1]);
    xor_swap(z[1,2]);
    xor_swap(z[2,1]);
    xor_swap(z[2,2]);
    y   :=z[1];
    z[1]:=z[2];
    z[2]:=y;
    blockwrite(f2,z,sizeof(z));
  end;
close(f1);
close(f2);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -