设为首页收藏本站官方微博

【汉化工具】通用命令行解包器QuickBMS

[复制链接]
查看: 8174|回复: 15
打印 上一主题 下一主题

【汉化工具】通用命令行解包器QuickBMS

跳转到指定楼层
楼主
发表于 2009-4-17 11:19 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

【汉化工具】通用命令行解包器QuickBMS

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。 & |# T& H) s$ u6 B
现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。 " ~9 X1 n0 w1 x7 W" n# m
7 c. {) E) p+ f- @9 Y6 B; g9 u
----------------------------
+ }, F/ R0 F+ W. \# V! h0 ]工具更新1
! G+ @  K5 V6 w----------------------------
! X- ], v$ Y- g2 M7 H1 @4 \  ~* Ywell I have some good news. * H5 A$ M0 E* ~$ W" O" c7 X/ R; s( Z
yesterday and today I have worked on the script parser and the results are so good that my beta version already works. 5 ~" F2 H) z7 a# k" ]: e
. [' C  x& A3 G5 c
I have made it compatible with the BMS scripting language so people don't need to learn 1000 languages and then it's a good language. / z% l5 p* Y8 g) C
obviously the BMS support has been enhanced so it's possible to use XOR, rot13, zlib/deflate, lzo, lzss plus various new operator in the "math" command (and, or, xor, complement, not, shift and modulus) and some other things like choosing the desired endianness.
* a- @* B$ g6 _8 ?then the input BMS script no longer needs the semicolon ';' and the file number which are now optional.
  W. D1 k' W" ]. Q$ O; m1 X' [, r) @3 e# ^8 \
note that the BMS guide available on http://wiki.xentax.com/index.php/BMS doesn't report some additional fields which instead already exists like the GetCT, ComType and ReverseLong or some internals variables like EXTRCNT so I have tried to find and add also these ones.
2 ~$ I2 {/ y8 y; t  a9 e8 Y6 O4 f. ]
about the new commands, the following is an example of BMS script for the game Outcry (you can call it outcry.bms or outcry.txt or as you want):
) l" c, I; E- j3 ?. N, I
, Q+ d: w2 m' u. K. j0 L; V2 R7 xCode:
, C+ b7 I( M0 X% g6 D) Widstring SBPK
0 z/ b7 b4 U! ^% e3 Gget FILES long / ]& l% D* R8 @# m" V  g* H( n

/ e/ d/ F' _" k7 F: W  fsavepos NAMES_OFFSET 5 r  G  u" m- j: g- n
for i = 1 to FILES
1 d) M8 e6 k8 s( P* V# t; |. cget FNAMESZ long $ N0 B1 n& W+ @% _
getdstring FNAME FNAMESZ
2 f+ a; y9 x. E; h+ sget OFFSET long - j; ]; A8 Q4 b7 J$ W
get SIZE long
7 y. H: I2 k% _0 S6 x0 G' gnext i : j) o% d$ H; k8 h# R$ }$ ]2 W

# {1 N- V* }5 x  S3 P. {8 Hsavepos FILES_OFFSET
% R. ~; k  O+ `+ Z! Vgoto NAMES_OFFSET % G9 R9 o  J3 [: E. c& t
for i = 1 to FILES
8 p! e% H- W8 T$ |" U( @: l4 Oget FNAMESZ long   _4 L" \' k5 K2 _: _; g% c; }
getdstring FNAME FNAMESZ ' e% \7 W- l- c; H# J" w. g
get OFFSET long
! M: J9 N# r8 p7 fget SIZE long   W  f1 b" C( c$ D4 m
math OFFSET += FILES_OFFSET
# t2 k$ g1 P, E, |5 X3 S- {9 M0 h
filexor 0xcc
: P8 H0 i$ O& A8 n, s3 J: zlog FNAME OFFSET SIZE 0 0 ' j, Q: [3 y: \8 Q1 d2 Z  l' c+ F
filexor 0 2 _4 l1 n  P4 S0 V8 A
next i
: o) J1 @3 W' }$ ?9 l% m( `4 qas visible it's files are XORed with the byte 0xcc. 4 X9 j; [( J- g) Y9 y

  j( E- l! ~* D! o5 e: H3 know the link to the beta version:
3 ?  [2 b, x: d! K
; ~) S+ U/ M6 }1 Q" ]http://aluigi.org/papers/quickbms.zip + ?2 ?0 B0 P5 S5 _" M

