参数表/ o2 z1 d/ G3 z. _
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
& _3 Z& h- Q; J0 |! r# o2 L7 O8 aarg2:字符串宽度 x$ T' M# w" F& @: O( f
arg3:y
( u8 D7 ~, y: p3 H( }1 w0 g `- Marg4:颜色
1 I' Z7 |# p. Carg5:与颜色深度有关
6 m2 x+ G0 T+ m1 w% F; larg6:与颜色深度有关
1 d" b$ G4 g. c# | ?ecx:字符的编码基地址
$ \% \2 I& n/ Y) P9 r1 u% b. f! f8 a8 D. l9 y
0071B820 /$ 83EC 54 sub esp,54' h% b* f) L* E9 V% k
0071B823 |. 53 push ebx/ F! {; I y7 ?) N( ?. N I
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]+ ~4 ?+ G* A8 {* Y' q- m" `( F
0071B828 |. 55 push ebp
2 o" i8 e1 b1 `9 @2 |0071B829 |. 56 push esi
" {8 c; I$ g8 H, X5 N0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]) C/ F2 @; f2 y
0071B82D |. 8BF1 mov esi,ecx
8 d$ }' B+ |3 u3 s3 ~8 N0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]: C x/ i, o* i! C) H. Y" C% }+ _
0071B832 |. 57 push edi
) }4 f5 C( |( @( M) i; t0071B833 |. 50 push eax
$ E9 _ [! B6 t/ R" x0071B834 |. 51 push ecx5 q- \0 Q# E7 S1 j% e: {+ E' J
0071B835 |. 6A 00 push 0
: F' f% b" q: K' h0071B837 |. 6A 00 push 0
, I& ]5 r/ {; ?" Z0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
4 ^; i/ ]8 z* }# T1 @0 M0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi- _) w d4 F( ]3 q! ?, V5 i. N
0071B841 |. E8 6ABCCEFF call heroes4.004074B03 A$ @" g' D/ L, h
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
# {5 f! r. e( ?# g* I- M( M4 L0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
3 ?& C0 z% B% }1 C$ @0071B84C |. 52 push edx( G, V) E2 a& ~1 v
0071B84D |. 50 push eax
# I0 ?; R1 D$ b1 c4 m' u0071B84E |. 6A 00 push 0, z( y" v4 d9 f" e) W" r* g
0071B850 |. 6A 00 push 0
- }1 N, e" M: t; w0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]% B. t# o: s5 U
0071B856 |. E8 55BCCEFF call heroes4.004074B0
1 }) q. o s0 j+ _& \3 l' D) Q0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
* t. `) `" x3 N0 J0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]6 Q# L" u8 x% h- E4 i {
0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]+ D! o! U7 L, w! Z% R3 r
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx/ p, K# [# J+ w. v9 y: e& t
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
( z2 X4 v! r$ V3 ?0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx' ?( d) \. @+ x7 G2 b7 j% O* K8 k" L
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
C- L' Y2 s ?0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx1 q1 L0 j3 \/ R& x
0071B87B |. 52 push edx2 t, y4 z; _1 {" b) T
0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]0 d) ^! C) r0 M( T" j n' L
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax9 W2 Q) q; Z- [( c U# c. h
0071B884 |. E8 47BCCEFF call heroes4.004074D03 g$ S7 y$ V( v# a R ?1 u4 q
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]! o0 p% ]8 c+ I# h- X
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]3 K# Q1 R5 t- }* ~% b* x5 g
0071B891 |. 3BC1 cmp eax,ecx
* W, t6 `. _. s. u0071B893 |. 8BF8 mov edi,eax; a, Y6 J( b5 B7 c
0071B895 |. 7C 02 jl short heroes4.0071B899
/ t' I1 h. ~6 v8 w0071B897 |. 8BF9 mov edi,ecx( k. @/ C8 I. S+ B
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]# b! s; ]: j! @2 R' _ t Z
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
: a& D- B$ e4 ~; |1 p( e- ~0071B8A1 |. 3BC2 cmp eax,edx! {2 O" w0 o% X" o" i
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
1 Y& w' h" Y0 c2 D. v" c0071B8A5 |. 8BD0 mov edx,eax
! {, O! m" }% U7 a. p; S0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
: }5 t+ i8 } c) j R0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
' A. `/ o: ^) K* m0071B8AF |. 3BC1 cmp eax,ecx
, y3 ]: b9 |% i3 ~3 d0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
) J9 }" U/ q d, Y0071B8B3 |. 8BC8 mov ecx,eax; P1 m$ h- r7 H( @& _' @
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
1 \/ U. u5 y+ L8 M0 G7 N4 T0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]3 f4 w, } c; k- p) y3 J6 m. M
0071B8BD |. 3BC6 cmp eax,esi4 b: i, Q- q9 A* a( n
0071B8BF |. 7F 02 jg short heroes4.0071B8C3
2 h, y& G/ i- [+ n0071B8C1 |. 8BC6 mov eax,esi
' s+ A- P" Q9 O N0071B8C3 |> 57 push edi. j' }) ]$ i6 b6 F
0071B8C4 |. 52 push edx* }7 Y6 b. s3 V6 @2 v
0071B8C5 |. 51 push ecx4 d; K" w7 k2 ~% q' `8 i
0071B8C6 |. 50 push eax
' ~8 E, Q9 M* S% y3 T0 l0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
7 D g0 X$ Y Q R: o4 e" q; |: c0071B8CB |. E8 E0BBCEFF call heroes4.004074B0- M$ W* L4 l, m; W* d1 d
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60] N9 q* }5 N. \9 ^6 `/ Z
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]; r/ R; k5 R O
0071B8D8 |. 2BC6 sub eax,esi4 b! r3 `9 [, |0 ^
0071B8DA |. 85C0 test eax,eax- l4 ]3 P4 {4 j9 I( L9 u& i' V( v6 H
0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax K4 ]" r$ x8 \* d2 }: W$ f
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96+ L% [" m: q1 o3 }! _2 v% B5 n) V
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
5 F n: i1 V9 w- w5 \* ] v0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2; e4 K1 z9 @5 `2 {7 b. U0 P; s
0071B8EE |. 2BE9 sub ebp,ecx
: E6 x3 _: {9 o/ O8 C- k0071B8F0 |. 85ED test ebp,ebp' H- U! _2 |4 R4 q
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
% \4 Z- T$ P s D5 z0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
+ E% E: u% W7 C Z' J0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2+ t' h6 y0 `& p' m0 j
0071B900 |. 8BF9 mov edi,ecx! h6 J! |% ?$ Q, m$ W6 o/ b
0071B902 |. 2BF8 sub edi,eax1 S) V% q8 [( A" k
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3. V+ b7 r! g4 C2 z/ Z, H
0071B908 |. 8BD6 mov edx,esi) ?1 k1 _& Y( K2 P" R ` Z
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx4 \1 w. ?4 I# e: g* F
0071B90E |. 2BD0 sub edx,eax
9 F9 b6 Z1 O: j" @0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
- x0 {) f6 b% g0071B913 |. 8BD8 mov ebx,eax$ O! Y" N! R& b7 R: i6 }3 c
0071B915 |. 0FAFDE imul ebx,esi8 W; n1 K, ~$ \* t4 q7 s; h0 }
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
/ o$ }- ], U, W% G4 t( a0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
- t: W, f/ ?' k0 L+ I# j4 j2 v+ r0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]7 _: {# ~7 i( l: f/ W6 @ @) K
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
/ j% A" c5 h7 h/ M0071B926 |. 03F3 add esi,ebx
0 [% I, {0 n7 v; d0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]: L4 ]+ ^3 y, b* j& {' L- ^
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
8 |' t7 H: \% I1 X: L; f: |! M0071B92F |. 8BD9 mov ebx,ecx
: M* h5 `0 g+ V: ^1 m9 A0071B931 |. 2BCD sub ecx,ebp
; i0 |) M4 ^1 W3 o$ @* J0071B933 |. 0FAFDA imul ebx,edx
5 M# I1 s# t0 y4 i0 Y' B' b' U0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]- g; G9 V6 q5 a# p; q
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx! S: U' B. u2 {2 ]& N4 _4 S
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
M- i- p) S) R1 h2 R# Z; B0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
9 ^ H7 d& j- f+ w/ \6 R* I0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
! F8 t5 n: ]' j0 k3 b0 A0071B949 |. 2BC1 sub eax,ecx
7 q/ D+ C% |6 t0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
% j7 A* @, g" Q9 t8 B& r0071B94F |. 03DF add ebx,edi
$ h1 i8 y( l' ]% \0071B951 |. 8BC2 mov eax,edx
' U3 |. [+ a3 a0071B953 |. 4A dec edx
' G) ]- T j2 j3 ]0071B954 |. 85C0 test eax,eax# N# Y7 k. w2 g9 ^
0071B956 |. 0F84 3A010000 je heroes4.0071BA96: d, H+ c. N3 R. M* `- O" H
0071B95C |. 42 inc edx
$ S' Y5 {7 N+ i0 `# Q/ i0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
$ p; K3 _+ ]8 u8 }0071B961 |> 85ED /test ebp,ebp
- P# \, n& x7 y' o2 V3 s9 \/ d0071B963 |. 0F84 0E010000 |je heroes4.0071BA772 c1 T% `1 ]6 q3 @& e6 D
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
0 a; D9 w6 `- {. u, M% d# D0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp) w3 D0 @9 |0 _9 q* E' E
0071B971 |. 25 FFFF0000 |and eax,0FFFF8 n+ B3 @" X- v; s) y' B$ l V3 n7 \
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
! H' `) P' F3 {2 Z( L; {* j/ a0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]- s: r0 E( T* S% h
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
( l1 }7 a$ p# N3 M9 f8 W4 f0071B984 |. 84C0 ||test al,al" i L; o9 w1 z. R4 ]7 X& R4 N U
0071B986 |. 74 6A ||je short heroes4.0071B9F2
. D' I, G8 ?! @: Y: m, y. a0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点% E/ p* t0 `$ _0 c4 c& [# S
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
) O7 |6 K7 }3 r/ Q, m0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位# d7 a% \6 Y' y( m! R) i
0071B991 |. 25 FFFF0000 ||and eax,0FFFF
# T% D! U% S! p$ P/ b: R! F0071B996 |. 8BF9 ||mov edi,ecx+ U" Q0 e0 |/ b. ]+ A& X- N! ~; M3 b+ S
0071B998 |. 33C9 ||xor ecx,ecx5 e5 u+ s% b3 v. q k
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值% j" ~/ }: p8 h2 Y: n; y
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为06 L6 }4 Z5 o1 \! ]: `, |9 f+ k
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
' ^7 Y5 J( Q/ A- m0071B9A1 |. 8BD7 ||mov edx,edi# m2 B' ~0 P4 g$ W
0071B9A3 |. 8BF1 ||mov esi,ecx
9 f+ b7 Z3 f: X" H0071B9A5 |. C1FA 03 ||sar edx,3) `) ~% J% z6 l: r9 q3 r
0071B9A8 |. 83E2 01 ||and edx,1
( E3 `& L0 M: t6 g: o U2 Y0071B9AB |. 03FA ||add edi,edx
( E* v/ u @% l3 t8 m6 D: W0071B9AD |. 8BD1 ||mov edx,ecx
/ a) G; c' J) J& j, Q" Y9 \- ?$ D/ ~0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]( Y0 U5 V! K8 b% S
0071B9B5 |. 23D5 ||and edx,ebp
$ K8 v% v5 {' b1 x6 S0071B9B7 |. 23F1 ||and esi,ecx+ ] G1 f7 o5 A5 h4 {" I, n
0071B9B9 |. 8BC8 ||mov ecx,eax, S) v2 ^. R: K( @
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]* w+ x" g) B, X) h6 \
0071B9C1 |. 23C5 ||and eax,ebp
4 E8 @/ g" ^1 U0071B9C3 |. 2BC2 ||sub eax,edx
! }5 C( L; H, }8 E- d0071B9C5 |. 2BCE ||sub ecx,esi
' S" V# x" R4 }; f- Z; P) O; O0071B9C7 |. 0FAFC7 ||imul eax,edi
. I1 L" b9 y' e. j3 B: P. G0071B9CA |. 0FAFCF ||imul ecx,edi- X" l$ d9 L7 D$ v
0071B9CD |. C1E6 04 ||shl esi,4; H5 j, h T- w% ?6 ]
0071B9D0 |. 03CE ||add ecx,esi
# e: O6 u: b- q/ J% `) i0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]. J5 h' y8 b6 W; u+ n- E4 }) V6 R
0071B9D8 |. C1E2 04 ||shl edx,4
X9 C) H* j1 B( ~; N2 d3 q0071B9DB |. 23CE ||and ecx,esi
3 F; W' d0 [/ f& ^! P( D7 H0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
( h& Q" E1 v: O. h- w7 F1 P/ g! ^0071B9E3 |. 03C2 ||add eax,edx
% {5 s) Z4 U% |7 B& @0071B9E5 |. 23C6 ||and eax,esi
! o2 w2 x# p5 C) |" O$ s( h* b0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]! I V6 ]; E! Y3 \/ q4 E+ E+ h
0071B9EB |. 03C8 ||add ecx,eax7 e3 i Z W. C6 {
0071B9ED |. C1F9 04 ||sar ecx,4
9 F, e/ w! K- e' a* C" X0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5- @5 s* E1 h$ z$ r# `1 }
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]/ {- u3 B, { S( t! M
0071B9F5 |> 33D2 ||xor edx,edx6 @" V6 c# u$ N) Y$ C( B
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF" a: ?3 V, q4 C& x
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]9 j& k) y) y( d7 J
0071B9FF |. 8BC1 ||mov eax,ecx c& R, P& A( {
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
* a2 H) T0 f. L5 V) j: Z. x0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
* e$ [" C7 C9 ^( B- X; e8 k3 l0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理7 ?4 @( m# i* D6 m3 [
0071BA08 |. 8BCA ||mov ecx,edx
5 o$ h0 L9 T3 t& }4 O4 f0071BA0A |. 8BF0 ||mov esi,eax# F4 b5 U( i9 h/ o' {- ~3 p8 v
0071BA0C |. C1F9 03 ||sar ecx,3- F; W- f9 l! t1 N* z
0071BA0F |. 83E1 01 ||and ecx,1
2 p) \" m) B c5 q0071BA12 |. 23F5 ||and esi,ebp
; S* ?$ a; G' i- J& Q9 q* K9 Q0071BA14 |. 03D1 ||add edx,ecx! }! f# e0 o5 P( m+ `
0071BA16 |. 8BC8 ||mov ecx,eax3 s& y% Y# ]2 G
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]4 L( k6 b. _* T: e4 O: C! G
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]5 b& W; h5 U) O) _% [( a
0071BA22 |. 23C5 ||and eax,ebp
2 {; a5 s, i: n' h: _0071BA24 |. 23CF ||and ecx,edi6 d! W5 ^+ f- V0 S: S! [% T
0071BA26 |. 2BC6 ||sub eax,esi/ r( Y2 ^& j! }
0071BA28 |. 0FAFC2 ||imul eax,edx
9 P5 [( I. [: A$ F1 Z0071BA2B |. C1E6 04 ||shl esi,4
. Y9 L0 I. S0 h; H' e0071BA2E |. 03C6 ||add eax,esi
* I; ]/ X9 a0 u* R0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
3 C1 c9 X, j4 I6 H9 f" Z* D; J0071BA36 |. 23C6 ||and eax,esi/ d, ?7 D/ L" v; G) Y* v
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
5 O! t6 _( I5 L/ e0071BA3C |. 23F7 ||and esi,edi2 q0 E y7 C8 B& ]& V
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
. T% t: v( b J, y; A4 k" G0071BA44 |. 2BF1 ||sub esi,ecx
( {' l6 A3 {2 m" w0071BA46 |. 0FAFF2 ||imul esi,edx: Q# a7 m/ I3 f; i7 z0 d- o! l
0071BA49 |. C1E1 04 ||shl ecx,41 O5 Y& k# ~) i5 g6 L7 n
0071BA4C |. 03F1 ||add esi,ecx3 @; T% W0 a7 q8 \0 r3 R0 D
0071BA4E |. 23F7 ||and esi,edi
1 o0 k/ X3 [: q3 H( f" i0071BA50 |. 03C6 ||add eax,esi
; u% a. h, H5 H- f o0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]( M7 p: \- M- N v, Y6 x
0071BA56 |. C1F8 04 ||sar eax,4 J5 {! b' q, U" w/ |
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
8 D; |4 @6 ~/ L+ e0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]# F) t: k7 W# F% n
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点$ p" f) \3 S2 P8 E" X* T% J
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
) @$ p+ t8 `1 _8 @9 _" X+ L0071BA64 |. 48 ||dec eax ; 计数值减1
. h) Q* b0 F4 C, K- |7 x0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
7 F z9 o# r; X0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
* Z5 S; t7 w' d' j; e2 L0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
- p1 V! W7 w0 u3 G( o0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
/ X" ~$ E; j/ L7 |0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
+ d, o0 \" B, @0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
" x7 J3 o% L% V X6 q8 S0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
) s& ?$ ]* x6 B: @. D$ y7 l- ]! R0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
) q& f/ a0 x( i$ S( G B$ k0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点* z, x, w) x @1 n. I; H. L3 U
0071BA87 |. 48 |dec eax ; 计数值减1
?# K# x N' e7 ]0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
' O4 W" }% G. r* p- F+ T- Y% ]! R0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax4 K, n# q) Q. Y: ?
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
1 @% A! ^/ C$ X' k4 d7 v0071BA96 |> 5F pop edi
6 X( u' K* o% g# W! }9 v0071BA97 |. 5E pop esi
( `. U- A. e @) h. y5 b2 d0071BA98 |. 5D pop ebp
0 d) A: H( n/ Q* }1 {/ q* r0071BA99 |. 5B pop ebx
: D1 C- i* W0 ]' e* Y/ G+ k0071BA9A |. 83C4 54 add esp,541 s) l8 u, v U& e5 l# t
0071BA9D \. C2 1800 retn 18* Z6 g; y+ K0 U& L4 ]7 K( f
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:5 d: ]1 c- P8 s7 @! O
% ?' w# k/ R0 I3 `+ z9 u" ?
buf[x][y]=func(buf[x][y],zm[x/2][y/2])
- J- P3 `4 s( J+ z7 b7 w, `4 Q, I& o
buf:缓冲区二维数组,两个字节表示一个点
K* M& }! l2 h# z, H [. azm:字模二维数组,一个字节表示一个点 |