参数表# b* Q) [% f' r5 ^8 M
arg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
6 ~+ P/ o+ ^7 V' uarg2:字符串宽度 x9 b, N+ E- } `: D
arg3:y9 e' D5 ~3 }- h$ j& H" ?% [
arg4:颜色3 R: i; o; V1 n. f8 `: P! t$ ]# E
arg5:与颜色深度有关5 ?. ]* b$ ^* A2 ]
arg6:与颜色深度有关
" ^6 `% f& O9 z: P, c/ ~4 K& U7 Becx:字符的编码基地址
$ N7 S5 `! s2 m8 G5 Y8 c6 r" O% ]; e: o9 S+ V' B2 K/ n9 @
0071B820 /$ 83EC 54 sub esp,54
: w/ l( O+ ^( z( Q( p! ?. E0071B823 |. 53 push ebx t m0 h* n; f- V
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]* ?0 z- Y- {% K. ?+ ?8 j5 C$ P
0071B828 |. 55 push ebp+ o5 Z! `1 ^" a" Q: K' W
0071B829 |. 56 push esi
/ ^( s3 b# ?, k5 r+ ?8 Q0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
& ?2 l) {; T4 V% o7 R0071B82D |. 8BF1 mov esi,ecx" _/ B( H; s% ^( b8 J
0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
( U' G* ^: s! Q7 o; j; p0071B832 |. 57 push edi
1 c3 q6 h( \' ^* e2 v1 W: I0071B833 |. 50 push eax
! }! W! S% i1 P' t9 W1 M8 h5 h) K; L0071B834 |. 51 push ecx
X( R1 U! r+ `3 @, v7 R3 q0071B835 |. 6A 00 push 0" C# }6 P0 n- g8 ^! X+ o( c, a ]
0071B837 |. 6A 00 push 0
6 B6 K4 X) }. s: a0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]
( Y5 G% Q: o! a) L0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi
8 Y: {* o% K2 j' @% U2 `$ F0071B841 |. E8 6ABCCEFF call heroes4.004074B07 K" u" T) y# Q, Y# G
0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]3 U. `5 [9 c& }7 C& D0 s
0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]) N9 K9 F, V0 s5 p2 _0 s7 [
0071B84C |. 52 push edx5 k: D4 S/ ~' ]3 o+ \: L- J
0071B84D |. 50 push eax
/ B- S0 W4 l5 s8 \. J0071B84E |. 6A 00 push 0
, p, y9 o; C6 n4 N0071B850 |. 6A 00 push 0
0 ]& j2 T$ P) Y/ y0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
; E& H7 y) H @3 F# w0071B856 |. E8 55BCCEFF call heroes4.004074B0# v7 V+ r2 W/ O* ]/ ~
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]$ z) S( c, W- C: t: N8 O9 ?
0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
; g0 }# v, s7 |- c7 I0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]$ F) A P9 A* S+ b2 v6 E0 l) N
0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx7 R5 l7 I5 Z7 u. R2 E: ~4 D
0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]
& n: p* g) y; u( _0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx
8 i: w! P0 F' q# @- H6 v, M- O0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]" q3 I4 e' g: `
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx( u1 r2 I: `7 s- C5 v
0071B87B |. 52 push edx
6 w/ L( V3 W) Z4 n! {+ e9 p0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]& d( [1 b/ r! r/ s% Q6 a1 H o
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax1 ~) |/ \6 T7 ^8 |( i
0071B884 |. E8 47BCCEFF call heroes4.004074D0
+ ]/ c8 r( R* r9 p0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
$ w1 \! q: K% E4 h5 Q0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
- L. V/ V7 F. m' K0 [6 {# d3 V5 C0071B891 |. 3BC1 cmp eax,ecx
$ d; F; g, h2 s$ I! D& Y% j- ~7 A0071B893 |. 8BF8 mov edi,eax5 J3 ]& t" a) x ?8 H7 n0 C* I
0071B895 |. 7C 02 jl short heroes4.0071B899" c9 Z- u( T6 s( u
0071B897 |. 8BF9 mov edi,ecx
; z# S$ f8 F; r0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
. p" ]3 G8 K! Z1 J0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C] e' l0 L5 t# K
0071B8A1 |. 3BC2 cmp eax,edx
2 T- ~4 b# D% a/ a# y' d0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
" x' d- n! |# o" \0071B8A5 |. 8BD0 mov edx,eax
: ?% M9 H- D) M) p9 I& S( F3 W0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
8 T3 A/ b! V0 V* ~; p0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]6 D/ [/ ~$ U4 @( N W2 V; H. ^4 _% d+ i
0071B8AF |. 3BC1 cmp eax,ecx' N/ L {/ D2 T; R) h+ [: d/ a6 h
0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
& {4 k( Z4 g2 p: T0 J9 f( \$ e7 V0071B8B3 |. 8BC8 mov ecx,eax
* ^$ I4 Y; Z* l1 H0 U& t0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
# ^) G7 G/ f7 ] R8 n5 ^0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
1 S4 V D: c' I: W0071B8BD |. 3BC6 cmp eax,esi. y3 ]% l8 W6 P& l4 y+ G1 ?
0071B8BF |. 7F 02 jg short heroes4.0071B8C3, Z: d% H& w: _/ h
0071B8C1 |. 8BC6 mov eax,esi- Y7 b8 K. g4 s0 B- P+ a& V
0071B8C3 |> 57 push edi
" }( s$ N( Z2 x* M0071B8C4 |. 52 push edx
& l6 E0 U$ }, }: m0071B8C5 |. 51 push ecx
6 r) Z: w) H( O. J: M" e' m* |0071B8C6 |. 50 push eax
b9 H9 W7 a+ \0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
3 n1 L/ H) K" L3 o- M; S" g0071B8CB |. E8 E0BBCEFF call heroes4.004074B0- C: M: ?: N% ^( D' |# a
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]5 f" @2 b6 }9 H9 s
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58]2 m) @- ]% l1 `7 ?) q
0071B8D8 |. 2BC6 sub eax,esi
4 ~! Z' a5 H: O% v; L* ^( a0071B8DA |. 85C0 test eax,eax
0 D& E, a& ?- W) }3 }( T0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax
) s& ?3 U6 K, {& t$ B0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96
$ J6 W' O- y L% x- l0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C] ?# n5 C/ O+ Q- B! e4 T: n0 Z
0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2+ o% }2 T) a* u/ G* Z* ?& P5 y
0071B8EE |. 2BE9 sub ebp,ecx
" c' ~: T( h, U+ V0071B8F0 |. 85ED test ebp,ebp
0 @& `" d5 H, B. x) K! K" h/ t# e0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp" |' ]* u; ^" c; N, L, S3 a
0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96
/ {- `0 [ c1 h6 T- D( k2 B0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg24 F6 e% W" J$ k+ @9 D- \
0071B900 |. 8BF9 mov edi,ecx" K* |; @" F+ G- F, ^" i, b" `
0071B902 |. 2BF8 sub edi,eax
; `( Y: u0 G: Q1 I0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3
" ? V Y! R& x: ~* P4 {* W0071B908 |. 8BD6 mov edx,esi
5 G [8 x; ^9 T0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx
/ u" S t1 V' s, A) ]0071B90E |. 2BD0 sub edx,eax
+ X% V! N/ p; J: J/ |6 x% z8 z. n0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
/ x6 C( R; f- q. s0 u( W f, L0071B913 |. 8BD8 mov ebx,eax
5 o* m @7 m4 x8 t0071B915 |. 0FAFDE imul ebx,esi
5 h% g+ L, a4 g* l1 G" E0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]% R4 A- k2 B; U' g% Z- I
0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]6 \6 t; Q$ d7 {6 J, w
0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10], ~% t; M/ i2 E) z2 @( F7 U
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]
% w3 g3 Z' X& ^0071B926 |. 03F3 add esi,ebx! `" T6 J' B% q2 _1 X6 H7 Q6 Q
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
: ?1 U$ q4 z" _) q2 u0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)
- Z* m) S4 C; y2 r9 v0071B92F |. 8BD9 mov ebx,ecx/ v h$ E4 |9 o J& I2 p" u/ P: q' J
0071B931 |. 2BCD sub ecx,ebp/ ]; J& O1 k6 s" w
0071B933 |. 0FAFDA imul ebx,edx
, r8 z( i' S7 e, J' w' g0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]
0 V- E* O) x* E0 p# u0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx) s- _" e' I0 A/ D6 N* w# U! N
0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]! e# M0 \) K4 u
0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]
7 V# ^: ]0 d% Y/ T- a0 Y3 i9 {9 I, ?0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18] X) T! k, t8 Y
0071B949 |. 2BC1 sub eax,ecx D/ M- C8 Y6 q6 ?! a/ E
0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax; @" M) V4 s R" P( F, I- s! V
0071B94F |. 03DF add ebx,edi+ p5 L3 b: e( f* E
0071B951 |. 8BC2 mov eax,edx; }( F& t# X) j5 x2 I3 j
0071B953 |. 4A dec edx
" n! K1 R. Y: ~! h: W0071B954 |. 85C0 test eax,eax' {9 x; [, J7 ~9 Z
0071B956 |. 0F84 3A010000 je heroes4.0071BA96' e$ V7 p* S- X h: E9 W/ \( u
0071B95C |. 42 inc edx; ~# g' U; f4 @" C3 x* n
0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
. E+ j ` L9 k5 |9 ?0071B961 |> 85ED /test ebp,ebp2 g; g& z. M: Y
0071B963 |. 0F84 0E010000 |je heroes4.0071BA77
8 O% M( O7 a. f0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]
0 R$ Q5 g! v+ n4 W/ a3 M# Y* x0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp7 h4 J6 ]' j6 K6 A+ a; T' |) `
0071B971 |. 25 FFFF0000 |and eax,0FFFF
7 D1 h3 z0 w0 ]+ \5 K+ |4 E$ g- z0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax
9 S j& o: p6 H& l0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
: x; ^, l, v! _ @0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]8 ?7 i+ O w: i' ^' _& v2 o4 ^
0071B984 |. 84C0 ||test al,al
" j7 Q$ |' q ~( T6 w+ n9 X0071B986 |. 74 6A ||je short heroes4.0071B9F2
8 X+ u- P# a' d1 Q. k0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点# K8 q4 J! f* S
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]
$ @/ T7 G3 _! s+ ]% m4 v0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
% L( g& M U+ G; ^9 C' Q+ Q1 H; H0071B991 |. 25 FFFF0000 ||and eax,0FFFF
( K6 _% }2 Z7 \: c) F; E7 t0 p I0 T0071B996 |. 8BF9 ||mov edi,ecx
# y1 ^, X: p$ g7 u( y8 `+ \0071B998 |. 33C9 ||xor ecx,ecx
7 m9 i: G D1 c# ]! x, T0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值' @% `, h, {! n3 q6 `
0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0
7 c. _- X& c, @) ? T0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
- c) m9 g _6 o0071B9A1 |. 8BD7 ||mov edx,edi# q6 M* P" x. `4 F4 \- b( S) O6 i
0071B9A3 |. 8BF1 ||mov esi,ecx9 u" U0 X( M0 E# V' H( f
0071B9A5 |. C1FA 03 ||sar edx,3
* t3 A# M/ H) y0 n, h0071B9A8 |. 83E2 01 ||and edx,1
. m _# F0 }- J. G+ E! }- }8 k0071B9AB |. 03FA ||add edi,edx
8 x/ U3 Q5 z! F+ r F6 F0071B9AD |. 8BD1 ||mov edx,ecx
* c4 @) X' d9 C5 Q& p! k* f/ N0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]! c4 _0 e: c! v8 L
0071B9B5 |. 23D5 ||and edx,ebp
9 S0 u; T" `' I2 a. p0 }+ [0071B9B7 |. 23F1 ||and esi,ecx( z# A4 s5 M, p8 h0 i& p& {" J0 E
0071B9B9 |. 8BC8 ||mov ecx,eax# Y- S1 e1 e6 y
0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]) M! ]% b+ _( i- g/ `! q
0071B9C1 |. 23C5 ||and eax,ebp
# p6 J$ L% A# z8 V- M0071B9C3 |. 2BC2 ||sub eax,edx
' w8 u7 W- R, Y+ o0071B9C5 |. 2BCE ||sub ecx,esi% C4 w+ C Y$ ^* }4 r8 z) {
0071B9C7 |. 0FAFC7 ||imul eax,edi
) Y% k. I% k" R( P1 B$ H0071B9CA |. 0FAFCF ||imul ecx,edi
/ N* V& C$ O+ l6 ]5 `/ k3 w0071B9CD |. C1E6 04 ||shl esi,4
8 A; O) s. G# x/ r( \0071B9D0 |. 03CE ||add ecx,esi/ r8 ]7 M6 A9 z2 }
0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4]
/ C \ }2 r0 ]" C6 `5 ]0071B9D8 |. C1E2 04 ||shl edx,4. j, Y) F5 }6 M( X) A4 p
0071B9DB |. 23CE ||and ecx,esi9 v0 s9 V3 K, a8 Y$ D
0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8], C6 P+ p/ n J/ F
0071B9E3 |. 03C2 ||add eax,edx8 Y6 e: s; e) k, r- c6 @5 U' v
0071B9E5 |. 23C6 ||and eax,esi
- x# R- ]& @" y$ y% T+ r, h3 E a0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]: S/ a A; P7 Q; Y& a, J
0071B9EB |. 03C8 ||add ecx,eax
`( Y5 J2 q C7 e+ l, j0071B9ED |. C1F9 04 ||sar ecx,4
; u& J0 I: q0 K( ^/ P6 l k0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F5
7 T. M& N/ O9 C# n& h" g0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
2 W: U3 i" q* W6 n; Q0071B9F5 |> 33D2 ||xor edx,edx
) o0 m1 s' \' a; p, o, a0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF
0 \: s8 K2 J$ S! e# x, r3 ?0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]) w' D7 L' e2 `0 Q* ~
0071B9FF |. 8BC1 ||mov eax,ecx$ e4 M; L6 T; r p0 c9 D, S; G
0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位0 b D4 y6 L% z- d$ T2 Y
0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为0; x k$ X+ K n+ S3 L
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
* T _3 C# \! m! S+ h1 b' i9 w/ ?0071BA08 |. 8BCA ||mov ecx,edx
c8 Y+ v6 m, W! a0071BA0A |. 8BF0 ||mov esi,eax
& R- h+ m7 U/ {: W9 @# F4 b0071BA0C |. C1F9 03 ||sar ecx,3
: s# J# ~9 u' |) ~; I) ]0071BA0F |. 83E1 01 ||and ecx,1
( K6 _( j% W; {( _0071BA12 |. 23F5 ||and esi,ebp
0 E/ F- ?3 Q6 U8 F0071BA14 |. 03D1 ||add edx,ecx
# _$ K0 D: _8 s7 s0071BA16 |. 8BC8 ||mov ecx,eax$ g! W8 Z1 b5 q8 @, Z; N+ F
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]
0 B8 Q0 r- k% t8 M4 a- D0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]! h- D( L) d3 f' D# G" O% C
0071BA22 |. 23C5 ||and eax,ebp6 I9 a: ^5 U: o) l, s/ `* k! e
0071BA24 |. 23CF ||and ecx,edi
1 f% K: S. J; R, i* j3 d% d0071BA26 |. 2BC6 ||sub eax,esi9 V6 T1 Y9 h: E; L9 i9 o& e
0071BA28 |. 0FAFC2 ||imul eax,edx
# U3 ], P% Q6 g) `& s( Y0071BA2B |. C1E6 04 ||shl esi,4
9 o9 z/ s7 n" ~' \0071BA2E |. 03C6 ||add eax,esi8 g0 t' J/ P6 H2 z
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]% E) b9 v- K7 j
0071BA36 |. 23C6 ||and eax,esi; a ]' G' N" W" E, T o
0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]( B m1 M# V, f
0071BA3C |. 23F7 ||and esi,edi
7 u- @8 [: v' d: L# {0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
" v0 w. v+ L U8 B6 v0071BA44 |. 2BF1 ||sub esi,ecx: \3 Q) v4 a+ e! f3 L5 k. m1 U. T
0071BA46 |. 0FAFF2 ||imul esi,edx
! Q5 D0 i g+ C; o% X0071BA49 |. C1E1 04 ||shl ecx,4
- e: j4 a; |+ C8 P$ [/ n# H0071BA4C |. 03F1 ||add esi,ecx
' N+ P" l. M% ?, L3 [+ f" ?+ t0071BA4E |. 23F7 ||and esi,edi
) e7 K+ w; S3 d( g5 G# m0071BA50 |. 03C6 ||add eax,esi' T0 f( j% `. m) w
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]
8 _; c6 U o) x8 o8 S, T0071BA56 |. C1F8 04 ||sar eax,4# V3 t; o3 b: c3 [7 }' [
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处
, `# U6 n3 B1 t& C0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]$ e& W3 o5 P# U1 x3 k* M
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
, Y2 M1 y2 C1 U% s$ E$ c) K- @0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
# I& n9 b. ~% Z f0071BA64 |. 48 ||dec eax ; 计数值减1
( T' e: V3 O0 z% o6 M% {0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi
4 s0 b4 u2 |# t' |8 }0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax
# l% O$ C9 h4 j- F0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A
$ y5 R& O, q0 t0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
! o2 C% p" _+ I' A) |& v) |7 A1 n0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
! G* U, V8 M9 l' D/ x ]0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]& N0 s5 ?7 Y- K8 q& ^# Q6 h
0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
9 X1 g$ R6 n0 k) i0 {6 c; i0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点; F; v' g& G% }( c
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点! `/ ?* u" t+ V: V
0071BA87 |. 48 |dec eax ; 计数值减1
( n' C7 u: v; k! h& ]# T, O( N0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
$ h: i% J5 y7 ]0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
. u, O) ?( y5 g/ E9 ]2 s+ `# g0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961
! y: m6 O9 [, M9 N2 e" Y/ ?) R0071BA96 |> 5F pop edi
" @7 `$ G0 Y5 v/ j3 L0071BA97 |. 5E pop esi
0 b& i- r+ `) ~; ]0071BA98 |. 5D pop ebp+ {: x5 x( I/ y6 c3 x. V. E' D& l, B5 \
0071BA99 |. 5B pop ebx
0 X6 }! }, x+ Y3 E. E. p7 q0071BA9A |. 83C4 54 add esp,54- z7 z, H+ m" t& ?# r
0071BA9D \. C2 1800 retn 189 s0 B" w q; h: J
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:
% z2 e1 I% D0 [. M4 Y7 ^8 K$ v0 C2 C' n9 r) T1 }3 C$ |0 B
buf[x][y]=func(buf[x][y],zm[x/2][y/2])
( P: G7 B$ y1 \7 R& @2 {; h- T/ K6 Q% V' W. V; |+ i+ e$ F0 w
buf:缓冲区二维数组,两个字节表示一个点- e+ F7 z+ |+ ?% F
zm:字模二维数组,一个字节表示一个点 |