参数表9 G9 `3 Z0 H" m6 }; g
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
: T8 `9 Y5 J2 u, s1 Oarg2:字符串宽度 x8 t+ X" m5 N, f3 M z( Y/ B
arg3:y
, V0 N7 Z! Z# ?$ F, Xarg4:颜色" V5 _* Y( x4 E* K% ^( L+ r! a
arg5:与颜色深度有关1 s# s e& \0 a6 N6 B
arg6:与颜色深度有关4 r, f! P" k3 h( W
ecx:字符的编码基地址
& V, l+ t2 a7 d/ a) d7 k9 R O; N% ^) B9 C5 L# O& f
0071B820 /$ 83EC 54 sub esp,54! p/ T5 ~8 L5 C- ]
0071B823 |. 53 push ebx3 _& M( |% V' y% y7 V' C2 o
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
% k4 g' z% N& G7 e0071B828 |. 55 push ebp& p0 r' I. s0 l; g6 a
0071B829 |. 56 push esi
! d# g2 ^2 o! E. z7 {0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]7 S7 Q! x5 K; }( o: I9 J
0071B82D |. 8BF1 mov esi,ecx
" i! F J3 ?( u0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]' e X, N3 R1 Z% ]: @) W
0071B832 |. 57 push edi
4 K1 T: `1 ]: i; k$ m/ y8 i0071B833 |. 50 push eax0 E9 j5 t/ e4 ^$ ~
0071B834 |. 51 push ecx
+ J f8 w [) _0071B835 |. 6A 00 push 0' Q: {/ u5 ~ R, x
0071B837 |. 6A 00 push 08 o* i! x P ~8 D; B; E
0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]* {3 x* b: R- q/ ?6 f8 a
0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi% P6 r& D9 Q; Z9 `0 C. G' Y
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
7 S# X5 l/ o2 S" ~7 `' ?. L- o( t0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
. T, {" { b/ m' ^. D0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]: ~8 d& {4 H( X) }* N! E: Q
0071B84C |. 52 push edx
- c6 Z7 f& X: b/ M0071B84D |. 50 push eax( j& D0 m. o L/ l, q
0071B84E |. 6A 00 push 0
w I$ o; {& g0 x. P0071B850 |. 6A 00 push 0" a/ A; y4 [1 V( o
0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]1 |# L% Z9 v2 @/ j
0071B856 |. E8 55BCCEFF call heroes4.004074B0/ A0 T q. o- {7 ]* e3 J! L, @
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]' S% J( z9 W- Y; E' A( _
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]3 y7 }, |( a8 @) @$ E* i! [
0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]- c* Z% x1 l a8 J
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
1 ?( t; r! r2 F) b) u0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]0 v& _ i% n- e4 S$ Y2 r4 ?* p
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
* \% O8 i6 ~; l+ K/ w& D% Z/ E0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]! n# `+ O0 f. z+ t% I, ?
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
) q% S( M5 J: c( A) e# ]0071B87B |. 52 push edx) L3 A4 m$ @7 \& y- p& K$ ~
0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]. g+ L. T) {2 Z
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
. S/ }+ p3 |) |0071B884 |. E8 47BCCEFF call heroes4.004074D0) J6 L% a7 C+ q
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]; _" g# |) |8 o* z4 z5 U
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
( r4 x& E6 X" G+ c8 d. U0071B891 |. 3BC1 cmp eax,ecx# o/ b) I3 k7 b; P
0071B893 |. 8BF8 mov edi,eax
8 \4 d: r- c; a; f' X0071B895 |. 7C 02 jl short heroes4.0071B899
' N9 M: q1 p q* v# x0071B897 |. 8BF9 mov edi,ecx) A7 K+ P s3 N( b; t' _5 [" ?
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]! Y9 e# O7 I5 c9 T
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
% p5 X( t' N1 m1 b+ G0071B8A1 |. 3BC2 cmp eax,edx
+ C, |. P. }6 G9 E9 E) N0071B8A3 |. 7D 02 jge short heroes4.0071B8A7; z; G+ v) r& j. F
0071B8A5 |. 8BD0 mov edx,eax8 u; ~# R1 j8 t; `( ~, {9 b& N
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]! H; b `2 F4 G
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
- R* ^0 e }5 t4 p0071B8AF |. 3BC1 cmp eax,ecx
8 j4 g7 t) ^# e6 C% ~0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
z4 F6 A C) _0 R0071B8B3 |. 8BC8 mov ecx,eax6 T5 r2 A; e: y
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]) X- t7 \; U( r
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]5 x2 M1 u* a k( e
0071B8BD |. 3BC6 cmp eax,esi! O' V! o) ^3 N2 ]/ k) k
0071B8BF |. 7F 02 jg short heroes4.0071B8C37 Z( K5 f9 ^! {% Z3 L6 B$ L
0071B8C1 |. 8BC6 mov eax,esi
w+ T( l' u. l0071B8C3 |> 57 push edi! v9 H" N+ p$ m. i6 V! ^
0071B8C4 |. 52 push edx
* W4 V) [- y! O$ E0071B8C5 |. 51 push ecx" \% j/ c, B+ Z5 b( I/ e1 e
0071B8C6 |. 50 push eax
9 \% n8 i. ` N5 u0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]$ D; d& f2 w" Y( `
0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
0 f" u7 P/ e9 K8 F( y0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]# S% s, ?6 z$ w* G$ u& b6 |
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
4 z0 _/ C& k, d: Q2 ?9 `0071B8D8 |. 2BC6 sub eax,esi$ y4 y1 }2 z& ]( {
0071B8DA |. 85C0 test eax,eax
1 {) P4 K9 m6 U0 C0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax: w. Y+ ^! t) t
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
1 a$ m+ ~+ v' T1 C. w0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C] a( o: U% L2 a2 Q3 ]
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2
) M) O$ f, t' w0071B8EE |. 2BE9 sub ebp,ecx8 v8 u, g! N+ q' h
0071B8F0 |. 85ED test ebp,ebp
% P! A: X' T0 }& p1 ?2 e0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp5 O3 q" Q+ J6 z/ o5 ~& ?# I
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96' B3 [2 t# X+ d8 A3 H$ G- J6 B
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2" g1 n' ^( L7 Q6 V4 U
0071B900 |. 8BF9 mov edi,ecx
7 Y9 a: H0 G; l/ u/ \0071B902 |. 2BF8 sub edi,eax! H0 u, k/ i) g/ B9 Y
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3; K, I5 n" Q- Q9 c; w6 L
0071B908 |. 8BD6 mov edx,esi9 d* H/ J6 Z0 m* y
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx7 L2 K7 V) ?2 G. K. O4 |. i
0071B90E |. 2BD0 sub edx,eax
- i3 K6 \1 l$ P" S4 ?% p c0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
* J% Y% f0 w* P4 T( ~# F0071B913 |. 8BD8 mov ebx,eax
6 T9 Q: Z/ c" |0071B915 |. 0FAFDE imul ebx,esi
' F4 ^2 x( x" O8 A0 y3 V* n' h0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
8 |" E, M' T/ ?/ A; R$ l- z/ o8 M0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
& k. R* P U6 X7 Y, m2 r0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]& M1 l: n3 d7 m/ @+ W
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
0 s/ R2 E6 E) k+ m9 H1 I0071B926 |. 03F3 add esi,ebx- `% b. _4 o: A( H$ S
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]% Q& t4 z Z+ P) m4 P
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)! a) Y( b9 M/ ]- ^% ^- U& c. Z
0071B92F |. 8BD9 mov ebx,ecx" D4 _* U* l% W) x8 w6 |9 u6 S( L" Y
0071B931 |. 2BCD sub ecx,ebp) Z* ]* {' b* N( D! K( w6 U
0071B933 |. 0FAFDA imul ebx,edx- t6 m3 L4 H% S: \/ [
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]1 j% u5 | @+ d: G& l1 h0 A
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx! o8 O% u% z* P: [& L
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
) G) @' j& T) x; N) t( x+ J, O0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
e( }3 q$ W4 f. b8 y/ M1 k% A7 s( c0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]3 ?6 M, Q8 a) i3 R8 N
0071B949 |. 2BC1 sub eax,ecx
! S6 K1 ?+ B0 C; g8 r0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
& v ^1 M: J9 K% W0071B94F |. 03DF add ebx,edi
J5 |7 q' p$ r5 i0 p0071B951 |. 8BC2 mov eax,edx2 @: q/ r# K+ g* Q- a6 \
0071B953 |. 4A dec edx
2 X/ A2 @! H0 L. E( }9 l$ W0071B954 |. 85C0 test eax,eax4 l% F% {4 d& T0 B I# q
0071B956 |. 0F84 3A010000 je heroes4.0071BA966 q7 o g" ]/ W5 Z6 T
0071B95C |. 42 inc edx5 |! P# Z% U% G( a; `
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx9 o- I. ~* w& @# l4 S+ R z9 k
0071B961 |> 85ED /test ebp,ebp
2 C9 w7 h6 A' p, F% s# e0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
. i' ~5 ]: ~0 o: r0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
9 W, k$ ^8 o: k, j0 ?6 [# S1 |0 j0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
8 u: T( l/ \4 H5 X* V: g0071B971 |. 25 FFFF0000 |and eax,0FFFF4 f( O& r1 \1 ~% M0 _. |" z$ p3 \
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax' W* h( D. _7 u/ w& k% `$ F1 C
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
8 G* ]2 k( A6 p8 |0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC], g6 T# I" n7 y. E- ^
0071B984 |. 84C0 ||test al,al& _! x* T8 i; t$ _6 G7 K# G. p
0071B986 |. 74 6A ||je short heroes4.0071B9F2
# d9 w+ E) L3 Z( m0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点3 X8 a, a5 S& h8 Q/ ?7 C D7 L
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]: b: i* O8 k- N2 o* \) Q" l& l
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位, t/ e" N0 U: j, D% C
0071B991 |. 25 FFFF0000 ||and eax,0FFFF
4 R! t5 X `0 ?9 t. f4 x* H, I0071B996 |. 8BF9 ||mov edi,ecx
* e$ @2 o) @" u/ n0071B998 |. 33C9 ||xor ecx,ecx }! C, C) n# h# K
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值* [3 N, `( S: D6 G2 R. N4 z
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
4 \6 e$ j* Z+ ?0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理( E. f5 I# O& C W/ m4 E5 P$ K
0071B9A1 |. 8BD7 ||mov edx,edi0 v; y: x+ Y/ e [
0071B9A3 |. 8BF1 ||mov esi,ecx9 |. F5 s4 l- R' X6 T
0071B9A5 |. C1FA 03 ||sar edx,3
9 f0 ]; v8 j7 g/ H8 Y' b) W/ _7 K! U0071B9A8 |. 83E2 01 ||and edx,1
0 b: J6 Z9 J5 R1 P W- M* n0071B9AB |. 03FA ||add edi,edx) d2 b& ?/ y6 l& w) H
0071B9AD |. 8BD1 ||mov edx,ecx5 ~$ h% \/ S! H
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]3 k& O* }$ d" g# R5 j# a
0071B9B5 |. 23D5 ||and edx,ebp1 Y2 l1 |! X$ S V5 J1 ]) l) n
0071B9B7 |. 23F1 ||and esi,ecx
, Q7 f A2 T) m2 e0071B9B9 |. 8BC8 ||mov ecx,eax
. J. r+ D8 M$ b$ X2 D$ x" O0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]* \3 D t& w5 ^0 S0 g' t9 \" P
0071B9C1 |. 23C5 ||and eax,ebp, v+ r# e9 ~/ t/ i2 j4 {; v
0071B9C3 |. 2BC2 ||sub eax,edx
+ B& \/ C* X' d2 D0071B9C5 |. 2BCE ||sub ecx,esi% ]+ e( m4 S. E! a4 F
0071B9C7 |. 0FAFC7 ||imul eax,edi
2 D6 A: _2 `9 k6 k0071B9CA |. 0FAFCF ||imul ecx,edi
# D+ @4 Q7 W* C0071B9CD |. C1E6 04 ||shl esi,4
2 L, ]4 K) K8 q% G* `7 ?1 Y0071B9D0 |. 03CE ||add ecx,esi8 l. D7 w) J% {1 z
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
) x; j+ \9 K' T) w0071B9D8 |. C1E2 04 ||shl edx,46 t ^$ \8 `% R2 O! Q* V0 h4 d
0071B9DB |. 23CE ||and ecx,esi) y8 \4 p5 g6 W3 y* }
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
! Y( _8 P4 b- {0071B9E3 |. 03C2 ||add eax,edx
; W. d& E2 Y* }5 o0071B9E5 |. 23C6 ||and eax,esi9 p6 w/ }7 n v$ @
0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]$ ? V1 L0 U! E5 C- s/ v( S: l
0071B9EB |. 03C8 ||add ecx,eax, w- c! T# S2 M' T1 ^ t
0071B9ED |. C1F9 04 ||sar ecx,4
3 s8 T* q. d3 g3 O" T% {3 y+ F0 B0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
1 b5 {6 y' [1 q+ n3 F; l' H+ C h0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]+ L( Q; D" n3 A2 D& C' y9 }
0071B9F5 |> 33D2 ||xor edx,edx
$ N% y6 a9 M+ n7 K- B3 o0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF+ p$ D5 [5 Q6 b0 l
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]" v8 H) P( ~5 P) I' J
0071B9FF |. 8BC1 ||mov eax,ecx
! @ e% ~9 y, j' J& b0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
- h* ~% N. A+ ]' |) s- F8 v" G0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
: d/ c& Q( X! }# s# \0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理# t* U/ C1 n# r ^4 J0 |7 C
0071BA08 |. 8BCA ||mov ecx,edx. r4 L8 ]& @5 R' l; J1 O8 @
0071BA0A |. 8BF0 ||mov esi,eax
- R( ]1 N D/ H$ W0071BA0C |. C1F9 03 ||sar ecx,3
- X/ T3 M8 d: j/ F/ _0071BA0F |. 83E1 01 ||and ecx,1; ]6 }6 j* J* m% Z A* U1 B) b8 ?4 M
0071BA12 |. 23F5 ||and esi,ebp. q+ j8 J7 a" ^6 j6 q% ?# h
0071BA14 |. 03D1 ||add edx,ecx( u# t3 b/ i- \8 k8 _2 I' }
0071BA16 |. 8BC8 ||mov ecx,eax
1 G& V; p5 v; W' D8 p0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]9 _8 x9 P# h6 }& Z% c6 w$ M
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
8 l& B# ~0 ^" K/ t$ i, y! Q0071BA22 |. 23C5 ||and eax,ebp9 l1 R# ?: U; l$ e; C) T
0071BA24 |. 23CF ||and ecx,edi
) j0 E* v! u0 C0071BA26 |. 2BC6 ||sub eax,esi
' C% Q8 ]0 S" Y& G0071BA28 |. 0FAFC2 ||imul eax,edx
' W1 l o( @6 ^8 E0071BA2B |. C1E6 04 ||shl esi,4
$ k" b' d% U% z! t J1 v& S- R0071BA2E |. 03C6 ||add eax,esi
/ u8 E+ h! ~, o x: r0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]* k7 t: _6 `2 n3 j! ]
0071BA36 |. 23C6 ||and eax,esi& h6 M& X; B ?1 [- B7 _" U) {
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
( O& l7 C6 G& E/ R$ _0071BA3C |. 23F7 ||and esi,edi( \! |2 s2 o* a/ T+ s( x ]
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
; ^3 D3 p3 Q, d8 \0071BA44 |. 2BF1 ||sub esi,ecx
& e& a' [9 z& o" B" f0 r, I3 R0071BA46 |. 0FAFF2 ||imul esi,edx- z7 u3 U! O' n6 l9 W, ?
0071BA49 |. C1E1 04 ||shl ecx,4+ `: r4 B$ Y# K U/ j" K! v$ ]
0071BA4C |. 03F1 ||add esi,ecx" H! e' B5 s. {
0071BA4E |. 23F7 ||and esi,edi
7 H( N* I$ o; D% Y2 T0071BA50 |. 03C6 ||add eax,esi, E0 _+ C# G$ q: @) X
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
" Q5 P9 C0 G7 `; ^/ n0071BA56 |. C1F8 04 ||sar eax,4
+ W) z+ x. f# T; f0 a5 A0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
: c7 B7 u2 W9 P' O$ c0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]1 ]! z) _3 r) G% o2 u. d
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
* |/ {- }( }, s( x' m0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点" h2 N5 Y% r% }' f: C$ U
0071BA64 |. 48 ||dec eax ; 计数值减16 \" m6 B2 W4 l; N* f7 u0 ~
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi7 O V# k$ K( [
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax( k4 o% b$ u$ c) J
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A7 P* `3 c# G q- [) Q
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]4 N; x5 {, Z% S: j' e ?
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
. U. `0 i& I) t) A( e0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
9 A- S. c4 e' e8 z2 v0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
& ], A( E2 B+ K' W7 U; b: {, d0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
0 N; c7 L6 k) n! T/ q5 Z7 v0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点% J, l6 x# \- s3 j
0071BA87 |. 48 |dec eax ; 计数值减1, U w3 Y4 T) h: ~$ {, _3 T
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
; F# P, h+ r! q+ I8 p7 Q- _0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax& R, L- U; k$ l _ c
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961% e: R! g9 i+ I! z7 E
0071BA96 |> 5F pop edi: G* C7 Z# K, l; n
0071BA97 |. 5E pop esi
2 b$ s6 u# z, n$ \/ o* i3 H0071BA98 |. 5D pop ebp
% h5 z8 o3 m$ |: R9 h0071BA99 |. 5B pop ebx
" R7 o3 c6 L7 a# @/ [0071BA9A |. 83C4 54 add esp,54& p( q* N; P4 }0 o) {
0071BA9D \. C2 1800 retn 18; v2 V* U, o: `7 Z- `6 x* p
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
2 f5 a* c4 M1 ~3 k3 b9 [4 ]. a* f- S4 D
buf[x][y]=func(buf[x][y],zm[x/2][y/2])
- s+ W3 c' A1 q4 V0 y9 |* e6 {7 f
7 p! N4 f W" p- N( l' d7 ?buf:缓冲区二维数组,两个字节表示一个点* m" \$ A/ y! }: y. ]' [ ?$ l$ g9 b
zm:字模二维数组,一个字节表示一个点 |