参数表+ H9 m# w0 J) G# G" s
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址6 h' {0 S7 X, w1 @; N2 J+ H
arg2:字符串宽度 x
/ Q6 m# k$ f+ warg3:y
& l$ \# \' W; C( Harg4:颜色' f# s# x0 `* L, A
arg5:与颜色深度有关
# W( d& Y0 M$ S7 {$ z) |1 N0 zarg6:与颜色深度有关
# l& @7 l& f# l" c$ V& Tecx:字符的编码基地址
8 {% h) p* [9 x# H$ m/ v/ a s: I) F! v# j
0071B820 /$ 83EC 54 sub esp,543 v5 }$ ~: M) h8 H0 p
0071B823 |. 53 push ebx
7 k5 y8 y) R+ O3 c6 s. ?# A. Z0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
; u' y, }' {6 ? S7 L# t+ D0071B828 |. 55 push ebp
5 C5 T. t8 G. o- d, W0071B829 |. 56 push esi- K- s' k6 [4 |* Z+ l3 E2 |
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]8 F# G @. F" {5 f, q& j- s
0071B82D |. 8BF1 mov esi,ecx! J4 d$ F7 ]: [: H' M6 L$ a( E
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]& |+ O% e2 p1 d2 ?! W. D& B
0071B832 |. 57 push edi7 g" J, H. j# A$ {# _
0071B833 |. 50 push eax
+ c( Z1 f+ F" `0 I$ }3 F0071B834 |. 51 push ecx# l* k9 f5 n$ J3 B# m
0071B835 |. 6A 00 push 0+ c8 X+ [$ d. f e/ |7 w F v4 s
0071B837 |. 6A 00 push 0
: j3 x: w& ]: v! b0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
; t; |! y! i- ^' l1 n0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
4 _. d" ]( w2 V& j/ \+ q0071B841 |. E8 6ABCCEFF call heroes4.004074B0/ R! W& e$ J$ c
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]2 j% F! o! Y6 ~8 ^! u7 c* ~
0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]* |6 b- \. M6 F
0071B84C |. 52 push edx
" q) b8 C {3 w) c! P; l% K0071B84D |. 50 push eax4 a1 ?$ W& _4 S8 A
0071B84E |. 6A 00 push 0
" o4 J0 I- r4 q! N9 q0071B850 |. 6A 00 push 0# u$ E# C% n. e& @
0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]: ~* t* j; P5 U$ ~, s: o* u
0071B856 |. E8 55BCCEFF call heroes4.004074B0
+ N/ @4 _5 F6 `* K8 E' d0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]4 j1 N+ ]/ h, O$ k e
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
/ g$ A; K6 G9 z) U( C0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]! k, Y8 H1 o3 b
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
7 f4 p; y V; g* p* Y; w0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
6 H1 R. ]; y; Q( L+ b0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx0 ]: G' [) n1 Z+ w/ M, P6 R0 r
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
9 G' F. `9 E& w5 p8 _0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx- L5 q$ Y& m+ W: D' ]. H
0071B87B |. 52 push edx
- ^% S b( V& `/ ^ y' `, ~* ^$ f$ z0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
, H9 P- R5 S& d& k+ P: s1 g0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax" k3 D3 q2 n0 t6 t( B, B$ B" x5 J
0071B884 |. E8 47BCCEFF call heroes4.004074D04 m8 i+ P7 V$ l7 E. h
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]+ ^& g5 c/ V( ^2 U o' A
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]( a w5 a; c j" e
0071B891 |. 3BC1 cmp eax,ecx
1 H1 j5 P# r" v3 w0071B893 |. 8BF8 mov edi,eax% @7 c: u+ W3 N9 [ L
0071B895 |. 7C 02 jl short heroes4.0071B899! w0 U% z6 f6 o5 @
0071B897 |. 8BF9 mov edi,ecx
f! g4 D" M, R, @0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
8 {2 Y4 E5 u. Y6 ?1 e O0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
" e% B' }! t- i5 b0071B8A1 |. 3BC2 cmp eax,edx
9 d- Y0 G5 m1 g$ P3 E, Z0071B8A3 |. 7D 02 jge short heroes4.0071B8A77 o1 v$ N1 A- W+ A
0071B8A5 |. 8BD0 mov edx,eax
& g# H! A) _. J& z$ V0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]* d7 u" s# K; x/ x7 n
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
: }' y$ I% W' v7 Q5 E0071B8AF |. 3BC1 cmp eax,ecx3 W# f$ a" s% m/ N2 V
0071B8B1 |. 7E 02 jle short heroes4.0071B8B55 H1 b5 B8 a$ w+ _9 Q
0071B8B3 |. 8BC8 mov ecx,eax+ X8 I& W9 L. g+ p& k8 G& A6 z
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]) G. s U* b( U* |2 B8 e' |& |
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]9 p" @$ T) f. B' }8 n [8 W
0071B8BD |. 3BC6 cmp eax,esi6 ^7 [- p. T0 H! B' c
0071B8BF |. 7F 02 jg short heroes4.0071B8C3
9 v$ g2 }5 ~5 U$ F8 a0071B8C1 |. 8BC6 mov eax,esi; |4 s" C9 w* Y
0071B8C3 |> 57 push edi- l2 g! c3 G* B5 t% K
0071B8C4 |. 52 push edx# [3 h* | c9 A, ~7 s* v
0071B8C5 |. 51 push ecx
+ u) u; h% S; {1 z; P3 _0071B8C6 |. 50 push eax! x: \* X/ P1 }/ j0 k" Q& f
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
, z- s5 _/ Q3 B0 k! l3 d, a! Z5 x0071B8CB |. E8 E0BBCEFF call heroes4.004074B06 ^) l# O6 c1 A0 v
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
# {* v; i9 x6 N6 a: Y @0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
1 w0 Q3 o7 ?+ t5 M& p5 k P0 j0071B8D8 |. 2BC6 sub eax,esi
$ E) K5 N" }/ Q6 ~" T6 t9 q: _5 W0071B8DA |. 85C0 test eax,eax
/ v- {8 o8 Q+ D% S+ q0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
* y( F, W0 ?/ |6 W" j5 v0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96' k' T9 I" O( _. G
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
$ V3 j5 c O! _: w0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg26 x9 W U3 u1 @5 n
0071B8EE |. 2BE9 sub ebp,ecx
0 b, l6 E T! r; x% ?0 L0071B8F0 |. 85ED test ebp,ebp2 y3 ?) w3 @4 Y) |' L6 x
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
3 d2 c" y9 M6 J, M# E0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
1 @) ?3 w1 g3 w: J% J( k0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2) i6 g" c& V8 Y! }( n2 o8 R
0071B900 |. 8BF9 mov edi,ecx& U- \' ^3 N, N/ }, b7 \+ p
0071B902 |. 2BF8 sub edi,eax. @: l) Z, @! [8 G0 o- _, _
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg31 [8 L# ?% M$ C
0071B908 |. 8BD6 mov edx,esi0 v9 G" s, ]& S$ X$ m( c+ J. h0 x
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx u! \5 V/ V& p( p" U4 n h
0071B90E |. 2BD0 sub edx,eax; [- T: `* T, {6 x+ \. P. y
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
: }$ L: f. O5 u. |0071B913 |. 8BD8 mov ebx,eax
$ Q9 Z y* n# ]9 F9 j) u8 n0071B915 |. 0FAFDE imul ebx,esi
( T% T, M( {/ o, }+ \7 y0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
6 d/ n+ ^$ Q$ k6 Z& t6 }1 z% H/ C! {0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]" c2 k( S3 e# {0 ?, w7 @
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
" f. {4 {! w4 c8 s) ~7 w; `0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]' l7 d `# J8 T" L9 j* N$ q
0071B926 |. 03F3 add esi,ebx- @6 M8 u0 p9 d; f' m9 f$ v
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]5 P" A0 U( `3 k- i9 N! c
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
1 @$ c7 h- ?! S [3 X0071B92F |. 8BD9 mov ebx,ecx K- K1 ^. E; R% N
0071B931 |. 2BCD sub ecx,ebp+ I0 J4 y6 C8 r: u! n* n$ h# j4 t/ L
0071B933 |. 0FAFDA imul ebx,edx6 S8 |6 ]+ d/ U" X4 j# M* ?
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
$ |' y* y5 l& V; X! n+ @6 T0 Q0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx, Y2 q4 Q- i/ t N+ N8 r5 a1 L* i
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
+ K3 T R8 m% u! a p" F0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10] c) ~3 j/ N) i+ H! S4 P3 c
0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]2 o) d+ L$ @* ^( K. H) P
0071B949 |. 2BC1 sub eax,ecx
3 i7 J- H( e4 V l: J9 Z! e3 A0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
) z5 t4 o, a. j2 n }0071B94F |. 03DF add ebx,edi2 t3 J2 `. J1 n$ m, ]% `" K) D4 S- D
0071B951 |. 8BC2 mov eax,edx
& Y/ e7 Y5 n, ]+ j- A/ h: F4 |+ _; v0071B953 |. 4A dec edx
% ]1 {! s) z3 D! i& {) R0071B954 |. 85C0 test eax,eax
7 C7 V, ]4 k$ ^/ T0071B956 |. 0F84 3A010000 je heroes4.0071BA969 i- B. ^ c) W Z4 b
0071B95C |. 42 inc edx$ H! l# W2 [; L& V: C( y7 M
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
& B+ E# l7 g7 p, L& V0071B961 |> 85ED /test ebp,ebp
/ X; {5 }) C$ t1 w; ]6 L0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
8 w, ^( m5 W; o7 L4 f+ v0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]. k+ P! K, f! V# z/ G" S m
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
6 k* r: q& T: U) q2 R% ~! j$ E9 W0071B971 |. 25 FFFF0000 |and eax,0FFFF* J7 N+ r# b- g3 _ u% \
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax' T S) ^% C, u: r4 Q4 U
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
; o1 ]% X; X& f3 {; M" N* n; \0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
. F/ o7 D( ?. f- E0071B984 |. 84C0 ||test al,al8 ^. t9 m' z: r2 G- e& G
0071B986 |. 74 6A ||je short heroes4.0071B9F2 C7 Y' ^: f7 _6 R
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
; O3 W3 @% h' g0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]* \5 A; P, W( o! B7 L5 n4 `3 q
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
2 K1 m. v$ l5 h- \7 ]0071B991 |. 25 FFFF0000 ||and eax,0FFFF& c! b" r, W8 b$ M2 y
0071B996 |. 8BF9 ||mov edi,ecx
1 o: T# w' m2 ]7 D$ Q! C; O0071B998 |. 33C9 ||xor ecx,ecx* \9 T }+ b ~! p4 T+ p
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值+ a1 Y# N" p' Y6 }& _2 ^# k
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0- p8 [) x& ]( y
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
7 S7 Q5 N% }3 B, z' Z2 Q( W1 j0071B9A1 |. 8BD7 ||mov edx,edi7 p7 b) Q% E0 B6 }2 }: n( K# \$ _
0071B9A3 |. 8BF1 ||mov esi,ecx- t* ~" W" J7 o( z
0071B9A5 |. C1FA 03 ||sar edx,3: l- |& o- J; V3 a7 Z j, M
0071B9A8 |. 83E2 01 ||and edx,1
0 w! M- u2 @( z0 |0071B9AB |. 03FA ||add edi,edx$ H2 J' k8 m9 ?5 ~
0071B9AD |. 8BD1 ||mov edx,ecx) [. k6 n4 Z B
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
3 \& _$ U' s/ \! \0071B9B5 |. 23D5 ||and edx,ebp) w# b' L4 P6 j$ K6 l
0071B9B7 |. 23F1 ||and esi,ecx. I4 a7 L- T9 l8 L
0071B9B9 |. 8BC8 ||mov ecx,eax
1 w; m/ _3 o$ ?0 h0 P0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]$ C$ N$ A6 C x4 m8 a3 A( U1 ~
0071B9C1 |. 23C5 ||and eax,ebp1 O) ]& o$ z! [3 M! l0 F
0071B9C3 |. 2BC2 ||sub eax,edx
% g/ J' T5 S8 {3 y' F/ L& o0071B9C5 |. 2BCE ||sub ecx,esi
" E4 u6 w/ T7 T6 Z3 ~0071B9C7 |. 0FAFC7 ||imul eax,edi
0 a; e9 s) m h$ E0071B9CA |. 0FAFCF ||imul ecx,edi' @7 l3 y& U6 O- N' J
0071B9CD |. C1E6 04 ||shl esi,4
4 h. ]2 ^2 p. J- }; h0071B9D0 |. 03CE ||add ecx,esi
- o) B2 u. r% h7 Y. j* N( }: V0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
3 y3 f( v: I( e6 f& k0071B9D8 |. C1E2 04 ||shl edx,41 q- i9 B* ?5 Y3 l! y
0071B9DB |. 23CE ||and ecx,esi! n. N$ M( _5 t; A! S
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]7 m0 }9 A3 j9 Q' i4 j9 B* ?5 G0 e z$ m/ s
0071B9E3 |. 03C2 ||add eax,edx
. m: y- C7 E* H3 c' e& J0071B9E5 |. 23C6 ||and eax,esi
9 _+ Y0 t$ h6 x7 T' ^0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]. R5 Y$ X5 ^. [4 D C
0071B9EB |. 03C8 ||add ecx,eax
9 `4 t/ R/ A# z5 @* R9 R0071B9ED |. C1F9 04 ||sar ecx,4+ Q' v3 ~3 Y9 g f. |
0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F56 ^( F+ {( P) b+ H6 u
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
9 y" R# ]6 G' I! v7 a0071B9F5 |> 33D2 ||xor edx,edx3 }+ B$ T- |$ F" I
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF: H. x/ W1 l8 i) R
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
& z8 w8 C2 k: g! G0071B9FF |. 8BC1 ||mov eax,ecx
7 [* Z8 J+ S+ c+ p' g; V0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
. r0 A7 B6 j! C5 c7 V4 O: b% Y6 a0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0) i7 }/ ]5 D/ i, ]) Q. R4 k
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理9 ~( b0 v4 M# V& _% r$ O8 h( f
0071BA08 |. 8BCA ||mov ecx,edx- p! q6 V5 y3 @$ W+ A4 ?: |
0071BA0A |. 8BF0 ||mov esi,eax1 t/ y! h8 V4 B2 d0 `3 ?
0071BA0C |. C1F9 03 ||sar ecx,33 ~! v3 Q; H+ l w8 _6 S$ @8 m. w
0071BA0F |. 83E1 01 ||and ecx,15 |- p6 o+ U# a( o; I; ~
0071BA12 |. 23F5 ||and esi,ebp
+ Y# E/ W3 t! e, N5 m0071BA14 |. 03D1 ||add edx,ecx
0 M% N: G/ x& g6 O0071BA16 |. 8BC8 ||mov ecx,eax
" v4 l- [1 |$ P! D0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]( s8 y6 R6 L# j
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
( A A0 o, [( f% u0071BA22 |. 23C5 ||and eax,ebp
# i' O! ?" c/ ^8 U- H7 O" @' F* q0071BA24 |. 23CF ||and ecx,edi
% I: }. Z4 M0 Y# l3 I/ ]0071BA26 |. 2BC6 ||sub eax,esi
$ {" l; } p6 K; }% h0071BA28 |. 0FAFC2 ||imul eax,edx
: |: }% m2 v) |0071BA2B |. C1E6 04 ||shl esi,4
: [& u Z( s4 ~# y5 A0071BA2E |. 03C6 ||add eax,esi& D: \/ U4 n' L3 ` `6 N
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
. r& G1 p( p9 u0071BA36 |. 23C6 ||and eax,esi
6 P) Q6 ?" h% ~0 \3 l4 I0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]4 ^" H1 {; u6 S! ?: N7 L' O, R
0071BA3C |. 23F7 ||and esi,edi
* B4 s$ z" u, m$ Z6 p0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]6 x9 j+ _7 B( f& ^# O! ?2 e
0071BA44 |. 2BF1 ||sub esi,ecx1 j( i; \5 m% q8 T) U
0071BA46 |. 0FAFF2 ||imul esi,edx
+ o" @1 V6 N( G5 s0071BA49 |. C1E1 04 ||shl ecx,4
" Q" ? H& H/ j2 y& G* ~. M7 W" A! Z0071BA4C |. 03F1 ||add esi,ecx
/ L# \. U- L0 X4 z0071BA4E |. 23F7 ||and esi,edi! ~. J1 k3 r0 D# i
0071BA50 |. 03C6 ||add eax,esi
8 V# m( z( ~7 E% F5 }0 o0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]+ K/ L7 _3 {6 G4 {+ n* ?- f
0071BA56 |. C1F8 04 ||sar eax,4% `) C" V1 K; n: C3 ^
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
% [" Q8 T" q+ W, @( J* E0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]
- ]8 U" y+ Z# [' N+ d ^0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点7 |( A5 \" l$ y& A/ r0 B8 w6 Z
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点5 r& r2 I2 I/ `5 \
0071BA64 |. 48 ||dec eax ; 计数值减17 T+ {& [6 |7 p( _+ y! G
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi+ ?3 Y! x0 U% m. _: R8 m
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
5 k6 d+ i- `1 x0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A8 r0 d5 L# o3 V0 d2 T+ f
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]: C! K7 @7 i7 J" Q2 ^6 o
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
. B8 Z" I' V0 @8 [6 x( ^1 _2 B0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
2 z) }7 e# Q. u5 k& f0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]' {" t$ u+ d( ?# }0 a
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
5 W+ f3 k$ b# Z- ]9 E u" Z0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点' o: j7 N$ q O2 B; \8 Q
0071BA87 |. 48 |dec eax ; 计数值减19 e$ k2 Y" P. B$ \. S
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi$ r5 ]- b- B$ \9 j; @! g
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
& B0 {2 `, e. h7 r" s8 m- s Z& A0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B9610 y% U8 h% U8 T, ^6 F' T8 G1 ~
0071BA96 |> 5F pop edi
- v" e% P3 S- Z6 b# q, @0071BA97 |. 5E pop esi
& Z% D2 G8 B7 s+ Q0071BA98 |. 5D pop ebp
3 s. y- i4 O" f; U0 Q; v, z0071BA99 |. 5B pop ebx
/ Y# ]. `, f/ d/ a! N0071BA9A |. 83C4 54 add esp,54
. j+ ~6 @" ?( T- @$ Y0071BA9D \. C2 1800 retn 18' d1 N) n. p9 p2 r, l
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
4 R4 Y( j. J5 L. ?
& O, M9 @( V9 X+ W. }, g4 dbuf[x][y]=func(buf[x][y],zm[x/2][y/2])! w D- |) V: Q* Y. h- A
" L% u; F/ D( ~
buf:缓冲区二维数组,两个字节表示一个点
, m/ U) g A% }zm:字模二维数组,一个字节表示一个点 |