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

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

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

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

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

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

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。
. H; S/ ]; S1 o现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。
* p- j% F  W3 q- D2 M  E) I& p- z5 X. V) }
----------------------------
( r1 m) S5 D( V0 u工具更新1 ! `! T1 K7 w% Y. q" I
---------------------------- & O9 p7 S0 o" ^+ f' r  {* N
well I have some good news. 4 z8 u* t& O8 t; @8 m+ E" o# K
yesterday and today I have worked on the script parser and the results are so good that my beta version already works. ! o) Y" m7 y1 B0 z% h; s9 c" Z: I/ F

2 H$ U5 j, q' q8 `  [0 z+ D& {0 WI 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.
4 H; k: A9 L( N6 k5 m7 iobviously 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. ) F; I- g4 V% |; q
then the input BMS script no longer needs the semicolon ';' and the file number which are now optional. 7 U; D+ S! f5 c/ L3 R! g/ Z! {

2 v9 M  j' g; z$ H2 H  l- T$ o6 xnote 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.
, c3 A, Z+ q! y- ]2 ~' S, y6 n! S8 |" }+ T
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): 5 L, o! Q) e% ~/ {

+ C; o6 p0 c. E8 s  ~9 TCode: $ |% ]9 W5 Z! {5 H( K8 J8 j1 o6 h/ d
idstring SBPK # [8 j6 A- V' n' U, N0 L# w
get FILES long - Z: A  C4 h3 T' K4 r! X- h5 s
7 X6 B3 {2 _5 U9 @0 s$ k) p0 n
savepos NAMES_OFFSET 3 x& H, R: R) \4 ~6 |
for i = 1 to FILES
5 y) M( w+ s# @5 Hget FNAMESZ long 9 j* L1 p4 m6 `1 I: A2 h) I9 x
getdstring FNAME FNAMESZ
+ U6 O; q7 W- k4 n/ Bget OFFSET long : e! Z7 T0 ?, F" x
get SIZE long % ]- n2 g% s! J# J" b
next i 3 R2 S1 G, W$ F1 R  ~

. P! S- k' [+ q( Ysavepos FILES_OFFSET
! ~6 }/ e3 m9 `3 k! J6 A* Tgoto NAMES_OFFSET 4 `7 o- _4 K6 M# ~! K
for i = 1 to FILES & k% s5 m8 |$ t( V$ g) N
get FNAMESZ long   G8 M, p0 e4 |8 |3 @
getdstring FNAME FNAMESZ 7 {! ?/ \! g0 ~1 u0 D5 N
get OFFSET long
' J" K1 f, D8 L$ n: P. k6 Tget SIZE long
3 g" S+ g4 ?- O: i& k) Xmath OFFSET += FILES_OFFSET
( V5 _5 h# c3 ?- q/ A( d  U
- C  t  |- g5 g" h3 ?6 Jfilexor 0xcc * d7 q! j6 G% _5 K1 j1 X
log FNAME OFFSET SIZE 0 0
- v/ D' L, l( S0 Yfilexor 0
9 N6 M. W" U7 U$ v( Vnext i ; A/ s2 W9 O* |! z, W+ _
as visible it's files are XORed with the byte 0xcc.
  `; d' ?) ^2 ]+ G& j+ p
% H0 S6 F/ `! L, ^; i2 G4 X' K  q- nnow the link to the beta version:
/ p# K4 D, ]1 a$ k- T, L1 ^: o
% Q7 _  u; b- [6 j6 Q3 T0 Whttp://aluigi.org/papers/quickbms.zip   f, J; E7 E% t* B' V

* m1 g. g, S: I& Q. R. [0 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. / d: j* U8 z/ v8 X
5 D7 h- j: i2 r5 s% @1 e
P.S.: the usage is very simple and the following are some examples:
" H. k2 y& j. o0 Nlisting the files in the archive common.spk of outcry:
. C( v$ k# }3 }6 \; n9 e1 e% OCode: ( p$ S3 Q0 q% K9 p- {1 s
quickbms -l outcry.bms c:\common.spk .
1 w: d& ?/ O$ {4 |- @5 h& j8 V! n8 M/ F' L3 U: g+ T
extracting the files in c:\folder:
+ v% U3 n7 P+ aCode:
8 `( p+ c7 N! v+ [1 R! vquickbms outcry.bms c:\common.spk c:\folder ) E# N, u  {* n

3 f2 k/ x  c, l! Iextracing or listing only the dds files:
0 s5 c, n! n, m! {+ c7 ~; p! I$ vCode:
6 j* h( \/ j% O$ jquickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
2 u9 X6 \+ W3 A) `/ r; }; O$ u" c8 R. w. Y2 h# H2 I+ f4 J  g
----------------------------
8 L  T) X% R8 |+ H. K  \6 Y; C工具更新2
1 E5 V" X7 e9 |& u9 |7 C---------------------------- 7 m4 d. b. q2 h. n! s7 n" O% s
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:
* J0 f7 t1 E! D3 X
* f2 y- Y* n! U6 RCode:get OFFSET asize
  W" c4 T- ?0 T' kmath OFFSET -= 4
& D  a( a" L7 I( {  u7 `+ r0 vgoto OFFSET / W/ R& L- k- s1 D. M
get OFFSET long 4 ?2 F0 ?/ m3 b( s7 b
goto OFFSET
, Q7 Y7 o, W! u9 E! j' f7 m8 H1 u..."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. " \# }- _, S2 E
anyway 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.
, e- \3 I( F/ b4 z) A
$ [) @, g& `  koh and about the "repacking" question, no it will be not supported
; ?5 D% X2 W0 {8 z9 d9 w* _% ^3 U) x% C5 s8 q
*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)
& ^7 S$ w2 j. I
! J, O* S3 w& T" ~----------------------------------------------------- . H1 |4 |) w; y2 O4 h
2009.4.17 更新
: R0 C6 M* Q) D% O! b/ }老外发布了最新的0.1.2 版。 8 _! w3 Q" _7 J' ?* m
----------------------------------------------------- % E# C) s, C5 }" }! |
2009.4.18 更新
4 U6 X1 ~& k4 U4 k& d7 r4 r老外发布了最新的0.1.2a 版。0 B. h. X5 U* A1 S3 w
-----------------------------------------------------
& b; s. p/ Y6 s' y2009.5.10 更新 5 E: S# t" T, @6 S2 G. F% Y
老外发布了最新的0.2.0 版。
% _1 `" A' J9 j& e+ M, F----------------------------------------------------- / E' p# N% o, n+ l+ [; _
2009.5.10 更新
, X, c# b( y$ e6 f7 [6 g老外发布了最新的0.2.3a版。. X- R9 W1 \) p4 ?$ V

) C2 ]) {' M/ O7 r+ b; V. o) M+ S2 ^# L: s" {
说明:ND20在老版本打不开。

本帖子中包含更多资源

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

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

使用道具 举报

沙发
 楼主| 发表于 2009-4-17 23:16 | 只看该作者
2009.4.17 更新
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2009-4-18 07:13 | 只看该作者
2009.4.18 更新
回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2009-5-10 09:16 | 只看该作者
2009.5.10 更新
回复 支持 反对

使用道具 举报

5#
发表于 2009-5-10 11:38 | 只看该作者
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
回复 支持 反对

使用道具 举报

6#
 楼主| 发表于 2009-5-10 11:47 | 只看该作者
引用第4楼firendless于2009-05-10 11:38发表的  :* O" \$ H7 k' Y4 Y3 c: m: ^  T
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
. W5 ?7 `6 G% ]7 \2 s
确实是晚了
回复 支持 反对

使用道具 举报

7#
发表于 2009-5-10 11:51 | 只看该作者
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
回复 支持 反对

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :; U( m. F1 [$ k
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
" o( W: r8 @3 d& F; w/ o' h5 b& _
呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :' a# V9 ^  U5 i
' w4 o% m. I1 E0 X# ~5 _2 f
呵呵,人眼订阅工具

6 y7 C" l( ?3 R! M9 {) M* ~: n可惜现在的论坛没有关注ID发帖功能,如果发帖,则用PHP Mail()发邮件通知帖子有更新
回复 支持 反对

使用道具 举报

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

使用道具 举报

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

本版积分规则

冒险解谜游戏中文网 ChinaAVG

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

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

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

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