冒险解谜游戏中文网 ChinaAVG

标题: 英雄无敌四读字库函数分析 [打印本页]

作者: jinxin8866    时间: 2010-3-16 20:33
标题: 英雄无敌四读字库函数分析
参数表
, G+ ]+ w; T/ I- q% O/ x. W- g2 o% Parg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
. P& G2 i9 t. i8 d# W3 Aarg2:字符串宽度 x
6 x$ p. k% {) f8 o& Y/ Uarg3:y& T  \2 y8 n% S3 U
arg4:颜色. k4 F, z7 e% v4 b
arg5:与颜色深度有关2 I; J* _5 `7 ^9 ]+ s: p
arg6:与颜色深度有关0 C1 @& D! [: A. V
ecx:字符的编码基地址' J6 }+ `6 R1 L; }
8 V9 F8 p) G3 c; K9 p
0071B820  /$  83EC 54               sub esp,54
+ h. a( y0 s$ f: k% w6 T0071B823  |.  53                    push ebx
6 z6 Q: R+ J0 V0 a0 a) ]$ F. z0071B824  |.  8B5C24 5C             mov ebx,dword ptr ss:[esp+5C]  m! y% b5 F& F* M) |
0071B828  |.  55                    push ebp
! }" M8 V( ]6 p0071B829  |.  56                    push esi
( Y2 R5 z( g$ ^% K6 l0071B82A  |.  8B43 08               mov eax,dword ptr ds:[ebx+8]
$ k1 t2 W2 }5 v6 Z$ o, I; y( M8 g0071B82D  |.  8BF1                  mov esi,ecx
" r! U0 I) U2 \9 c) P# o0071B82F  |.  8B4B 04               mov ecx,dword ptr ds:[ebx+4]6 `2 S  i1 b$ ~! x
0071B832  |.  57                    push edi
: c5 @% a6 g, v  R2 K( }1 ^0071B833  |.  50                    push eax5 B7 K$ S3 L2 b" L5 n
0071B834  |.  51                    push ecx
. l! _9 O- {5 G4 G0071B835  |.  6A 00                 push 0
# [3 z. t# Y1 |& w: @) y$ G( S0071B837  |.  6A 00                 push 03 ?! S. A" g& x/ N( u4 J2 L" ?" p
0071B839  |.  8D4C24 54             lea ecx,dword ptr ss:[esp+54], @) z( W# `! z" u* {+ A
0071B83D  |.  897424 20             mov dword ptr ss:[esp+20],esi
, q/ W0 g$ t, @+ M; Z" o0071B841  |.  E8 6ABCCEFF           call heroes4.004074B0( {* i+ F3 g4 T4 r
0071B846  |.  8B56 08               mov edx,dword ptr ds:[esi+8]9 C0 K% E6 P- q6 m  a
0071B849  |.  8B46 04               mov eax,dword ptr ds:[esi+4]3 o+ H" c2 f4 W4 w3 t; s
0071B84C  |.  52                    push edx0 d) q& ~- ]- k  d
0071B84D  |.  50                    push eax
& G( ?* W4 _4 b, `7 x0 }0071B84E  |.  6A 00                 push 0
: `" O( B# }$ `) E6 a: _+ b  u0071B850  |.  6A 00                 push 0
+ h: N/ m- t" l) T- D1 n% ?0071B852  |.  8D4C24 44             lea ecx,dword ptr ss:[esp+44]$ L$ c& `2 H9 U3 F5 V( w
0071B856  |.  E8 55BCCEFF           call heroes4.004074B0, Y, A  H" L, u5 a
0071B85B  |.  8B4C24 34             mov ecx,dword ptr ss:[esp+34]
6 C1 ^5 i8 k0 V* Y% `6 ]0071B85F  |.  8B5424 38             mov edx,dword ptr ss:[esp+38]0 W0 j5 k6 H+ Z6 F# C
0071B863  |.  8B4424 3C             mov eax,dword ptr ss:[esp+3C]$ q/ t9 T0 X8 b" C
0071B867  |.  894C24 24             mov dword ptr ss:[esp+24],ecx
* ?. [; T4 X: a+ X0071B86B  |.  8B4C24 40             mov ecx,dword ptr ss:[esp+40]0 i" B: C$ ~3 c3 n0 R0 O
0071B86F  |.  895424 28             mov dword ptr ss:[esp+28],edx
9 Z0 v$ |5 r, S% ^7 a0071B873  |.  8D5424 6C             lea edx,dword ptr ss:[esp+6C]  f+ |- O0 R" L! e9 q$ ?- {; }
0071B877  |.  894C24 30             mov dword ptr ss:[esp+30],ecx
' d$ s" q( J9 D0071B87B  |.  52                    push edx
2 e+ s/ z( ^8 [0071B87C  |.  8D4C24 28             lea ecx,dword ptr ss:[esp+28]
" n; a! c0 P8 v' e7 A; A- W0071B880  |.  894424 30             mov dword ptr ss:[esp+30],eax
3 ^  j# P5 H5 }: O( X0071B884  |.  E8 47BCCEFF           call heroes4.004074D00 d/ I+ A/ r" D# r7 M
0071B889  |.  8B4424 30             mov eax,dword ptr ss:[esp+30]
/ r  `% e* B: ~1 x( l0071B88D  |.  8B4C24 50             mov ecx,dword ptr ss:[esp+50]- n0 ^% i  V) J% |7 R7 S1 T
0071B891  |.  3BC1                  cmp eax,ecx
4 U* j, W3 v  M/ x( G' X5 S0071B893  |.  8BF8                  mov edi,eax5 C* o& D3 |5 E& x! w0 E
0071B895  |.  7C 02                 jl short heroes4.0071B899
) [% P  J* a& W/ a0071B897  |.  8BF9                  mov edi,ecx
3 U. g3 n% n) }( j$ ?, n0071B899  |>  8B4424 2C             mov eax,dword ptr ss:[esp+2C]
* @/ W" z* f+ ?8 Z3 W5 q5 k0071B89D  |.  8B5424 4C             mov edx,dword ptr ss:[esp+4C]
, T, E: v8 N! e7 C. W0071B8A1  |.  3BC2                  cmp eax,edx
# D2 }) v+ z2 U* _2 g6 [3 \0071B8A3  |.  7D 02                 jge short heroes4.0071B8A7
  Z. H8 \6 m6 i, c1 W0071B8A5  |.  8BD0                  mov edx,eax# k5 k- L! k1 W
0071B8A7  |>  8B4424 28             mov eax,dword ptr ss:[esp+28]
! U$ J0 c. l+ K( }$ d0071B8AB  |.  8B4C24 48             mov ecx,dword ptr ss:[esp+48]
4 ]' p0 r3 k% B+ e0071B8AF  |.  3BC1                  cmp eax,ecx! d' \( `. ^/ W" w1 O
0071B8B1  |.  7E 02                 jle short heroes4.0071B8B5/ s0 F2 C" d$ L
0071B8B3  |.  8BC8                  mov ecx,eax
- w' y! D6 [" w0071B8B5  |>  8B4424 24             mov eax,dword ptr ss:[esp+24]  r1 @2 z0 y. B8 i- N3 S9 M
0071B8B9  |.  8B7424 44             mov esi,dword ptr ss:[esp+44]
! M2 {9 t. Z4 n0071B8BD  |.  3BC6                  cmp eax,esi$ a) t9 }2 ^" m, r. [  B# Q
0071B8BF  |.  7F 02                 jg short heroes4.0071B8C3; w: L4 A) i0 D$ b
0071B8C1  |.  8BC6                  mov eax,esi! E- I( I5 `6 e! _( v3 l
0071B8C3  |>  57                    push edi" ^- `) K+ Q% M2 ?* Y+ p
0071B8C4  |.  52                    push edx
+ l& K* i$ I: S0 T, ]0071B8C5  |.  51                    push ecx
! L, g$ d0 D( @; H0 r% i) U0071B8C6  |.  50                    push eax& d' j3 @# g: y3 Z! Q( D
0071B8C7  |.  8D4C24 64             lea ecx,dword ptr ss:[esp+64]
% n3 Z  \% b5 B( w0071B8CB  |.  E8 E0BBCEFF           call heroes4.004074B0; V: }( L6 M  Z& M& U6 n* A
0071B8D0  |.  8B4424 60             mov eax,dword ptr ss:[esp+60]
% I/ y" X0 s+ ~+ ~* z! p0071B8D4  |.  8B7424 58             mov esi,dword ptr ss:[esp+58]
$ r$ F" P' m8 @4 e9 ~; E& h+ [0071B8D8  |.  2BC6                  sub eax,esi1 g* T$ U; \) s4 E( H1 H! T
0071B8DA  |.  85C0                  test eax,eax1 }9 B" {8 _# ]8 G% }( V
0071B8DC  |.  894424 18             mov dword ptr ss:[esp+18],eax. i0 B4 N) d* ~
0071B8E0  |.  0F8E B0010000         jle heroes4.0071BA96
2 M* M2 Q. U( ?* I+ ]0071B8E6  |.  8B6C24 5C             mov ebp,dword ptr ss:[esp+5C]0 l) Q4 [2 X; z
0071B8EA  |.  8B4C24 54             mov ecx,dword ptr ss:[esp+54]     ;  数值上等于arg2& U0 o7 Q% |1 r6 ?9 c( L
0071B8EE  |.  2BE9                  sub ebp,ecx5 V, {+ u8 Z) R2 N9 s, S0 k
0071B8F0  |.  85ED                  test ebp,ebp
( U0 P2 e  z  M% o3 W( I6 L# x: G- z0071B8F2  |.  896C24 1C             mov dword ptr ss:[esp+1C],ebp
/ K' {% S/ T- V7 V  ]0071B8F6  |.  0F8E 9A010000         jle heroes4.0071BA96
" F) p/ z. Q" A2 ~8 ^0071B8FC  |.  8B4424 6C             mov eax,dword ptr ss:[esp+6C]     ;  arg2
5 |. ^2 M2 C  \0071B900  |.  8BF9                  mov edi,ecx5 R7 _+ n% ]+ _( V% Y, y7 h5 X) ~0 U; A
0071B902  |.  2BF8                  sub edi,eax  R+ L/ ^  C1 r/ V; \  s
0071B904  |.  8B4424 70             mov eax,dword ptr ss:[esp+70]     ;  arg3
' }9 B( Z- N& H1 F4 j* X0071B908  |.  8BD6                  mov edx,esi' t2 ]5 X9 D2 i- r- t9 H. j- R
0071B90A  |.  894C24 24             mov dword ptr ss:[esp+24],ecx# l) t, x5 e- g# J3 k) R/ b
0071B90E  |.  2BD0                  sub edx,eax
& _+ i2 O  H8 s1 g! J" c0071B910  |.  8B43 0C               mov eax,dword ptr ds:[ebx+C]
# e" h, X0 t& j$ O+ l' R' n: K' D0071B913  |.  8BD8                  mov ebx,eax
1 c5 {7 U* k' s4 [, ?4 a0071B915  |.  0FAFDE                imul ebx,esi9 d( A9 l; X  B' U- g
0071B918  |.  8D344B                lea esi,dword ptr ds:[ebx+ecx*2]
' S4 L/ f) o: P/ f8 Q/ Z0071B91B  |.  8B4C24 68             mov ecx,dword ptr ss:[esp+68]
( j* U6 f$ S* y0 b# F+ I0071B91F  |.  8B59 10               mov ebx,dword ptr ds:[ecx+10]$ B7 H" G3 ~1 }* L6 o* p8 L
0071B922  |.  8B4C24 10             mov ecx,dword ptr ss:[esp+10]
8 V3 k- E- Q/ {0071B926  |.  03F3                  add esi,ebx; T: Z. [1 j% n* |6 \  T
0071B928  |.  8B49 0C               mov ecx,dword ptr ds:[ecx+C]+ K5 g0 A3 A! Q- L/ f
0071B92B  |.  897424 68             mov dword ptr ss:[esp+68],esi;  重点:将缓冲区地址写入栈内(原arg1处)
' m* F/ V) z  _# k: s0071B92F  |.  8BD9                  mov ebx,ecx
6 A3 o2 _8 ]( x7 A- N  L5 o& _0071B931  |.  2BCD                  sub ecx,ebp; R- n# |1 U: x" a4 O1 |. ~- O6 \
0071B933  |.  0FAFDA                imul ebx,edx
$ q* D+ p& m0 I! l2 j" F0071B936  |.  8B5424 10             mov edx,dword ptr ss:[esp+10]
% L; x/ i7 T7 S9 m0071B93A  |.  894C24 20             mov dword ptr ss:[esp+20],ecx% J" r  g! i: v6 }1 S( K
0071B93E  |.  8D4C2D 00             lea ecx,dword ptr ss:[ebp+ebp]$ _2 t% X9 U2 o9 O, v* x6 S
0071B942  |.  035A 10               add ebx,dword ptr ds:[edx+10]* t& b, N! s) N0 T! y: [( o
0071B945  |.  8B5424 18             mov edx,dword ptr ss:[esp+18]
9 Z7 ?& A1 [2 h( I0071B949  |.  2BC1                  sub eax,ecx
- \) h3 H8 z" B8 l) s$ a0071B94B  |.  894424 24             mov dword ptr ss:[esp+24],eax7 w. U/ S$ P; d+ e
0071B94F  |.  03DF                  add ebx,edi
* X. Y9 s2 Z( f2 Y2 p$ j0071B951  |.  8BC2                  mov eax,edx1 ]$ e! a3 C, A3 I+ W; U
0071B953  |.  4A                    dec edx  Q' h* Z0 G2 a$ i2 M
0071B954  |.  85C0                  test eax,eax8 k+ P( j4 Z  g! U7 Y$ ^6 O0 B0 C
0071B956  |.  0F84 3A010000         je heroes4.0071BA96
, m: t8 r& ?1 I, ~: b5 [* p0071B95C  |.  42                    inc edx& @! T- J# i& y" T+ n/ n
0071B95D  |.  895424 18             mov dword ptr ss:[esp+18],edx& E' W3 @; C2 B0 X$ J
0071B961  |>  85ED                  /test ebp,ebp
3 x, e+ F% F' \) u4 Z  v0071B963  |.  0F84 0E010000         |je heroes4.0071BA77& R' b5 ^, Z# f& j! o
0071B969  |.  8B4424 74             |mov eax,dword ptr ss:[esp+74]
4 v& [. u3 O0 L. G, ]  ~9 o0071B96D  |.  896C24 14             |mov dword ptr ss:[esp+14],ebp
6 V. N% r5 @8 k( C0071B971  |.  25 FFFF0000           |and eax,0FFFF7 ?6 Z$ d0 l! H* b( f" z
0071B976  |.  894424 10             |mov dword ptr ss:[esp+10],eax
3 f9 ^) f9 ]8 C: o0071B97A  |>  8A4424 78             |/mov al,byte ptr ss:[esp+78], l, }1 W& O. I$ }% B7 Q, a: b5 Z8 t
0071B97E  |.  8B2D DCF0AA00         ||mov ebp,dword ptr ds:[AAF0DC]
( B) T) ~; T) U# q( R0071B984  |.  84C0                  ||test al,al
' y; q4 }; F  x$ _' o- @0071B986  |.  74 6A                 ||je short heroes4.0071B9F2
: `- m2 ?$ e/ _! \: A0071B988  |.  8A0B                  ||mov cl,byte ptr ds:[ebx]        ;  取字模的像素点  h3 `9 Y" d& r& y
0071B98A  |.  8B4424 7C             ||mov eax,dword ptr ss:[esp+7C]+ u% H+ G; i" X: V' O  S8 r' C5 f6 ^
0071B98E  |.  83E1 0F               ||and ecx,0F                      ;  取低四位
: M0 Y- F- ~5 _4 @" L0 U  H0 U8 V7 I0071B991  |.  25 FFFF0000           ||and eax,0FFFF
! j! \8 Z' j+ I- s9 b0071B996  |.  8BF9                  ||mov edi,ecx) p7 t: z) b' M, f. A8 ?( S% ~
0071B998  |.  33C9                  ||xor ecx,ecx
4 R8 }6 w  [5 c( H0071B99A  |.  66:8B0E               ||mov cx,word ptr ds:[esi]        ;  取缓冲区的原值
$ P8 R, Z  M1 [5 g0071B99D  |.  85FF                  ||test edi,edi                    ;  检查字模的像素点低四位是否为0
! \" \# u% f9 ^+ f  V, s- }. G0071B99F  |.  74 54                 ||je short heroes4.0071B9F5       ;  为0则不作处理+ P( s8 T) _7 f
0071B9A1  |.  8BD7                  ||mov edx,edi- Z, o6 I. e3 E% c
0071B9A3  |.  8BF1                  ||mov esi,ecx1 }/ d3 p7 j- ?  f
0071B9A5  |.  C1FA 03               ||sar edx,3
& Y* \( E) u4 q2 q0071B9A8  |.  83E2 01               ||and edx,1! X0 E" h$ t' o$ s4 X/ f% G3 Y' P, M
0071B9AB  |.  03FA                  ||add edi,edx  f/ p% S! a5 _- N) x
0071B9AD  |.  8BD1                  ||mov edx,ecx( @7 C+ S2 s0 N( _/ b6 ?7 q, h
0071B9AF  |.  8B0D 04F1AA00         ||mov ecx,dword ptr ds:[AAF104]3 i8 H* L* @" N1 o! {2 W, n
0071B9B5  |.  23D5                  ||and edx,ebp, q* ~5 @6 q4 e* R: V! Q. j
0071B9B7  |.  23F1                  ||and esi,ecx
( f" _1 X9 R' Y$ |8 i* B0071B9B9  |.  8BC8                  ||mov ecx,eax
% s" s/ q3 p7 k" B+ g1 n4 Z. f0071B9BB  |.  230D 04F1AA00         ||and ecx,dword ptr ds:[AAF104]
0 J# E7 c7 c8 {- E0 [3 V4 q5 N0071B9C1  |.  23C5                  ||and eax,ebp1 c. w) M' }( ]+ X( c
0071B9C3  |.  2BC2                  ||sub eax,edx0 s1 K1 C1 H0 B# J! z' S% v
0071B9C5  |.  2BCE                  ||sub ecx,esi
; ?0 ^8 p, ?8 e6 m) j# M- S6 Y0071B9C7  |.  0FAFC7                ||imul eax,edi1 M3 ]; a% ^/ u( O/ d9 V
0071B9CA  |.  0FAFCF                ||imul ecx,edi
! k' `9 W, x, Y7 b% Q$ m# h0071B9CD  |.  C1E6 04               ||shl esi,4
1 n8 z! @5 F: F5 K" Y, @0071B9D0  |.  03CE                  ||add ecx,esi8 E7 S! ]+ v; I. m2 M
0071B9D2  |.  8B35 F4F0AA00         ||mov esi,dword ptr ds:[AAF0F4]( S# x' z1 w' m% S- l2 O, i
0071B9D8  |.  C1E2 04               ||shl edx,4$ d' j: }6 y' V" p$ e5 B) p
0071B9DB  |.  23CE                  ||and ecx,esi* T! ^! I3 M* M* c- |* ~/ Q3 S$ s' d
0071B9DD  |.  8B35 D8F0AA00         ||mov esi,dword ptr ds:[AAF0D8]
7 [  P# Z9 l7 n  ?* B! _$ @, D2 Z0071B9E3  |.  03C2                  ||add eax,edx
8 j/ f/ g+ v  U0071B9E5  |.  23C6                  ||and eax,esi
( r: K# o4 ]1 s- |) _5 }0071B9E7  |.  8B7424 68             ||mov esi,dword ptr ss:[esp+68]- z7 [2 x# J  X
0071B9EB  |.  03C8                  ||add ecx,eax
8 `, f& F9 y. P0071B9ED  |.  C1F9 04               ||sar ecx,43 G; F/ x5 N  _2 R/ L
0071B9F0  |.  EB 03                 ||jmp short heroes4.0071B9F5
' }; F/ V; Y/ G/ G0071B9F2  |>  66:8B0E               ||mov cx,word ptr ds:[esi]
1 e/ l& V' X& f: d3 f0071B9F5  |>  33D2                  ||xor edx,edx
* n1 z; P* G5 r% ]7 T2 F: j1 ~0071B9F7  |.  81E1 FFFF0000         ||and ecx,0FFFF
5 `0 U# b$ f" ~' I0071B9FD  |.  8A13                  ||mov dl,byte ptr ds:[ebx]0 p2 G% m+ b1 r7 |2 v4 X
0071B9FF  |.  8BC1                  ||mov eax,ecx$ o* J3 x8 l, P/ q0 w% d  m
0071BA01  |.  C1EA 04               ||shr edx,4                       ;  取高四位; q$ H: u. B/ P( N( t/ L& }( j- |/ q
0071BA04  |.  85D2                  ||test edx,edx                    ;  检查字模的像素点高四位是否为0# V: G$ B: G! q- n8 K
0071BA06  |.  74 51                 ||je short heroes4.0071BA59       ;  为0则不作处理2 H6 P3 ]9 j4 f0 ]- |5 Q
0071BA08  |.  8BCA                  ||mov ecx,edx
: G1 n  n$ E: X5 ?7 w2 S3 x0071BA0A  |.  8BF0                  ||mov esi,eax8 @0 g3 M) v! B: J0 Q; c6 B, T
0071BA0C  |.  C1F9 03               ||sar ecx,3
' E  p6 ^& Z( c+ i0071BA0F  |.  83E1 01               ||and ecx,12 L: w7 W/ A; e1 t) G
0071BA12  |.  23F5                  ||and esi,ebp- t$ E6 H9 h+ _4 d% e; i* V. s
0071BA14  |.  03D1                  ||add edx,ecx
& ^& b  O0 |; b9 a3 d2 z0071BA16  |.  8BC8                  ||mov ecx,eax( H1 C1 f6 C! o- n& q
0071BA18  |.  8B4424 10             ||mov eax,dword ptr ss:[esp+10]
: T) g5 q5 D9 H1 n0 S( w0071BA1C  |.  8B3D 04F1AA00         ||mov edi,dword ptr ds:[AAF104]
1 L# D' W. \2 O; ]/ \0071BA22  |.  23C5                  ||and eax,ebp
, v$ J0 D! W/ h! A) T0071BA24  |.  23CF                  ||and ecx,edi
% l- m; d$ Z- [8 a0071BA26  |.  2BC6                  ||sub eax,esi1 y* x# H2 b0 ~, B( \; r
0071BA28  |.  0FAFC2                ||imul eax,edx
  B- A% w0 y$ w: @1 Y0071BA2B  |.  C1E6 04               ||shl esi,4
+ k) I$ A' [; ~. [2 \0071BA2E  |.  03C6                  ||add eax,esi
+ p8 d) T- L7 ]8 K7 l4 {0071BA30  |.  8B35 D8F0AA00         ||mov esi,dword ptr ds:[AAF0D8]: M) r8 O. H: V1 A- j5 V& G
0071BA36  |.  23C6                  ||and eax,esi
% N9 l/ a" Q6 _! M4 X0071BA38  |.  8B7424 10             ||mov esi,dword ptr ss:[esp+10]/ p( y9 G' Z* d1 _
0071BA3C  |.  23F7                  ||and esi,edi( `3 F: `2 e" T' ~; N
0071BA3E  |.  8B3D F4F0AA00         ||mov edi,dword ptr ds:[AAF0F4]
3 b) N0 @/ r) d9 U- u5 C7 l8 Q0071BA44  |.  2BF1                  ||sub esi,ecx
1 R& ?1 [3 k( @, E* c) Y7 D/ E2 B0071BA46  |.  0FAFF2                ||imul esi,edx
* H  [& n" F% ^0 S0071BA49  |.  C1E1 04               ||shl ecx,4
7 s  I% B3 J9 _9 ?+ z0071BA4C  |.  03F1                  ||add esi,ecx& d( z' n% T' c9 C- w$ M1 s
0071BA4E  |.  23F7                  ||and esi,edi
4 b( t1 M: Q. u/ C% e0071BA50  |.  03C6                  ||add eax,esi
; k( Q$ B' K& q( l" T9 M( I0071BA52  |.  8B7424 68             ||mov esi,dword ptr ss:[esp+68]
8 g, S( ^, n! T% Q: z( W( y' F1 d0071BA56  |.  C1F8 04               ||sar eax,4
5 i& D7 ?' S  A" X. h% v% o9 G0071BA59  |>  66:8906               ||mov word ptr ds:[esi],ax        ;  将经过处理后的缓冲区值放回原处
2 M" w( A" I5 j4 p7 R0071BA5C  |.  8B4424 14             ||mov eax,dword ptr ss:[esp+14]4 v; N" c& f/ h; V
0071BA60  |.  43                    ||inc ebx                         ;  指向字模的下个像素点
9 h! C8 k- T* e0 V0 t( i1 t0071BA61  |.  83C6 02               ||add esi,2                       ;  指向缓冲区的下个点
  u6 g/ [5 d/ I# p0071BA64  |.  48                    ||dec eax                         ;  计数值减1
1 {$ E0 k/ Q( W# R! |; N7 w0071BA65  |.  897424 68             ||mov dword ptr ss:[esp+68],esi7 y# i) c% ^% |0 n8 c& d  q; v
0071BA69  |.  894424 14             ||mov dword ptr ss:[esp+14],eax
6 m" T. |2 _' Y- w0 A& R0071BA6D  |.^ 0F85 07FFFFFF         |\jnz heroes4.0071B97A
) Q% Y& U' a7 _" {0071BA73  |.  8B6C24 1C             |mov ebp,dword ptr ss:[esp+1C]
3 G) F# i. r, U- i! l( X0071BA77  |>  8B5424 20             |mov edx,dword ptr ss:[esp+20]
+ L2 w/ Q; [" w- |# B6 c0071BA7B  |.  8B4C24 24             |mov ecx,dword ptr ss:[esp+24]
3 Q- C4 i5 J/ T; }  a( @0071BA7F  |.  8B4424 18             |mov eax,dword ptr ss:[esp+18]$ e% r3 z( ^$ K' j4 }9 m+ S
0071BA83  |.  03DA                  |add ebx,edx                      ;  指向字模的下行像素点
( P+ E1 w& z5 n. L9 C0071BA85  |.  03F1                  |add esi,ecx                      ;  指向缓冲区的下行点
9 C) {; }8 E: A0 P0071BA87  |.  48                    |dec eax                          ;  计数值减1) h6 ?7 A, d: ?3 Y
0071BA88  |.  897424 68             |mov dword ptr ss:[esp+68],esi( S1 M; ?$ ], w2 e# l/ |
0071BA8C  |.  894424 18             |mov dword ptr ss:[esp+18],eax
- X9 U1 E$ n! z5 G: W9 y. s0071BA90  |.^ 0F85 CBFEFFFF         \jnz heroes4.0071B961
) {3 S; t- l: j/ t6 U7 R) d0071BA96  |>  5F                    pop edi
9 u( w* ]9 o; w" N& ~" F0071BA97  |.  5E                    pop esi
! v" F/ z6 b8 C+ |2 k% J- W- @' u0071BA98  |.  5D                    pop ebp
* F8 }* \/ Y6 F2 b) J0071BA99  |.  5B                    pop ebx6 W! \: ~3 b: a& Z) g3 k; W( O/ ^
0071BA9A  |.  83C4 54               add esp,54
; f6 \% N1 t  J% C  f9 C% C0071BA9D  \.  C2 1800               retn 18
1 ^% O- F$ ]2 S, k: L, g7 J, z本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
/ P4 ]' [& _& V, m+ W8 U
$ T* Q3 h1 ]! L9 m* d0 l& Zbuf[x][y]=func(buf[x][y],zm[x/2][y/2])  B' V7 F. g5 w2 b; L; Q

- q- T$ K, S: m1 A2 Fbuf:缓冲区二维数组,两个字节表示一个点( o' c3 ^4 `, X+ Y& H
zm:字模二维数组,一个字节表示一个点
作者: shane007    时间: 2010-3-16 21:37
建议楼主可以内挂一个DLL代替原来的函数。疯人院就是这么搞的.
. v; c4 a: {- S" h
+ _; b4 a3 `, ~8 [+ F1 G2 Z对了,这个游戏是直接写显存的?
+ l! L% t  }. `. ~' ?9 Z0 L不是写directx的surface?
作者: shane007    时间: 2010-3-16 21:45
对了,我想问一下楼主,你是不是对这个游戏很感兴趣?还是只是想研究汉化技术呢?
作者: jinxin8866    时间: 2010-3-17 18:11
两方面都有!
作者: shane007    时间: 2010-3-17 22:30
引用第3楼jinxin8866于2010-03-17 18:11发表的  :
5 j( c. G+ ^, p$ h8 h3 A: `两方面都有!

4 B  p) F9 }0 ^/ \' K1 f$ e论坛很需要像楼主这样的人才啊。希望楼主多多发表后需汉化资料。
% @4 u7 E2 M( J9 o! ~+ c+ M目前论坛有几个游戏需要会汇编的人才,不知道楼主可愿意帮忙?
作者: shane007    时间: 2010-3-17 22:31
[quote]引用第4楼shane007于2010-03-17 22:30发表的 : 7 a" U" ?0 c0 D
/ |8 P9 \" y% e9 `- b2 N  b
9 @' z& ^. |7 i; q2 [: Z
论坛很需要像楼主这样的人才啊。希望楼主多多发表后需汉化资料。
! T7 ~8 v) ]3 A% u! {目前论坛有几个游戏需要会汇编的人才,不知道楼主可愿意帮忙?
2 ^# C8 v5 O2 o8 F如果愿意的话也一定会让你有所收获的。
作者: jinxin8866    时间: 2010-3-18 03:21
可以啊,希望能帮上忙




欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2