参数表) N8 G1 T, s9 m# h& H& G. P
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
0 W& D7 b9 k5 q! s! Yarg2:字符串宽度 x# }& ]; p' X* J6 z4 t# W
arg3:y
, L( w4 p2 B8 H# }5 n) ^arg4:颜色$ o; ~- R/ L* T
arg5:与颜色深度有关
/ z; Q; n2 S) ^+ F' s5 L3 p9 jarg6:与颜色深度有关
8 D {( d1 x6 \2 k( xecx:字符的编码基地址" S; K5 X) P( S4 s
( [6 |4 a1 {4 _8 W2 G
0071B820 /$ 83EC 54 sub esp,54
. H" k. e" Y3 g# M% ~5 C0071B823 |. 53 push ebx
2 z" f9 [/ W+ r5 v0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]/ i( q( j4 @3 Z9 P7 U
0071B828 |. 55 push ebp
# t0 {' i, D+ u' w, W0071B829 |. 56 push esi/ I+ D$ P$ D, H4 e4 E* {
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]4 f5 W# r$ |$ R0 ]
0071B82D |. 8BF1 mov esi,ecx( v3 i3 Y; C) }3 r, {
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]7 E) v" I) ] c1 y9 b& H5 r) P. V) F
0071B832 |. 57 push edi
$ e6 a3 q V3 C5 q1 A0071B833 |. 50 push eax8 D# H8 g; i7 S, T* f# C0 Y m
0071B834 |. 51 push ecx' m" Y! K0 L( }6 N# Y+ e. m/ r1 ?
0071B835 |. 6A 00 push 0
+ ^2 z4 M9 h5 R7 P, B0071B837 |. 6A 00 push 0
( T8 q8 h- f" E% R! S( v0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
8 n) S1 ]4 y& r7 C% p0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
/ }: M+ s8 U, T7 z0071B841 |. E8 6ABCCEFF call heroes4.004074B0
0 f- ^+ s0 g& V0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
7 q! h r' D5 H: R, ?( M0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
9 {0 Y- n7 \8 R: K0071B84C |. 52 push edx
" n% R9 E0 W) B! w0 f" U% i# q: S0071B84D |. 50 push eax+ o/ i/ y9 q& G8 E" O
0071B84E |. 6A 00 push 07 x" `8 Y+ z. L. j
0071B850 |. 6A 00 push 0
0 c g: _4 Q8 I9 w( c8 P O0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
) q1 s3 }7 \ N0 x" k3 V+ w0071B856 |. E8 55BCCEFF call heroes4.004074B04 c3 z8 o4 \5 }0 _5 g
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
; R* G w& t$ [' S7 N0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
3 W7 I2 J K, ^0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]# w) Q& E4 x2 [# J( f
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
1 d8 b) d+ J4 |0 A& k0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
; n* W& W4 q) J7 ^5 ?0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
3 f/ S( @! p9 x% Z0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]) V% O$ D3 q" c2 s7 d2 W7 {
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
! a) _& z) m2 |0071B87B |. 52 push edx
4 F( G+ t I" d4 q# T6 D; U0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
' V _1 B- \7 Z( X0 K6 h( I8 W+ [0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
) K. g! b9 Z. [0 g7 L7 h7 N" Z0071B884 |. E8 47BCCEFF call heroes4.004074D0
7 | v6 j, x* _' d" K5 m" T* j% E) z0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
6 g! |9 I& L. u/ l8 |0 ^+ z+ G) H0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]' p4 g2 ?. _! t& j
0071B891 |. 3BC1 cmp eax,ecx
- x% }/ l* y5 h* ~" V+ W0071B893 |. 8BF8 mov edi,eax: P% P& H9 o/ U- s. P X) J! r, L
0071B895 |. 7C 02 jl short heroes4.0071B899
; J, b I1 `1 L' }: N; S/ N% J7 J2 ?0071B897 |. 8BF9 mov edi,ecx) O4 v$ a+ R. Q' R" M+ A' R5 q
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]% }" \8 l3 l1 g9 _* K" H% a
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
; @/ k" T; U- R6 U0 M( K0071B8A1 |. 3BC2 cmp eax,edx9 _% d0 [9 ]8 }
0071B8A3 |. 7D 02 jge short heroes4.0071B8A78 B, m" G; b( f, y7 U
0071B8A5 |. 8BD0 mov edx,eax' G1 b2 {9 I7 s# l1 L
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
! _3 y. i! |( M5 x! V# J B0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]# s" S6 Z0 D+ c; `: K
0071B8AF |. 3BC1 cmp eax,ecx
; Y; K4 R$ u" R. ^' K$ V. x2 W0071B8B1 |. 7E 02 jle short heroes4.0071B8B5 I; E* h9 ~& b [7 L7 ]
0071B8B3 |. 8BC8 mov ecx,eax- @" Q; Z U( }& p. l7 n- H
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]: E S: U2 N; l9 ? A7 x, r
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]$ G8 e1 l5 D2 z7 D
0071B8BD |. 3BC6 cmp eax,esi3 m$ s" W) ~, I/ x: b
0071B8BF |. 7F 02 jg short heroes4.0071B8C35 z& E) P" K/ a$ p1 J5 J6 |7 n% P. g
0071B8C1 |. 8BC6 mov eax,esi
9 u* B& \+ i8 R6 b! e. f0071B8C3 |> 57 push edi
. R! U* l3 F6 [- H* J4 N. \% x4 ~' [0071B8C4 |. 52 push edx/ j, Y# F) d. Y# U- O \2 m
0071B8C5 |. 51 push ecx
' O% Y+ O7 j* p0 G6 m" F. q; D0071B8C6 |. 50 push eax: Y5 M$ G, V- ^# u+ z+ b
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]3 @; Q' ?0 @1 b9 j8 a% v( a" L
0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
) S7 n) r- j$ b- s! E4 d5 e& U0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60], r. b! A/ _0 e/ ^% _
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
: ~: {, s9 b" Y6 l$ b. c/ G" F9 \0071B8D8 |. 2BC6 sub eax,esi
. J( a5 ?1 r1 a/ a1 k3 E" H$ R0071B8DA |. 85C0 test eax,eax
/ }5 B! l; X6 V e; X0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
) k& i. N+ p8 c- s. P$ a+ {5 w0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA966 b" V2 k7 V4 |: U% G
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
1 t7 W! ~0 G7 m, s3 `( L6 z0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2
6 H' V2 }* ]0 m0 g0071B8EE |. 2BE9 sub ebp,ecx
# \- e' q4 \5 V4 ?. Y0071B8F0 |. 85ED test ebp,ebp' |9 B. k2 c2 w; `8 d' R
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp$ u/ [7 H( w0 ~+ J4 W' l: D
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96" z! ^. ?" ?% P
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2 j7 }/ O# f. N) ~' J) W `
0071B900 |. 8BF9 mov edi,ecx/ N( J* p2 G- a- l" _
0071B902 |. 2BF8 sub edi,eax
1 _* S6 I, I7 ^. K d% u3 i0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3! W( b, f4 p! A' U' z! H
0071B908 |. 8BD6 mov edx,esi
2 T" a" p5 H% G$ t& W p" m0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx
+ B3 G$ Z, K0 R3 [3 H4 F" C/ E" O0071B90E |. 2BD0 sub edx,eax" K4 N- ~0 v+ T& A5 U e
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
$ @4 [8 |" b9 v1 {- U' S. n+ c. O0071B913 |. 8BD8 mov ebx,eax8 Y- d5 a+ u |/ {& f$ } m$ c! l* M- w
0071B915 |. 0FAFDE imul ebx,esi) h; {. F! d- f4 }2 ~
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
* i9 O2 D' o$ h0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]1 q' ]0 p* K( K8 q+ ~
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]* m7 @7 \! J7 d/ }, w! H( b4 v
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
5 x; ?% L9 ~ f0071B926 |. 03F3 add esi,ebx1 @4 t6 f' g0 z0 @# Z- _
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]" l( ^& ?+ Q; ^3 R7 r( c) s
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)# p7 W+ a. n6 m7 o* ^0 R3 I
0071B92F |. 8BD9 mov ebx,ecx
9 e$ P) w4 A9 p/ V' E1 G! V7 p0071B931 |. 2BCD sub ecx,ebp( \& z6 z1 r% _ x
0071B933 |. 0FAFDA imul ebx,edx
4 r. E% ]3 v% p0 x4 I( k0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
$ C3 k2 W$ u) N" L9 F% d o0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
' K" l2 {8 K4 [6 e. C* I2 ]7 n0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]; j7 ^; O; v/ g! a
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
3 ?: M3 V1 F3 H1 u1 ]6 f0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]3 W k9 {0 {$ \) K
0071B949 |. 2BC1 sub eax,ecx. t# z9 g" v9 t/ O
0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
+ F/ G- O9 o) Y7 ^+ y0071B94F |. 03DF add ebx,edi z' i8 O" o* X& B1 X
0071B951 |. 8BC2 mov eax,edx
~0 J" ^3 x$ k _0071B953 |. 4A dec edx) J+ a! f. f9 V R
0071B954 |. 85C0 test eax,eax/ \7 d. ^; O9 g& ]! K7 q; e( [
0071B956 |. 0F84 3A010000 je heroes4.0071BA96& I9 q. D$ T+ f# j
0071B95C |. 42 inc edx
% w) e# ?$ ` @; O* C0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx; U& J3 U7 T. r/ B# T& f
0071B961 |> 85ED /test ebp,ebp
2 G0 p& s4 G! m: Z ?( P! h0071B963 |. 0F84 0E010000 |je heroes4.0071BA77# R k A q5 R8 ~% t: h4 n
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
, V, x8 d; u0 I, F9 ~ Q1 \0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
0 Z; K& {; ], \% O" y/ C3 J2 b0071B971 |. 25 FFFF0000 |and eax,0FFFF: o+ j, ?$ {* E! ^! K5 x: D' b
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
z7 O* r' e7 h0 p% b: G' G0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
! ?% t6 q6 l( t2 B0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]" F& x, G5 y1 M; T
0071B984 |. 84C0 ||test al,al
! ^* n5 ?& D/ I2 a; G6 n( B0071B986 |. 74 6A ||je short heroes4.0071B9F2& R0 c( k! _% ]# r
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
7 W8 D; |; z. q; a+ Q! N0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
+ n% ~+ f# y0 m9 F& }0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
x( @6 C4 b, ^' }* m8 Y0071B991 |. 25 FFFF0000 ||and eax,0FFFF
: A- Y: q) r" u0 z* e0071B996 |. 8BF9 ||mov edi,ecx1 q* t0 U; C5 I1 H" X$ V0 b" x! A
0071B998 |. 33C9 ||xor ecx,ecx
6 Y5 R. O: c ^! R1 u0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值
) B' F4 a! B1 z( K3 T) Z0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
" q% {9 F. O R0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理, v' O4 _1 [8 d
0071B9A1 |. 8BD7 ||mov edx,edi
. q4 \6 ^: ?7 P* c$ ?" L+ J' A0071B9A3 |. 8BF1 ||mov esi,ecx: G* h/ |4 O! v: ~9 l
0071B9A5 |. C1FA 03 ||sar edx,37 V. v8 C( ?, }% f4 [9 ^
0071B9A8 |. 83E2 01 ||and edx,1
- ~7 C4 O/ W. F0071B9AB |. 03FA ||add edi,edx
" s1 Z0 l: B$ y! M1 F3 U5 Y0071B9AD |. 8BD1 ||mov edx,ecx
- M* M0 E4 K5 V- F+ t6 I, j C0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]" G8 ~. {8 i, p6 T- v5 t
0071B9B5 |. 23D5 ||and edx,ebp/ t4 Q) O; {) P# L& Y: c) ~) n% d
0071B9B7 |. 23F1 ||and esi,ecx, k+ K0 x, P% q1 x
0071B9B9 |. 8BC8 ||mov ecx,eax' S! c5 P# M8 x5 u, I
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]
. s' u1 @7 W& J5 L& i0071B9C1 |. 23C5 ||and eax,ebp+ A) B& c4 f# R( h
0071B9C3 |. 2BC2 ||sub eax,edx# @6 V$ b' t2 A: w E- _& S1 B
0071B9C5 |. 2BCE ||sub ecx,esi
% p% @" I9 w4 R% h" _7 t0071B9C7 |. 0FAFC7 ||imul eax,edi
. ^2 _5 }0 f9 ~! I: [0071B9CA |. 0FAFCF ||imul ecx,edi, J' q6 b; V# a7 h+ F- l
0071B9CD |. C1E6 04 ||shl esi,46 q4 p3 {8 B# }' L& P. m
0071B9D0 |. 03CE ||add ecx,esi1 |1 ^ ?4 |9 J, j; D0 p) K8 i
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
; E0 {* r3 B% A d2 r0071B9D8 |. C1E2 04 ||shl edx,4* l* ?, B R# \: ^: o
0071B9DB |. 23CE ||and ecx,esi: `6 ^) ]4 Y/ Y# U$ s2 t
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8], I9 J! W- y$ p4 n5 U/ X" A. D
0071B9E3 |. 03C2 ||add eax,edx/ S6 b$ b N( _3 {: k
0071B9E5 |. 23C6 ||and eax,esi
: f6 L2 h- m. b$ `! Y0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
, @2 Y2 K/ q! J/ f. x0071B9EB |. 03C8 ||add ecx,eax
4 s5 m, `. Q4 `; \1 s0 N0 C0071B9ED |. C1F9 04 ||sar ecx,4& g1 x/ @& D! N: v) M! G
0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5. T q9 i7 ?6 [; }+ W. ]! e/ e
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]2 p6 t+ y A8 L c) Y
0071B9F5 |> 33D2 ||xor edx,edx
" w, o( s$ c2 s; Z/ [0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF% l, m$ f* |1 O( y
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]! ?, K7 D1 `' D8 V+ a5 ]1 F; D
0071B9FF |. 8BC1 ||mov eax,ecx8 D! }, k& p8 b
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
( z3 x* z" X5 m6 \1 J0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
6 f! ~* q6 H! w; c: C( @" s0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
2 L" s0 B# S/ L% ]7 x; R0071BA08 |. 8BCA ||mov ecx,edx! h1 ~: w' K5 j0 f& g
0071BA0A |. 8BF0 ||mov esi,eax
0 f5 u- C7 n- K! R0071BA0C |. C1F9 03 ||sar ecx,3
) G9 x6 j7 \$ u1 B6 K/ \0071BA0F |. 83E1 01 ||and ecx,1
$ R$ Z& M& P4 F4 D0071BA12 |. 23F5 ||and esi,ebp
4 V( F; v# j( D0071BA14 |. 03D1 ||add edx,ecx
, G, }, q& I- ~6 K; T0071BA16 |. 8BC8 ||mov ecx,eax9 B# a+ J: _$ o( \$ [) }
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]! g: |8 T3 l" @4 `
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]9 ~* }4 Y. j5 U5 b; O6 K
0071BA22 |. 23C5 ||and eax,ebp
M9 l2 }) B G: J& w8 a; n7 M0071BA24 |. 23CF ||and ecx,edi9 V1 N' ^ g4 ~5 a8 `( [/ R# G0 _& V
0071BA26 |. 2BC6 ||sub eax,esi
; l; |! A$ y# ]7 F0071BA28 |. 0FAFC2 ||imul eax,edx
. C2 v, \, l/ m8 x- q! b/ [0071BA2B |. C1E6 04 ||shl esi,4
' W3 ?" n( ?* Z6 q- o' A C/ G0071BA2E |. 03C6 ||add eax,esi
$ P& E- B1 o2 Z: z9 C4 Y1 H$ c: B0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
/ O# E& T$ h5 m- a% p0071BA36 |. 23C6 ||and eax,esi
" D8 `! j5 _9 p0 p. ^- ]0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]
* N7 R. F# m; i; O: ]' y0071BA3C |. 23F7 ||and esi,edi
. k! d. Z% u/ @0 l& s# C: m0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
5 R& X+ U7 ^+ t: W0 p) V f f0071BA44 |. 2BF1 ||sub esi,ecx/ L# t6 P/ H# d
0071BA46 |. 0FAFF2 ||imul esi,edx
, c! y9 e! G$ U, P& v& O& \. }0071BA49 |. C1E1 04 ||shl ecx,4
" D+ j7 w. d2 M5 O0071BA4C |. 03F1 ||add esi,ecx# F" y8 U5 ]+ O) r! L, O5 @
0071BA4E |. 23F7 ||and esi,edi$ T6 F8 n& Z3 ?' L' e
0071BA50 |. 03C6 ||add eax,esi8 z3 [8 {! Z6 @9 J2 m6 b$ N
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68] z' a- Q( t! v8 k# q$ G) D& G; d4 Y
0071BA56 |. C1F8 04 ||sar eax,42 [; B/ _0 ?( F* s6 y, y
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处3 v2 i P+ F: Y
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]7 {) F6 ^; Y2 ~' ?5 G
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
% t6 Y% y: o2 M# F0 O7 U0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
" S& ^8 t! _. [& [( u6 o: d0071BA64 |. 48 ||dec eax ; 计数值减1
- p7 U0 J, A7 W! Z* n7 |% ?" C+ q0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi+ c2 t* `, f: R5 j1 s0 a1 b
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
) h$ X2 ?3 Y h3 x3 N0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A% ? ]5 f' ?+ U; v# r
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
& E+ [; ~; K( u( m/ \" B% z0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]8 j* U+ b4 |$ y$ h/ j
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
" g0 x" n0 {" x2 N' v, M0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]6 J" ~( o2 Y! Z5 | W6 F! X" |
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点: l# \: `0 e2 q3 I
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点0 w8 W, i1 k5 {$ A; u) E
0071BA87 |. 48 |dec eax ; 计数值减1
$ G$ P5 |2 q7 Z& X0 @5 C' e" m0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
1 V8 ?5 y( r3 Q5 t1 u3 N( v0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax8 ?) B: z# y4 A) o! ^, V
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
; l# c! u3 [& L+ n2 G0 D7 q0071BA96 |> 5F pop edi
# X# j* w0 H: s2 }9 ]0071BA97 |. 5E pop esi$ y. [# D5 a3 d" C b$ f2 O
0071BA98 |. 5D pop ebp$ S+ b8 |: h: G: L2 V
0071BA99 |. 5B pop ebx
7 t& Q* v; ^" I! F& i0071BA9A |. 83C4 54 add esp,54; g4 q. V, T6 y7 ^% \* v9 z
0071BA9D \. C2 1800 retn 183 ], }0 W5 g; o4 o. u: [: {0 U. c
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
% h2 R8 h4 p2 w1 V8 S+ B7 u) |, y2 z) Y
buf[x][y]=func(buf[x][y],zm[x/2][y/2])7 k" w2 j+ Q% Z2 f
' C% ^4 e* ^! n- V) K4 K, F. N! Obuf:缓冲区二维数组,两个字节表示一个点
; k. ~3 C* z; W% Z. y8 uzm:字模二维数组,一个字节表示一个点 |