冒险解谜游戏中文网 ChinaAVG
标题:
英雄无敌四读字库函数分析
[打印本页]
作者:
jinxin8866
时间:
2010-3-16 20:33
标题:
英雄无敌四读字库函数分析
参数表
: W. H x, z& ^/ X
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
* ^; e! O% A4 d- s
arg2:字符串宽度 x
; R6 I% z' I1 H5 h3 T
arg3:y
, v" ?/ n- N* D' j( A; E
arg4:颜色
7 I1 d9 E/ D$ W9 c2 E
arg5:与颜色深度有关
2 ]6 `2 g% Y r
arg6:与颜色深度有关
6 H: ]' M' @8 E& C: E
ecx:字符的编码基地址
8 Z. C' Y% @$ @% S
6 f! U7 q$ `) v" P
0071B820 /$ 83EC 54 sub esp,54
) M! Z; e" ^* \6 {
0071B823 |. 53 push ebx
3 p7 k/ q+ L, `. _+ K+ I+ _
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
C% m5 E% m% y a( _& |! F# `, [
0071B828 |. 55 push ebp
3 c# g$ V7 e. s* |
0071B829 |. 56 push esi
- V* |4 o6 o, Z; W
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
7 ? i% O' b* b( Q% _- L0 [
0071B82D |. 8BF1 mov esi,ecx
# z/ B- Q5 b4 s. ?7 k
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
; v: f8 B# g8 \( W/ j; v
0071B832 |. 57 push edi
2 S# t2 b4 i6 b2 S+ K- ?1 [
0071B833 |. 50 push eax
" P: l9 U( W3 u$ Y9 H% d* ?# [2 d; \8 ?
0071B834 |. 51 push ecx
2 M: M& ~! i9 F! Z) R, S# C
0071B835 |. 6A 00 push 0
. E: c/ Z1 b7 `' Z o8 r
0071B837 |. 6A 00 push 0
( }$ j2 B/ ]. I7 }) p( X
0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
1 u# o9 @$ B v- j- e
0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
! y& l" }" I) R% g5 }" y
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
% u- n% j* g% I
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
6 {6 \# u! d5 R# R
0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
* W6 _# Q2 X, F- n9 n( Y5 }. V0 A
0071B84C |. 52 push edx
; o( h/ ?* |, ]
0071B84D |. 50 push eax
5 h/ q" s9 h) V5 F" r
0071B84E |. 6A 00 push 0
# w! `8 f" _/ E6 D4 |
0071B850 |. 6A 00 push 0
) \7 u1 m2 m. o& g2 c) S
0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
! D4 ]2 |, I9 y8 K( w6 x
0071B856 |. E8 55BCCEFF call heroes4.004074B0
0 P. x) O: m: o9 u. k. B
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
: e& a# l" [2 F; V% N
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
/ J4 N* [3 s, D1 m- N
0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]
9 k5 {9 F; a# _# i0 e
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
6 a+ K' F; _; \* M
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
5 r' ~7 x' d. t" [& C* Z' ~
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
# ]* V1 l8 z7 z7 h/ N; S J* R
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
) Y$ L+ }$ I; F6 L6 t
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
! d; T5 n; P4 ~# q. z
0071B87B |. 52 push edx
$ U% U2 Z i3 _- L2 N
0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
3 w' w2 V" f. b5 X
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
. T" B7 u, [1 B+ n" }6 `% A
0071B884 |. E8 47BCCEFF call heroes4.004074D0
$ t* H0 t+ A$ Z- b" ]; Y9 G
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
0 V; M' }! Q0 V- @9 c/ b& G
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
1 K9 @5 U3 J) i U9 V. H5 }
0071B891 |. 3BC1 cmp eax,ecx
9 N! R1 x. _3 G% @. s
0071B893 |. 8BF8 mov edi,eax
3 _9 Q- F) f+ `' B
0071B895 |. 7C 02 jl short heroes4.0071B899
. G% |7 d, @ R C0 i
0071B897 |. 8BF9 mov edi,ecx
4 u: A I! k( E. r# Z% o& K8 ]
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
9 M- B, U# @: _% N! N) R
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
4 Z5 F m2 l% v, W2 A7 t
0071B8A1 |. 3BC2 cmp eax,edx
3 |# K9 B/ k$ f2 F+ J& q
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
+ A0 M4 R2 K- I+ L; j5 y
0071B8A5 |. 8BD0 mov edx,eax
2 |4 u. i% M* h, o N! N. q7 ~
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
9 D. F7 ]; s8 u% f5 p* V/ p
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
1 P9 s; H6 r' H- Q
0071B8AF |. 3BC1 cmp eax,ecx
8 ~. t. _! y8 [9 {# |$ M$ K. \* E
0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
. ~& I8 B9 F. u% _0 c/ T
0071B8B3 |. 8BC8 mov ecx,eax
5 {; l8 w! W8 m! Q9 W
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
5 q+ X/ ?" v8 Y+ I! O( g% A# X
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
9 o0 ^( r2 u) m, ?# N: x( b2 q+ p
0071B8BD |. 3BC6 cmp eax,esi
7 o7 T; v" ?3 V, A# J- [: B" K1 ]
0071B8BF |. 7F 02 jg short heroes4.0071B8C3
1 q- ?0 q# X0 b8 k6 f S" X
0071B8C1 |. 8BC6 mov eax,esi
+ n7 p/ X% G R1 H
0071B8C3 |> 57 push edi
5 I2 \8 ~. F; G& \3 P
0071B8C4 |. 52 push edx
# g: E" m+ x8 x. h, |
0071B8C5 |. 51 push ecx
- ~; E2 v8 P$ Z4 b/ \9 z& D
0071B8C6 |. 50 push eax
" E# B- Y1 p1 L
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
: s9 G5 s* [5 U1 c0 N" n+ E
0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
' P5 J* F* A/ h* G" y
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
5 h. l5 R7 T" M$ j1 ~0 f E2 j
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
$ h9 p. b1 `6 I8 h4 g* Z! r& M6 V
0071B8D8 |. 2BC6 sub eax,esi
: r: ^& l0 o) {" a( M7 _4 T, U
0071B8DA |. 85C0 test eax,eax
2 b* ?3 R' P1 [6 e$ x
0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
. G( T p7 u ]" w5 L
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
, X& D% M. Y. Z# G+ r
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
- d3 P) f" s) k& k( ~+ Y
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2
5 U+ b1 x( q1 X& {# _) D; N
0071B8EE |. 2BE9 sub ebp,ecx
) @$ J% U& c/ v! Z* j! f" w- v# C
0071B8F0 |. 85ED test ebp,ebp
( E6 y1 [1 T4 C+ c
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
8 t5 s0 a7 {1 Y# c
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
# x% o+ v/ ^3 U" j3 e8 |
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2
( A: Q1 M0 i# Y2 X; i
0071B900 |. 8BF9 mov edi,ecx
% ~* `, C k0 v9 w5 N0 L
0071B902 |. 2BF8 sub edi,eax
2 E6 Q5 `& Q0 W0 e9 g& q/ r' p4 w
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
* H& I: O( t; P7 h0 y) @
0071B908 |. 8BD6 mov edx,esi
: A: f+ a T; C. D/ t# S( m: f* g+ t
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx
7 Y1 _* m ^1 K
0071B90E |. 2BD0 sub edx,eax
+ M: |' }0 p1 F
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
( f! n; K9 P! B1 J& w% J
0071B913 |. 8BD8 mov ebx,eax
|" d! e4 Z- h: {9 Z1 }
0071B915 |. 0FAFDE imul ebx,esi
X; F, c7 i: u* U
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
( C1 u5 q$ R, ^8 V7 U. }4 h8 Z% C. T
0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
4 l/ Z- I& J1 q. H( `
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
* G; i4 Q6 S% Z- }1 y' ]) g
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
! y# X$ W6 }8 X1 { J
0071B926 |. 03F3 add esi,ebx
6 |7 [9 ~6 x" H0 U$ R: [+ h" J
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
& u% H3 y* `* E% Y* h4 ]8 b: M
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
7 w- |. ?) L9 R( I# W6 y( e6 t+ P0 A
0071B92F |. 8BD9 mov ebx,ecx
) m" {+ R% v7 D* R% L
0071B931 |. 2BCD sub ecx,ebp
1 g4 u+ u9 n8 ~3 G _# D
0071B933 |. 0FAFDA imul ebx,edx
0 t; D( ]8 {2 s) s* q8 Q5 l
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
) f. G9 V& b# i- T* H$ {
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
' s( W$ L$ ?& u. U! n
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
/ B: ^* K2 t" j8 D" A
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
: a9 e6 L) U; |* z5 ~
0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
2 V7 \( D/ z* l% V, B- _& k7 E" j
0071B949 |. 2BC1 sub eax,ecx
2 g/ p9 x9 X) _
0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
# Z" ]3 T* ]5 |# |* h
0071B94F |. 03DF add ebx,edi
# n; N- Q3 n; a& p( [: F; h
0071B951 |. 8BC2 mov eax,edx
" Q2 \) d2 T( ]/ T
0071B953 |. 4A dec edx
# L6 i% V# X) R: n) {1 N. I) k6 o# M
0071B954 |. 85C0 test eax,eax
- b u* V$ a8 Y0 j( p7 J8 P
0071B956 |. 0F84 3A010000 je heroes4.0071BA96
! s; i; w3 x6 \6 l
0071B95C |. 42 inc edx
/ y$ `4 U) c! o: X; \4 s9 |
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
6 l) C- ^) C* X0 s6 X! v
0071B961 |> 85ED /test ebp,ebp
" b" Z& M, A! a, u
0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
3 c1 |# W+ W9 y% X
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
$ D7 C& T' }$ u ?% M, K' g
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
2 w4 G& C E2 `
0071B971 |. 25 FFFF0000 |and eax,0FFFF
5 Y6 `. Q6 O4 ?% G8 b
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
3 D) O" m8 M o2 G8 y, `: k
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
7 z" k# i) V$ r
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
- S8 J; W. i: C
0071B984 |. 84C0 ||test al,al
M6 q2 d: R1 N. `# {' e
0071B986 |. 74 6A ||je short heroes4.0071B9F2
4 q" E. j9 i( s0 m
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
1 r1 O# G/ e& w v7 r) b1 {
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
! Y; Z8 Q: }% L2 Q/ F2 C
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
- \$ G* C+ G- A* G2 ~
0071B991 |. 25 FFFF0000 ||and eax,0FFFF
! t4 ~2 w: o8 J: G) F
0071B996 |. 8BF9 ||mov edi,ecx
B$ g$ H0 V( u) u. ^) q1 w# H
0071B998 |. 33C9 ||xor ecx,ecx
# A C5 L. S# o
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值
: ^( h4 w% l8 Q- W( f
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
, p& c3 k' \0 e( E
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
: \3 l2 V T% g2 e
0071B9A1 |. 8BD7 ||mov edx,edi
2 C* e1 D& `# G6 H
0071B9A3 |. 8BF1 ||mov esi,ecx
9 i# E% B: P5 E h
0071B9A5 |. C1FA 03 ||sar edx,3
' L: ?6 |' N# I3 l$ E
0071B9A8 |. 83E2 01 ||and edx,1
, n' O9 L3 L, y b% a1 U
0071B9AB |. 03FA ||add edi,edx
* u) X3 Y2 q& z
0071B9AD |. 8BD1 ||mov edx,ecx
- N; g5 w# d7 b- S
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
& q- Y4 d, ^6 S6 q4 ~- e3 D: Z
0071B9B5 |. 23D5 ||and edx,ebp
2 m+ u1 T+ c5 ~
0071B9B7 |. 23F1 ||and esi,ecx
; A- J! @' C8 ?$ s
0071B9B9 |. 8BC8 ||mov ecx,eax
( j4 c. b: u( c* T- _6 X0 I3 G8 e
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]
1 S% X' E/ n7 C% h* W- G
0071B9C1 |. 23C5 ||and eax,ebp
" f1 V) S0 ?# L# Q) {
0071B9C3 |. 2BC2 ||sub eax,edx
5 P7 x1 w# T- r: O' Z+ V2 x- Q8 T5 a" B
0071B9C5 |. 2BCE ||sub ecx,esi
: I ^$ {0 c# b+ P: ?
0071B9C7 |. 0FAFC7 ||imul eax,edi
1 d. s# R, [# B: }
0071B9CA |. 0FAFCF ||imul ecx,edi
0 S2 t- b' m% Q" m% C8 {) \
0071B9CD |. C1E6 04 ||shl esi,4
3 H1 I$ v+ X2 K2 {: J( ~/ r
0071B9D0 |. 03CE ||add ecx,esi
% }1 Q. J# K& o% @1 z1 C2 H
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
$ E# L5 y) j. w& ]3 N: R
0071B9D8 |. C1E2 04 ||shl edx,4
$ s3 I: r- ?4 \4 b; g; x3 \
0071B9DB |. 23CE ||and ecx,esi
0 y; h+ ?# x$ v5 z9 X' @& `- ~
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
! [" B6 o. i; G4 D
0071B9E3 |. 03C2 ||add eax,edx
/ Y- {1 w6 C1 ~
0071B9E5 |. 23C6 ||and eax,esi
, N: u* @% i; }8 r6 W
0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
6 s) L2 x1 [2 e( `% x
0071B9EB |. 03C8 ||add ecx,eax
. \& P" [9 L! }' l7 h
0071B9ED |. C1F9 04 ||sar ecx,4
1 W3 | Z+ R, y
0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
1 {$ m& P: @4 ]: @9 z, r
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
( }, J! y% ` q( T% M% S. a
0071B9F5 |> 33D2 ||xor edx,edx
9 Z! c% L& M& f" }* ~0 F% q$ w
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF
) n( m l: S0 t
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
$ C* ?( }! G) y( s( Y
0071B9FF |. 8BC1 ||mov eax,ecx
; m% L: V: U* h
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
1 I' C5 c, h9 x1 W
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
/ ]: Q* e( Y2 ^
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
; T, G, Q" ^. D' T8 K; |, w4 G( M
0071BA08 |. 8BCA ||mov ecx,edx
0 i7 S0 {* J A$ [6 X
0071BA0A |. 8BF0 ||mov esi,eax
$ k" |: o- R$ B! }
0071BA0C |. C1F9 03 ||sar ecx,3
; `1 r& j. |% _
0071BA0F |. 83E1 01 ||and ecx,1
$ S; f$ e$ K9 E" r# X6 q
0071BA12 |. 23F5 ||and esi,ebp
* B% N. H f9 d2 ]1 a
0071BA14 |. 03D1 ||add edx,ecx
% k/ J0 |7 J- A. t0 h2 \4 u
0071BA16 |. 8BC8 ||mov ecx,eax
4 M/ I7 |9 Z+ Y( r
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]
/ A( {5 o. V7 c1 r4 V% f- a
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
8 Y; W& R7 O, \9 t
0071BA22 |. 23C5 ||and eax,ebp
8 f6 T( B# v: I
0071BA24 |. 23CF ||and ecx,edi
. o( h2 g# @' A0 W* V4 w. P! M0 Y/ B
0071BA26 |. 2BC6 ||sub eax,esi
- M3 q7 }. M$ w- s0 D" K
0071BA28 |. 0FAFC2 ||imul eax,edx
" q: x$ `' o1 X1 d6 G, M% Z0 \, z
0071BA2B |. C1E6 04 ||shl esi,4
& w# j9 s) l! a) E% M
0071BA2E |. 03C6 ||add eax,esi
5 Y% Y, f5 _, P7 X# R1 R: G7 t
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
- E0 g! x! r0 i2 {; ~
0071BA36 |. 23C6 ||and eax,esi
* x9 x' G- `4 U8 v) S
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
: J8 L0 I# m; |* \4 O
0071BA3C |. 23F7 ||and esi,edi
% q }0 j% k7 d/ b
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
% t) a8 L7 X" Z1 P2 M' A
0071BA44 |. 2BF1 ||sub esi,ecx
( O+ r, z; \2 l8 v$ Z- X) T
0071BA46 |. 0FAFF2 ||imul esi,edx
; f, S1 C s2 T+ V- ? j1 O
0071BA49 |. C1E1 04 ||shl ecx,4
b2 L3 g- D# M6 z2 | q8 X
0071BA4C |. 03F1 ||add esi,ecx
' g1 v4 g4 _/ R1 W) Q
0071BA4E |. 23F7 ||and esi,edi
5 u7 U& I2 ^. H' c3 m% k% x
0071BA50 |. 03C6 ||add eax,esi
; Y5 G) k# _( v" |' E% s4 M/ D
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
% S2 W4 V+ i* ?/ C. L D
0071BA56 |. C1F8 04 ||sar eax,4
& n: n$ c! }/ ~1 Z* m
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
" U/ B' |* W. h
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]
: s3 U, v) j$ J% g7 F7 ^- }7 `$ `
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
. q- s3 y# J8 K/ r1 B
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
: { O7 a m) n s
0071BA64 |. 48 ||dec eax ; 计数值减1
% z1 p5 T' O: h7 Y! _' D2 ]' M
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
6 G- h) d3 Y% A8 X2 l% A/ h3 g+ P
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
1 T1 i. f: n, D4 v! W
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
: a/ Y! K" y1 o6 x( Q$ y
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
6 h4 v' |+ p2 s/ Q
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
9 c6 z* O3 j0 r; E1 {$ Q
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
5 l. E+ s& k! m% g) S
0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
1 A- b+ c. S4 U" x( R# d0 J, Q
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
: U) G- Z g+ f+ ?6 _
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
% _: R' m0 H4 {0 U
0071BA87 |. 48 |dec eax ; 计数值减1
) }/ }: K6 u# R# V! o) B
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
2 Q" B% B+ w7 G
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
6 n' S* v4 d# r8 i$ l1 V+ `* }
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
% H2 k+ G% N8 X7 w3 ?% Z/ H
0071BA96 |> 5F pop edi
3 \; p8 \# b; n; F
0071BA97 |. 5E pop esi
7 d' Y: m r8 {
0071BA98 |. 5D pop ebp
( a$ r1 Z: R+ p$ v2 Q" I
0071BA99 |. 5B pop ebx
- X X$ G8 i8 D/ v# O" m% V$ f" W
0071BA9A |. 83C4 54 add esp,54
* p' O$ o8 l( H/ T
0071BA9D \. C2 1800 retn 18
$ u/ _) I# ]$ Z! ?) g" B
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
! x7 H9 S( d- G* X0 X
! b4 }0 y1 D- s# D4 ~5 w) w* q
buf[x][y]=func(buf[x][y],zm[x/2][y/2])
5 R& B8 V/ R) i- D) v: R7 o$ k
6 e% V- ^: _% p! C, {+ O: N
buf:缓冲区二维数组,两个字节表示一个点
0 E, X+ S0 C" W( q
zm:字模二维数组,一个字节表示一个点
作者:
shane007
时间:
2010-3-16 21:37
建议楼主可以内挂一个DLL代替原来的函数。疯人院就是这么搞的.
& d: F/ K+ t U* [* V, |9 ^& {1 S
) r7 c3 m2 i2 D; s* t
对了,这个游戏是直接写显存的?
8 U$ {( r9 Y- ~3 ?; ]0 ^- [1 E" Y
不是写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发表的 :
, {6 [! A0 [: D; V2 a" T, ?
两方面都有!
* L! g, I3 M- v8 d
论坛很需要像楼主这样的人才啊。希望楼主多多发表后需汉化资料。
7 j5 d" w; F3 z4 `8 }# r& d- w
目前论坛有几个游戏需要会汇编的人才,不知道楼主可愿意帮忙?
作者:
shane007
时间:
2010-3-17 22:31
[quote]引用第4楼shane007于2010-03-17 22:30发表的 :
! w' ?) U/ U; b7 v0 I$ T) e( m
0 k) X# R& @, T$ m, ~5 W T
& f2 O2 u4 ~$ F9 H) V
论坛很需要像楼主这样的人才啊。希望楼主多多发表后需汉化资料。
2 d) u7 L. J5 K1 U
目前论坛有几个游戏需要会汇编的人才,不知道楼主可愿意帮忙?
6 w% H* ~+ n7 h- ?9 x4 O
如果愿意的话也一定会让你有所收获的。
作者:
jinxin8866
时间:
2010-3-18 03:21
可以啊,希望能帮上忙
欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/)
Powered by Discuz! X3.2