参数表) X1 o8 V, {5 T( }- R
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
- o9 F3 }; B" Q4 n( [- barg2:字符串宽度 x
: B6 A* q' O. jarg3:y: T4 E$ z0 t# [
arg4:颜色
# b3 w) `: S2 K `8 O# Qarg5:与颜色深度有关$ ?3 t* [( [6 }- T& y' x( q. N
arg6:与颜色深度有关
& R# k" {" r: x$ ]9 f/ L0 p2 Hecx:字符的编码基地址
1 e) Q& I, ~' ^+ \/ H5 U
5 ]0 r: c& v# B+ C0071B820 /$ 83EC 54 sub esp,54
8 i& u3 C' T5 a+ m7 C0071B823 |. 53 push ebx8 n/ x* ]* [: z
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
' h4 q6 K: B2 t' U0071B828 |. 55 push ebp6 L8 m% H& v0 [2 }+ m
0071B829 |. 56 push esi
) b* s% W% o3 v8 b0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]: A" C" G" P& P, [' ]9 }
0071B82D |. 8BF1 mov esi,ecx2 R0 B- t! l- V2 w5 |0 F
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]9 f" ^/ S1 p2 v/ F
0071B832 |. 57 push edi
% @! v& g# a# b+ ~' t% p+ D' j0071B833 |. 50 push eax
: h" D6 E' |" R" x+ C1 K) {0071B834 |. 51 push ecx
2 P* S( ~1 z# N! M) X) R, @0071B835 |. 6A 00 push 0
+ j4 x0 _$ R5 M. Q, O6 Z0071B837 |. 6A 00 push 0
+ ]8 l) N! e5 G; M# ]0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
2 N+ f s2 C5 @' ]: Q# ]0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
3 R9 t# r5 w- e5 h: c6 S0071B841 |. E8 6ABCCEFF call heroes4.004074B0. y) n4 o( Z& o* V# i
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
E* {& N; {; D5 p; ~. J0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
+ }1 S T+ @7 p0071B84C |. 52 push edx
3 Q5 k& i. K# r* H3 K5 ]+ D0071B84D |. 50 push eax
i! Y: M5 D5 z+ n0 b( B0071B84E |. 6A 00 push 0. x I5 m/ Y' _) M" y8 u
0071B850 |. 6A 00 push 0
! Z1 j3 b9 ]& X( \8 p) p0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]: a! r! |3 {& g a3 W- t6 U7 o! y
0071B856 |. E8 55BCCEFF call heroes4.004074B0
3 H: S( k0 N0 s0 h$ V& C, D0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]% S2 {( n a. x( b
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
# Q% r Z' B# P$ `6 r, M2 Z0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]
8 G( Y8 ?9 O) J; I0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx9 p5 Y+ @$ g# w( v5 i
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
" v# S; A& Q, c* N e& m1 K h0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
( k, l% I; t2 \* j2 ^0 \0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
6 N3 y9 v4 c. s# R, {# v4 u5 t0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
/ x+ P& |& R; R b! t0071B87B |. 52 push edx) Y h( {' `6 S
0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]" _! K, L; n `, W9 L1 O" h
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax% \; F0 [* W7 y5 e& i' i& y. y
0071B884 |. E8 47BCCEFF call heroes4.004074D0: b& P$ ]( z$ q
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]3 j) o* Q5 y' F1 G
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50] c' a+ d- f0 u0 W6 |9 b
0071B891 |. 3BC1 cmp eax,ecx S7 I* ~2 G! `, J/ B) {; {( c2 ~
0071B893 |. 8BF8 mov edi,eax( r$ D* H4 y# U& r
0071B895 |. 7C 02 jl short heroes4.0071B899
- y# v/ M5 F% n0071B897 |. 8BF9 mov edi,ecx2 y X0 Z3 j3 I, h2 T( E
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
5 D! u) y0 F7 b8 S1 @: W+ P0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
( z) o6 o0 e1 n7 h7 K8 {+ Q- ~0071B8A1 |. 3BC2 cmp eax,edx" B5 z( ~4 G( R- m
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
; _) S5 o' f# m3 g9 S0071B8A5 |. 8BD0 mov edx,eax" E1 Y1 r. X! b7 }* w5 `3 }0 H
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]0 Z9 J Z/ ] l# A
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
- M: r# r/ L8 ^0071B8AF |. 3BC1 cmp eax,ecx
3 W! ~# H! H& l. G0071B8B1 |. 7E 02 jle short heroes4.0071B8B53 A0 ]* h; d# O2 m
0071B8B3 |. 8BC8 mov ecx,eax
! V; Q5 w' C5 V4 {8 Y0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
0 y4 \9 e( }! l" E3 T% E( l0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
3 O% O% S% y5 V8 q0071B8BD |. 3BC6 cmp eax,esi) H) U- B1 b8 B5 Z2 m7 Q/ Q' R- P/ v
0071B8BF |. 7F 02 jg short heroes4.0071B8C3
# u1 }0 t! x3 ^& I: c8 O/ Z0071B8C1 |. 8BC6 mov eax,esi
2 c; F4 Z, V* s/ d& U# n+ r0071B8C3 |> 57 push edi
+ M# h/ P: L' Y; i0071B8C4 |. 52 push edx
; V7 C- I; w, t7 B, U: u0 _* S; A/ @0071B8C5 |. 51 push ecx
3 | I2 J4 j+ ?4 w) E0071B8C6 |. 50 push eax
1 k* B& \+ P' R L! x' l0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
* |: B) r* @* {4 L3 w+ ^0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
8 O/ S+ w- g. D% W4 D6 W- @- B% g0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
! Z+ s/ U& P$ J# `. m2 o$ d8 Q! s0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
" M! f" Y; G/ t: q# F& K2 y0071B8D8 |. 2BC6 sub eax,esi- k: Q, F& k% f/ h2 r
0071B8DA |. 85C0 test eax,eax
* q3 Q! [# u2 j I0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
' S7 F- H/ U, y; {$ d0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
( @ L- o0 }& {" q0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]- E, r8 }: v9 e
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg28 e7 ?+ V3 W2 e5 E- f
0071B8EE |. 2BE9 sub ebp,ecx
8 B! q" v) Z8 L0 ?9 d9 Q4 d0071B8F0 |. 85ED test ebp,ebp, \9 Q# y, _( h* Z
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
4 Y( l0 n5 u R- m7 R: R0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
3 {2 n% d7 N+ q: c7 C+ Q' N! a* L0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2
0 [' Q( X4 @/ [& a4 B# e. o9 W% F0071B900 |. 8BF9 mov edi,ecx) _1 F; _5 F1 q( G5 D/ |- E) {
0071B902 |. 2BF8 sub edi,eax* |' U1 b( k. _5 x3 W" s& H
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
+ P8 _1 o# e, n2 @0071B908 |. 8BD6 mov edx,esi
$ g" I( i) A$ y7 W0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx3 a- a. D9 T4 _% {* _" O
0071B90E |. 2BD0 sub edx,eax
& @) C7 ]' p: u" v0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]& i7 r3 v8 S* _9 b8 L, B
0071B913 |. 8BD8 mov ebx,eax9 |: m5 H. R6 }/ ]9 v6 V
0071B915 |. 0FAFDE imul ebx,esi' `7 a4 V+ p0 V2 ^
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
) n" p% c: l2 R; u0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
5 x9 V& U3 s l0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
9 f# m, p4 O' g0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]8 N v, F* l% E/ N Q
0071B926 |. 03F3 add esi,ebx, |, m* c) m3 r) g+ _) R( T9 G
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
2 T3 f. \- r! ^! l; ~, D2 W( `0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
$ w6 g: p! o6 E1 `2 S0071B92F |. 8BD9 mov ebx,ecx/ ^. O% D( H9 n9 N
0071B931 |. 2BCD sub ecx,ebp
0 s. i- Z. G+ i6 [ t% f0071B933 |. 0FAFDA imul ebx,edx
$ c. B9 i$ ^ o- b# X0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
; u- R; i& h" o( q" i4 o# R0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx, \. @8 Z$ X v) q$ f ?
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
/ P4 Z1 }) F. e3 [' P0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
3 g( B, j A _* O7 z$ N: G9 z0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
( }2 b" I! I: }" a$ E, ~0071B949 |. 2BC1 sub eax,ecx
! a: e( n# L3 i4 k9 F& S0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
4 P! ]; n$ y5 G% M0071B94F |. 03DF add ebx,edi
1 W o4 z5 ]% K% [6 ]0071B951 |. 8BC2 mov eax,edx
! J2 U1 D( C5 k( ]- Q, } `7 {8 s+ ^0071B953 |. 4A dec edx
$ ]! j+ D& M- g$ F; Q3 U7 l$ B* P0071B954 |. 85C0 test eax,eax
# E) U7 l9 L3 O' o0071B956 |. 0F84 3A010000 je heroes4.0071BA96
! _" `' p. Z- s1 k2 K$ y0071B95C |. 42 inc edx
9 F/ z) h4 D, T- T7 r/ e; E+ W) x0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
4 l6 `3 u$ T+ {2 ^" w0071B961 |> 85ED /test ebp,ebp
; R, R! A. \+ f; v, g h3 h2 y0071B963 |. 0F84 0E010000 |je heroes4.0071BA772 k; A9 S8 Y- t0 e4 r, p d
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]9 B/ L8 K' J: w7 L8 O0 n. g) ~
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp9 C3 u1 |, P( ?. V2 \% g/ n
0071B971 |. 25 FFFF0000 |and eax,0FFFF5 O* A4 j$ ]$ ?) [* X
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
. w/ c( s% P5 v b D0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]* B( @0 I0 Y, R, O" `' T9 w/ o
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
8 H! H( [# Q5 b" ~; ^% d0071B984 |. 84C0 ||test al,al; N1 m$ [2 S. ^+ o4 d
0071B986 |. 74 6A ||je short heroes4.0071B9F2; [% X) x- j/ _7 c+ B& D
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
# }7 m9 k5 @- r+ p1 ?1 j0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
/ B# R5 E3 Y/ |# [! v: f0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
5 P6 [* G3 B% n, ~8 T: ~0071B991 |. 25 FFFF0000 ||and eax,0FFFF1 i* @# t; b+ F1 c3 _0 D* u
0071B996 |. 8BF9 ||mov edi,ecx
8 X# e4 [1 N5 |8 m' o0071B998 |. 33C9 ||xor ecx,ecx
+ w* W; j4 P% i7 C( I) n% a+ H0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值' o: J# o) @* F/ ^& }
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
2 w3 r1 q2 j2 m+ F0 M9 N0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
9 U0 B! `. q: f0071B9A1 |. 8BD7 ||mov edx,edi
4 t5 L0 @: D7 @/ S, [3 b0071B9A3 |. 8BF1 ||mov esi,ecx
) e5 l3 W# ]8 w$ a0071B9A5 |. C1FA 03 ||sar edx,32 R5 i; y/ d/ U+ `6 ?8 g
0071B9A8 |. 83E2 01 ||and edx,1
$ X$ v+ E9 `6 F5 M3 O2 k* o$ ~1 L0071B9AB |. 03FA ||add edi,edx n$ f4 l$ h" R$ z! K' ]
0071B9AD |. 8BD1 ||mov edx,ecx) e' }+ }, \! X- Y2 S5 M- W
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
o0 r: U- d& {/ q( l9 H5 i$ l) V0071B9B5 |. 23D5 ||and edx,ebp4 R/ Z# [9 q' D. B+ D; L# s8 O5 n0 {
0071B9B7 |. 23F1 ||and esi,ecx2 ~2 P- K$ `$ a* H
0071B9B9 |. 8BC8 ||mov ecx,eax. r/ F) k7 L. `7 D. J0 e
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]4 d, ^+ {# Z, {
0071B9C1 |. 23C5 ||and eax,ebp$ W0 i9 h" c# v$ t$ c
0071B9C3 |. 2BC2 ||sub eax,edx3 v2 `4 @4 B) V! V, t
0071B9C5 |. 2BCE ||sub ecx,esi
' J7 a* }- |; ^3 F7 v7 a0071B9C7 |. 0FAFC7 ||imul eax,edi
8 m p3 x; Z" `0 a; `& T0071B9CA |. 0FAFCF ||imul ecx,edi
( e0 e' `8 I8 C* ^) Y$ t( V4 R0071B9CD |. C1E6 04 ||shl esi,4
4 d! _1 P) \3 n8 m/ [0071B9D0 |. 03CE ||add ecx,esi
r/ }% |( W* f, S1 J2 F2 w0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
2 {1 ] Z n6 h @0071B9D8 |. C1E2 04 ||shl edx,4
0 ^2 V! S( R' _; @: B6 O) B( c0 k0071B9DB |. 23CE ||and ecx,esi
5 p7 t- Y: O& H! \0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
% i( u" h [& d$ t0071B9E3 |. 03C2 ||add eax,edx
0 I- C- Y2 }4 |# V' L6 u* X0071B9E5 |. 23C6 ||and eax,esi
5 ]1 s. m0 |: U8 B! R0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
& q) X9 j* P/ C! ^0071B9EB |. 03C8 ||add ecx,eax
4 q) F |3 [ L+ j. C8 V u0071B9ED |. C1F9 04 ||sar ecx,4
h8 F5 i- P! l& e1 j0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
0 w, r$ o+ a8 S0 }% R0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
# V% K$ ~; m4 I7 ?5 l2 A9 g0071B9F5 |> 33D2 ||xor edx,edx
7 o4 ]) v g+ S, V! Y5 r0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF5 L2 \. K: [3 @5 w+ Q' P* \- X: _
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
" M' N$ Y3 J7 B0 I! ?/ K0071B9FF |. 8BC1 ||mov eax,ecx9 ]6 C& r! v$ B6 u
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位/ d; @; P5 {8 l- u0 l
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0/ u7 Y- E, e( {% W
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理8 @( \! Q0 P# N2 }' W& c
0071BA08 |. 8BCA ||mov ecx,edx8 d, \1 ]5 l" `& n6 o
0071BA0A |. 8BF0 ||mov esi,eax
* G& U* U1 U. }+ ~; M/ q0071BA0C |. C1F9 03 ||sar ecx,3
/ D% r/ I6 [8 r, o8 B9 j0071BA0F |. 83E1 01 ||and ecx,1
; |6 S6 o+ g# T" }, x0 ]/ I0071BA12 |. 23F5 ||and esi,ebp0 e7 I4 \# i% u' r
0071BA14 |. 03D1 ||add edx,ecx# `, t* F4 c& h! u( h" g
0071BA16 |. 8BC8 ||mov ecx,eax
5 ^) h- B$ }/ `4 f7 J/ ?0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]" Q w3 z5 @7 D$ _
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]) @) Q9 F& Q+ `, k8 ?9 R
0071BA22 |. 23C5 ||and eax,ebp3 H) |9 C) E4 [; [+ |. ]* ?7 k
0071BA24 |. 23CF ||and ecx,edi
' d$ F7 c6 W/ k2 A6 P5 c0 ^0071BA26 |. 2BC6 ||sub eax,esi. m8 f: Q+ W" f* h7 [+ e$ t# d) R
0071BA28 |. 0FAFC2 ||imul eax,edx
6 G5 Q/ j! ]( n* z; V, _0071BA2B |. C1E6 04 ||shl esi,43 h( Y: Q, o+ R4 |7 }4 `) d& P: ~
0071BA2E |. 03C6 ||add eax,esi
# T( [5 p+ h- F, s7 \" @( m0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
2 c& {" N2 m' a$ j$ l$ S+ L7 {0071BA36 |. 23C6 ||and eax,esi
6 c4 b2 `% x6 `$ M1 I0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
6 z7 o, D" b5 B' u# j. Y0071BA3C |. 23F7 ||and esi,edi
2 O: f/ |, R' e! r! r3 F0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]5 ~: L: m" y( p
0071BA44 |. 2BF1 ||sub esi,ecx8 S( k$ M$ ~6 B4 b! {
0071BA46 |. 0FAFF2 ||imul esi,edx
- B" u! }) o3 O( ?" L4 M) A4 F9 V7 k( b0071BA49 |. C1E1 04 ||shl ecx,4$ a' J. s! E1 T( c. m
0071BA4C |. 03F1 ||add esi,ecx
/ ~4 `/ ?# S ^; F; [0071BA4E |. 23F7 ||and esi,edi/ {* b8 t- q+ `+ c# M' f" Q! h
0071BA50 |. 03C6 ||add eax,esi. \( m8 e" {& J O1 R
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]4 \$ [4 j8 z7 U- g* \
0071BA56 |. C1F8 04 ||sar eax,49 p7 Z/ |: f- i# |/ D+ R
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
" T# F8 g9 x1 q# k0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]$ ?( z8 u$ A- f
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点 c" F6 e4 A0 Q" C- _
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点# w" N9 g, F6 m. \
0071BA64 |. 48 ||dec eax ; 计数值减1' z( |" h- o1 E
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi( |2 V9 \/ V! G6 Z6 e7 K, \, }
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
% _0 \, x2 x! V7 t1 y: g0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
: [0 I& v Z+ G7 n7 }% r( G: i$ h0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]- @0 {1 D: g' R, ^ o' X7 z) ~
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]7 L7 O8 ], Q4 k# q( z
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]3 \5 P( ^& f, l! v: [
0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]! q3 ~* e6 x9 p8 \$ N* P" K, P
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点& @9 H, ~( e2 ]
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
2 O1 _) F9 ]5 h0071BA87 |. 48 |dec eax ; 计数值减1
; `0 B8 f$ Q3 C0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi' W3 e1 X# Y# j9 z' ]; K. G+ P
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
- ]" {! m+ h1 z5 K% e0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
6 L/ c+ ^$ S1 b! |6 C& @0071BA96 |> 5F pop edi
) [% V6 }+ W4 q0 ^+ f, p0 P0071BA97 |. 5E pop esi
2 y8 ~3 g, h9 Q* b/ u2 n0071BA98 |. 5D pop ebp
1 X7 s0 Z! B6 ^0071BA99 |. 5B pop ebx* i& n& k4 e; `, d: d
0071BA9A |. 83C4 54 add esp,54% c6 r* L6 X& b5 s+ f8 C
0071BA9D \. C2 1800 retn 18# i$ ]8 _+ P. N- E' }4 G! Y
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
$ J& o- V. o: H. A4 o
' Z* a# w; W$ C; Q4 Hbuf[x][y]=func(buf[x][y],zm[x/2][y/2])
* m! ^9 W `: R6 K n [3 [0 C/ p7 t# l3 t: ]: A# ~
buf:缓冲区二维数组,两个字节表示一个点
+ O2 k; s* ~6 Zzm:字模二维数组,一个字节表示一个点 |