|
|
|
请问这是什么压缩算法?
看起来是一个非常简单的基于LZ算法的解压程序。 字典是4KB,有点像LZRW1算法. //LZRW1解压程序: U32 LZRW1::Decompress(U8 *src,U32 srclen,U8 *dst) { U32 ctrl=1; U8 *srcnow=src+1; U8 *dstnow=dst; if(*src==LZRW1_FLAG_RAW) { memcpy(dstnow,src+1,srclen-1); dstnow+=srclen-1; } else { if(*src!=LZRW1_FLAG_LZRW1) LZRW1_ERROR_BLOCKFLAG; while(srcnow<src+srclen) { if(ctrl==1) ctrl=0x100+*srcnow++; if(ctrl&1) { U32 off=((srcnow[0]&0xF0)<<4)+srcnow[1]; U32 len= (srcnow[0]&0x0F)+1; srcnow+=2; U8 *p=dstnow-off; while(len--) *dstnow++=*p++; } else *dstnow++=*srcnow++; ctrl>>=1; } } return dstnow-dst; } |
|
北斗压缩壳是不是只要DUMP基本上就可以了
DUMP+ImportREC可脱几乎所有纯压缩壳. |
|
VC++6.0绿色版
[QUOTE]最初由 china 发布 我FTP里的这个是CCF里放出来的一个。 ===================================== 我还是把我的DIY版本上传了.7zip压缩到36M 以下是简要说明: Visual C++ (6.0sp5+6.0sp6+7.1+8.0beta)绿色版(By Dwing) 安装说明: 1. 解压后(共2441个文件,247MB), 复制System32中的所有文件到系统目录中,重复文件建议不要覆盖! (Windows2000/XP系统目录一般是:Windows\System32) (Windows 9x/ME系统目录一般是:Windows\System) 2. 执行MSDev98\Bin\MSDEV.exe打开VC的IDE,并设置BIN/INCLUDE/LIB目录. 如需使用VC7.1或VC8.0的编译器,则需在MSDEV环境中修改BIN路径中VC60\Bin为VC71\Bin或VC80\Bin 3. 当前VC6的编译器内核是SP6,如需要使用SP5的编译内核(可识别SSE/3Dnow!指令), 则把VC60\Bin\中的C2sp5.DLL覆盖原来的C2.DLL. (不知道为什么SP6的C2.DLL又不支持SSE/3Dnow!指令了所以有不少人只用SP5) 4. 包含以下组件: <开发环境> Microsoft Developer Studio 6.00.9782.2(MSDev98英文版+sp6) <编译器/汇编器> Microsoft 32-bit C++ Optimizing Compiler 12.00.8804 for 80x86(英文版) Microsoft 32-bit C++ Optimizing Compiler 13.10.3077 for 80x86(中文版) Microsoft 32-bit C++ Optimizing Compiler 14.00.40607.16 for 80x86(英文版) Microsoft Macro Assembler 6.15.8803 Microsoft Macro Assembler 8.00.40607.16 NASM 0.98.39 for 32-bit Windows <编程库> C/C++: 静态库(6/7),动态库(6/7),debug静态库(6/7),debug动态库(6/7) Win32SDK:动态库(7)(附带DirectX8.1库,增加OpenGL扩展库) MFC: 静态库(6),动态库(6),debug静态库(6),debug动态库(6),源代码(6) ATL: 编程库(6),源代码(6) <开发工具> SPY++,...... 5. 已知的兼容性问题: (1)VC6与VC7的编译器与C标准库一般不能混用,否则编译浮点运算会出现链接出错. (2)VC6的IDE无法调试VC7编译器产生的程序. 6. 注:其实VC2005(8.0)的正式版已经出来了,但还没来得及加入(虽只有beta版,但几乎与完整版一样). 值得一提的是VC2005的Express版是完全免费的,微软官方网站可下载. |
|
(Win)Upack 0.39final
最初由 auser 发布 呵呵,这个是老问题了. 自定义入口一定要用ExitProcess/ExitThread/exit退出,否则退出时在Win9x中会"非法操作". |
|
VC++6.0绿色版
最初由 heng9ml 发布 我的DIY版本虽然是免安装的,但第一次运行是需要配置的. 由于编译器版本较多(6.0sp5/6,7.1,8.0),库文件只有7.1版的,编译肯定会有一定的兼容性问题,虽然我已经有解决方法,但新手一般很难掌握,所以不建议都使用这个DIY版本了. Crack Tools 2006工具精品盘中有一个绿色的版本,似乎也不错,只推荐熟悉VC的尝试尝试: http://bbs.pediy.com/showthread.php?s=&threadid=19933 |
|
(Win)Upack 0.39final
最初由 auser 发布 这个程序的SectionAlignment值不标准,正常的应该是1000h,而这个程序是200h. 因为Upack不能处理相对地址<1000h位置的数据. 因此不要自定义SectionAlignment的值,这样做也会造成兼容性问题,如无法在Win9x中运行. |
|
win98绿色版[推荐]
厉害!优化几乎到极限了. Win98SE的内核 + Win95版的shell(即explorer.exe,和regedit.exe是仅有的两个图形应用程序,可惜没有控制面板). |
|
VC++6.0绿色版
不过我用的是自己做的VC6.0绿色版. 含MSDEV98的IDE,VC6.0(sp5/6)/7.1/8.0/MASM32/NASM的编译器,Win32SDK/C/C++/MFC/DX8.1全套库, 压缩起来才不到50MB.可惜没有空间存放. |
|
VC++6.0绿色版
最初由 fslove 发布 不含编译器?那就不要说是"VC++6.0绿色版"嘛,容易让人误解. |
|
优化C++程序编译效率的实例
最初由 goldenegg 发布 可能是对我的话理解有误.我们的观点是一样的. 再补充一下: Win95OSR2(Win97)虽然自带msvcrt40.dll和mfc30.dll,但不是目前的标准库了. Win98SE自带了msvcrt.dll和mfc42.dll,Win98第一版不知有没有. WinXP第一版肯定不带msvcr71.dll和mfc71.dll,这些是VC7.1才使用的动态库. |
|
[求助]我的V6.0安装不了.
最初由 kyc 发布 复制安装盘以下目录到安装目录: \VC98 \COMMON 复制安装盘以下目录中的文件到系统的SYSTEM32(Win9x/ME的SYSTEM)目录(不要覆盖同名文件): \VC98\DEBUG \OS\SYSTEM 然后运行COMMON\MSDEV98\BIN\MSDEV.EXE启动VC, 第一次运行需要设置BIN/INCLUDE/LIB路径. 另外需要手动关联文件类型. |
|
优化C++程序编译效率的实例
再补充几点: #pragma comment (linker, "/align:0x200") 这着我也经常用,不过我经常这么写(只用于VC6.0): #pragma comment(linker,"/OPT:NOWIN98") 但是如果要加压缩壳的话,这个PE文件空间优化没有一点作用, 因为虚拟地址没有改变(仍然是4KB,而且无法改变). #pragma comment (linker, "/ALIGN:16") 对齐到16字节可能有兼容性问题,可能不能在Win9x中运行. #pragma comment(linker, "/ENTRY:EntryPoint") 如果没有不加入默认库的话可以不用自定义入口. 而直接用void mainCRTStartup()或void WinMainCRTStartup()即可. 但不使用默认库可能某些浮点数的转换会出现问题,虽然可以使用其他方法解决. #pragma comment (linker, "/OPT:REF") 这一项其实在默认的优化编译设置中已经有了,不用写出来. 如果启动"/OPT:REF"的话,"/OPT:ICF"默认会自动启动. #pragma comment (linker,"/merge:.rsrc=.text") 这项一定不要加,有时候如果资源不在某个节(段)的开始,程序的图标可能不能显示出来. |
|
优化C++程序编译效率的实例
楼主的文章写的不错! 但标题写的有点疑虑. 因为优化有几种意义:速度优化,代码空间优化,编译速度优化和内存占用优化. 一般来说需要速度优化的地方,代码空间优化和内存占用优化就要牺牲一些. 编译速度优化可能意义不太大,不过我还是补充一下: 例如添加以下宏可以提高一些编译速度,在硬盘和CPU速度较慢的机器上尤为明显. #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #define WIN32_EXTRA_LEAN 另外如果关闭预编译头文件的功能,可以大大提高第一次编译的速度,并减少硬盘占用的空间. 强烈建议编译小程序的时候关闭这个功能,因为它默认是启动的. 下面评价一下楼主的一些优化,仅供参考. (1)自定义程序的入口 一般不建议使用自定义入口,虽然只有使用动态库时只节省不到1KB. 主要是考虑到C++的全局对象的构造,如果自定义就会被忽略掉. 不过如果确实想使代码精简到极限,可以考虑. 此优化对速度几乎无影响. (2)合并区段 这一项对减小PE文件大小很有帮助,但一定要注意正确设置好节(段)属性,否则后果不可知. 表面上此优化对速度无影响,但可能会导致数据cache与代码cache重叠,不利于CPU的执行. 如果需要加压缩壳,此优化可能无效,如果合并不当可能还会使压缩能力降低(例如代码被混合在数据当中). (3)不用调malloc,free等函数 分配内存不用malloc,free等函数用什么?new和delete吗?后者当然更好:) Win32API有众多分配内存的函数,malloc等C/C++标准库当然使用的是API中的 堆分配(HeapAlloc),而堆分配调用虚拟分配(VirtualAlloc).效率当然是后者高一些. 但实际内存分配一般在初始化过程中使用,而且使用次数也不应过多(以避免内存碎片). 所以速度影响几乎可忽略. 代码量应该不会有太大影响. (3)不用cout来输出,cin来输入 这个确实可以使用C标准库来替代,而且使用灵活,速度更快一些. 如果使用动态库,代码量差距不大. (4)如果调用了很多库函数如memset,stycpy等等的话,请导入msvcrt.lib, 这点不用担心了.原因如下: 如果使用最快速度优化,memset,stycpy,sin等某些内存/字符串/数学函数会被自动内联到程序中, 无论是否使用动态库还是静态库,速度要快的多,我也推荐这么做. 使用次数过多代码量会大一些.但如果加压缩壳的话影响不会太大. 如果使用最小代码优化,自动内联的函数不会内联,此时可使用动态库以减小代码量. 如果只使用1~2次某个可自动内联的函数的话代码量可能反而更多(还要考虑到导入表) (5)window编程不用mfc... 呵呵,这就不一定了.目前如果没有还在使用Win95系统的话,MFC的动态库就可以大胆使用了. 但要注意一定要使用MFC42.DLL的库,也就是VC6.0自带的库,高版本的可能连WinXP也不会自带. 减少程序运行内存占用量可以调用SetProcessWorkingSetSize(GetCurrentProcess(),-1,-1); 又学到一招! 但我不得不说一下:这是个骗人的招数.拿来骗一骗初级用户还可以-_- 因为任务管理器只显示进程当前使用的物理内存大小,所以使用这个招数虽然可以降低物理内存占用. 但虚拟内存并无减少,所以这个技巧只建议使用在后台或很少工作的进程. 经常使用这个函数会造成CPU负担过重,磁盘交换文件的读写也会更频繁.这样会很影响进程的执行效率. 其实不需要在意物理内存占用,如果物理内存不够用,系统会自动降低不常工作的进程的物理内存. |
|
优化C++程序编译效率的实例
我有中文版的编译器: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. C/C++ 编译器选项 -优化- /O1 最小化空间 /Op[-] 改善浮点数一致性 /O2 最大化速度 /Os 优选代码空间 /Oa 假设没有别名 /Ot 优选代码速度 /Ob<n> 内联展开(默认 n=0) /Ow 假设交叉函数别名 /Od 禁用优化(默认值) /Ox 最大化选项。(/Ogityb2 /Gs) /Og 启用全局优化 /Oy[-] 启用框架指针省略 /Oi 启用内部函数 -代码生成- /G3 为 80386 进行优化 /Gh 启用 _penter 函数调用 /G4 为 80486 进行优化 /GH 启用 _pexit 函数调用 /G5 为 Pentium 进行优化 /GR[-] 启用 C++ RTTI /G6 对 PPro、P-II、P-III 进行优化 /GX[-] 启用 C++ EH (与 /EHsc 相同) /G7 对 Pentium 4 或 Athlon 进行优化 /EHs 启用 C++ EH (没有 SEH 异常) /GB 为混合模型进行优化(默认) /EHa 启用 C++ EH(w/ SEH 异常) /Gd __cdecl 调用约定 /EHc extern "C" 默认为 nothrow /Gr __fastcall 调用约定 /GT 生成纤维安全 TLS 访问 /Gz __stdcall 调用约定 /Gm[-] 启用最小重新生成 /GA 为 Windows 应用程序进行优化 /GL[-] 启用链接时代码生成 (按 <Enter> 继续) /Gf 启用字符串池 /QIfdiv[-] 启用 Pentium FDIV 修复 /GF 启用只读字符串池 /QI0f[-] 启用 Pentium 0x0f 修复 /Gy 分隔链接器函数 /QIfist[-] 使用 FIST 而不是 ftol() /GZ 启用堆栈检查(/RTCs) /RTC1 启用快速检查(/RTCsu) /Ge 对所有函数强制堆栈检查 /RTCc 转换为较小的类型检查 /Gs[num] 控制堆栈检查调用 /RTCs 堆栈帧运行时检查 /GS 启用安全检查 /RTCu 未初始化的本地用法检查 /clr[:noAssembly] 为公共语言运行库编译 noAssembly - 不产生程序集 /arch:<SSE|SSE2> CPU 结构的最低要求,以下内容之一: SSE - 启用支持 SSE 的 CPU 可用的指令 SSE2 - 启用支持 SSE2 的 CPU 可用的指令 -输出文件- /Fa[file] 命名程序集列表文件 /Fo<file> 命名对象文件 /FA[sc] 配置程序集列表 /Fp<file> 命名预编译头文件 /Fd[file] 命名 .PDB 文件 /Fr[file] 命名源浏览器文件 /Fe<file> 命名可执行文件 /FR[file] 命名扩展 .SBR 文件 /Fm[file] 命名映射文件 -预处理器- /AI<dir> 添加到程序集搜索路径 /Fx 将插入的代码合并到文件 (按 <Enter> 继续) /FU<file> 强制使用程序集/模块 /FI<file> 命名强制包含文件 /C 不抽出注释 /U<name> 移除预定义宏 /D<name>{=|#}<text> 定义宏 /u 移除所有预定义宏 /E 预处理到 stdout /I<dir> 添加到包含搜索路径 /EP 预处理到 stdout,没有 #line /X 忽略“标准位置” /P 预处理到文件 -语言- /Zi 启用调试信息 /Ze 启用扩展(默认) /ZI 启用“编辑并继续”调试信息 /Zl 省略 .OBJ 中的默认库名 /Z7 启用旧式调试信息 /Zg 生成函数原型 /Zd 仅有行号调试信息 /Zs 只进行语法检查 /Zp[n] 在 n 字节边界上包装结构 /vd{0|1} 禁用/启用 vtordisp /Za 禁用扩展(暗指 /Op) /vm<x> 指向成员的指针类型 /Zc:arg1[,arg2] C++ 语言一致性,这里的参数可以是: forScope - 对范围规则强制使用标准 C++ wchar_t - wchar_t 是本机类型,不是 typedef - 杂项 - @<file> 选项响应文件 /wo<n> 发出一次警告 n /?, /help 打印此帮助消息 /w<l><n> 为 n 设置警告等级 1-4 /c 只编译,不链接 /W<n> 设置警告等级(默认 n=1) (按 <Enter> 继续) /H<num> 最大外部名称长度 /Wall 启用所有警告 /J 默认 char 类型是 unsigned /Wp64 启用 64 位端口定位警告 /nologo 取消显示版权消息 /WX 将警告视为错误 /showIncludes 显示包含文件名 /WL 启用单行诊断 /Tc<source file> 将文件编译为 .c /Yc[file] 创建 .PCH 文件 /Tp<source file> 将文件编译为 .cpp /Yd 将调试信息放在每个 .OBJ 中 /TC 将所有文件编译为 .c /Yl[sym] 为调试库插入 .PCH 引用 /TP 将所有文件编译为 .cpp /Yu[file] 使用 .PCH 文件 /V<string> 设置版本字符串 /YX[file] 自动 .PCH /w 禁用所有警告 /Y- 禁用所有 PCH 选项 /wd<n> 禁用警告 n /Zm<n> 最大内存分配(默认为 %) /we<n> 将警告 n 视为错误 -链接- /MD 与 MSVCRT.LIB 链接 /MDd 与 MSVCRTD.LIB 调试库链接 /ML 与 LIBC.LIB 链接 /MLd 与 LIBCD.LIB 调试库链接 /MT 与 LIBCMT.LIB 链接 /MTd 与 LIBCMTD.LIB 调试库链接 /LD 创建 .DLL /F<num> 设置堆栈大小 /LDd 创建 .DLL 调试库 /link [链接器选项和库] |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值