参数表# ]. D" S& v, R2 k1 p% H% C% [( y" i
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
" Z5 _ Q1 }9 x5 z- ~# c) farg2:字符串宽度 x2 O! T; A2 ]% {. E) k/ H
arg3:y
, {' T6 V6 |9 y" Uarg4:颜色% Q" r* u1 \ X) E6 M4 E: d
arg5:与颜色深度有关, |* m% v+ U4 o# x$ v* e
arg6:与颜色深度有关
$ ~4 E. y6 K+ W: ~% X6 Lecx:字符的编码基地址
! q d M. w6 s5 X$ }+ P; f# a! G
0071B820 /$ 83EC 54 sub esp,54
8 t+ b# ~, T( s; R0 z3 ?0071B823 |. 53 push ebx3 ^! S% U, d, u
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
* G4 _. r: f) @ F: B0071B828 |. 55 push ebp! j* K) Q/ s. J' k; e
0071B829 |. 56 push esi# }* x4 G( F( B8 h" ~$ x1 y9 y
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
$ E8 \, ^ A* I5 s0071B82D |. 8BF1 mov esi,ecx% F/ T: ~7 D- h* l1 N
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
; k: y6 E# V( |6 E0 |0071B832 |. 57 push edi5 \) E8 L* X' {4 q, q' r8 y
0071B833 |. 50 push eax
4 U4 W N6 u; U, e; K7 y) e4 l0071B834 |. 51 push ecx
8 I- [" X8 x( j3 P5 L0071B835 |. 6A 00 push 0- q% p# r( T/ \' ?' {; E5 Y
0071B837 |. 6A 00 push 0( J- V9 h* p1 q* r0 t' P
0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]* v- p$ [5 H' d0 Q; v
0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
" X, [0 S9 |+ ^# L5 e7 F/ A0071B841 |. E8 6ABCCEFF call heroes4.004074B0% d6 b) k8 K8 ^# j, K: v, H
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
; P" M- n$ `& Y1 w0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
, G$ B% a1 M+ `0071B84C |. 52 push edx: @- R0 e2 z B# ^ U1 S K
0071B84D |. 50 push eax/ A( q+ }& \ s! ^8 t8 J
0071B84E |. 6A 00 push 0
+ }. y/ e* F# S6 K0071B850 |. 6A 00 push 0& h. T& Q8 G3 ?8 }& T+ @9 s
0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
C( r4 ~0 g3 N; d0 K, t. h* v0071B856 |. E8 55BCCEFF call heroes4.004074B02 k# T+ Q+ Q2 I1 X
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]' q2 q& T- j8 m7 M# G* H! N( Q
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]8 n$ `2 A' \& Z" b" \
0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C] \) M( v9 `2 D4 k
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx0 a+ a" E |, t" }
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]4 S5 w7 P$ H7 @/ h4 }2 N% w# R; y& s
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx; r4 _) {6 M: w& |/ y* m0 R8 {
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]7 ]) X7 M! _: B. @7 Y8 b! c) F
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx8 w( c4 h5 m7 v) h7 d6 p
0071B87B |. 52 push edx
& f$ |8 p: @* r/ e9 U0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]9 s6 D. E+ t+ b7 t5 q/ o2 r" A
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
& b0 D, b' m) m2 h) a+ o1 s" r0071B884 |. E8 47BCCEFF call heroes4.004074D0
2 K& _% w. s _2 D N4 S7 j4 J0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
; \% M& \2 r) f) g2 }) r$ j0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
; u- G3 C/ D5 p- Y) d5 R0071B891 |. 3BC1 cmp eax,ecx1 C9 u Y; g) w \
0071B893 |. 8BF8 mov edi,eax9 V! P/ Z) a+ D/ H% ?* ^
0071B895 |. 7C 02 jl short heroes4.0071B899
3 b3 B6 e" c& A: k# @2 u. X! n* ^( v0 B0071B897 |. 8BF9 mov edi,ecx
6 u) t9 C' Z1 d- d0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
' Z/ Z% G, T* d$ H3 ^) R, @9 @! ^0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
+ P7 r8 p7 I J8 E( v0071B8A1 |. 3BC2 cmp eax,edx( I/ C& t5 x8 o$ Z3 i2 o5 c
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
/ G5 m; f% k" T; a+ V# j0071B8A5 |. 8BD0 mov edx,eax5 X& A s" k1 X2 R0 u: \8 _ p
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]* F; f2 i7 Y9 B4 Z' Q
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]. C. c# N) Q7 l- M
0071B8AF |. 3BC1 cmp eax,ecx9 |( l4 i1 e1 c% x( U6 x. O
0071B8B1 |. 7E 02 jle short heroes4.0071B8B5) C2 D- Q2 _8 g+ c+ M. g6 n9 q9 T9 D
0071B8B3 |. 8BC8 mov ecx,eax
9 E: |/ W& ^/ s5 H( Z4 w+ a% a0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]: }' w% d7 b: h1 C! I& J
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
7 z; d! _" h, v) ^0071B8BD |. 3BC6 cmp eax,esi
5 M' c! J: B6 ]5 R& p0071B8BF |. 7F 02 jg short heroes4.0071B8C3
5 t, r7 P/ C0 U9 ?5 `/ [0071B8C1 |. 8BC6 mov eax,esi1 y* M! K5 E* ^$ a
0071B8C3 |> 57 push edi
0 E+ V" ?' ~! }! w$ t( L0 W0071B8C4 |. 52 push edx% s9 m" }7 F+ B( s5 N5 m$ e" X$ d. n
0071B8C5 |. 51 push ecx
9 q( j- ~: c' B" V8 n9 [+ j0071B8C6 |. 50 push eax3 x0 O8 n& i# B
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
* v% z3 f8 [3 O. O+ I: _, b4 D- `0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
' W! X0 Y8 x* g/ U) c0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]; q' ?% s# }. G' d+ B" t
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
+ x4 v c: p: \8 p0071B8D8 |. 2BC6 sub eax,esi
; f0 \' l' R1 i7 j6 M7 n$ U# V# j0071B8DA |. 85C0 test eax,eax, G) ?6 Z# T, {' x
0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax% O, [. H- `3 Z+ s
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
, M! A) H+ {% |( z0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]5 }. r2 e% L. c# X% M: D3 R& ^
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg23 K; m6 I2 a+ v( ^4 n
0071B8EE |. 2BE9 sub ebp,ecx8 n! I7 {0 D) `: `! p
0071B8F0 |. 85ED test ebp,ebp* Z/ j( ]% g8 x: s3 _; s& u/ m: C
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp. m6 z) Z$ h5 T7 Z# N- L
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
( |+ h" p- i" m& ^, h0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2
+ m- P+ K' i- O0071B900 |. 8BF9 mov edi,ecx4 f4 |7 K( Y9 d5 C( E/ i: i
0071B902 |. 2BF8 sub edi,eax
' Y, o9 g4 H2 G0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3! H% b% R$ N8 [! R2 j& |7 _3 c
0071B908 |. 8BD6 mov edx,esi
' r' s( @9 {. c0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx: Y' R" I5 d3 a: \
0071B90E |. 2BD0 sub edx,eax6 F5 l% ?7 h( O. \
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
. t" j& v+ q. v d0071B913 |. 8BD8 mov ebx,eax
' Y: e e% L4 X0071B915 |. 0FAFDE imul ebx,esi; P3 T/ Z; i0 j9 G' B
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
/ h7 N; |' R4 \5 `& U; Y9 Y1 n. f0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
/ Q; R4 }0 Q2 |% ?0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
1 v8 I) S; b5 u& c9 M0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
8 L/ k6 L5 }2 D" k0071B926 |. 03F3 add esi,ebx! J- w$ e( f4 V1 Q2 W$ P5 X5 A
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
9 G; \: o) v, F; q: R2 A: x0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
, \3 D# u X; |: _9 ^0071B92F |. 8BD9 mov ebx,ecx" I& O7 F7 b5 W
0071B931 |. 2BCD sub ecx,ebp
1 Q- |. W. A R, s/ G' R8 c, X/ O# C0071B933 |. 0FAFDA imul ebx,edx
/ l2 q$ {3 t& r1 D# o0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]: f/ f4 O& b b0 C4 F, V6 o; W( j
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
/ I/ ~7 M1 O1 i X# Q0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp] x, N, Z' z. K) D9 A
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
1 e% d; {7 |4 d. @: m* U0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18], m/ @- `& ?- g
0071B949 |. 2BC1 sub eax,ecx
* ]% o& P& Y4 e5 m% t. K+ m& ]$ l0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
) l% P5 V5 q( e: w9 `6 S0071B94F |. 03DF add ebx,edi
* O$ m K1 V5 B& \ [) L, C# d0 g. P0071B951 |. 8BC2 mov eax,edx
) L4 w+ L4 E& U0071B953 |. 4A dec edx! ]' B4 ?" s% H9 ]0 @
0071B954 |. 85C0 test eax,eax
9 t' ^( k/ L& f0071B956 |. 0F84 3A010000 je heroes4.0071BA964 B2 w, ]: o* W& D/ a) a
0071B95C |. 42 inc edx3 i! b- p2 b, h" r6 v
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx/ D8 K, r/ i' [
0071B961 |> 85ED /test ebp,ebp
4 B1 v/ q. G9 v0071B963 |. 0F84 0E010000 |je heroes4.0071BA77) v( F5 W7 I' U3 D. |
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]* M3 ~9 x2 Z$ j z B/ ^
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp F' H1 u4 Z! g; r
0071B971 |. 25 FFFF0000 |and eax,0FFFF
; H, t- l' C+ f1 T5 _& Y. E0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax0 ^; N, e/ G9 {8 x% A
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
: I+ G/ a$ n4 C2 ]0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]7 L' f9 z4 c) l
0071B984 |. 84C0 ||test al,al o X. D& J+ p [# K
0071B986 |. 74 6A ||je short heroes4.0071B9F2
2 z' r- `/ L/ [ Z+ z0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点% H" Y$ `+ m0 G6 F* V$ E
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]. v$ A5 l. [% n4 n( Y K
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
! ?" R @& x$ M( ~5 F p5 C0071B991 |. 25 FFFF0000 ||and eax,0FFFF
' `+ u, s' o" k0 T! \' I$ q; K$ c# T+ z0071B996 |. 8BF9 ||mov edi,ecx" I m: g8 H7 ]4 Q9 j1 Q* W
0071B998 |. 33C9 ||xor ecx,ecx" v9 d8 V1 I/ r. E$ M l
0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值: c; W: T8 z& p* M% g
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
1 U4 ]. A. _8 }2 `! g0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理& X/ U5 C4 T7 }
0071B9A1 |. 8BD7 ||mov edx,edi7 ?9 r. V% r v' j
0071B9A3 |. 8BF1 ||mov esi,ecx
K( P0 w @# d+ |8 F6 W0071B9A5 |. C1FA 03 ||sar edx,3) A1 l, N, m. ?/ O' I
0071B9A8 |. 83E2 01 ||and edx,1
, m4 [6 F8 i- r$ |5 f0071B9AB |. 03FA ||add edi,edx
- j( P& D. _! g( m$ K% B0071B9AD |. 8BD1 ||mov edx,ecx
9 s) F% a/ X( l2 H0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104] q- a- ?( X0 J9 i
0071B9B5 |. 23D5 ||and edx,ebp
M0 Q( D: n5 Z$ G8 T3 w0071B9B7 |. 23F1 ||and esi,ecx2 ^8 t% m: A) W _6 a
0071B9B9 |. 8BC8 ||mov ecx,eax3 e; _6 ? Q3 s) F
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]& j a- L- P, d& ~) E2 }
0071B9C1 |. 23C5 ||and eax,ebp
' k" ^3 H* K0 h0071B9C3 |. 2BC2 ||sub eax,edx
4 Q" t3 u4 Y, q0 ?+ T$ t0071B9C5 |. 2BCE ||sub ecx,esi
% N) H. M4 z; ]# B0071B9C7 |. 0FAFC7 ||imul eax,edi
4 L, I# _+ w" v0071B9CA |. 0FAFCF ||imul ecx,edi
4 L- J9 Y) p; _. B- D- s. m$ G0071B9CD |. C1E6 04 ||shl esi,4/ ^: |9 [' W9 U) y x I }, c
0071B9D0 |. 03CE ||add ecx,esi
5 z- p `! N! M8 {- J0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]( ]5 r- M8 T* _9 |$ U' ]
0071B9D8 |. C1E2 04 ||shl edx,4
+ K- A( K! H; k' O3 t0071B9DB |. 23CE ||and ecx,esi- x6 k$ U9 s4 w# J3 U2 p
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
, ^- K5 V+ s+ F( W& l! S0071B9E3 |. 03C2 ||add eax,edx$ j1 ~* y6 V; s7 H5 ]
0071B9E5 |. 23C6 ||and eax,esi
% I9 j/ q* d. K4 a0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
6 t% H [9 b$ F! u& }2 C" X2 I# z! J: U' m0071B9EB |. 03C8 ||add ecx,eax6 o( `7 z$ ^, e' H0 i0 X
0071B9ED |. C1F9 04 ||sar ecx,4
$ V/ N7 ^ c/ s0 u5 T1 E- s0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5$ j- b$ i1 U3 x( y
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi] e" T% W4 O2 s$ c
0071B9F5 |> 33D2 ||xor edx,edx* R# C- @% V4 R7 ]: m/ ~
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF7 ]& E7 ^! Q. V+ g5 N0 k
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
2 A, i5 x, h" U) I7 u, L0 a0071B9FF |. 8BC1 ||mov eax,ecx o5 H; P9 P8 ^; c# E2 h8 P
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
- s: e9 p4 a1 | j6 R' ]' y, I. A0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
" U. \. e) f( T9 Q0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
% r2 h- f4 Y) ?+ |6 m% e( R0071BA08 |. 8BCA ||mov ecx,edx P0 a! A2 G, g# l$ t. W
0071BA0A |. 8BF0 ||mov esi,eax
5 X7 }# L0 o& g( v! F& A0071BA0C |. C1F9 03 ||sar ecx,3- J+ }) V3 s3 ?$ x0 M0 n
0071BA0F |. 83E1 01 ||and ecx,16 Z J/ _) i( ?! R: G
0071BA12 |. 23F5 ||and esi,ebp
( G( g \% }/ e" @* j" K+ l0071BA14 |. 03D1 ||add edx,ecx! S; Z% R6 x" m2 v2 ]
0071BA16 |. 8BC8 ||mov ecx,eax, u; a( @3 h3 G, R) {4 X
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]
; N% I# |8 G$ Y* m0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
: z3 u" E, H* w: o0071BA22 |. 23C5 ||and eax,ebp
% @: x- ]1 R0 T% U. }4 i0071BA24 |. 23CF ||and ecx,edi
/ Y. J+ _. W2 W3 s3 R# i: h. e0071BA26 |. 2BC6 ||sub eax,esi
5 L! |3 C D2 B0071BA28 |. 0FAFC2 ||imul eax,edx* C) f7 J' h) L% |; T7 F8 I
0071BA2B |. C1E6 04 ||shl esi,4' {) f4 g8 @1 E7 M1 T
0071BA2E |. 03C6 ||add eax,esi
9 F( Z3 U! x4 t. [6 E. ]$ G+ J6 ?0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]
6 t# ?2 @ B. _$ P2 e( G0071BA36 |. 23C6 ||and eax,esi3 ^. p7 o2 n, x$ U- l
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]% W% V2 k. Z8 K
0071BA3C |. 23F7 ||and esi,edi, }2 d. B- b) k, N$ t% F: D
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]# o; B7 _& P* h
0071BA44 |. 2BF1 ||sub esi,ecx
3 k# X1 m7 G! P. O- _" G1 i7 [0071BA46 |. 0FAFF2 ||imul esi,edx
% ?* U7 m6 h* g1 S. t+ N1 W0071BA49 |. C1E1 04 ||shl ecx,4. A1 e, u8 a6 i
0071BA4C |. 03F1 ||add esi,ecx% e" b3 @/ v( y* M8 p! m
0071BA4E |. 23F7 ||and esi,edi
. l$ F7 f7 _ F: y. B# F" m0071BA50 |. 03C6 ||add eax,esi
9 }; P' t- W% t1 y# N, C0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]. x; S' z. [6 {
0071BA56 |. C1F8 04 ||sar eax,4/ w4 L( U+ Q( U1 O1 \
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处6 h; k/ Q7 _. S; r6 E
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]
. y9 b! v( V; B. n! p. g0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点! y2 ?1 F# j; \! `( T
0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
* @ q; i2 A* k9 i0071BA64 |. 48 ||dec eax ; 计数值减1( A3 v, V; |) S1 _% C9 c( [$ ~
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
% i) k& M# |/ E$ b& c2 ]0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax9 }: f4 w0 ^0 B* b( o$ \
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
( f2 y5 `( B& j9 @ P* c( [0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
; O! A9 i8 b9 h8 _0 Y2 K; |0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]0 N; i4 Q7 W# w4 E
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
9 j) M9 x! s+ D4 e+ S: `/ x7 b* |4 ^0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]0 ]% r& I3 R" ^% g8 b& ~: d
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
6 @8 D& ]9 G2 I2 {8 u$ g9 _0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
9 m& |9 K7 V. l: e/ G5 u7 `0071BA87 |. 48 |dec eax ; 计数值减1
U2 V t+ N7 t9 C# T/ J2 f; ~0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi, k1 |' M" `4 `
0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax4 m# d" t4 H1 Y7 B! @
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
0 }' J' y3 A0 V! H+ n, r3 E- I8 L0071BA96 |> 5F pop edi- b" |) b: K' b5 K4 E
0071BA97 |. 5E pop esi
. Y4 M* d. K* T2 B0071BA98 |. 5D pop ebp
$ h& \, Q% F% m0071BA99 |. 5B pop ebx, y7 R/ K8 L* t; e1 }9 F
0071BA9A |. 83C4 54 add esp,541 V5 r7 N$ K: X. R9 J
0071BA9D \. C2 1800 retn 187 O9 N& b# c+ h) J A! r8 P
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
/ I7 [; T+ M- G( @, h
) J6 y: Q! g! g5 M! ]* K1 o7 rbuf[x][y]=func(buf[x][y],zm[x/2][y/2]), ` d& H" S4 x4 L& J1 w
2 O$ k2 }/ l* Nbuf:缓冲区二维数组,两个字节表示一个点
# Y' w# F( t# G; L e2 q: Szm:字模二维数组,一个字节表示一个点 |