参数表
E9 B, e/ q' r8 r$ \6 U. i% barg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
" ?! `3 }( g C- r6 Carg2:字符串宽度 x' Q7 O" n& _$ `. P, w S( E
arg3:y
* I$ v' `9 {$ |' X6 x- y) \arg4:颜色
8 a, O/ V% Q5 E* }, rarg5:与颜色深度有关
R4 Y, |4 e" w, e6 carg6:与颜色深度有关 e9 b. R4 a: B% W' j; w/ y
ecx:字符的编码基地址
6 U, W8 b h; [! z! s# \$ Z& T/ f! _0 L
0071B820 /$ 83EC 54 sub esp,54; K. K F6 U8 N- o/ u0 X
0071B823 |. 53 push ebx1 ~) g9 q% w9 J8 {) Y: J( E5 [
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
5 Q4 d; `% n1 {. g% f+ o0071B828 |. 55 push ebp
* \( A, ] \4 X2 f- A, ^# E0071B829 |. 56 push esi
/ p4 P' y, W: y0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
" _. H- m" V1 o# ~ Y' _0071B82D |. 8BF1 mov esi,ecx
( r) L9 w9 \5 `* N0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
5 R l. D: d& I) d7 p" [+ S0071B832 |. 57 push edi
3 U+ k! K) H2 [2 e9 `/ a0071B833 |. 50 push eax
- v8 D1 [; A% h4 _* g0071B834 |. 51 push ecx
$ b8 e( s; B6 W) o3 K; ^. b0071B835 |. 6A 00 push 0* w7 ]0 |' M% h' B
0071B837 |. 6A 00 push 0
& V" ~/ H% \. C2 a# e0 C0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
8 @! Z! t# \- h, P9 |% F0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi1 Q; ^ l$ D! r
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
% S: z1 ~1 T' U4 O0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
, }9 w5 z! j; v/ H, @0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]4 K$ w4 R: z' m2 I3 ~
0071B84C |. 52 push edx, [6 k x: M' [$ _
0071B84D |. 50 push eax
. G; h8 z ~$ p+ x* |1 O6 z$ y0071B84E |. 6A 00 push 0+ y: j' ?+ l0 u$ i0 E2 C
0071B850 |. 6A 00 push 0
/ R6 f8 N {% s% y& L2 s$ M& l0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]5 l, D" m" P/ O+ x. R
0071B856 |. E8 55BCCEFF call heroes4.004074B0
& S; |' j+ C! u; h: F1 r0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
g6 C5 n+ n9 G' \. \; H0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
; [% G/ I2 K6 u x: C/ ~7 x% P0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]2 `: |3 n( ~7 }1 C9 R
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx2 ^8 V/ }0 ^6 \; {& h i' J
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
" r( `% i( W8 j. N1 E8 a& C1 W/ y0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
6 h5 c0 a. t% Q5 {9 i9 f0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
- f( k9 @7 m# {8 p. i0 ?% s0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
; Q n1 @. F; i4 T$ u. G2 X0071B87B |. 52 push edx
- T5 l8 O- U2 _ o; g& A0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
* b6 O/ B8 |! a# ^4 }; U0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
- P4 v; x6 }8 s' p k6 q3 w0071B884 |. E8 47BCCEFF call heroes4.004074D0
+ n2 I1 |! S6 }) ?0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
! \" t6 U9 T1 `4 O" Q+ v4 d: c0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]( Y- H$ x* Q) x! p
0071B891 |. 3BC1 cmp eax,ecx
' E7 _4 O( C) K4 }3 D# z0071B893 |. 8BF8 mov edi,eax9 q5 @) I& |- Y2 I- ]
0071B895 |. 7C 02 jl short heroes4.0071B899
! R, |0 m2 ]- \: x0071B897 |. 8BF9 mov edi,ecx% R% G7 H4 ^ I6 x
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
8 E- p/ X0 W0 A+ Z/ I, e$ X9 s0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
6 d) \( A2 u& z. I) t( Z0071B8A1 |. 3BC2 cmp eax,edx+ ]$ y: X3 L; k) @0 s; y! U
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
$ J, ?# _' u# ?+ f& P& T* |+ G0071B8A5 |. 8BD0 mov edx,eax
1 c( C( B8 F3 i' M1 A0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]& Z1 L. g9 E: K/ Q
0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]' B8 @$ ?1 }6 @8 E) l* M! y/ t
0071B8AF |. 3BC1 cmp eax,ecx
, v" M5 e3 m2 S& F) s0071B8B1 |. 7E 02 jle short heroes4.0071B8B5! b/ A9 X% E k- y
0071B8B3 |. 8BC8 mov ecx,eax1 w; q6 l) B ~. V/ K4 E: b1 g
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24] ~) [4 Y5 b! p- y4 T3 n H, q0 m
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
1 ^2 Y0 u7 e- `% n( N( ?1 c0071B8BD |. 3BC6 cmp eax,esi
% A- i' ?3 g0 r% [6 ~( Q- ?0071B8BF |. 7F 02 jg short heroes4.0071B8C3
4 _# \# I& H$ r$ W) x# w- ~- j0071B8C1 |. 8BC6 mov eax,esi
8 u' s( f) J) O. f( ~# _2 B0071B8C3 |> 57 push edi
0 D8 V" m, p7 V) a+ K* o8 P0071B8C4 |. 52 push edx
+ v0 \! ?4 B) L1 |- G9 y' E0071B8C5 |. 51 push ecx/ G2 w, ^! K# z' F( |2 n9 }
0071B8C6 |. 50 push eax: A8 J+ M. ]3 ^9 K8 ^
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
* {6 i: i7 W; }0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
9 a1 a0 W" P' b/ S9 T& T' u1 L0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]6 L6 c6 }. m' U+ i' e. q; u
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]' |4 R$ _4 {1 n4 @! x- }
0071B8D8 |. 2BC6 sub eax,esi: `6 [. _0 z8 T$ O2 G9 j
0071B8DA |. 85C0 test eax,eax
5 u+ S4 i1 F6 e) @; X0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax" l8 K, n1 h q T
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
% `6 N( c3 h# ]' ?$ b. |0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C], P* h- a/ i& u
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2; l. ?6 s- p4 Y/ b
0071B8EE |. 2BE9 sub ebp,ecx M# b+ q- _3 k1 k- q
0071B8F0 |. 85ED test ebp,ebp
" j) ^; i6 X% T$ F0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp' c0 j* ^7 d& u$ j8 H* T% P
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
2 }* ^6 l Q3 k. d* w( Q8 {0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg25 y2 ~2 ^" E5 V
0071B900 |. 8BF9 mov edi,ecx, I0 {1 e$ O, _( b8 L
0071B902 |. 2BF8 sub edi,eax6 q% j7 j7 t, Y& \6 J9 k: g
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
1 [, V' i9 S" S( F1 G$ `: E R! |0071B908 |. 8BD6 mov edx,esi7 v' e0 \- g& p1 z. f u! H
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx! M; Q' Z" I7 h" T
0071B90E |. 2BD0 sub edx,eax
# A I# r5 P" G8 | x! _$ a0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
$ d4 e5 a0 E9 R$ I7 T I2 N0071B913 |. 8BD8 mov ebx,eax( f D6 j3 J; Z
0071B915 |. 0FAFDE imul ebx,esi) d% | p, N8 P, J9 l! Q
0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]. q3 v4 U5 w0 n) ^; l1 A
0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]* U* Q" T5 A. u% k+ O5 o
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]
$ L2 r( ^: D e0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]5 X W; y( Z2 M1 `* o) T; U
0071B926 |. 03F3 add esi,ebx
: a8 P- q c7 f9 W$ n/ r1 u$ V! O$ \0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]* _8 O7 J* [4 t' J/ V2 G
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
( c4 _7 B7 B2 h1 Y$ n0071B92F |. 8BD9 mov ebx,ecx
, |% d* o8 h; t' `0 C+ t e/ n0071B931 |. 2BCD sub ecx,ebp
" Q+ [1 O$ R! t: ?. P0071B933 |. 0FAFDA imul ebx,edx
6 t" |8 n: f% j0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]3 W7 }3 d! ?, R$ ^- w/ l4 i
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
9 D$ X! ?6 u$ N& C% p1 u+ [0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
* l9 }+ n+ C( R( p/ y0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]& ^: w; }4 I V2 K+ o& W3 B
0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]3 Z7 p' Q7 z) |; q
0071B949 |. 2BC1 sub eax,ecx
2 B* i+ _- @" \4 m- V% z0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax: x4 b: v8 j( @& w! t
0071B94F |. 03DF add ebx,edi9 L8 m( Q! v; k
0071B951 |. 8BC2 mov eax,edx4 d) G" h! r' Y3 b% o
0071B953 |. 4A dec edx
- z9 h* V# K$ ]* m# z( i Y0071B954 |. 85C0 test eax,eax; ?; i0 H3 l" A W* A
0071B956 |. 0F84 3A010000 je heroes4.0071BA96
! O# A9 |, p& o$ Q, H. r1 \0071B95C |. 42 inc edx- X8 w$ B2 W) H
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx [3 E7 P) O7 G1 ?0 j
0071B961 |> 85ED /test ebp,ebp2 g& i3 l+ c! X( M
0071B963 |. 0F84 0E010000 |je heroes4.0071BA77# T! @! T8 }/ p& R
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74] A; Y4 z0 n9 x8 N) W9 Y' X. _
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
, w( _, o9 a1 q/ S6 P) d, c0071B971 |. 25 FFFF0000 |and eax,0FFFF
7 V2 {8 f& E) `8 h7 o$ M+ f0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax1 h1 w* v [* z1 D! v6 {
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
. l. b) c6 z' U2 X0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]- u2 l+ S$ T7 S6 n& ^
0071B984 |. 84C0 ||test al,al3 }* s+ ]1 |" K
0071B986 |. 74 6A ||je short heroes4.0071B9F2
9 K# F2 T* l; V" a7 p0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点2 ~" i" i; z- |5 C
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
3 [& h! I8 y" N7 L$ _! b% t6 D! _0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
g. E& u$ u8 y7 P- K0071B991 |. 25 FFFF0000 ||and eax,0FFFF
- c( R5 Q4 `) Y' ?2 s% H4 l0071B996 |. 8BF9 ||mov edi,ecx0 O3 E/ q" u* S
0071B998 |. 33C9 ||xor ecx,ecx
8 j2 [$ z/ C' R" ?. \: I% C. S0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值
/ z9 a" t; R2 h( A+ i5 U0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0& C) O3 B+ M% d: v& @5 P6 T
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
- Y" _- T9 m% x6 q5 A% x0071B9A1 |. 8BD7 ||mov edx,edi- a" i! F+ ~ L/ O! @
0071B9A3 |. 8BF1 ||mov esi,ecx& s) k6 c4 a2 w; @- p, F
0071B9A5 |. C1FA 03 ||sar edx,3. z8 s s# [- X1 p: g
0071B9A8 |. 83E2 01 ||and edx,15 G0 j! Z" }2 W5 {) C8 F9 E
0071B9AB |. 03FA ||add edi,edx
& d8 Y: l) Y" u7 M% a O0071B9AD |. 8BD1 ||mov edx,ecx, @) Q/ u! u4 q4 w" m o9 e: H
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]/ v6 [7 E5 X% z4 k6 J- b) P/ f
0071B9B5 |. 23D5 ||and edx,ebp: b0 U2 M0 }" j% \/ U
0071B9B7 |. 23F1 ||and esi,ecx9 M. f, t* b- z/ F* }9 C! N
0071B9B9 |. 8BC8 ||mov ecx,eax( {4 }0 d u5 `! O# [3 T) H
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]
3 G( g" E! M6 k: ^" v2 S0071B9C1 |. 23C5 ||and eax,ebp
7 ^$ ]: e3 W) ?3 B$ d% b0071B9C3 |. 2BC2 ||sub eax,edx7 ]7 {) d2 e/ \3 \' H, I
0071B9C5 |. 2BCE ||sub ecx,esi
$ S$ f7 B0 q$ M& I ?$ _0071B9C7 |. 0FAFC7 ||imul eax,edi# y2 i/ T: U# L" B
0071B9CA |. 0FAFCF ||imul ecx,edi5 g) p: P! E# F, n2 [* e# e3 S
0071B9CD |. C1E6 04 ||shl esi,4
/ o8 m, }; h# E, _7 B0071B9D0 |. 03CE ||add ecx,esi+ j$ U& U1 j5 r0 X4 }
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]! a- o4 A0 C. M4 n- M7 _
0071B9D8 |. C1E2 04 ||shl edx,4
w f, \" f9 l2 |0071B9DB |. 23CE ||and ecx,esi
$ ^- s" p" f, k5 ~6 A6 b0 J6 i, G6 L0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]2 r; e2 i8 }" _
0071B9E3 |. 03C2 ||add eax,edx& ~. ]$ }3 \6 u# H
0071B9E5 |. 23C6 ||and eax,esi
& w: y- W; S6 W! M- I7 N0 d0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
. Q& C/ q+ f. R8 K- w* J0071B9EB |. 03C8 ||add ecx,eax4 b- p) t8 r& x. ~0 a2 I: e9 |5 z. e
0071B9ED |. C1F9 04 ||sar ecx,46 ?( E" I. M4 h! j3 ^
0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
5 Q3 [5 n2 K |( r4 x0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
0 _/ p4 ^/ n: z' v8 v' E0071B9F5 |> 33D2 ||xor edx,edx o8 U0 C# S: ^" p0 ~7 P, o% C. e
0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF
2 r) V0 C4 p4 ^( Z0 R( V0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]& ]7 K+ W/ `, D- {/ L8 N' Z
0071B9FF |. 8BC1 ||mov eax,ecx
6 k. e |( ~6 i7 x1 E8 ^- }0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位- |" x2 ]8 w5 I% ?
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0
9 m& p# D- p: V# Q/ I8 W0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理 p! e, M3 N$ g- H
0071BA08 |. 8BCA ||mov ecx,edx
8 h* ~5 \, t) t S# E: S5 U& Y, J0071BA0A |. 8BF0 ||mov esi,eax# D( d6 q& H; S2 w1 m
0071BA0C |. C1F9 03 ||sar ecx,3) I4 ^: G6 M6 }' I, Y
0071BA0F |. 83E1 01 ||and ecx,1" r& B$ K1 U+ ]6 {5 g
0071BA12 |. 23F5 ||and esi,ebp" ~, L _+ A+ R( F$ Y
0071BA14 |. 03D1 ||add edx,ecx
7 q9 J. U; n( } c+ ^; a0071BA16 |. 8BC8 ||mov ecx,eax/ k2 C; ]0 G1 k4 C7 V, t) W
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]5 w$ B+ E( z: p6 v% o j
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
- Y/ a# z V1 X! Q i0071BA22 |. 23C5 ||and eax,ebp
) E; B+ I6 [! |0 b0071BA24 |. 23CF ||and ecx,edi/ q# j3 }; q: n9 _: u* }
0071BA26 |. 2BC6 ||sub eax,esi
p# c- J9 ]- Z+ n* R: Q% R0071BA28 |. 0FAFC2 ||imul eax,edx0 B( x9 i4 J% l: l' V' w
0071BA2B |. C1E6 04 ||shl esi,4
4 h5 N) G4 O) ?% }; v5 `7 [0071BA2E |. 03C6 ||add eax,esi; F. b) }& y$ B7 |7 O9 p+ _
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]3 y6 q- z5 E8 ^5 F" i, S( \
0071BA36 |. 23C6 ||and eax,esi1 \4 n3 c- k, H2 O
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]' X- @- x) y. Z. N2 |% y
0071BA3C |. 23F7 ||and esi,edi5 M7 ], ~' d Z& S0 u5 z
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
. U2 x: |7 j( q7 F5 e: u0071BA44 |. 2BF1 ||sub esi,ecx9 P. A" z/ h% c& X+ Z2 A
0071BA46 |. 0FAFF2 ||imul esi,edx: M4 u3 C, U& I+ l0 W5 T6 K
0071BA49 |. C1E1 04 ||shl ecx,4; h; X( l- P) V( h) a5 M! t
0071BA4C |. 03F1 ||add esi,ecx
: y( n8 q/ u$ J- E5 X+ C0 |0071BA4E |. 23F7 ||and esi,edi
p U3 Y- K* l3 h/ q o0071BA50 |. 03C6 ||add eax,esi
, `+ w/ t. M' n% L7 _6 P* W4 H0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]$ B+ |0 _6 |+ a6 ^
0071BA56 |. C1F8 04 ||sar eax,4. W: q$ F8 {, w- W- Y
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
& ~) s/ v) v6 e2 B0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]- h7 D$ m0 H2 D0 w
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
" g: ]% e7 N- i* C4 e! P- `7 \0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点7 ?, Z+ \& f7 I- v7 D ~+ `" ?
0071BA64 |. 48 ||dec eax ; 计数值减1
L4 `0 N4 i, j* e# [0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
3 j n3 T% A2 T+ u0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
1 ]3 X3 W) M6 l- Y) r& v0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A1 h: n( a' M' P8 Z/ |, D
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
5 D1 N- D3 S5 r1 d0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
5 |/ s/ h; f% E* ] f; a6 b0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
# r: L3 l H1 O& t0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]* h q' r9 R# D) M
0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点" W2 q7 F3 ~/ J5 G2 b
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
: ]' X0 K, n; R# n. E2 ]0071BA87 |. 48 |dec eax ; 计数值减1
- s. }( B# X, ^; p/ l0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
$ E4 E& F1 V& [6 e0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax" M" M4 G% A, H' v" Q5 f% z
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961 j% P1 o( P9 L1 L1 s/ W
0071BA96 |> 5F pop edi3 S: H2 p E, o) L7 A- J: B1 `
0071BA97 |. 5E pop esi" C _! G" M: _: i; d" t
0071BA98 |. 5D pop ebp
+ _' P& ?' c2 h# r* d# S" A0071BA99 |. 5B pop ebx0 d" u! ]: B- j8 e5 d# T' o
0071BA9A |. 83C4 54 add esp,545 O$ w$ D7 D. a4 b' m
0071BA9D \. C2 1800 retn 18; I/ q' K: }; f+ G! s' H8 b/ Q
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
+ x3 b7 L4 r8 |7 D+ J# x; ~' h. Y6 u2 v7 V. o1 O
buf[x][y]=func(buf[x][y],zm[x/2][y/2])( X( \; k" y! L9 n% [
' c2 B! Z/ k3 A! K$ P( f
buf:缓冲区二维数组,两个字节表示一个点 i+ V* i' q4 Q1 d9 A7 F( C
zm:字模二维数组,一个字节表示一个点 |