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

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

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

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

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

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

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。   P) ^+ a  ]5 s( W' _
现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。
* b4 d8 s( N! F) z( p2 ?" ~* T6 M- t4 x5 o
----------------------------
0 {. F& q1 p+ N1 J# B0 F工具更新1
$ F8 R* O( X; _0 N& M/ S" |; Q  X) P----------------------------
, z2 h/ ~* _8 U. G0 dwell I have some good news.
/ K: J* S" M5 t/ W0 X. hyesterday and today I have worked on the script parser and the results are so good that my beta version already works. ' N% Y0 r( Q2 c8 ?$ f  R7 e

; }, K/ x, }' x9 l8 F. C9 sI 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.
0 _2 H5 f7 `7 l# gobviously 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. ( M, U' G0 Y: `0 [" j
then the input BMS script no longer needs the semicolon ';' and the file number which are now optional. / L/ d. p' g- k& {
! X. v9 K$ ]) r4 ]# W$ D' 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.
; k$ S( e  h4 F
# Y) y" U/ Q6 m9 ^- ^: Aabout 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):
/ O3 T1 `  X- W0 g6 R
& s$ q1 Y( K( k# j+ lCode: % v! U) Y! H1 f; b/ q" i8 {
idstring SBPK 2 X0 g" T& J- G5 |5 ^: N5 j
get FILES long ) d. ?! h) u2 u3 o3 N/ G

" }' E, }9 ~, f5 Ssavepos NAMES_OFFSET
) p8 Z% V. W2 n3 A4 i' E  v: Ufor i = 1 to FILES
( H+ h, l4 D5 i, Lget FNAMESZ long
0 w( p  M: H. L1 o5 Bgetdstring FNAME FNAMESZ " K  y8 f. B1 l
get OFFSET long
, G1 t- b: h5 z! u, [# ?' X" |get SIZE long ; x% r1 S2 [" T+ k$ l; N
next i 3 @( w( W% n  a& K  x

" a$ ~# S- g- w0 ?. Q8 t" Wsavepos FILES_OFFSET
. Q1 y! Z; \; Y4 E* t% P/ tgoto NAMES_OFFSET + M5 z# q+ X/ u5 R, \
for i = 1 to FILES
% D: e  Q9 \" }6 B1 _$ g& D4 iget FNAMESZ long : ?; }6 |( P6 |6 `7 v2 m
getdstring FNAME FNAMESZ - V  r1 s3 P9 h5 r# m0 E4 v) ^
get OFFSET long / Y/ W" E/ D9 R2 j% {% T' {
get SIZE long
: h' i, r7 f# H$ V2 d  B: imath OFFSET += FILES_OFFSET ; w# k  \; T$ Y' l
+ p! f( g* F8 ^- x
filexor 0xcc   \3 c, c3 m  u& V
log FNAME OFFSET SIZE 0 0 $ p0 ~* `, ^! o! u9 j* F% C; y
filexor 0
/ T8 ]: b& L! `6 `next i
2 T) D9 l4 g" B6 vas visible it's files are XORed with the byte 0xcc. - p7 M! b+ C3 L" d; D2 \8 I" Z
( {5 S6 `" f; ~9 V6 r, R% I" c4 D
now the link to the beta version:   }' _- m6 ~. S) R1 F8 H8 W

6 t$ ^  v7 ~4 R- u  G% T# [. [: Bhttp://aluigi.org/papers/quickbms.zip * P) @9 U# J9 H

  `: x8 B# J6 Z  i8 j, ?/ Uobviously 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.
5 G5 h+ G" m$ n: E
2 e# V6 i* l% p3 {; ]; bP.S.: the usage is very simple and the following are some examples: 4 e% L$ L" E+ K, Q4 V( F
listing the files in the archive common.spk of outcry:
/ Y: `$ I5 B8 lCode:
; n/ D9 ~& }. c0 ~3 Fquickbms -l outcry.bms c:\common.spk . $ o6 L% C, T6 a; x1 ]1 E/ |) u

. C4 k8 M3 \0 A, M1 ^extracting the files in c:\folder:
0 D; {4 h, P6 g' }Code:
8 }( J. r! G# Z4 _. Dquickbms outcry.bms c:\common.spk c:\folder
) S; B% {4 U- m% x% C2 B3 r
) ~4 L, S6 |  G8 K# C" R0 }) eextracing or listing only the dds files:
, i- O6 {+ H' S( T, L8 cCode:
0 n+ z) ~6 F) x& D3 y- `$ A8 c: xquickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
" r0 ^* m/ |1 t2 Y( _/ l- o% f, X( v5 `# y- d& s5 Y
----------------------------
2 I( e4 A, u( i: E2 Y工具更新2
. C, Z4 v- C* R3 E# u, y8 Z----------------------------
: a2 y; W4 G% j8 ?7 P4 b- r7 Gif 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:
0 E3 b0 Q3 o8 V% |/ P
+ Z- e% p2 K7 o4 @5 H1 o; k" ICode:get OFFSET asize 3 [- D3 z( q: m2 _" w" {$ F
math OFFSET -= 4 7 F2 V6 `1 ^$ g. N* ?
goto OFFSET : h2 N0 ]+ [" g( f; y
get OFFSET long ) F! C' T2 [: Z8 e
goto OFFSET
& a+ l  z9 S  @7 b/ n..."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. : \6 O4 L' Z8 M$ y& [
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. , p! z6 m" |5 n! W
- d9 G# g3 Y# L$ e0 U7 g6 R( J
oh and about the "repacking" question, no it will be not supported 4 _) |/ Q, D; |" t; r8 B
" E- {& [9 T' g0 D5 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)
! [6 j9 T5 H2 v5 I3 f8 j0 j+ r2 U1 p4 x2 p- y7 h( L
-----------------------------------------------------
* v7 G, s( L! [& |2009.4.17 更新
' c" q+ ?3 x% T; {( C: C老外发布了最新的0.1.2 版。
% O) D2 }. h" e- o7 L----------------------------------------------------- . y% h  o2 j7 z9 r
2009.4.18 更新 ; W3 K6 |3 d2 p; _
老外发布了最新的0.1.2a 版。& }$ ?: K1 v: j5 {% A3 @
-----------------------------------------------------
& u6 J) V( R9 R( O5 Y7 u9 q2009.5.10 更新 9 g' c9 o" `2 m9 ?
老外发布了最新的0.2.0 版。
+ [, a3 J: R6 K+ w$ i! U5 Y-----------------------------------------------------
4 L; h- L: U- E' e* \( z2009.5.10 更新
: o  P) Y- t3 @4 ^% B6 D" o! Y老外发布了最新的0.2.3a版。4 w, ^2 j2 ^9 W. ~/ B/ {, p4 R
% T1 B, l5 ?. d9 A! f& c; n

. u* p7 Y5 V' f& T6 n" O) [说明: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发表的  :
  f6 n$ _9 ?) c4 {哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
% G& F) O  |8 _3 J* A
确实是晚了
回复 支持 反对

使用道具 举报

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

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :
; c) u, W# ]# u一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

, h) m$ T9 o* B7 ^, m1 |0 `: b% k呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :
$ I; p4 u% M( S( ~5 z" F2 `5 w5 e8 Y, V; L9 L# I9 ^
呵呵,人眼订阅工具

3 z6 l4 V3 v$ J4 L; O可惜现在的论坛没有关注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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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