参数表6 Z/ |( c' m0 O3 Q
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
& Y* Y6 V% L6 w% S5 y& l; A2 ]arg2:字符串宽度 x6 N: o2 C" ~6 J7 H* }. u1 N' r
arg3:y8 @% m% W% u2 }5 w
arg4:颜色) C/ `" |; O; M* w7 v+ T( ~) S5 u o8 Z
arg5:与颜色深度有关
6 | ~/ r! H, F6 C& e. ~arg6:与颜色深度有关3 S$ P5 N5 u5 Q3 L6 t5 f {- [
ecx:字符的编码基地址
9 v) X+ X6 V7 p) y+ u% _6 ?1 q( Q/ f s- w3 f! n, n
0071B820 /$ 83EC 54 sub esp,54$ i( G' H3 j- L" E5 i9 ?) I8 \
0071B823 |. 53 push ebx& n9 i. h5 s7 R5 H3 p8 E4 k
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C] ?2 N; t6 S& K) L$ g
0071B828 |. 55 push ebp" g4 I' q' p# B" I# b( i# ]. m
0071B829 |. 56 push esi) c, h7 `7 y; i% }( F$ J
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]$ H, ^. E' ]( o0 ?2 s! {: q; y2 [' Q
0071B82D |. 8BF1 mov esi,ecx
" @3 ^9 j. D" z9 X$ U0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]# ]2 V) B1 D1 S
0071B832 |. 57 push edi
6 {" ~! b7 {/ {$ Z& S, _; r0071B833 |. 50 push eax6 E+ B% P. ^* Q/ r. e8 ^- U; L0 \
0071B834 |. 51 push ecx
" K. T& X! ~0 c" M" R0071B835 |. 6A 00 push 0
6 z5 B; I0 G% Y* U* E {/ J: g, a0071B837 |. 6A 00 push 0
) Q5 K7 b1 |' V* ~- z0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
7 M( T, V' Z! n" x4 Z3 [% D' [0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi* a% G9 a6 l( O% ^" w+ d
0071B841 |. E8 6ABCCEFF call heroes4.004074B0 ]6 u7 c" X$ F9 E* U7 Z9 Y2 O- I7 O
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]; N1 c) R3 V2 ^
0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]" R; p+ I) [. O; [! x1 V
0071B84C |. 52 push edx
7 C/ `- c0 n- m: c0071B84D |. 50 push eax
/ K) P5 l: M' ~# I- `$ O# O' N0071B84E |. 6A 00 push 0% v" o: S# T3 O! F- ^/ l5 s
0071B850 |. 6A 00 push 0
' f+ R+ k" B8 i9 o4 O0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]$ u1 f& c8 y e |/ C
0071B856 |. E8 55BCCEFF call heroes4.004074B0
/ b& c6 M( X* a! f. ] Z0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
. {; S/ p K& f/ A! g1 G2 O0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
- W8 Z6 [5 r8 M' b% U( x0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]$ S& n+ |) M, ^% U* k; J
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
+ ]% {1 T v6 Q+ D+ X0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]2 P$ W9 j: q9 t- `' {$ z
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
% L, n% _9 } H, J! s% O8 ?0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
7 Z- G. h3 E5 o" Y: ^& @0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
6 Y' u; T4 \1 z) c7 P: ]0071B87B |. 52 push edx
' J* r8 `1 h" D I a( O8 [0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
* M- q# u. E8 s6 J, W0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax& k9 U Z! n( N: B ~
0071B884 |. E8 47BCCEFF call heroes4.004074D0
, L- j4 d/ s" y+ }6 N0 H m' p0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]0 a" z( L# ^, l' n& p$ L
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]1 s5 E* ~/ C3 I# S/ S
0071B891 |. 3BC1 cmp eax,ecx h7 E. X4 m9 `4 Z, I
0071B893 |. 8BF8 mov edi,eax# Z0 y1 D, O) X: k8 j2 U- ^
0071B895 |. 7C 02 jl short heroes4.0071B8997 P% i9 W9 j% o0 [, p6 w
0071B897 |. 8BF9 mov edi,ecx
$ B+ u1 v' N, R4 Z0 }: @0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]1 c" U! f3 i* ^3 ?( I8 ?
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
) L+ h0 K: B+ n) h/ {/ h0071B8A1 |. 3BC2 cmp eax,edx8 C2 h8 K( g: q/ `
0071B8A3 |. 7D 02 jge short heroes4.0071B8A73 i7 c; L0 Q& m5 L: O8 Y
0071B8A5 |. 8BD0 mov edx,eax% y* }6 d' E S6 ?, O2 ?6 f( N
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
8 z0 }( U. i, a' y) a4 a Y8 Z0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]
, u Z' R- Y$ R! C' r+ @3 ?% V0071B8AF |. 3BC1 cmp eax,ecx
5 I7 b; x( ]4 F0071B8B1 |. 7E 02 jle short heroes4.0071B8B5% Y& M, U* W; c3 o s
0071B8B3 |. 8BC8 mov ecx,eax
# @' a+ U7 e9 H7 M& `- N# S$ m0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
; a% H& _: a" ~" j4 w0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
) W3 N: j# Y9 w1 R, P0071B8BD |. 3BC6 cmp eax,esi
2 f) N: D' M. m! e% M* @0071B8BF |. 7F 02 jg short heroes4.0071B8C38 f& a* \9 m# b( e( l
0071B8C1 |. 8BC6 mov eax,esi3 O1 t, G$ }$ E2 p, y, G# h: g# A- S! K$ x
0071B8C3 |> 57 push edi
7 p* ~/ q* {5 A/ W. x1 e! {0 {0071B8C4 |. 52 push edx
. b3 \( J1 u( R& k% X9 N& s% l0071B8C5 |. 51 push ecx. c1 f% S5 Q/ K& r& a- H/ b
0071B8C6 |. 50 push eax
2 H& d) R; [) b4 J3 n% F0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64], W9 ~, e$ G! q
0071B8CB |. E8 E0BBCEFF call heroes4.004074B0- k* m3 E( F* p
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]* r, @4 p, {- G5 y9 z3 ~% k
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
' l6 B4 Y0 a" h+ H0071B8D8 |. 2BC6 sub eax,esi
6 c" I, j. o6 D& C3 M; g4 E0071B8DA |. 85C0 test eax,eax
6 U: `. P$ ?( E# b0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax- }& x7 |. [7 L7 b5 m H& R
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96; }" ^% X- Z* N# |& {! S
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]! u$ e# R& l! P6 X6 A5 a$ ~
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2
7 c3 Q |. D1 w0071B8EE |. 2BE9 sub ebp,ecx
) `- {6 | ?# s/ |0071B8F0 |. 85ED test ebp,ebp
6 d' F: S% |5 V/ k9 [4 U& `: I) G# ~0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp) Z8 E, r0 @, b. A+ h9 C4 F* E. x
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
' \8 |! s8 J4 x* ?! z0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2 D0 n& H4 W# H) X0 S3 F% r! c
0071B900 |. 8BF9 mov edi,ecx' z. E/ s/ `! \
0071B902 |. 2BF8 sub edi,eax) w+ K% ^" g, f3 ^1 I' a' F
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
. A; M. Z; e6 |$ j6 F$ Z- I; T1 Z0071B908 |. 8BD6 mov edx,esi2 |* U1 s5 {, Z4 e3 q
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx
0 {/ f W% l# I4 q0 ~3 n: w0071B90E |. 2BD0 sub edx,eax
7 y0 f$ I) V( S, H1 z1 ], k' @+ ?- Z0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]- K) o p P" m9 o; m
0071B913 |. 8BD8 mov ebx,eax% P$ z- @9 ?6 b. D
0071B915 |. 0FAFDE imul ebx,esi
& S2 y; L* `: N- H0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
6 X, C. W2 I- B! d0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
: q5 L5 D3 E- k9 @0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]: A: Z/ D# y0 m/ g
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]! L, ?: u/ s3 w/ @
0071B926 |. 03F3 add esi,ebx
' N6 E. y) Q0 Q1 A1 o0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
+ O4 D- p# Z* s8 J% t0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
% \( @% t. l3 P& Q, W0 J6 A' x" ]0071B92F |. 8BD9 mov ebx,ecx3 ]4 l8 K; L! |$ c
0071B931 |. 2BCD sub ecx,ebp& D5 {" U9 e5 A0 Q1 u o
0071B933 |. 0FAFDA imul ebx,edx$ N2 ~# `% H8 A' V1 {% A" k
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
" j f1 c, z, H* ?0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx/ e4 W9 |) X5 w' n; M8 s4 B c4 M
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]( ?% Y8 {7 w: M' w$ Q% J
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]" {9 U* Z! b& P
0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
! i* a6 w6 f; ? p9 n0071B949 |. 2BC1 sub eax,ecx
; A% A1 d/ D' L+ C# J0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax: c, _* a* r! r8 G R
0071B94F |. 03DF add ebx,edi' l( f9 L2 n- G9 {( d- \
0071B951 |. 8BC2 mov eax,edx
" s* k% n+ l5 r$ L9 V+ C" i, Q# S0071B953 |. 4A dec edx
( ^; ?# M3 ?" ]/ a/ c" P0071B954 |. 85C0 test eax,eax) J' j8 n9 x) F. ^ I( B ?
0071B956 |. 0F84 3A010000 je heroes4.0071BA96$ s6 ~/ {5 g( T# {2 @& Q( o
0071B95C |. 42 inc edx
. J( L4 \' A9 N3 v4 T2 E4 q5 x0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx2 d4 j+ S" P( b# `
0071B961 |> 85ED /test ebp,ebp' Q& K" A* v: }& T1 w! v
0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
% Q4 \5 C+ U7 I$ A4 B0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
2 n. l) s* Q' P7 x2 Y! ?0 P0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp2 s( s+ _+ Y* w6 U
0071B971 |. 25 FFFF0000 |and eax,0FFFF' H5 \0 m8 x p; U' m; b, g8 h
0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax/ G6 n& t o4 a
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
( Y, w' i+ n) V# x1 A0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
. d( B( G8 y/ G5 j6 o0071B984 |. 84C0 ||test al,al
9 A/ _2 J: j+ g! y0071B986 |. 74 6A ||je short heroes4.0071B9F29 Y: f5 l- D( Z3 O$ h( i
0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点3 Q+ i4 ~7 n& w- c& \. f" N
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]* j/ r3 v# _, _
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位& A) ~0 i: C' p$ O6 o2 g w
0071B991 |. 25 FFFF0000 ||and eax,0FFFF/ }- ]) F9 z" N6 l2 a6 ^) S1 k6 M1 Z
0071B996 |. 8BF9 ||mov edi,ecx4 Z& [$ T7 R6 g7 m
0071B998 |. 33C9 ||xor ecx,ecx
4 q# ?9 y5 V9 `6 q0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值3 J/ f. `; \. ~
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为07 r7 H/ H' u4 l
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
V6 @) k5 H9 j- n0071B9A1 |. 8BD7 ||mov edx,edi
4 n/ }! a( S5 O) |" w# |/ H' P; G! v0071B9A3 |. 8BF1 ||mov esi,ecx/ o" a0 k0 r4 y7 I' k @. }( I
0071B9A5 |. C1FA 03 ||sar edx,3* o; M- Y) D& n% F5 s2 G
0071B9A8 |. 83E2 01 ||and edx,1
2 F& q( O' G7 k, Q* Z0071B9AB |. 03FA ||add edi,edx' u0 O' k. S' `$ \! W6 ~: @; ~+ p% a
0071B9AD |. 8BD1 ||mov edx,ecx# m) v. i: _5 L. y3 ]1 v
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]" e( @! k- G& [( w* B) i4 r
0071B9B5 |. 23D5 ||and edx,ebp
" R4 Z. y2 O% V3 q- _, M/ ~2 C/ o0071B9B7 |. 23F1 ||and esi,ecx
) n: T; q2 [+ J& w5 d0 k; ^* ]5 c+ v0071B9B9 |. 8BC8 ||mov ecx,eax
9 R4 U5 a1 k( x& l7 ~( I: p0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]2 _) `$ f4 e/ C: J" @
0071B9C1 |. 23C5 ||and eax,ebp w5 Y' g1 C* N; K: Y+ H! f9 C
0071B9C3 |. 2BC2 ||sub eax,edx
+ Y0 r1 `( O$ s# e$ l) O+ L; {1 ]0071B9C5 |. 2BCE ||sub ecx,esi: B( }, W# m& r0 ?% \
0071B9C7 |. 0FAFC7 ||imul eax,edi
) L$ A8 h2 E. e/ D! O8 n9 g0071B9CA |. 0FAFCF ||imul ecx,edi5 X6 u+ U. O% ^7 _% U- x, i
0071B9CD |. C1E6 04 ||shl esi,4
0 e' W% n3 v1 ], i1 t2 m+ y1 \0071B9D0 |. 03CE ||add ecx,esi
+ I4 `6 L$ O' ]$ n, L, w( j- A: I0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
' a! @4 D# {, D; B) }; V0071B9D8 |. C1E2 04 ||shl edx,4
) T+ l- X& q. n( n. G/ |( X6 N% t0071B9DB |. 23CE ||and ecx,esi
, z/ U5 L ?2 I5 u$ @# i) \0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]0 ?$ J7 G. A$ x! X+ K+ d3 E
0071B9E3 |. 03C2 ||add eax,edx) R$ \' |# v( Q( I s5 H
0071B9E5 |. 23C6 ||and eax,esi, E( R, o& c _; L1 F6 X# g
0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
& C; g6 i* Q& t2 v0071B9EB |. 03C8 ||add ecx,eax
- `. J( d+ X" u" g" o0071B9ED |. C1F9 04 ||sar ecx,4
/ {6 T7 Z5 Q* W* S1 v/ `1 S& U0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
; B% n0 {% W* |; G% r/ Z0 q4 ?0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
$ o1 q% F! K& r. v2 S% Z$ L0071B9F5 |> 33D2 ||xor edx,edx" u( o$ Q8 [3 {" r4 t/ O
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF D* T0 l0 j4 M4 S" r. r
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
/ T7 a4 Y0 z7 r. I0 n0071B9FF |. 8BC1 ||mov eax,ecx0 `0 ?( u$ ]0 S/ u2 s0 p0 `# G- M
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位: U1 U4 |6 m. ~+ e5 k9 X- H
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
7 ~ n$ D0 Q8 c! c' _3 x0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
9 |* x3 p- _5 `5 k9 ?, c0071BA08 |. 8BCA ||mov ecx,edx
; i+ h7 J0 c" n( Z0071BA0A |. 8BF0 ||mov esi,eax
1 n+ F) y7 e. V9 Q3 X0071BA0C |. C1F9 03 ||sar ecx,3
. w8 X) d! U' B, |0071BA0F |. 83E1 01 ||and ecx,1
% {2 ]$ U. ^7 w, @0071BA12 |. 23F5 ||and esi,ebp4 V% E: K }4 [! L$ W1 A; o
0071BA14 |. 03D1 ||add edx,ecx
; H* [; w& r8 c0071BA16 |. 8BC8 ||mov ecx,eax/ t* G& T' {( g, J4 {. f& N/ n
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]
( p+ o" L7 N. n" l! R7 x. o) S0 X0 |5 a0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]6 H0 e' h3 n: s: I
0071BA22 |. 23C5 ||and eax,ebp
6 v" d- N7 v9 Z9 x& U0071BA24 |. 23CF ||and ecx,edi
o/ r$ W4 M+ Y/ @( `0071BA26 |. 2BC6 ||sub eax,esi8 x1 i, m9 J' g2 H& i
0071BA28 |. 0FAFC2 ||imul eax,edx8 u. W* ?0 K9 V
0071BA2B |. C1E6 04 ||shl esi,4
1 h- D8 `1 J( N% D9 ^0071BA2E |. 03C6 ||add eax,esi
" K) o* b$ K$ @7 S+ ?0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]2 H, a8 L0 Z% h( o
0071BA36 |. 23C6 ||and eax,esi
* P- k! c6 s* X2 T( I0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]6 G7 W1 r" P: ^' i/ O9 g
0071BA3C |. 23F7 ||and esi,edi
* A& g) e: x# a: q" G0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
8 ]8 E, s- R& M5 w" W3 i0 v' I0071BA44 |. 2BF1 ||sub esi,ecx: l' `& {, s* G) b. l5 d) D8 T7 F
0071BA46 |. 0FAFF2 ||imul esi,edx
9 g' o( H' `- l4 o9 ~& V0071BA49 |. C1E1 04 ||shl ecx,4
* A/ J# R u7 T0 _9 T0071BA4C |. 03F1 ||add esi,ecx
# x/ ^5 A. d9 {/ I+ q0071BA4E |. 23F7 ||and esi,edi' a- t- @& k f
0071BA50 |. 03C6 ||add eax,esi6 P$ M9 z( f& e4 X. v, q
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
/ w, `, N) ]; R# P& T A" l5 s$ ~0071BA56 |. C1F8 04 ||sar eax,4' L- N; V. L+ ~9 S, l3 h
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处/ n' A8 w4 T) L {) i0 H7 r( \" _
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]
) c% p8 k3 d9 A- J2 F6 t/ K0 {0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
/ s3 H9 q% R, a* p) Q3 X* C0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点# s. V! u/ f0 J0 ]/ J9 i) v
0071BA64 |. 48 ||dec eax ; 计数值减13 N2 T, n4 e8 E5 I5 Q7 f
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi7 t, L% |' R' V. L( u* v
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
: k6 a) {+ B* W' }/ S0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
' T! b2 f; W. K( C5 ]# F0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
* p. \% {3 F! k- B! ~& y* w( _0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
1 D9 E/ T; T' L+ L; x# k/ Y0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]) ^$ x7 `2 G; R/ W! A) j
0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]8 P8 u2 B2 x) u- [
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
+ G/ K5 U1 y8 I: u4 S' T0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
1 Y' ~, h& n0 e. x& \ e# A0071BA87 |. 48 |dec eax ; 计数值减16 L2 q7 X" ?& _- n5 j
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi# m. W5 s0 z' ]+ f) m2 u# R
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax5 c1 L/ K Y% N' I1 S7 y! ]
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B9619 V& C5 ^$ F. n6 `. k
0071BA96 |> 5F pop edi; @$ v; g* Y$ m0 @. m
0071BA97 |. 5E pop esi6 n7 b" C. R! s) C: u
0071BA98 |. 5D pop ebp2 ]6 u- w6 l- o* T% j
0071BA99 |. 5B pop ebx
0 O" L# Y. c; o* y0071BA9A |. 83C4 54 add esp,541 S* [- y/ I0 `& Q& p, C C$ O
0071BA9D \. C2 1800 retn 18
$ _( W2 P- y, V& ~0 X& d本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
" V6 s! t, g- H; Q: ?& v7 |* g0 P* W- \7 s0 N
buf[x][y]=func(buf[x][y],zm[x/2][y/2])3 n2 f+ @6 c! q! M8 V' I
1 T3 @4 ?+ U+ Q, r) }1 r
buf:缓冲区二维数组,两个字节表示一个点
7 W3 T0 j& z: k9 y1 fzm:字模二维数组,一个字节表示一个点 |