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

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

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

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

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

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

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。 % W0 m+ t- e/ y) n: H
现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。 # s4 A; p7 K* M# Q

# v9 J5 ]& D; [" A, i---------------------------- % X1 [& U/ O! |. Q& u
工具更新1 . t! P* V- C5 D! h0 ?4 W, n/ L) O- y  {+ F
---------------------------- 4 E) L# j( F/ m
well I have some good news. 2 M, G+ a, z$ R" a
yesterday and today I have worked on the script parser and the results are so good that my beta version already works. , k' e$ C$ |! ]* O' R. Q

0 v* s) O) e) F. jI 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.
+ r3 f6 d5 g! n  z- q* Q' Wobviously 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.
' E9 I8 G0 Z+ C2 bthen the input BMS script no longer needs the semicolon ';' and the file number which are now optional.
8 C- t1 u' `$ _8 G8 w) E1 Z9 }; [0 A1 M* M! o/ u! ]( _
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 ~5 y& U, g. |1 x1 F; X
# X; Y4 I5 S0 K6 _
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):
4 e" Z4 w- v9 @, M
! E) {- }: P4 HCode:
0 f% v, _, F7 S7 v) z) @idstring SBPK
$ c0 Z( v) v( T2 b9 |! M0 Y. nget FILES long
4 k! \/ s1 Z/ `" g+ q$ r, |  }' B- }2 |0 z
savepos NAMES_OFFSET
% B3 A) j- D; q! @) R8 r* J& Ofor i = 1 to FILES % v# L) Y. Y& u: ~1 h
get FNAMESZ long & d3 K) e, b8 {' w% N
getdstring FNAME FNAMESZ
6 |4 w5 t9 A( N- M3 r0 }get OFFSET long + k6 t  ^4 a! A
get SIZE long . {: W8 i/ v- B4 i6 P
next i * r' p" m: z% \: R* f

2 j5 n* L; u7 X" u6 W' F9 Usavepos FILES_OFFSET ! Y; _1 W' ~: J. Y
goto NAMES_OFFSET
9 E, Q" Q7 B* Ifor i = 1 to FILES
- o8 H4 D, V) `1 N3 O' rget FNAMESZ long 2 j/ ?# F/ w: R+ C$ Q; w
getdstring FNAME FNAMESZ
; `6 r4 R) @9 [  i; Z* I- kget OFFSET long
5 n: M0 ]5 N+ \! B* |" zget SIZE long ( @! ^' K& L5 t5 e3 i
math OFFSET += FILES_OFFSET
, Y! C& b" W2 I
, ]7 G2 P, i% g9 v4 v  Dfilexor 0xcc
' ^/ ]: U) x5 _& J/ ^9 Dlog FNAME OFFSET SIZE 0 0
( e! x% g1 j: V7 X5 K( j  h2 B: q: |filexor 0
7 N! Z$ S6 N6 o; a- C4 K6 |7 ~6 \next i 8 W! J9 N/ p+ \
as visible it's files are XORed with the byte 0xcc. 6 k) T( W9 |" m. x9 L/ |
; A# ~2 v+ |. o$ D
now the link to the beta version:
2 K$ t* e" Y, d/ X- J3 s6 n  ^. s
http://aluigi.org/papers/quickbms.zip
4 j- ~" U& J  O9 l
0 r. n: s5 f2 e2 Gobviously 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.
( Z& {' q* m3 r8 O" W
% p, ]* s$ @. L' D) t0 CP.S.: the usage is very simple and the following are some examples:
* r& C8 a1 v0 u% I) e' `0 {listing the files in the archive common.spk of outcry:
+ m1 m' v: ^! C% DCode:
7 w- C: k* S* U2 j3 J/ bquickbms -l outcry.bms c:\common.spk .
% [4 _  i; S: {7 L8 l0 O; N
/ ]# u& T( j$ oextracting the files in c:\folder:
5 I! c8 S8 X9 C# tCode:
! D- [8 g  j9 B$ B, Z1 w# Rquickbms outcry.bms c:\common.spk c:\folder : `! Q" I4 A9 y3 r- w
7 b6 R+ B) @8 a; o/ H7 E. D6 e
extracing or listing only the dds files:
( ?4 @) |, E; [! B; g! j9 o! z: ACode: ; c( p6 W( I% ^1 y
quickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
$ o7 [' [3 f% G8 Q- {% m  G, p2 f3 B/ U; P2 c# l+ ?5 t
---------------------------- 3 t# Y! ?! S6 g
工具更新2 & h0 l) ^; X2 U9 W
---------------------------- . n5 n& `* u  a
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: ) E8 B0 n. M( d/ y0 U

) s; D, f( L6 r5 W. r$ B0 N; V9 Z2 N$ NCode:get OFFSET asize 9 C1 \+ r1 [" `  ]! e
math OFFSET -= 4
  k$ E- B2 G+ a: sgoto OFFSET
; N+ F: F7 W) d/ H+ V6 Kget OFFSET long 6 e5 d; V8 |6 q1 H( x
goto OFFSET % m# Q% m+ A' c
..."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.
: J) p$ y$ h4 _' U+ R- r* Manyway 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. ! B" ~; C4 f6 U

6 ^* ~: E9 `3 v% @7 |oh and about the "repacking" question, no it will be not supported 4 B# S# ?/ j6 u& i' N

! p$ D7 @) F$ k7 d*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 _3 @0 Y8 I$ M8 j3 F1 ?' Q
. v) l$ t( C( Y3 w; V+ ~
-----------------------------------------------------
$ X! }. W* e9 b+ ^2009.4.17 更新
& Q$ y- k2 w9 V& ~' {老外发布了最新的0.1.2 版。 2 u% ^' c4 l6 ?) c( V9 y, j" k( `# `
----------------------------------------------------- 0 U* H" X8 x  D4 b& B
2009.4.18 更新 ) M# B% W! F. a, V. H
老外发布了最新的0.1.2a 版。7 J/ A  T  b% {. @5 i- h3 U
----------------------------------------------------- ( f" V/ F' {3 O0 p# m
2009.5.10 更新
2 f( L: g6 {* Q+ P; o  @老外发布了最新的0.2.0 版。
/ z* I' w0 w2 {+ F2 b5 B! ]----------------------------------------------------- ( s8 D' s, Y6 d1 s
2009.5.10 更新 0 ]. N* k6 g7 q# S1 ~
老外发布了最新的0.2.3a版。
, u  j8 O" w1 |- M# ]& T# c) T
+ i7 N3 v1 \% o4 J% \- t- D) \% h' T
说明: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发表的  :
$ E, s2 r/ B) c3 b- c+ c哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...

5 ?4 ]: ]; n; m! X. Z9 }确实是晚了
回复 支持 反对

使用道具 举报

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

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :
" b5 E; V. @$ _( \3 K) o一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

3 i8 f  s3 Y* x呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :
: m2 m* d! _6 w: [+ L8 _$ o5 i0 H8 D% W7 M0 m& ?3 Z- I
呵呵,人眼订阅工具
$ ?& R8 o  P7 e$ h/ X( B
可惜现在的论坛没有关注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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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