参数表
( v1 O) d& r* f4 w7 H2 d# Farg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
$ d% O6 X; V8 ~+ `) _arg2:字符串宽度 x
; n, u, O" i. Uarg3:y
* P% T; T# c" |' f* G- C; h% qarg4:颜色* ^3 Q' L& Q+ k9 N. p
arg5:与颜色深度有关
/ S/ Q' H$ M( h$ Aarg6:与颜色深度有关1 w% k3 |7 W& ?; [# F- P' p5 E' k
ecx:字符的编码基地址
' ~& I5 {* e! O f2 m8 l ]. I* q/ n3 A% A! E
0071B820 /$ 83EC 54 sub esp,548 d( E3 Y7 U* v) J& f
0071B823 |. 53 push ebx
+ j4 w' I; A$ S2 z( B* n0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
5 C0 \+ \% D1 N& |7 v d/ f0071B828 |. 55 push ebp
1 Q# h- V% M2 I4 T0071B829 |. 56 push esi Z1 a% F# M3 I+ r& u2 F, x
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
D: J- L' |: t$ R8 t0071B82D |. 8BF1 mov esi,ecx0 d- ^1 [0 J- u4 G8 j5 X
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
$ E, S, g3 F* d( j0 a- m0071B832 |. 57 push edi
$ f9 @( U8 `. C8 A! S) |0071B833 |. 50 push eax
3 p: y6 z1 a2 ]' t1 G0071B834 |. 51 push ecx1 I4 |8 s. V/ E" N$ ?" q2 ?! Z6 n
0071B835 |. 6A 00 push 0
# r. O4 m. m9 `! U& n1 i+ c7 i0071B837 |. 6A 00 push 0) H, D1 r/ K1 j$ u I
0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
- }. x2 m2 i4 L% ~; p$ H0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi% ?3 }% U9 [) W7 U g1 M
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
8 I' d( [$ W! W# A0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
* r; U" }: x% b: [8 f5 N0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
1 S8 i& C& }) W/ v- m0 K. C7 ?0071B84C |. 52 push edx
0 e" u* q# ?* w8 u" H/ K0071B84D |. 50 push eax
9 S& N& w$ z ]( \- @2 m0071B84E |. 6A 00 push 0
( a1 U2 K9 u$ g4 w0 s; J. t0071B850 |. 6A 00 push 0
( Z6 O! a1 P8 m3 N0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]( C: W$ i4 H0 n- I- ]
0071B856 |. E8 55BCCEFF call heroes4.004074B0
. o' L% Y( l- w! s0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]6 A7 q1 g' Y1 V3 B$ l2 Z
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
1 p& h% a( x# D0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]4 c% R, m+ @! ~ M% A
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx6 G; p& z6 |( M/ W) j l( I1 k
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]9 u) m. }7 H" G3 _0 z2 Q
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx! c+ V$ {$ V$ V
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
2 o& K; H9 a" Q, I8 Z# _0 l0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
6 h5 ~. K- ^* H/ w$ _0071B87B |. 52 push edx
* J* c, q# l; g( \# Y1 n0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]! I ]( x( j s3 q) ]" t
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax" W# N t% S) g
0071B884 |. E8 47BCCEFF call heroes4.004074D0
0 M6 H: v% a* u) K% {. p0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
# x* }, u3 D/ r) _( a/ e0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]0 L# j1 L6 ?+ k- f `9 ]' h% p
0071B891 |. 3BC1 cmp eax,ecx0 i3 Q+ y) G% H" ~6 Z9 b+ u( |5 a4 c
0071B893 |. 8BF8 mov edi,eax
6 Q; i3 A M Q7 T! X; d0071B895 |. 7C 02 jl short heroes4.0071B8992 ~2 D( K. F( i. U4 I- R1 V
0071B897 |. 8BF9 mov edi,ecx
, d O7 G% k1 v0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
* ?5 |9 K Z% s% r/ `0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
; S" P$ X ]$ _$ H6 P0071B8A1 |. 3BC2 cmp eax,edx
5 N3 i! Q" J q" u$ `* x: F H* P0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
3 u c0 A4 S4 I7 c4 \* |0071B8A5 |. 8BD0 mov edx,eax$ G9 E6 o+ V: E- ^4 g* b, Q
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]5 h" u) k' J' A8 z" l
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]- A! X. S( M) S' |# h) V
0071B8AF |. 3BC1 cmp eax,ecx
: Z9 x2 V# g! B: M# f' j$ o( e8 n6 E0071B8B1 |. 7E 02 jle short heroes4.0071B8B5' S- W' Z; K7 N; q
0071B8B3 |. 8BC8 mov ecx,eax
( `7 k) K, v+ Q/ g$ W, w( ^" z: q0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]% a4 I" J2 B. x7 g3 C2 x
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
$ ~# N5 N7 w, ~2 T' `' a- t! f% |# K0071B8BD |. 3BC6 cmp eax,esi7 o, J0 }: |% a/ P! N& x6 o9 H% S
0071B8BF |. 7F 02 jg short heroes4.0071B8C3) V/ {9 H) y3 U( N# }/ W f
0071B8C1 |. 8BC6 mov eax,esi+ P" k `# f3 t v C' e3 ^) Z
0071B8C3 |> 57 push edi+ i' J# I2 W" @4 g7 o1 e5 \# t3 W
0071B8C4 |. 52 push edx
) l! ]& V. O+ V4 E5 D% C3 r0071B8C5 |. 51 push ecx# r/ W5 c% v* C: l) f
0071B8C6 |. 50 push eax3 E4 B* ~; O- W' \) i! r6 O7 }/ L
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
" c( y2 Y- |* [6 n( c) s6 b0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
: k0 A+ i8 o# d! z8 \4 z0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
* }6 g, j/ ?( l5 \0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
) m+ Y% S, y' W0071B8D8 |. 2BC6 sub eax,esi# }1 A, x! }. g/ B$ i, @7 n
0071B8DA |. 85C0 test eax,eax: r$ N1 {0 w1 B ? }* a; o
0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
, ]) o3 J3 m. d7 I% N0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA966 u# A5 V/ t) M2 {: r
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]* v4 Q: p ]0 { b. d( C
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2
4 L# [* {3 T" r5 ~% w9 Z, i0071B8EE |. 2BE9 sub ebp,ecx
2 o1 I8 F; s$ L2 a" o0 V, t0071B8F0 |. 85ED test ebp,ebp
. i7 c$ N5 b6 z# `1 _0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp4 k9 j! p) {* l( s: j9 v
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
# c2 g0 X- X( E0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2" O5 ^5 |/ { `. u8 l6 }! X
0071B900 |. 8BF9 mov edi,ecx$ c: D( o6 l: O4 o6 j
0071B902 |. 2BF8 sub edi,eax
# ^9 ~- b$ ~: k; K3 P, B0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
- `9 B7 y3 Q$ L0071B908 |. 8BD6 mov edx,esi
& w- W# E# r5 A6 e0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx) ?7 y ?6 f+ B- P( i
0071B90E |. 2BD0 sub edx,eax4 H* G( ?% i; d5 ^# b- b4 g
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
0 g- f% i, m" E2 w* ?# e2 b0071B913 |. 8BD8 mov ebx,eax4 S7 ?$ h1 z8 @3 C/ P1 J; t
0071B915 |. 0FAFDE imul ebx,esi: [* o5 B0 G9 t
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]! `' f1 }: X2 Q9 A
0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]$ t4 v3 O# E& p7 W# `( Z% G% j
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
2 g) L2 o) e, R# P ^2 B; R2 G+ C. g, E0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10] @0 I% p2 L C
0071B926 |. 03F3 add esi,ebx
: U! b Y; q8 a l, |2 {0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]; R/ D+ F& B# Z, d1 E. z+ v: ~
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)' N6 [ T4 G: z) ] C- g, N
0071B92F |. 8BD9 mov ebx,ecx3 D K: G2 Y! I: h y7 K8 K
0071B931 |. 2BCD sub ecx,ebp* p4 x; ]3 q( @! E5 k
0071B933 |. 0FAFDA imul ebx,edx
0 F. g0 I( V* K0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
: G' Q8 u/ @, h" ?$ N0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
7 R# [6 l" q4 Y* j# V0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]$ D+ |) q9 m' L2 e# u3 `6 F
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
% Y& _6 i: \) H; [+ m0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
+ Z" s! l& ]9 \! p$ \, S0071B949 |. 2BC1 sub eax,ecx
; m- l" H9 n/ o0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
; s- ?* a% x( b0071B94F |. 03DF add ebx,edi
, f# f: V1 l; v# F+ _% N0071B951 |. 8BC2 mov eax,edx
7 \& x* q3 P+ ^' ^1 p% r0071B953 |. 4A dec edx
0 L( k0 _8 d9 {9 O1 z a0071B954 |. 85C0 test eax,eax
. ?1 q' M3 P, D6 n, P2 i: k# `7 u0071B956 |. 0F84 3A010000 je heroes4.0071BA96
4 i3 v( n" N- p; H% T% _0071B95C |. 42 inc edx
3 I" |) v2 h/ B, Z0 B( W0 |0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
& S2 e9 D# W/ [- h: i0071B961 |> 85ED /test ebp,ebp
: r% N) W* X. G7 _# i4 B1 q0071B963 |. 0F84 0E010000 |je heroes4.0071BA77$ v- i7 S5 P: b* g
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]1 n4 p0 L7 H+ E
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp, d- Y1 z- i6 x8 q3 B* J( @
0071B971 |. 25 FFFF0000 |and eax,0FFFF0 y P& Z0 ?: F& l$ [
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
; {+ N. e9 p/ l5 l0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]' L8 X- v) b) `& E% h: }0 E9 T& P/ v
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]- S/ {4 m2 h* i$ q" ~
0071B984 |. 84C0 ||test al,al3 T1 ~8 z( X1 l( P7 c' X; y
0071B986 |. 74 6A ||je short heroes4.0071B9F2
- O' {% p" ~$ S$ Z0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
/ R n' s6 X4 w( m3 t0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]. v- q4 ?" P4 ~
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
6 s( j) z7 u4 q; ]* t/ j7 I1 {$ y! n0071B991 |. 25 FFFF0000 ||and eax,0FFFF
S3 e2 m, ?0 g- R/ p; Q& o7 P0071B996 |. 8BF9 ||mov edi,ecx% g3 Y4 l6 O8 m P
0071B998 |. 33C9 ||xor ecx,ecx8 w+ P6 C( A9 h/ h3 i
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值
- Z. e3 z2 i, e/ }0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0! }6 {! [3 Y2 U8 d# C1 E: ^& U
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
: R" G6 V0 Y# o3 U8 n0071B9A1 |. 8BD7 ||mov edx,edi+ |: ]; f* x; r; P4 s5 g9 d+ _
0071B9A3 |. 8BF1 ||mov esi,ecx9 g. s3 c8 j2 T, y0 U
0071B9A5 |. C1FA 03 ||sar edx,3
; y) u8 K: v" ]0071B9A8 |. 83E2 01 ||and edx,1
# U* `. A. n- }* e; Y! \0071B9AB |. 03FA ||add edi,edx: R/ y' |" O1 v4 h' G+ D6 Y4 M' E
0071B9AD |. 8BD1 ||mov edx,ecx! b" n) e0 o7 ~# P
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
& l9 a8 R8 Q: p" X N0071B9B5 |. 23D5 ||and edx,ebp
- B6 N, ]3 c8 V+ p% z9 p0071B9B7 |. 23F1 ||and esi,ecx
1 s7 b; F' z7 f! f$ m8 S* L0071B9B9 |. 8BC8 ||mov ecx,eax9 M/ D, _. j$ O/ B8 z
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]# O$ C- G+ A( }1 a% ?* T" r
0071B9C1 |. 23C5 ||and eax,ebp/ G# C: i& A! ]' T w( \8 t
0071B9C3 |. 2BC2 ||sub eax,edx
2 ~) y( j9 M5 k4 ]3 O6 Q0071B9C5 |. 2BCE ||sub ecx,esi& p2 ]8 ^) `6 c& B. ^3 y
0071B9C7 |. 0FAFC7 ||imul eax,edi
* j e1 y1 D+ R5 `# P/ n* ]0071B9CA |. 0FAFCF ||imul ecx,edi2 }: X0 h5 H3 |
0071B9CD |. C1E6 04 ||shl esi,4
' |& F9 W# B9 R2 G0071B9D0 |. 03CE ||add ecx,esi# o2 V/ B7 r) ]" F9 ]" y
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
2 R: H- Z5 c# P* T5 [6 k+ p5 I0071B9D8 |. C1E2 04 ||shl edx,4
. y% L% T0 c+ `) B! R2 K) j0071B9DB |. 23CE ||and ecx,esi
9 S$ y& c8 D* H. Y2 s9 f. p ?0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]/ ?+ Q. Q) n. @/ {( R, n
0071B9E3 |. 03C2 ||add eax,edx
' M4 i. v0 r" N) Z2 A! t. B9 _0071B9E5 |. 23C6 ||and eax,esi
7 F& [/ f. `0 l4 @- ]0 i0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]4 N/ t$ U2 x- a
0071B9EB |. 03C8 ||add ecx,eax
5 s' E! O+ X9 S7 C4 G0071B9ED |. C1F9 04 ||sar ecx,4
( k. ^, H2 ^0 G) N. l3 b5 A0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
. }! u5 s1 }7 n: ?( J( ^! O0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]# f: v# H, E* w& I# | p
0071B9F5 |> 33D2 ||xor edx,edx& G% U, J) n/ B) L/ k- ?
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF( y3 K$ y' [( p* O& s) l
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
6 Y- N4 ^4 N9 z: \ F0071B9FF |. 8BC1 ||mov eax,ecx
! W( R0 e0 l2 T$ D+ P, b0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
4 A% p/ i7 `( _4 P6 k5 {0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
. i; d5 g+ {. _3 b, M4 h7 o0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
0 M: o+ b& x3 ?0071BA08 |. 8BCA ||mov ecx,edx: _) A; F8 R/ i) F. a4 t) c
0071BA0A |. 8BF0 ||mov esi,eax1 F$ U. j* ^0 h2 _4 ?, ]% ~4 |
0071BA0C |. C1F9 03 ||sar ecx,33 W: X: [# Q0 v! {/ k; |6 u
0071BA0F |. 83E1 01 ||and ecx,16 F: k1 k- Z% B7 x! A7 u
0071BA12 |. 23F5 ||and esi,ebp& i& w& F% d* K ^
0071BA14 |. 03D1 ||add edx,ecx
& ?" l4 H1 n f1 e0 \2 S* V0071BA16 |. 8BC8 ||mov ecx,eax7 w3 t9 c! m& t5 O
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]% Z6 w2 D$ X& s
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
+ r4 N0 n8 A6 a+ M/ V0071BA22 |. 23C5 ||and eax,ebp
' B- T& w, u4 F7 ?/ ~( q; S0071BA24 |. 23CF ||and ecx,edi/ G4 A2 C6 Q+ T1 e4 {
0071BA26 |. 2BC6 ||sub eax,esi( k9 O( ?' x- [# d+ W5 v+ g
0071BA28 |. 0FAFC2 ||imul eax,edx! C0 G+ l, w* V& K
0071BA2B |. C1E6 04 ||shl esi,40 P$ P; a' ]( h* G o
0071BA2E |. 03C6 ||add eax,esi1 v! Z* D, ?0 w, E, e
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]; ?3 r2 y; ~/ {( I
0071BA36 |. 23C6 ||and eax,esi
- w+ y# j1 ?# D: X" V5 M, T0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
( e3 e( e) H3 z0071BA3C |. 23F7 ||and esi,edi
4 Z. H* g3 m- M1 s' d0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
7 O- u5 s9 o2 ~0 x8 J& k0071BA44 |. 2BF1 ||sub esi,ecx+ ^+ {, F% g! Q8 E7 {$ y
0071BA46 |. 0FAFF2 ||imul esi,edx; E6 e: _& t! Y# q/ C) W0 G
0071BA49 |. C1E1 04 ||shl ecx,4
( p2 @# U; K* {) f0071BA4C |. 03F1 ||add esi,ecx
# |" H6 y) f* `5 z: \/ N, a) P0071BA4E |. 23F7 ||and esi,edi
! Z- ^6 A% ^7 `0071BA50 |. 03C6 ||add eax,esi
' |/ ?" m8 R; q' z0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
% x- Z7 h3 C0 t$ Y2 k0071BA56 |. C1F8 04 ||sar eax,4
8 }+ y2 G, }' R: X# m) Z; x0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
' ?1 A$ {4 X8 d/ o0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]* W8 Q$ T+ H: l4 u8 ]
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
3 r( B9 p3 F; C7 Z0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点. k0 E: T( Z* |" ] N5 t, G3 K
0071BA64 |. 48 ||dec eax ; 计数值减1+ r# Q, q3 l, Z4 |, }2 {9 j) e4 N7 `
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
+ b1 J3 k& N3 h# Z$ e5 Q. B; J# N3 l1 @0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax# [8 V! Q; |9 E8 G
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
% h& d4 t3 C* l, `& a0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
2 U4 c3 x; L% R& s+ _# h0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]/ c8 Q& x. ~5 _
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]6 H3 a2 S& g& y
0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
/ t( }! U* ?2 }& Z% K- \6 D0 W, ]0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点0 e. G. S9 N3 B! _# J6 T8 {. i9 t0 @
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
; B6 |* m, U$ m0 m: E$ I8 ?9 J0071BA87 |. 48 |dec eax ; 计数值减1& K9 U% E5 ^5 ~8 g
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
+ S: ~1 E7 J. C0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax6 p+ H3 p7 C8 `0 {
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
9 R+ F! ~! n8 X0071BA96 |> 5F pop edi
) Z1 i+ p% c4 A5 w0071BA97 |. 5E pop esi, x/ i8 q; d: k1 |
0071BA98 |. 5D pop ebp
" f+ I2 O4 D, @. M" j0071BA99 |. 5B pop ebx
/ @7 i5 S- t+ R0 b" a# ?* a3 i) O0071BA9A |. 83C4 54 add esp,54
; h7 [1 z2 X9 d; r. l! Q0071BA9D \. C2 1800 retn 18
( l' y( [" q3 l: w本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
' N# d4 z( g0 m- b# P" f8 g& i' s7 @/ A/ Q
buf[x][y]=func(buf[x][y],zm[x/2][y/2])* K9 ?% N* t( C6 m0 n0 _; {
" n3 J0 s7 ^! j5 |) \/ u
buf:缓冲区二维数组,两个字节表示一个点
* h* B1 r) X8 n" `% }# Z1 M/ ] u' ozm:字模二维数组,一个字节表示一个点 |