参数表8 t# `1 P( t! p6 T
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
% h: R, O- N+ R6 x; l4 e; n2 ]arg2:字符串宽度 x
: s6 T$ u- s6 P( X# T& h6 b8 ^arg3:y
0 v5 [, @0 l# K D/ Y' larg4:颜色- a) D7 X1 a# h6 N" i! K8 Q1 J
arg5:与颜色深度有关0 u" F" ~+ y+ L" w+ t2 f2 L* f
arg6:与颜色深度有关
) {8 j6 a8 P7 E1 U$ @. N+ Mecx:字符的编码基地址& s! j) J8 Y6 a- D Q
; v3 B2 e _7 X/ b* }$ ]% S! ^8 B5 |
0071B820 /$ 83EC 54 sub esp,54
5 V# C1 X- b/ w& Q6 K9 L! Y0071B823 |. 53 push ebx
/ O/ x" m% F( e W% s2 Y0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]
- J& [7 m. ~" V7 z( ?& e0071B828 |. 55 push ebp# C( y1 X8 y! U* R' c3 R
0071B829 |. 56 push esi( A: C6 j1 I: L5 E3 {; f
0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]$ M- @2 ^; @; D _& i
0071B82D |. 8BF1 mov esi,ecx
! L" I* I9 ^( h0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]1 l- r6 W! Q5 F, s: J1 Z
0071B832 |. 57 push edi
9 ^& \% Q" @; ?6 J0071B833 |. 50 push eax
* _* a0 {: `% s- K+ Q0071B834 |. 51 push ecx( _3 o0 c/ e' k" h) x9 L E
0071B835 |. 6A 00 push 0
/ s4 e1 I5 p! B& o2 i& j* S0071B837 |. 6A 00 push 0
$ l; f3 `: n1 K: X4 |4 ^+ G0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
4 T3 ~" E1 a& E0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi, @" K7 ~4 t& [9 U( Y( ~
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
$ C8 q& S, _3 t# j0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]
) V$ Z3 G+ A/ z( D# W: D: |% g8 Y0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]
( T* C9 _, s. o4 z0 m0071B84C |. 52 push edx
) \! v+ J* V8 E3 U& f0071B84D |. 50 push eax, u) l! P9 b* ^0 n4 E
0071B84E |. 6A 00 push 0) r, R/ j- D1 r0 M I3 Y
0071B850 |. 6A 00 push 0+ X4 U4 M+ d( t; x! |
0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]) Z" a' E( K: J; V" k# J
0071B856 |. E8 55BCCEFF call heroes4.004074B0
( ?$ C) T; C2 D1 T7 |0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]: D+ q" z9 h4 w) Z! U8 J4 m# p
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
/ ^3 ]* i% L1 W( s% b2 j! p: E0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]
% H; |/ ^% {" S7 X' T0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
5 [% t5 u) }4 d0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
& l0 b5 y) g( `+ ]$ K" _- u1 R( a0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx! n4 D& h2 O1 ?' h1 w
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]
" Q% }" p) c1 a3 x6 q2 v0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
0 s/ [' y2 |0 a) N' O; }0 e0071B87B |. 52 push edx
5 o1 L9 A' X4 _( F$ O: F. r0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]6 I1 ?2 O! l; x$ `2 z2 F
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax4 D" ] X7 O6 p( F3 x ^6 Q
0071B884 |. E8 47BCCEFF call heroes4.004074D0
/ y# ~. B+ ^7 b& T0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]0 D# E4 l# s( [& z; j' W# C
0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
) k, Q/ N7 c9 V* ^$ @+ y0071B891 |. 3BC1 cmp eax,ecx) p4 E z2 l0 T* Y9 N
0071B893 |. 8BF8 mov edi,eax; R# R8 x1 p* p/ w
0071B895 |. 7C 02 jl short heroes4.0071B899
! |8 m- B) B: J) I8 ~' u0071B897 |. 8BF9 mov edi,ecx
" S, G# v& c8 X0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]& O" U$ z/ o7 a# j' r! [5 e- k
0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]; F$ g3 [" j9 s7 h
0071B8A1 |. 3BC2 cmp eax,edx9 S, ~: f5 a6 _4 @
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
$ x- H: d6 T$ ~7 q0071B8A5 |. 8BD0 mov edx,eax! R7 V+ k- d+ v
0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
- J& m6 ~3 J/ u7 h$ l0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]" E$ D& e9 s/ T/ M
0071B8AF |. 3BC1 cmp eax,ecx
/ S9 K# G! J) X0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
( O3 X6 i, Y: W' L, H8 U0071B8B3 |. 8BC8 mov ecx,eax" p" r b5 g( O2 W) P
0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]1 a7 C5 H% K! w3 G/ S) e& F
0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]; V* L; w) P! ], j# T' i
0071B8BD |. 3BC6 cmp eax,esi
* x4 U- z, y/ B# k1 `4 u0071B8BF |. 7F 02 jg short heroes4.0071B8C3) Z5 d5 W) s$ A3 p3 I p
0071B8C1 |. 8BC6 mov eax,esi1 i, R8 f4 e/ z. _: D2 i
0071B8C3 |> 57 push edi! ?& N$ j4 `+ \5 Q
0071B8C4 |. 52 push edx3 J* U+ z) W! O( |; c: V* Q2 M) P0 ~
0071B8C5 |. 51 push ecx
! d( S7 P7 P# q0071B8C6 |. 50 push eax
+ c! r6 b' b. ~( M6 P1 @$ o8 U+ g0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
. Q2 o( J% J/ k0 h# U$ X) H* _- J$ w, W0071B8CB |. E8 E0BBCEFF call heroes4.004074B0
7 U# T' T4 n( U0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]
) ^& K. m9 f3 Q# [( z) L R0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]
$ {+ H) X9 B/ s/ I) m, `0071B8D8 |. 2BC6 sub eax,esi
7 l# [- K1 M; J% `" R, T# H( P0071B8DA |. 85C0 test eax,eax
# S" a0 \: t( [( ?0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax4 H$ E5 K' I! G+ G
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96. V+ `& ^$ ~( n) q' E" P
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
; a. d- w" o! f! b. f3 s0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg24 k0 A$ V- _" \( {
0071B8EE |. 2BE9 sub ebp,ecx; W; H. r5 ]6 d5 f! n" T" K7 F. D' s
0071B8F0 |. 85ED test ebp,ebp4 N' d6 z. F; a3 }
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
8 h0 i( G) ]' ~4 c* e0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96. ]$ n2 F7 P' g! m* M
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg2
% p9 a) Q7 z+ }* U0071B900 |. 8BF9 mov edi,ecx
. \: P6 [8 e, Z$ g3 Y& `/ S- z0071B902 |. 2BF8 sub edi,eax8 C7 `8 r4 ?) V7 L/ v0 F: k5 e
0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3/ V5 K3 C( d& i* p; X6 p3 a5 O
0071B908 |. 8BD6 mov edx,esi
[% d. m2 c: |0 `7 T+ A; s0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx
% ^5 @8 d# h2 G5 p( l2 l, X/ Y0071B90E |. 2BD0 sub edx,eax
/ u6 E" c4 P' f0 }0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C], I% ] m r$ \
0071B913 |. 8BD8 mov ebx,eax1 _0 O5 `1 z# h
0071B915 |. 0FAFDE imul ebx,esi
4 ^' f3 J. Q* Z3 x( y w+ _0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
; n k9 u) S: x1 M( r: O0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]: f2 U6 i1 W) B& K
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]$ d: R$ M2 N3 c5 k! k
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
9 Z6 d p5 k9 `* \9 c" {* o0071B926 |. 03F3 add esi,ebx
. c% A$ b/ a" A! M0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]7 X+ s$ d/ V* S/ f
0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
, H- s. h2 f7 N7 m0 H0071B92F |. 8BD9 mov ebx,ecx
6 {/ w0 s) F+ U" u9 r' O/ V0071B931 |. 2BCD sub ecx,ebp6 H( t. j. B a1 \; @
0071B933 |. 0FAFDA imul ebx,edx8 S' {: Q. r4 Q
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
6 D2 ^& X; M1 o0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
3 c& n: q# ^7 Z' l6 B* d0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]" g1 ]! ?- j! h& b: J' Q
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
& _/ X Q! _1 Q2 z m0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]. Z1 P% Z5 h+ W% t- C! H- }) I( D
0071B949 |. 2BC1 sub eax,ecx
' {# K& _; l1 \; L" `0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax
$ \6 x' R9 b' h+ }; l N& G0071B94F |. 03DF add ebx,edi1 [ ~. N- n+ ^, n+ ~$ s' r# `
0071B951 |. 8BC2 mov eax,edx
4 W, X# L+ E7 q/ L6 k0071B953 |. 4A dec edx, x' d; P4 b$ z2 G$ o/ ]
0071B954 |. 85C0 test eax,eax! k- s/ N- i R0 Y) T6 {
0071B956 |. 0F84 3A010000 je heroes4.0071BA96
- {5 M& ]8 l0 l0 H5 {3 r0071B95C |. 42 inc edx
$ n9 G8 K; T, ~6 ]0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx8 z4 O0 \( b6 z; u4 d( g8 K
0071B961 |> 85ED /test ebp,ebp
, p1 n' l. A+ H5 t; j! F0071B963 |. 0F84 0E010000 |je heroes4.0071BA771 i' Y- L$ n" U1 _' N1 n: R- t# D I
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]2 r3 ~2 ?4 j" z) A
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp; i5 {( K7 I) H4 X
0071B971 |. 25 FFFF0000 |and eax,0FFFF
6 d9 A5 u3 J; Z" B0 f$ o0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax2 M1 ~) J2 a& P9 [7 p
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]& k9 L6 {( {0 ^( M4 T
0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]: O- W& L2 t4 ?3 B+ n
0071B984 |. 84C0 ||test al,al
& F$ B! `% V, Q5 H0071B986 |. 74 6A ||je short heroes4.0071B9F2
" O9 _2 v, O5 A. X, V( l0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点
7 ?8 _: Q' r3 c! j$ U& J0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
6 t5 d/ R. K) Q& k) N$ }0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位! c# J1 }& F9 ^- L5 T4 K* O# Q6 {
0071B991 |. 25 FFFF0000 ||and eax,0FFFF
: f5 H; @" x$ h5 Q0071B996 |. 8BF9 ||mov edi,ecx2 p* H9 B- l; M4 L2 v) f$ {
0071B998 |. 33C9 ||xor ecx,ecx
; r8 I; s2 w$ m3 {! H( X$ i6 W; b0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值5 H) G% H. A# @. g# ^, L- a @
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0) Q9 s/ t# E ]. _$ J& v6 {
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理$ I+ H9 w/ p6 }: _3 L- p* o
0071B9A1 |. 8BD7 ||mov edx,edi
' j( v9 y6 W+ F2 S ^0071B9A3 |. 8BF1 ||mov esi,ecx
! E- [9 t+ _! j5 g( D0071B9A5 |. C1FA 03 ||sar edx,3) ^: ]5 g8 v6 r) C! j( k
0071B9A8 |. 83E2 01 ||and edx,1
9 j7 n" h$ q" s( P; p# U9 P! a0071B9AB |. 03FA ||add edi,edx* ]4 w" ~0 R3 f
0071B9AD |. 8BD1 ||mov edx,ecx1 H3 d, I3 n5 J! m* H
0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
" `! s) U3 l$ A0071B9B5 |. 23D5 ||and edx,ebp
5 f7 B! _; A, R5 c O0071B9B7 |. 23F1 ||and esi,ecx
" J# @. _; \0 H4 i3 Y4 ]0071B9B9 |. 8BC8 ||mov ecx,eax
, q: H4 a! e, E* Q5 S) ]2 @0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]5 C& n1 O+ J' F6 D2 Z
0071B9C1 |. 23C5 ||and eax,ebp0 |7 U( E: J) K; \. a; Z% U
0071B9C3 |. 2BC2 ||sub eax,edx
4 @4 ]( v, ~; n! u/ R/ }! w& W0071B9C5 |. 2BCE ||sub ecx,esi# _" {" s: [( p8 P% p
0071B9C7 |. 0FAFC7 ||imul eax,edi8 @$ c! `. P6 E. J5 `# n
0071B9CA |. 0FAFCF ||imul ecx,edi
7 r+ Z6 x: w( Z& q: h0071B9CD |. C1E6 04 ||shl esi,49 ]) K1 @3 b; B, E
0071B9D0 |. 03CE ||add ecx,esi, |. V2 x1 R) {( W
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
2 u5 Y* ~; @8 I+ M9 V0 w& @$ r2 V+ W( }0071B9D8 |. C1E2 04 ||shl edx,45 ?- }) |9 S2 X! ]
0071B9DB |. 23CE ||and ecx,esi1 l# w' j9 }7 x! R$ D4 E
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]7 G6 j: {1 O8 ?9 x A |
0071B9E3 |. 03C2 ||add eax,edx
- f8 ]5 q" P6 a6 N5 P+ r: m0071B9E5 |. 23C6 ||and eax,esi
% O: q2 q" t, ~+ i7 q) J1 d0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]) L2 O, }( b4 q5 r- D# R
0071B9EB |. 03C8 ||add ecx,eax
2 S( z! N% v8 J0 G I% E8 ]# U0071B9ED |. C1F9 04 ||sar ecx,4
3 F1 f! n$ Y* I0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
n4 F [( s6 A0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]! @- L0 b1 z: W
0071B9F5 |> 33D2 ||xor edx,edx
4 d% h/ i; \1 V5 d' m2 G7 M0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF6 |1 f; X2 c6 e
0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]
6 z2 Z3 V2 s: `2 c$ Q0071B9FF |. 8BC1 ||mov eax,ecx
+ d9 P3 B4 g3 `9 o0 L' G# R2 `: L# G5 Z0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位 S6 y( V# ^' `; H, n' N
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0- d: G ~. m; C/ T( {- b
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
+ `+ a( F$ i$ b+ W, x8 Y0071BA08 |. 8BCA ||mov ecx,edx
1 @+ M! J0 \8 j" I7 b0071BA0A |. 8BF0 ||mov esi,eax- U* ]* u+ b; t2 j& Q% K4 X0 r" |
0071BA0C |. C1F9 03 ||sar ecx,3
7 e5 Z$ f2 O+ J+ z+ b$ Y# ]9 M0071BA0F |. 83E1 01 ||and ecx,1
1 p, M6 |5 B( \3 t6 R0071BA12 |. 23F5 ||and esi,ebp8 ?0 H* g5 R8 }. U( h& U6 s; ~! B
0071BA14 |. 03D1 ||add edx,ecx
3 M; W6 _$ y9 L6 u+ y2 {" s A# v0071BA16 |. 8BC8 ||mov ecx,eax
1 \3 l' ~; I' M. e8 N1 C0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]
. F5 P" n2 u9 M* N4 U, b3 E6 c4 G0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]
$ o+ n2 X7 M' B& x) N2 [' z- n0071BA22 |. 23C5 ||and eax,ebp
, |* c( |' l, k" d% A5 @" J2 Q3 m0071BA24 |. 23CF ||and ecx,edi* y' E! a5 G- O7 F) F- z4 i
0071BA26 |. 2BC6 ||sub eax,esi
0 L w7 d' Q) y5 @, e* U. }5 E, \0071BA28 |. 0FAFC2 ||imul eax,edx( q' z( D2 O! A6 m/ }4 P
0071BA2B |. C1E6 04 ||shl esi,40 j3 R0 Z0 Y( ~: g9 A
0071BA2E |. 03C6 ||add eax,esi
2 N* e. |- H& w# ~3 M0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8], b# a) a4 D0 [8 A
0071BA36 |. 23C6 ||and eax,esi
1 K0 p3 L: z( l0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]7 D" `$ ~! M7 t- p" d
0071BA3C |. 23F7 ||and esi,edi- I& [3 n6 l0 Q: H
0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
) e- T% L# w% O6 D( |0071BA44 |. 2BF1 ||sub esi,ecx. K& J K, x% t: H# D1 x( T
0071BA46 |. 0FAFF2 ||imul esi,edx
?$ w6 o& M$ G. `& V% g9 e0071BA49 |. C1E1 04 ||shl ecx,4
2 g2 z- T; B% I. ]; G0071BA4C |. 03F1 ||add esi,ecx+ I8 u$ N1 x4 R6 [- @. u
0071BA4E |. 23F7 ||and esi,edi
5 G, J9 G! b( Y# `0071BA50 |. 03C6 ||add eax,esi
; Z& F6 i" `( ^! S9 G0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]! V7 Y, m9 Q/ E, { m( ]% z8 s
0071BA56 |. C1F8 04 ||sar eax,4
' R1 a# a# @# }+ V; \0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处' Z) M# ^7 h" q. }
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]
' H' a% F4 z8 }0 I! D0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
( u! T1 ]. m2 \7 s( O" i0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
9 e- ~6 f4 K6 g2 p& J3 \0071BA64 |. 48 ||dec eax ; 计数值减1
X, H" a6 J: f% ?- R0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi6 H0 V5 O% u- Y2 G% T
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax+ {. g; u0 A5 Y! c8 X
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
) k9 ]$ N3 K* k+ H0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]+ A! x6 E8 U. A& R7 }3 }
0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]6 ?( @8 i& C0 a+ }5 Y0 M
0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
5 Y: K$ K) ~! J: K+ U, c2 r0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
' S( ~8 C9 l$ G5 \0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点
0 _5 G( O( |. y- H8 N0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点! M+ m' R; t S- O+ z
0071BA87 |. 48 |dec eax ; 计数值减13 a; N3 P# T2 ~1 f3 W* q; Y
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
; j2 h, e: H9 \0 x$ @0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax" T% s& i6 Z! S6 m7 Q9 S( @0 X
0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B9618 I, B8 F; [; @' G- U
0071BA96 |> 5F pop edi
: |5 L) c7 x- Z5 C0071BA97 |. 5E pop esi4 d. [/ i4 W( K$ q
0071BA98 |. 5D pop ebp
i7 t' r. W/ E( Y" d0 D0071BA99 |. 5B pop ebx4 `+ D( b; ?( m! B. \
0071BA9A |. 83C4 54 add esp,545 H4 [2 _9 w2 V
0071BA9D \. C2 1800 retn 180 J( n% O$ r' \; v
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:/ V. D- j: R+ L0 ^8 p5 W, P7 S
. q+ F/ Y* E' u. X+ F) Q
buf[x][y]=func(buf[x][y],zm[x/2][y/2])
! j' e+ i& J+ x* D( d
: ?5 i- J; w$ Bbuf:缓冲区二维数组,两个字节表示一个点# y" h- X, }5 y% y% c
zm:字模二维数组,一个字节表示一个点 |