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

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

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

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

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

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

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。
8 t9 U6 T1 ^6 M# |现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。
5 y5 S+ N2 {- S4 G3 P& b1 \6 G/ K- A: s- |% o1 ?1 a
----------------------------
/ K* k" _) z6 Y+ L; a3 n工具更新1
4 T1 h7 I3 v8 t% I. m/ A/ p. z. U---------------------------- ( V( u+ t) V! ?; n% I( f9 ^: |
well I have some good news.
2 J4 P6 p0 H  t: T$ I+ a$ ~yesterday and today I have worked on the script parser and the results are so good that my beta version already works.
& \1 d+ {# ~. \# c( J! W# Q+ J9 S9 Q) ]. G& \2 d) X1 S. ?, }. P$ x
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. 2 G/ E  [, [: j$ f: }
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.
* R6 }* q$ N$ T5 D6 }then the input BMS script no longer needs the semicolon ';' and the file number which are now optional.
& ?' m4 T6 X% L9 a! y9 a7 A, Z, f, h, _' V' [
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. ( q! N. u( Y2 h8 M! A

! i0 c- F% g: ]! w) Eabout 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): / C8 U8 Q; G7 r

5 P8 ]: S7 j: t' r+ Q$ gCode:
& N7 ^. e- G" pidstring SBPK
- |# K' i- y3 l  c  nget FILES long ! B8 `  l5 T9 R4 R' j/ i2 Y8 r& Q) N

7 C1 y- F' H7 H9 d# Qsavepos NAMES_OFFSET
- W  R5 b! q  ~6 i$ T; J5 }. ffor i = 1 to FILES . X* y2 u7 f) k( c
get FNAMESZ long
, k+ g( c+ F+ H; N# R5 T, l1 @getdstring FNAME FNAMESZ $ B/ }7 R" W. _# ^$ j* n
get OFFSET long # f7 E6 V. l7 K
get SIZE long
, K  w7 e7 ?8 @- [! D) N0 Qnext i 2 t8 e  U' ~1 a# E& G8 r

" ~- D% K$ @0 Q2 f  R) ?" |( {savepos FILES_OFFSET
" g) |3 h5 [+ \2 u7 |2 e& x& Egoto NAMES_OFFSET
) L! o# g3 t( |$ t! Y* Gfor i = 1 to FILES % x: e/ B1 \' |! g
get FNAMESZ long
0 J( I0 I7 G- S$ Ugetdstring FNAME FNAMESZ
* ?% K: e0 Y1 l, nget OFFSET long 9 l7 |9 x" T# m8 p6 D
get SIZE long # w# X0 g' Z3 W+ A( d- Q/ u
math OFFSET += FILES_OFFSET - t0 s1 J! |$ m" M. m; Y5 P1 Q2 M
* f$ ], @& a+ R/ Z3 _& k
filexor 0xcc 3 y( Q$ j% @" A8 {! J& }% i) ~
log FNAME OFFSET SIZE 0 0 , S, ^& t4 z$ O
filexor 0
( I) X/ s6 N6 Vnext i
7 e. Q2 P% z2 R' ^& has visible it's files are XORed with the byte 0xcc.
4 s$ m* i$ O3 {3 g/ s9 o/ Y3 G4 I! F: m1 t
now the link to the beta version:
9 N) {3 C% s3 U) S, t( \& D
% L4 D! p* M) E/ N' h* jhttp://aluigi.org/papers/quickbms.zip : M( p2 Q" @; D5 E" E* V. I

; [' ?# N6 y( P+ 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.
6 h  ]3 X9 Z  D- O- ^
3 d$ c/ X) P2 D+ R1 P1 J0 ]P.S.: the usage is very simple and the following are some examples: 9 @) D' i1 K8 ^
listing the files in the archive common.spk of outcry: : D5 e8 z( c  f
Code:
% [5 J# O' d: [3 S; \quickbms -l outcry.bms c:\common.spk .
& Y3 M8 P/ q1 k8 x2 X( p) {) ~2 q
extracting the files in c:\folder: ) s5 F) d; g$ Y5 N% `' r
Code:
2 B+ r; l5 G. P# X, i0 ~quickbms outcry.bms c:\common.spk c:\folder
, c: |5 ?" I2 `  D! r2 S" D$ V) H  H! S: x
extracing or listing only the dds files:
/ P# j7 D2 S9 U' zCode:
1 g- M" T) G% |  _* j+ X1 uquickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
, J1 T& o/ _: ?* V% \
$ q0 t- @& m0 p+ R/ \; M----------------------------
7 l5 M  F3 J5 U工具更新2
* A* F$ U! T6 D$ e5 {% N8 d2 B---------------------------- 6 V3 l9 t8 ^2 S4 w* K& U4 }/ \
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:
8 y( I, ?* u3 m8 w; m8 O% d* J0 ~% n& L
Code:get OFFSET asize - Q( D4 r6 r3 Q; N! `, w/ u3 J
math OFFSET -= 4
- Z: `- l9 K! a/ rgoto OFFSET 8 z; Q1 |7 ^8 I5 s
get OFFSET long + e# m, e' W; y( M0 |$ e
goto OFFSET 8 v+ W1 k* S! u' E7 J) c" L
..."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. ( N% o: i! }* L$ L6 E3 j+ ^( @/ s
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. 3 O6 B2 _5 X( B% S

4 b% A" |' P; t  Toh and about the "repacking" question, no it will be not supported + w$ A  c, n& Y& }% u( U1 R0 A* t
: I5 x* @9 T) \  J2 Y6 G5 e
*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)
8 C# `$ z3 b1 U( b
- B$ r8 ~( ~* A6 Y----------------------------------------------------- 0 |3 _) ]3 G& p+ U& M; D8 f0 X
2009.4.17 更新 * Y4 H+ l+ o( P5 N" e
老外发布了最新的0.1.2 版。
5 `+ q- e& \1 H/ e  y-----------------------------------------------------
* T+ c8 N! j# y' T  |2009.4.18 更新 3 N8 E! q- C, c8 n
老外发布了最新的0.1.2a 版。
6 A) I7 B; F( E) }/ h----------------------------------------------------- ) ^1 u0 k# Q' k' B7 k
2009.5.10 更新
( t3 X9 ^' \% a, `/ m4 U0 L) W老外发布了最新的0.2.0 版。
1 [# G; ~6 W1 O2 |) S- O-----------------------------------------------------
/ j8 M% A) v4 D: I2009.5.10 更新
3 m' V+ V7 u" x* w2 }老外发布了最新的0.2.3a版。
# V; C0 a$ o1 @, \7 r1 r( f# ^) W; {% |1 ~- `3 z

( [- r' T7 h& j. C说明: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发表的  :1 T; m5 X" Q, L
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...

3 y6 Q3 L! M; s& g9 ^, P5 w( y确实是晚了
回复 支持 反对

使用道具 举报

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

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :' F3 [9 ?# T% m8 |$ D, C
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
8 n1 y/ O9 L: {- [. A4 N6 k" r
呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :9 g( p5 `3 ?$ g# y8 w) s
( p9 t; l$ b# g6 F
呵呵,人眼订阅工具
& E- i- e7 L1 v
可惜现在的论坛没有关注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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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