3 a- Z, E( a. o+ e( H, |8 Robviously it needs to be tested more because 2 days are not enough for a project like this which is not so basic so anyone is invited to test it and suggest new features.
' h/ c' k2 M  f; U
; b( z2 |& s2 L, H% h4 e" H5 qP.S.: the usage is very simple and the following are some examples: * V6 |/ p8 d1 j# ~8 h9 v# I
listing the files in the archive common.spk of outcry: 7 d) a9 {" ], c# \2 C) S0 o+ H% o
Code: 5 p% g" n) G- M( R/ L3 `# Z8 r
quickbms -l outcry.bms c:\common.spk .   a5 C5 S( ~' Y" r- d

9 j: c7 q# `4 I2 bextracting the files in c:\folder: 2 a; ?9 z- [; E% T6 `1 K
Code:
8 N, I9 s- w' l2 Aquickbms outcry.bms c:\common.spk c:\folder 2 t% }. d4 L7 M: j5 j3 x/ P/ ]
6 g1 V- R4 J" e, l7 R! o; {/ s( k
extracing or listing only the dds files: . j4 p9 {( Z' p) _; T4 P
Code:
) X( L3 ~6 t6 Z/ K  V  _quickbms -f "*.dds" outcry.bms c:\common.spk c:\folder $ P5 C4 ~% Y' f

# W3 L- U5 L! h5 y----------------------------
6 c: e" z; R7 {4 P" L3 p) {工具更新2
% [" b1 y; L7 d$ V$ z---------------------------- , Z2 ?' n. e' E$ R( _. C
if you know the size of the structure or where is located the particular value you are searching (for example some file formats have a 32bit number in the last 4 bytes which has the offset where are located the other file structures) you could use something like the following:
% ~5 K8 w4 `* B. D$ V3 G. P" \' v3 g2 K. A1 \9 m7 l6 A
Code:get OFFSET asize
8 Q! W% }  z- f* Y5 Wmath OFFSET -= 4 1 a6 G. f' A) i6 `$ z& O: B  x. q: ^
goto OFFSET
5 F+ l: P( R# v( `! Fget OFFSET long
+ f% X# y+ o; ^goto OFFSET
  `$ u( |1 f7 n- s" y! R  i..."asize" is not available in the BMS guide but is supported by both multiex and my tool, it contains the total size of the file.
9 w0 t1 P: s. z" u% W) Danyway tell me a file format which has the file name table at the end, it's good to make various exercises for testing the BMS language and where is possible to enhance it. # P) P* c# ?5 w4 S: G
7 M% G( J! O/ N" D& q( V
oh and about the "repacking" question, no it will be not supported 6 @$ C$ C) W! _
% K* k5 `/ T$ Q# N; U2 ~
*EDIT*: updated version to 0.1.1 and attached 3 examples of BMS files which show different operations or different types for doing the same thing (7x7m.bms and 7x7m_special.bms) ) u5 g4 y4 e% H) F$ c  s
% ~! W. S3 m8 d3 _5 |" ~/ v9 C$ Y
-----------------------------------------------------
* T3 _8 I( R* U- c" E. M2009.4.17 更新 ' V" P1 `5 V* v
老外发布了最新的0.1.2 版。 . v7 S/ a0 c6 K" U. H. e: J
----------------------------------------------------- 5 `* ?; M, T$ p5 J2 V9 e
2009.4.18 更新 + \  w1 p- \  K! l% |/ y  _
老外发布了最新的0.1.2a 版。2 Y6 X7 p( d* u
-----------------------------------------------------
# y9 Z  r8 O( S) l" |2009.5.10 更新 & i& H$ ~8 K* i4 c
老外发布了最新的0.2.0 版。
9 J- O* r* }" g% j----------------------------------------------------- 8 c0 O$ R- ~9 e" `1 }# D0 a0 y
2009.5.10 更新 / U; i- K5 h* S- F7 \
老外发布了最新的0.2.3a版。
5 Z6 j. x/ U3 `4 u3 L+ h  g" ?3 ]: g& P2 H& B; h
2 N" t. v2 N6 p- }4 k$ ~
说明:ND20在老版本打不开。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好 很差劲很差劲
回复

使用道具 举报

16#
发表于 2011-6-12 14:28 | 只看该作者
本帖最后由 onis 于 2011-7-17 20:04 编辑
. J+ h. Z, E7 C6 K% e8 {& }/ H) q2 M, Q7 Q7 \- y( i
不好意思頂上來,由於在研究中,看了那兩篇教程,有個問題不太明白,既然文件偏移量和文件大小都是反向的,那麼腳本里只寫get offset long,bms能知道反向嗎?
. [: s- t9 O9 t; o因為想要解包的文件已經完全瞭解結構,也試過直接將其中某個文件單獨導出,都是ok的,就是這解包程序讓我頭大了。。。。。。" X9 v0 m- t- w
* k( ^) Z" I7 S+ P7 P
已解决!
回复 支持 反对

使用道具 举报

15#
发表于 2011-3-9 12:44 | 只看该作者
本帖最后由 beegame 于 2011-3-13 11:23 编辑 / f: J) d8 W, R( T
2 {9 I" a+ k+ F  s
现在已经是ver 0.4.10a  
3 i  n" X# p6 p6 m2 h" S$ A: @- S' @5 L+ d* R. }
7 y' f' D0 }/ J# \  L: f  T% m
回复 支持 反对

使用道具 举报

14#
发表于 2010-8-18 13:13 | 只看该作者
现在已经是ver 0.4.6a 了
回复 支持 反对

使用道具 举报

13#
发表于 2010-8-18 12:54 | 只看该作者
现在已经是ver 0.4.6a了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

12#
 楼主| 发表于 2010-4-9 18:48 | 只看该作者
引用第10楼solidji于2010-04-09 18:12发表的 : * y4 l8 Z2 {& p2 e; f' E' x5 d
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具 6 m/ v* m) }+ ~( q, d+ b1 N1 j
不错的东东 ! _9 x: l( A7 V- `2 v% c
不过我习惯于直接调用EXE自己的解压算法

2 n& l$ w1 \7 F$ V3 y* k3 p$ T3 h. U, m
直接调用EXE自己的解压算法,这难度太高,只有高手会使用。
' X; P& ?/ O- k$ z; y, P, {0 }目前还是属于传说级的。
回复 支持 反对

使用道具 举报

11#
发表于 2010-4-9 18:12 | 只看该作者
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具1 C' S( w, @$ W: Q. j, q
不错的东东! c: p- f" W  t" j) W
不过我习惯于直接调用EXE自己的解压算法
回复 支持 反对

使用道具 举报

10#
发表于 2009-8-3 15:39 | 只看该作者
2009年8月3日更新
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :$ S1 Y% _2 {0 Z- i1 U: h7 s
. f3 m, n: j$ f8 D4 a7 j) p
呵呵,人眼订阅工具

! [0 W6 G2 i9 \, b可惜现在的论坛没有关注ID发帖功能,如果发帖,则用PHP Mail()发邮件通知帖子有更新
回复 支持 反对

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :
/ P6 N. _# e. A. ~# n7 B一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

- ~' Y# _! h5 T2 M9 F呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

冒险解谜游戏中文网 ChinaAVG

官方微博官方微信号小黑屋 微信玩家群  

(C) ChinaAVG 2004 - 2019 All Right Reserved. Powered by Discuz! X3.2
辽ICP备11008827号 | 桂公网安备 45010702000051号

冒险,与你同在。 冒险解谜游戏中文网ChinaAVG诞生于2004年9月9日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

快速回复 返回顶部 返回列表