参数表8 u ?# s/ @& M
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址$ w* Q* x+ c6 F0 M
arg2:字符串宽度 x7 U$ c# W6 o2 ~9 C) E- q: R
arg3:y
8 J- ~% g/ G' d- Narg4:颜色% H' ^5 }6 P# {' k" ~. k
arg5:与颜色深度有关8 G0 m1 q# W. E: _3 v
arg6:与颜色深度有关
: G2 Q( r9 [0 _7 Oecx:字符的编码基地址) L6 T7 h7 X) r
/ ~' K4 U7 k$ D$ E0 R8 y: E5 C
0071B820 /$ 83EC 54 sub esp,54% e6 Y8 C& n Z" o) w
0071B823 |. 53 push ebx
. H" J( [- N3 X. p0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
" B" y( B0 y' b0071B828 |. 55 push ebp6 y) ~7 k [. y3 p7 b
0071B829 |. 56 push esi- P/ A+ y% t7 H. l
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]" g# {% a& T: j
0071B82D |. 8BF1 mov esi,ecx
/ U" l1 O5 c$ p7 M! ]$ Y0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
6 p+ q0 k& r3 @1 B* B) T0071B832 |. 57 push edi
- k* \7 B/ k4 K2 U6 l6 d2 `$ r0071B833 |. 50 push eax E+ N; V$ D5 z6 V, q7 \5 b
0071B834 |. 51 push ecx# ^9 @' Z4 s/ v/ I$ R9 y. [+ A {
0071B835 |. 6A 00 push 0
+ \- y& ^7 T! P5 ?9 X0071B837 |. 6A 00 push 0
' s( H6 I3 K. l8 e0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]2 t& \5 _( ]. {: Q% ~( E3 X5 a/ o
0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
) ]: u7 @4 o- |8 E u- F0071B841 |. E8 6ABCCEFF call heroes4.004074B02 V1 B- j+ Z, t& e; Z1 m( ^
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
3 R- B) a# p! Q9 q0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]0 Y$ A" R1 w6 X9 h8 H$ ^' ?
0071B84C |. 52 push edx
. f/ g9 ~; J; w! V0071B84D |. 50 push eax
% N' Q# h# O6 i) s2 a& B5 x0071B84E |. 6A 00 push 0
7 D7 G. i8 G! S6 H0071B850 |. 6A 00 push 0
5 u8 y, P* m1 c' f7 b2 j, H: y0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
* i) o; |. B/ ^/ g/ B" V. ~5 a S5 B- ?# H0071B856 |. E8 55BCCEFF call heroes4.004074B09 @: I% C7 d- c3 Z7 a0 c
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
7 l3 k. _+ Y- ^9 p- z0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]8 [& ~' I1 O) N0 l% o5 J
0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]. b x7 B) x( H7 R
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx/ ^4 t( C& D0 n5 X
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
' D) @, N7 k: r0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
4 H9 w5 m' B1 @: z2 M- Y2 D' E0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
! i+ |5 k2 ^0 Q6 e7 {5 b+ h0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx0 P9 C x, l4 U; B1 J$ n* H
0071B87B |. 52 push edx
: N- G: k' s; \; D0 D8 |0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
: ~7 M3 @. [8 B% S. C$ } d! f: }0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax! D- z$ ~: n8 E0 W( ?- c( F
0071B884 |. E8 47BCCEFF call heroes4.004074D0
' \. b" y/ u; G' {: p* P* g) S0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]& m" c8 c; `* m6 |
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
. E% K Z; y- U+ H5 I: m- }0071B891 |. 3BC1 cmp eax,ecx, t5 u: g' C) I
0071B893 |. 8BF8 mov edi,eax
0 @# I6 Z( T. A/ E0071B895 |. 7C 02 jl short heroes4.0071B899
1 a. x7 h! O. ~7 `% R' |0071B897 |. 8BF9 mov edi,ecx
, O9 y$ {# k5 }/ ^% i2 _0 M0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
+ ~5 c0 _9 c: P1 N5 {: j0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
0 P7 g, y0 C$ I1 G0071B8A1 |. 3BC2 cmp eax,edx/ s' M+ q7 q( v7 X6 |
0071B8A3 |. 7D 02 jge short heroes4.0071B8A70 z; I# [5 z$ r7 r
0071B8A5 |. 8BD0 mov edx,eax8 X" p* |1 a/ P" } f) L
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
# I$ d) E8 t: R2 S% {5 y. g) ^0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]5 M% k W) }: Q9 K% i0 v3 O( J
0071B8AF |. 3BC1 cmp eax,ecx
2 B4 [1 \: U% `2 k) F0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
" [& f: t( N% g3 {4 b9 z0071B8B3 |. 8BC8 mov ecx,eax0 Z7 ^# H3 z% H* W2 n7 a
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
8 i! v9 T) i0 w+ ]+ U: p' X0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
8 ?! s# a6 ^$ d0071B8BD |. 3BC6 cmp eax,esi
6 P- I+ |4 M/ K; X6 o0071B8BF |. 7F 02 jg short heroes4.0071B8C3& M6 d0 c$ U0 U0 v5 Z
0071B8C1 |. 8BC6 mov eax,esi! q6 P( V2 H$ j, M$ G
0071B8C3 |> 57 push edi, d% ]9 t) @- D% U. Q1 K' u. j
0071B8C4 |. 52 push edx
- n, u7 V: k3 X7 X' }5 q0071B8C5 |. 51 push ecx& s8 p, m8 K/ s) }' A- y( p5 p
0071B8C6 |. 50 push eax
( k3 V) f6 a9 Z" d: T0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
' `$ c" b/ Q5 e( g8 n0071B8CB |. E8 E0BBCEFF call heroes4.004074B08 F( q. |( }+ ?& T" m
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
# v# s# x9 }+ s) z& {( ~" a0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]* d- u9 Z1 T0 c0 ~5 f- s; U
0071B8D8 |. 2BC6 sub eax,esi
5 } C7 ^& J2 p ^4 K0071B8DA |. 85C0 test eax,eax
7 Q2 i/ O) t2 t. E0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
( W3 V' c: |' ], B0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96: K6 x5 K% H6 N* T |
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
$ e. P' L- j0 S' I0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg26 r$ M- A3 b% Q, ~# e; K3 `; Q! j9 ^2 h6 P
0071B8EE |. 2BE9 sub ebp,ecx
$ ]* j# l4 C+ m \6 d+ j. ]0071B8F0 |. 85ED test ebp,ebp
, G Z' G4 P2 X7 I7 G1 C/ n+ Y0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
! n. J0 `, a' I0 o) B0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96; c) r/ M3 @& Q9 x
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2
: P9 x/ i* F( n% ~$ Q2 C' I0071B900 |. 8BF9 mov edi,ecx% T: T6 s) p' E- q% @
0071B902 |. 2BF8 sub edi,eax r1 ~& {" b0 z+ ]+ N
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
1 z+ i0 l1 s" n' {( k& q. d8 }0 B0071B908 |. 8BD6 mov edx,esi
. X( B0 k p, e" X' j0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx4 _8 y9 `! e0 f6 T0 O. x7 }
0071B90E |. 2BD0 sub edx,eax) J# N+ }6 d4 h3 `
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]" t' \" E: W* u: F
0071B913 |. 8BD8 mov ebx,eax
/ e; w& c+ h9 i0071B915 |. 0FAFDE imul ebx,esi
5 F7 t- l5 H$ U# x, _; \0 T0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]+ `5 t8 @, E8 _, b6 `, x
0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
% F8 H* r" C% a" s9 F% A$ m0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]+ W& i* s- f5 n* J
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
) a# X) g& L; |: H0071B926 |. 03F3 add esi,ebx( E8 g' F# x, e
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]! K5 V, t1 H! U8 j. e
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)% m! T% [1 m, t9 n$ h! c, m1 e7 c
0071B92F |. 8BD9 mov ebx,ecx
9 \- Y. `% K% Y5 L# d3 [# j3 L6 v3 B2 l0071B931 |. 2BCD sub ecx,ebp
7 r$ n: M ^( j/ q0071B933 |. 0FAFDA imul ebx,edx0 U( T! q2 J2 i
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]: H4 z0 S- ^* P1 f# `
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
; t$ I0 |, s5 g4 \0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
* N; {* q0 a/ L$ B9 L" O0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
2 R# t u+ T M9 U8 e0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
6 A) w/ o, b& H; J& q6 X+ B0071B949 |. 2BC1 sub eax,ecx
/ N, I. w8 C- m$ A( M% a/ W# ? b6 Z0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
# [5 X: B; I$ u/ J0071B94F |. 03DF add ebx,edi
/ }! `. n7 D* ^% o- F0071B951 |. 8BC2 mov eax,edx" v; p7 s& k1 D/ }
0071B953 |. 4A dec edx
2 q+ v. M: }1 ]) \0071B954 |. 85C0 test eax,eax$ b9 y+ g% `- m
0071B956 |. 0F84 3A010000 je heroes4.0071BA96" _: a* ~1 I0 v
0071B95C |. 42 inc edx5 T" B. o# C5 T$ D9 M
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
9 U6 c/ F8 S% U3 J3 z. z- W, V O0071B961 |> 85ED /test ebp,ebp
. S; ^0 R% e. l: p, i, s0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
) l0 k1 |4 p& O) _: {, G0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
; I6 V$ t) F! o- l. G$ W+ T Z0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
9 m! R. a: q0 g) u0 y2 |0071B971 |. 25 FFFF0000 |and eax,0FFFF
, V W$ I5 _: c y8 F* e0 D2 u0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
$ a4 b- C! m+ C2 V/ s3 L0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78] y' G5 _8 w( d2 N" j
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
- i; g' x7 [+ f: X5 O8 ]0 m0071B984 |. 84C0 ||test al,al# c% a9 J! Z; j0 c- h" ~
0071B986 |. 74 6A ||je short heroes4.0071B9F2, ?) V1 J/ \9 r6 z X
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点1 x2 S! |2 }. M; {
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]5 h9 e4 N2 f/ f+ v
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
. G5 F, Y/ d: `" T4 |0071B991 |. 25 FFFF0000 ||and eax,0FFFF
: Q; D6 Q3 n: X8 F3 ^) x1 P, B0071B996 |. 8BF9 ||mov edi,ecx: X$ ^2 S/ v! C% p
0071B998 |. 33C9 ||xor ecx,ecx' d8 [) q8 _ s9 @8 d R
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值1 }5 N/ |) ]$ S" v/ F- q
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
5 y' O- b, p! V5 d0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
F9 g: J4 l. T) Y) c5 w& i% V! d+ U0071B9A1 |. 8BD7 ||mov edx,edi
/ E8 k+ t8 W1 s" X! {, J' N0071B9A3 |. 8BF1 ||mov esi,ecx" E& J5 ]9 v% F$ K
0071B9A5 |. C1FA 03 ||sar edx,3
- L! h4 F4 E3 ^5 P5 u3 C+ A6 J# s1 n0071B9A8 |. 83E2 01 ||and edx,1
, [6 x) Q3 y" C4 `+ r r' P0071B9AB |. 03FA ||add edi,edx
/ Y, t% t# {" u- a6 [- O2 o' B0071B9AD |. 8BD1 ||mov edx,ecx; R$ k9 N+ |6 o h5 {
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
9 @' b0 p3 k! {0071B9B5 |. 23D5 ||and edx,ebp2 T* l, J9 j, w3 `
0071B9B7 |. 23F1 ||and esi,ecx
# ~2 ]) \. {6 _" w1 G0071B9B9 |. 8BC8 ||mov ecx,eax
. h/ B- U7 }4 e4 f I( p* E, k: M( g0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]
8 X9 Y, \ \ _% x D8 f; A: r0071B9C1 |. 23C5 ||and eax,ebp$ n: i* e' H; W0 s2 l1 u4 S- a
0071B9C3 |. 2BC2 ||sub eax,edx% b0 m- i4 l1 j( c' D, M: I. F( C
0071B9C5 |. 2BCE ||sub ecx,esi
0 t0 N I' V; T0071B9C7 |. 0FAFC7 ||imul eax,edi3 \' f$ L- [+ [5 o3 m+ x& P
0071B9CA |. 0FAFCF ||imul ecx,edi
7 A9 M# m! f$ H' b8 _0071B9CD |. C1E6 04 ||shl esi,4
0 G0 N0 m# e+ _: H# Z0071B9D0 |. 03CE ||add ecx,esi% o2 A8 T5 @* ?4 s2 v. n+ o
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]; G# e1 N( b/ l e) }6 z! m/ {1 s
0071B9D8 |. C1E2 04 ||shl edx,4
7 l2 l: q, B; S0 {% `, w7 e0071B9DB |. 23CE ||and ecx,esi2 Q! R5 {$ V+ t2 T, G' ?
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
$ c6 v% S2 I% o: F" N1 z0071B9E3 |. 03C2 ||add eax,edx9 E1 {7 s8 l; n; e- e
0071B9E5 |. 23C6 ||and eax,esi% _/ w& Z' q, G
0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]0 u+ G& B# t2 `0 ^
0071B9EB |. 03C8 ||add ecx,eax
* i4 R# P$ o+ f# s) @5 q5 e _0071B9ED |. C1F9 04 ||sar ecx,4; a$ W" C% z2 W3 z/ v8 w
0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5 j9 A" O+ v* }! c8 ?8 J3 w
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]3 e, {, @. _2 J$ ~& G
0071B9F5 |> 33D2 ||xor edx,edx m( H. x( }- A
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF9 F9 d a7 f8 @( S- `4 T2 D
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
1 `7 q( F" Y0 M3 w, a% F0071B9FF |. 8BC1 ||mov eax,ecx* T* ?6 i2 d7 G! y8 } X! M
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位: q- A, Q8 z; w( m; S c
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0* x0 K7 G! L- R ?2 u. Z3 C
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理6 T: X1 I$ f3 {4 g# m' D
0071BA08 |. 8BCA ||mov ecx,edx
' E+ Q8 T; X& c2 T0071BA0A |. 8BF0 ||mov esi,eax% z% ^4 H3 R0 y' [- z' e' h
0071BA0C |. C1F9 03 ||sar ecx,3
1 ^2 ?4 |5 O& ~% x0071BA0F |. 83E1 01 ||and ecx,1
1 q+ O; N# m' g4 c h6 p7 L0071BA12 |. 23F5 ||and esi,ebp
5 i5 A9 ~7 Q/ ?) A z$ C2 G* e0071BA14 |. 03D1 ||add edx,ecx
5 T% C v( ]* c% p& d0071BA16 |. 8BC8 ||mov ecx,eax
- I) _: y5 U* i# u( \. ?0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]5 Q) y2 R/ T6 K3 ^. T3 \& `% X& i
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]6 t- t* z" [+ y6 p9 ~4 Q3 G
0071BA22 |. 23C5 ||and eax,ebp
: Z: y. R% {( l+ \8 p M0071BA24 |. 23CF ||and ecx,edi* F6 N- ~0 f. J! C) G5 c# ~
0071BA26 |. 2BC6 ||sub eax,esi
2 O- j+ U1 I$ l* H0071BA28 |. 0FAFC2 ||imul eax,edx/ m% P' b- Y0 D
0071BA2B |. C1E6 04 ||shl esi,4
. o: J1 J) f' d/ O5 c0071BA2E |. 03C6 ||add eax,esi$ x0 f% x+ o# ^ f) @8 p
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]' Q# d' g4 R+ e2 O; G4 R; n; l
0071BA36 |. 23C6 ||and eax,esi
- Q* B& a2 w, `" ?6 |* d- ^. a0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]0 [8 k4 N2 {+ x, T, o
0071BA3C |. 23F7 ||and esi,edi7 z. Z9 d% D& j! Y9 L" h
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]1 |1 Z# w: V7 h3 _
0071BA44 |. 2BF1 ||sub esi,ecx0 I, [$ K, t7 | W2 @
0071BA46 |. 0FAFF2 ||imul esi,edx% o9 a- Z* x3 Q* Z( M* A
0071BA49 |. C1E1 04 ||shl ecx,45 i& _5 v' }6 j; n% ?4 X- ]
0071BA4C |. 03F1 ||add esi,ecx
9 \8 Z' e' Y; b ?1 H4 P+ q5 M# [0071BA4E |. 23F7 ||and esi,edi1 z2 {* H8 J) j: S
0071BA50 |. 03C6 ||add eax,esi8 K @4 M- \( H1 u/ D2 j
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]& l$ H+ d. v, p, ^ i! l
0071BA56 |. C1F8 04 ||sar eax,48 H* B) z0 I9 \% X7 R1 N2 S
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处& }/ i& g$ n1 Q1 G$ z' R! L) V
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]5 |( e$ m6 H" k$ o. z- h- }+ o
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点! I) i! y0 O7 G7 r* U( ^
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点, a( q# J5 ]6 i6 t' Q9 S
0071BA64 |. 48 ||dec eax ; 计数值减1# `3 h \% [0 ~( w' _: o9 q) c
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
( Y! v/ U6 d% A3 j ^0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
% z% E, P! ?6 S/ P3 k% H% D/ p, \5 o0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A+ g- G) k4 Z) p; |8 d
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]; i0 G( c7 s; P+ U+ {, z Y
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]! y# I! u+ S0 \1 L
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
, s0 L7 h( e. p. x" c5 |0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
4 l/ Z/ \7 q6 u" V; ?( v2 I2 @# D0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点 e2 U; [! o, q2 k9 H% \
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点, ]! h8 O. ~8 X0 T2 ]
0071BA87 |. 48 |dec eax ; 计数值减1
" M" k$ z+ H- p$ @* D* c- B0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi4 {+ F8 g+ x6 D7 r
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
M% Y% L/ n9 m8 w) E0 i0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961# n! q1 s! f' d
0071BA96 |> 5F pop edi
. g6 n! G+ \: h0 H. C# H3 R. L" K0071BA97 |. 5E pop esi
( }9 l- [6 C7 k' @9 G9 y0071BA98 |. 5D pop ebp. I% y$ H/ w) H$ G# E8 W' C# N5 }0 A
0071BA99 |. 5B pop ebx
+ i$ } B5 s( I- {1 U0071BA9A |. 83C4 54 add esp,543 |( t5 p0 I7 \# U
0071BA9D \. C2 1800 retn 18) B6 h# X: |' h2 A
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
. o( ]3 a& N& ?% W' z
' C2 x' B6 z' J. J" N; v5 ebuf[x][y]=func(buf[x][y],zm[x/2][y/2])
: T3 ~+ g& Y6 p2 f# O6 T- Z: y/ X$ Z/ W9 W. f$ }4 ]
buf:缓冲区二维数组,两个字节表示一个点" V! L: R4 c" G( \ f6 i
zm:字模二维数组,一个字节表示一个点 |