冒险解谜游戏中文网 ChinaAVG
标题:
惊恐鬼屋Scratches初步汉化分析
[打印本页]
作者:
shane007
时间:
2009-12-23 13:37
标题:
惊恐鬼屋Scratches初步汉化分析
看了一下惊恐鬼屋Scratches这个游戏。
* ^; F; E9 t+ ^9 F, p% Y* z; a* x
包文件有2个,scratches.res和scream.res,
/ f: w( b( b4 O) S/ \& w1 J% Y
包文件的格式如下,可以用Game Extractor来解开。
2 c. D. }& G1 G) e8 i
http://wiki.xentax.com/index.php/Scratches_RES
, [1 O0 m4 k1 }4 u; a6 q2 _! j) a
从scratches.res里面解出一个font-michael.tga文件,就是在游戏利用的字体。
: O) y1 v, E- V6 A; F6 T
scream.res里面也有一个字体文件,但是游戏好像没有用到。
& |0 T; i5 E8 |) X" K/ }! q
$ |% b4 W H7 m# ?+ W6 N4 l- }. ?
用OD调试后,发现这是一个使用opengl API的游戏。
- Q( ]2 u! z) P5 C
在某句字幕上下了内存断点,断下来之后找到了和显示有关的代码段。
+ V1 h7 _: ^7 Z3 v
6 f7 E4 N0 _. v6 ^2 ~
0040C5D0 /$ 53 push ebx
+ Z0 R) c H7 g& v4 `
0040C5D1 |. 51 push ecx
; B" O" y9 ]. M/ f9 Y
0040C5D2 |. 52 push edx
0 @0 C, T! }7 P; M" U, B
0040C5D3 |. 56 push esi
1 G, {0 e/ K4 S/ M2 b" c& n3 r$ c
0040C5D4 |. 57 push edi
' h: M7 W( B4 j7 x$ @* `
0040C5D5 |. 55 push ebp
1 Z6 L3 T0 H% f; P
0040C5D6 |. 81EC 10010000 sub esp, 110
% V/ G% u2 N% S& v" N- a0 ?1 C! r
0040C5DC |. 89C6 mov esi, eax
+ ^2 B8 Z" m9 ~! s4 Z2 ]
0040C5DE |. 89C7 mov edi, eax
2 v- m, o- [( M5 z
0040C5E0 |. 29C9 sub ecx, ecx
' L) F1 E) A# D
0040C5E2 |. 49 dec ecx
& h3 T" B% N& h. O$ Q. W: W
0040C5E3 |. 31C0 xor eax, eax
+ h, ?2 n5 h/ O2 ^
0040C5E5 |. F2:AE repne scas byte ptr es:[edi]
t4 m( x# o% P# i% s9 v
0040C5E7 |. F7D1 not ecx
* q4 F( [! V, \9 S5 U }; W' `
0040C5E9 |. 49 dec ecx
, f# b/ j' [% W* J$ z/ P, g
0040C5EA |. 31DB xor ebx, ebx
; c6 a1 ~. [% s. @3 Y8 z
0040C5EC |. 31ED xor ebp, ebp
3 H, @/ N& D+ }3 i: @# O
0040C5EE |. 81F9 00010000 cmp ecx, 100
! I5 i4 J- l& ^4 B
0040C5F4 |. 72 0D jb short 0040C603
! R' j! G U2 Y. z. h' f
0040C5F6 |. 81C4 10010000 add esp, 110
9 s/ l- c7 R7 Z6 ~- W) P
0040C5FC |. 5D pop ebp
4 [/ U5 }+ A* r, @
0040C5FD |. 5F pop edi
& I+ n. G: I( v# j: p/ V" y2 K
0040C5FE |. 5E pop esi
. A' P2 ^! z$ x5 k! d
0040C5FF |. 5A pop edx
! a2 H3 F; Y, g g5 ]" {
0040C600 |. 59 pop ecx
5 i. ^4 c/ P" \8 y" s
0040C601 |. 5B pop ebx
K9 D- d( \3 q7 _; H
0040C602 |. C3 retn
; J, q" w' K: m* q
0040C603 |> 89E7 mov edi, esp
. M: n: ^4 X' X* P
0040C605 |. 57 push edi
7 z9 e4 S! ?- w; _1 v4 v! y
0040C606 |> 8A06 /mov al, byte ptr [esi]
& I+ F) r* z* n" L7 ]$ h4 L
0040C608 |. 8807 |mov byte ptr [edi], al
1 C. ~/ ], p0 D& ?) s
0040C60A |. 3C 00 |cmp al, 0
) C# \# u E4 g" p/ W! _- w
0040C60C |. 74 10 |je short 0040C61E
2 q; A B( C6 i' J' |( j
0040C60E |. 8A46 01 |mov al, byte ptr [esi+1]
; F, [9 ?8 {, ~( D1 G5 m' x `
0040C611 |. 83C6 02 |add esi, 2
6 H. Y; ?+ e6 j+ E8 L
0040C614 |. 8847 01 |mov byte ptr [edi+1], al
, R- T$ o* t2 e; j; F
0040C617 |. 83C7 02 |add edi, 2
. D; e4 D Q& U2 x5 Z! X
0040C61A |. 3C 00 |cmp al, 0
4 t. g3 }' H/ J0 C9 m# |' k
0040C61C |.^ 75 E8 \jnz short 0040C606
. |# v+ q0 U4 N5 ]5 l
0040C61E |> 5F pop edi
" Q% P1 {% p7 @( Z" l
0040C61F |. 8A1424 mov dl, byte ptr [esp]
/ k: ^5 d3 l3 `+ \2 P- f
0040C622 |. 89E0 mov eax, esp
$ i |7 S' r! x
0040C624 |. 84D2 test dl, dl
8 y* A3 B0 Y' Y2 \' f0 E5 L l
0040C626 |. 74 09 je short 0040C631
- L$ k0 A5 _3 u) \
0040C628 |> 8A70 01 /mov dh, byte ptr [eax+1]
1 _3 b8 U$ I5 j* c
0040C62B |. 40 |inc eax
5 W, W+ f2 Y* B4 M
0040C62C |. 45 |inc ebp
& G/ i* ^" S1 E
0040C62D |. 84F6 |test dh, dh
6 T: @7 \* D: Y& V
0040C62F |.^ 75 F7 \jnz short 0040C628
! N5 x# `5 X& ~ D. {4 r0 {
0040C631 |> 81FD D2000000 cmp ebp, 0D2
' Z- w% t( ~& f1 T% D
0040C637 |. 0F8E 61010000 jle 0040C79E
# K# ]* s- n6 ?' X6 t
0040C63D |. 89EA mov edx, ebp
! V. n; E |: o+ F; R
0040C63F |. 89E8 mov eax, ebp
' c. J/ n9 D0 ^+ J7 U
0040C641 |. C1FA 1F sar edx, 1F
. ~+ S5 ?# t* h- C* u
0040C644 |. C1E2 02 shl edx, 2
% q0 `5 t9 F: e/ D" H G
0040C647 |. 1BC2 sbb eax, edx
' Z2 m J3 Q0 ^7 m e: ?" f4 A
0040C649 |. C1F8 02 sar eax, 2
1 ?- D3 e/ m: c8 D
0040C64C |. 89C7 mov edi, eax
x7 y! T0 }. R9 [# |0 ]+ e
0040C64E |. C78424 040100>mov dword ptr [esp+104], 3
, L6 O3 f, M& ^; }! l/ ^3 s* x
0040C659 |> 89E0 mov eax, esp
9 e/ e5 p) m- S$ ?0 I( D \
0040C65B |. 31D2 xor edx, edx
6 |8 Z3 J1 ?: N7 T
0040C65D |. 8A0C24 mov cl, byte ptr [esp]
% q2 {" m. d6 m6 T/ [
0040C660 |. 8915 8477EF02 mov dword ptr [2EF7784], edx
. |. G3 m# X$ s5 b
0040C666 |. 8915 8C77EF02 mov dword ptr [2EF778C], edx
9 |, q5 k+ q3 x4 b5 W
0040C66C |. 899424 080100>mov dword ptr [esp+108], edx
, G' S7 O7 X+ f) d) b/ h
0040C673 |. 89E2 mov edx, esp
6 [0 e1 S: u0 }) R1 Z
0040C675 |. 84C9 test cl, cl
% r) R2 f: [' S) G& O. L0 F$ l
0040C677 |. 0F84 89000000 je 0040C706
8 }$ n) l1 s" w. _7 `# A- \+ ?
0040C67D |. 8B8C24 040100>mov ecx, dword ptr [esp+104]
! G+ N2 v ?6 ]" m+ c- k
0040C684 |. 4F dec edi
7 l4 ~' n+ E/ N! i
0040C685 |. C1E1 02 shl ecx, 2
2 d3 w- P8 T& l; o5 B2 {* k
0040C688 |. 89BC24 000100>mov dword ptr [esp+100], edi
+ ?/ K" H8 q- f
0040C68F |. 898C24 0C0100>mov dword ptr [esp+10C], ecx
4 Q1 ?# n! r* @$ j' b) _
0040C696 |> 8A0A mov cl, byte ptr [edx]
6 z1 G/ x" C) f
0040C698 |. 80F9 20 cmp cl, 20
5 n4 Q w+ W; `; ~
0040C69B |. 0F85 6A010000 jnz 0040C80B
2 O2 `: w, a+ E% Y z" I& Z% z
0040C6A1 |. 3B9C24 000100>cmp ebx, dword ptr [esp+100]
3 \1 X$ Q: A! F
0040C6A8 |. 7C 53 jl short 0040C6FD
/ z8 F1 G5 p+ `
0040C6AA |. 8BBC24 0C0100>mov edi, dword ptr [esp+10C]
t |; j& z" J* Q- T
0040C6B1 |. C602 00 mov byte ptr [edx], 0
y3 p- t" [3 D
0040C6B4 |. 89C6 mov esi, eax
/ D7 S% E0 N* y+ X
0040C6B6 |. 8BBF 7477EF02 mov edi, dword ptr [edi+2EF7774]
7 q# P1 e' V' A
0040C6BC |. 31DB xor ebx, ebx
* m' z# t; ~+ q5 t4 W$ z
0040C6BE |. 57 push edi
+ v. u. @, y7 W* Y+ d3 n* t0 x
0040C6BF |> 8A06 /mov al, byte ptr [esi]
9 @3 y- `/ m. J# z; a* M$ y
0040C6C1 |. 8807 |mov byte ptr [edi], al
7 D2 ^2 K% M# I0 m/ H) h- s; n
0040C6C3 |. 3C 00 |cmp al, 0
/ `) b# }! w y- O3 U! R& G- K
0040C6C5 |. 74 10 |je short 0040C6D7
- r, d W/ d' p$ _8 a
0040C6C7 |. 8A46 01 |mov al, byte ptr [esi+1]
8 J. { |3 w2 H% H6 S5 z9 Z( Q" {
0040C6CA |. 83C6 02 |add esi, 2
( {' }9 x" B+ H/ V2 I$ P
0040C6CD |. 8847 01 |mov byte ptr [edi+1], al
- e C* d/ _0 l2 Y J0 J
0040C6D0 |. 83C7 02 |add edi, 2
- d# j8 K# z6 [1 T# T8 z
0040C6D3 |. 3C 00 |cmp al, 0
3 H+ B& K. r) b
0040C6D5 |.^ 75 E8 \jnz short 0040C6BF
p( e4 v) e! I' }
0040C6D7 |> 5F pop edi
8 ]7 M+ n; e$ I* F
0040C6D8 |. 8D42 01 lea eax, dword ptr [edx+1]
" \2 h0 k) J+ o6 H# r
0040C6DB |. 8BBC24 0C0100>mov edi, dword ptr [esp+10C]
2 ^' O# t" L( `9 t" c+ R
0040C6E2 |. 8B9424 080100>mov edx, dword ptr [esp+108]
) [8 x# @( |3 ^! l0 z4 i
0040C6E9 |. 83EF 04 sub edi, 4
( J3 A4 h) N: L3 U
0040C6EC |. 42 inc edx
: k8 R/ `' ^4 v P- { ?
0040C6ED |. 89BC24 0C0100>mov dword ptr [esp+10C], edi
2 M4 r8 S* C5 O1 p& n& j; A8 H
0040C6F4 |. 899424 080100>mov dword ptr [esp+108], edx
/ _6 r* ]) `7 a P" M) n1 {: {
0040C6FB |. 89C2 mov edx, eax
3 R" x# Z5 L1 D$ @
0040C6FD |> 43 inc ebx
6 [! w) `' T& b( Q6 D' [, p3 X
0040C6FE |. 8A6A 01 mov ch, byte ptr [edx+1]
9 j- G* r- b1 @, _5 u8 Q, Z2 @
0040C701 |. 42 inc edx
3 ~2 D t9 L) b. I q* m2 N" f2 n
0040C702 |. 84ED test ch, ch
% O+ v9 w7 o) k8 k" I; d9 r
0040C704 |.^ 75 90 jnz short 0040C696
+ U6 J* q) v" \# I. r( X6 x
0040C706 |> 83FD 10 cmp ebp, 10
4 I+ M( f8 Y' H1 ^3 l/ Z2 e* `! e
0040C709 |. 7F 05 jg short 0040C710
4 B9 m6 @! c2 b* ?7 r8 L
0040C70B |. BD 20000000 mov ebp, 20
2 C% J7 v/ F: O X3 ]
0040C710 |> 8B9424 040100>mov edx, dword ptr [esp+104]
! o, i. h5 u& Y0 r- Z6 n. B* T
0040C717 |. 2B9424 080100>sub edx, dword ptr [esp+108]
; q7 _% ?5 N; B7 W
0040C71E |. 85D2 test edx, edx
; j2 M: E# ~; ]
0040C720 |. 7C 23 jl short 0040C745
% y0 u, w' m+ w6 b: j! O
0040C722 |. 89C6 mov esi, eax
' ~: z4 H8 {9 K0 |# m d
0040C724 |. 8B3C95 7477EF>mov edi, dword ptr [edx*4+2EF7774]
" N5 R4 ~& _/ l# E! L
0040C72B |. 57 push edi
* h9 x4 Z0 t4 r. n& D; s, g- z
0040C72C |> 8A06 /mov al, byte ptr [esi]
; ` W; z9 s- u5 h, e, w
0040C72E |. 8807 |mov byte ptr [edi], al
" `3 D% [4 Z( y, P T
0040C730 |. 3C 00 |cmp al, 0
8 q) K' s# b+ I4 f% \5 s
0040C732 |. 74 10 |je short 0040C744
" D" N6 I% F4 b+ f7 t
0040C734 |. 8A46 01 |mov al, byte ptr [esi+1]
4 O- b6 v5 f; ^; N8 l& \1 P) K
0040C737 |. 83C6 02 |add esi, 2
0 A0 \& O# Q+ ~) Q( W( Y& }0 {
0040C73A |. 8847 01 |mov byte ptr [edi+1], al
1 o8 \9 j0 g% I4 i" V) Z5 q, u
0040C73D |. 83C7 02 |add edi, 2
# W0 V. W1 n8 k! W/ k- a/ S, H8 r9 C
0040C740 |. 3C 00 |cmp al, 0
7 c3 K; D% s1 E7 E* {( g3 t. S
0040C742 |.^ 75 E8 \jnz short 0040C72C
6 G0 J$ Z& |( Q* w
0040C744 |> 5F pop edi
+ n! T7 n' D* y$ E
0040C745 |> E8 E6500100 call 00421830
9 O0 ~+ I" P; P8 R( x7 I
0040C74A |. A3 8877EF02 mov dword ptr [2EF7788], eax
% \- J& ]5 T4 ?8 r
0040C74F |. 8B8424 040100>mov eax, dword ptr [esp+104]
. R: K+ ~& q r1 W; o, n
0040C756 |. 40 inc eax
% c; N0 V# N- q! w$ M$ R, R9 Y/ m
0040C757 |. A3 8477EF02 mov dword ptr [2EF7784], eax
! ?* w7 V1 W& r, u
0040C75C |. C705 8C77EF02>mov dword ptr [2EF778C], 1
" P! h2 v$ F% h' |5 L8 \" O
0040C766 |. B8 64000000 mov eax, 64
3 I+ O9 O5 E7 _/ P4 s) U( o
0040C76B |. 89C2 mov edx, eax
. S; Y6 {; r2 \+ ~5 v$ L) g
0040C76D |. 8B0D E880EF02 mov ecx, dword ptr [2EF80E8]
5 \" e/ O0 ? ]' f0 D7 j" U
0040C773 |. C1FA 1F sar edx, 1F
C5 C; c* n& L* O, ^' n
0040C776 |. F7F9 idiv ecx
" V; ^+ L: k! D2 H5 t9 F
0040C778 |. 89C3 mov ebx, eax
1 i5 D/ s* z$ k# e% l0 j
0040C77A |. 89EA mov edx, ebp
H2 v P2 [( s1 r( O
0040C77C |. 89E8 mov eax, ebp
2 ]7 \% l4 @7 r! d2 k/ N% B
0040C77E |. C1FA 1F sar edx, 1F
( ]9 J' T, i& d
0040C781 |. C1E2 04 shl edx, 4
5 A% L8 ^- A$ @3 d4 ?4 \* u+ Q: K
0040C784 |. 1BC2 sbb eax, edx
4 m$ V% }/ @ a8 k d
0040C786 |. C1F8 04 sar eax, 4
/ o% Z% S+ Y9 I5 P, O4 D
0040C789 |. 01C3 add ebx, eax
8 J7 b$ T+ S& l6 F& O. ^) m- s
0040C78B |. 891D 9077EF02 mov dword ptr [2EF7790], ebx
4 E+ ?8 P& ^3 F
0040C791 |. 81C4 10010000 add esp, 110
' Q Q$ z1 x" {5 n7 t; F& r/ c
0040C797 |. 5D pop ebp
9 }- [2 \ r( C; [3 j9 e9 J' ^' H- p
0040C798 |. 5F pop edi
+ Z, } C$ \* @+ p9 e$ M
0040C799 |. 5E pop esi
- ^! S* n) U. _6 `9 G7 j/ C
0040C79A |. 5A pop edx
5 b/ [+ Y- F# T3 F, n+ y
0040C79B |. 59 pop ecx
$ T. T# C) e/ i7 ~, g; P
0040C79C |. 5B pop ebx
+ I( j5 S2 V' j
0040C79D |. C3 retn
' G5 Z2 {: C$ M
0040C79E |> 81FD 8C000000 cmp ebp, 8C
/ E4 Z# D7 [, q( u$ G! j7 k
0040C7A4 |. 7C 28 jl short 0040C7CE
3 z, E7 E9 k7 I! x5 Y2 w+ c
0040C7A6 |. 81FD D2000000 cmp ebp, 0D2
- C6 E! i8 Q% U+ v# E# l' T
0040C7AC |. 7F 20 jg short 0040C7CE
$ M" W5 G1 C) b
0040C7AE |. B9 03000000 mov ecx, 3
0 h; e1 R" V; k: ^
0040C7B3 |. 89EA mov edx, ebp
- `( x+ |- E5 @* n
0040C7B5 |. 89E8 mov eax, ebp
( ~- C# P1 C+ @2 h. i3 I
0040C7B7 |. C1FA 1F sar edx, 1F
& Z- s9 [+ P; A# \! C' |# i
0040C7BA |. F7F9 idiv ecx
9 F3 V N _' h7 a* T
0040C7BC |. C78424 040100>mov dword ptr [esp+104], 2
S2 @/ l& Z1 ?2 ?1 @2 g
0040C7C7 |. 89C7 mov edi, eax
" ^$ ^# \2 Z0 k1 s. i
0040C7C9 |.^ E9 8BFEFFFF jmp 0040C659
; T- F7 m. j. V% [$ ]* q
0040C7CE |> 83FD 46 cmp ebp, 46
; q% t _4 Z: h/ Q# b% L7 {) x5 c
0040C7D1 |. 7C 25 jl short 0040C7F8
; L* l4 }! b2 R& j# q5 {: H
0040C7D3 |. 81FD 8C000000 cmp ebp, 8C
! Z `1 B1 l4 U1 E S
0040C7D9 |. 7F 1D jg short 0040C7F8
& [! [" E6 j6 p: B
0040C7DB |. 89EA mov edx, ebp
* e' P4 |' J8 v; |" M, R
0040C7DD |. 89E8 mov eax, ebp
0 u- I$ z. i2 `
0040C7DF |. C1FA 1F sar edx, 1F
! g" }" T' B$ E
0040C7E2 |. 2BC2 sub eax, edx
, z* s K7 u3 k$ x+ Q
0040C7E4 |. D1F8 sar eax, 1
4 R- D2 r+ l4 K* \+ u0 Z4 O
0040C7E6 |. C78424 040100>mov dword ptr [esp+104], 1
0 j9 P- X4 s; C: Z5 w% m+ N% |
0040C7F1 |. 89C7 mov edi, eax
* o. l" @( u! I V
0040C7F3 |.^ E9 61FEFFFF jmp 0040C659
. d6 V1 s* ~8 P* h
0040C7F8 |> 31D2 xor edx, edx
( I3 r" H' E9 `" j
0040C7FA |. BF 46000000 mov edi, 46
0 j+ P1 s9 s, \# o3 t! N
0040C7FF |. 899424 040100>mov dword ptr [esp+104], edx
- t" `9 @- ` A7 V
0040C806 |.^ E9 4EFEFFFF jmp 0040C659
+ U& }; ?# B8 b9 _
0040C80B |> 80F9 7C cmp cl, 7C
1 M0 x( V* T. o. S# H
0040C80E |.^ 0F85 E9FEFFFF jnz 0040C6FD
' j6 N+ x* s% Z5 P" @$ Y
0040C814 |. C602 20 mov byte ptr [edx], 20
: g* N! R+ E: }/ O: a$ a6 z
0040C817 \.^ E9 E1FEFFFF jmp 0040C6FD
& m# v8 e: A# a9 \0 W. P2 \4 E
' g+ J8 b1 b' i& F
在scratches.sc和scream.sc里面有lua的脚本,保存有字体文件名。
2 v2 r. N" B0 f" B2 A% w
估计要汉化就要在上面的代码段下功夫了,以后继续研究。
$ y8 O# o$ n3 S! A x) k
. j6 F' I6 u" h; W. l
找到2个俄文的补丁,也许对以后研究有用。
2 W# f; {1 j8 Q
http://www.megaupload.com/?d=EZH6X672
& d+ o) s/ f1 H5 [) ?1 |
http://rapidshare.com/files/94227080/ScratchesDC.7z
作者:
shane007
时间:
2010-9-28 07:54
顶上来备用
作者:
shane007
时间:
2011-4-11 06:48
顶上来备用1
欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/)
Powered by Discuz! X3.2