|
参考 Drive SnapShot 简易汉化工具_终版 的批处理,修改为不输出临时文件的版本:
相关工具下载:
http://bytepointer.com/download.php?name=pelook.zip
http://stahlworks.com/dev/sfk/sfkwinxp.exe
https://github.com/upx/upx/relea ... /upx-3.96-win32.zip
- @echo off
- cd /d %~dp0
- if not exist snapshot.exe echo 请重新安装程序!&pause&exit
- if not exist snapshot64.exe echo 请重新安装程序!&pause&exit
- :: http://bytepointer.com/download.php?name=pelook.zip
- if not exist pelook.exe echo 缺少 pelook.exe 文件!&pause&exit
- :: http://stahlworks.com/dev/sfk/sfkwinxp.exe
- if not exist sfkwinxp.exe echo 缺少 sfkwinxp.exe 文件!&pause&exit
- :: https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win32.zip
- if not exist upx.exe echo 缺少 upx.exe 文件!&pause&exit
- set FileName=snapshot.exe
- :: 获取 PE 头
- for /f "tokens=3" %%i in ('pelook.exe -d %FileName%^|findstr "PE"') do set PE=0x%%i
- :: 获取 安全目录 偏移 值
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%PE%+152"') do set Security_Directory_RVA_Offset=%%i
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%PE%+156"') do set Security_Directory_Size_Offset=%%i
- for /f "tokens=8,10 delims=- " %%i in ('pelook.exe -s %FileName%') do (set SDRV=%%i & set SDSV=%%j)
- :: 高低位转换
- set "Security_Directory_RVA_Value=0x%SDRV:~6,2%%SDRV:~4,2%%SDRV:~2,2%%SDRV:~0,2%"
- set "Security_Directory_Size_Value=0x%SDSV:~6,2%%SDSV:~4,2%%SDSV:~2,2%%SDSV:~0,2%"
- :: 解压缩
- upx.exe -d --strip-relocs=0 %FileName%
- :: 修复 病毒警告
- sfkwinxp.exe replace -binary /E000220D/E000230D/ -dir . -file %FileName% -yes
- sfkwinxp.exe replace -binary /742081BD/EB0C81BD/ -dir . -file %FileName% -yes
- :: 修复 中文限制
- sfkwinxp.exe replace -binary /743A5768/EB3A5768/ -dir . -file %FileName% -yes
- :: 汉化
- call :HH
- :: 压缩
- upx.exe -9 --compress-exports=0 --strip-relocs=0 --compress-icons=0 --lzma %FileName%
- :: 修复 数字证书
- sfkwinxp.exe setbytes %FileName% %Security_Directory_RVA_Offset% %Security_Directory_RVA_Value% -yes
- sfkwinxp.exe setbytes %FileName% %Security_Directory_Size_Offset% %Security_Directory_Size_Value% -yes
- :: 注册
- for /f "tokens=6 delims= " %%i in ('sfk xhexfind -text "/\x53\x4e\x41\x53\x45\x52\x4e\x55\x4d\x00\x8f\x0a/" -dir . -file %FileName%^|findstr "%FileName%"') do set SNASERNUM=%%i
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+12"') do set Name=%%i
- :: 简体中文版
- sfkwinxp.exe setbytes %FileName% %Name% 0xBCF2CCE5D6D0CEC4B0E60000000000000000 -yes
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+76"') do set Vers=%%i
- :: 111111U - Site License
- sfkwinxp.exe setbytes %FileName% %Vers% 0x31313131313155202D2053697465204C6963656E7365 -yes
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+108"') do set Serial=%%i
- :: 25D4-5455-467B-B161
- sfkwinxp.exe setbytes %FileName% %Serial% 0x323544342D353435352D343637422D42313631 -yes
- set FileName=snapshot64.exe
- :: 获取 PE 头
- for /f "tokens=3" %%i in ('pelook.exe -d %FileName%^|findstr "PE"') do set PE=0x%%i
- :: 获取 安全目录 偏移 值
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%PE%+168"') do set Security_Directory_RVA_Offset=%%i
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%PE%+172"') do set Security_Directory_Size_Offset=%%i
- for /f "tokens=8,10 delims=- " %%i in ('pelook.exe -s %FileName%') do (set SDRV=%%i & set SDSV=%%j)
- :: 高低位转换
- set "Security_Directory_RVA_Value=0x%SDRV:~6,2%%SDRV:~4,2%%SDRV:~2,2%%SDRV:~0,2%"
- set "Security_Directory_Size_Value=0x%SDSV:~6,2%%SDSV:~4,2%%SDSV:~2,2%%SDSV:~0,2%"
- :: 解压缩
- upx.exe -d --strip-relocs=0 %FileName%
- :: 修复 病毒警告
- sfkwinxp.exe replace -binary /E000220D/E000230D/ -dir . -file %FileName% -yes
- sfkwinxp.exe replace -binary /742081BD/EB0C81BD/ -dir . -file %FileName% -yes
- :: 修复 中文限制
- sfkwinxp.exe replace -binary /743A5768/EB3A5768/ -dir . -file %FileName% -yes
- :: 汉化
- call :HH
- :: 压缩
- upx.exe -9 --compress-exports=0 --strip-relocs=0 --compress-icons=0 --lzma %FileName%
- :: 修复 数字证书
- sfkwinxp.exe setbytes %FileName% %Security_Directory_RVA_Offset% %Security_Directory_RVA_Value% -yes
- sfkwinxp.exe setbytes %FileName% %Security_Directory_Size_Offset% %Security_Directory_Size_Value% -yes
- :: 注册
- for /f "tokens=6 delims= " %%i in ('sfk xhexfind -text "/\x53\x4e\x41\x53\x45\x52\x4e\x55\x4d\x00\x8f\x0a/" -dir . -file %FileName%^|findstr "%FileName%"') do set SNASERNUM=%%i
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+12"') do set Name=%%i
- :: 简体中文版
- sfkwinxp.exe setbytes %FileName% %Name% 0xBCF2CCE5D6D0CEC4B0E60000000000000000 -yes
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+76"') do set Vers=%%i
- :: 111111U - Site License
- sfkwinxp.exe setbytes %FileName% %Vers% 0x31313131313155202D2053697465204C6963656E7365 -yes
- for /f "delims=" %%i in ('sfkwinxp.exe calc "%SNASERNUM%+108"') do set Serial=%%i
- :: 25D4-5455-467B-B161
- sfkwinxp.exe setbytes %FileName% %Serial% 0x323544342D353435352D343637422D42313631 -yes
- pause
- exit
- :HH
- :: Dynamic partition = 动态分区
- sfkwinxp.exe replace -binary /44796E616D696320706172746974696F6E/B6AFCCACB7D6C7F8000000000000000000/ -dir . -file %FileName% -yes
- :: Logical drive = 逻辑驱动
- sfkwinxp.exe replace -binary /4C6F676963616C206472697665/C2DFBCADC7FDB6AF0000000000/ -dir . -file %FileName% -yes
- :: Extended partition = 扩展分区
- sfkwinxp.exe replace -binary /457874656E64656420706172746974696F6E/C0A9D5B9B7D6C7F800000000000000000000/ -dir . -file %FileName% -yes
- :: Primary partition = 主分区
- sfkwinxp.exe replace -binary /5072696D61727920706172746974696F6E/D6F7B7D6C7F80000000000000000000000/ -dir . -file %FileName% -yes
- :: Unallocated = 未分配
- sfkwinxp.exe replace -binary /556E616C6C6F6361746564/CEB4B7D6C5E40000000000/ -dir . -file %FileName% -yes
- :: Boot partition = 启动分区
- sfkwinxp.exe replace -binary /426F6F7420706172746974696F6E/C6F4B6AFB7D6C7F8000000000000/ -dir . -file %FileName% -yes
复制代码
|
评分
-
查看全部评分
|