参数表
R& W$ g! ^4 T0 Carg1:[arg1+10]+[arg1+C]*arg3+arg2*2存放缓冲区(应该就是屏幕显示区在内存的映像)基地址
' _1 Q3 |# q9 I% Iarg2:字符串宽度 x0 U! s% D! w# r3 p$ `+ c5 [
arg3:y8 ^' q# C- H% {: o4 F1 K8 ~
arg4:颜色
) p2 A- V" B1 targ5:与颜色深度有关) q- f9 K: }, P% Q0 B
arg6:与颜色深度有关( [2 R- r/ W# h3 W
ecx:字符的编码基地址
9 i" S; F! ?" x8 f3 T
2 q4 a& R+ K; K# J- [0071B820 /$ 83EC 54 sub esp,54& d* i' }& a+ x/ I: R" h% O, b
0071B823 |. 53 push ebx* {. l- }1 _0 ~
0071B824 |. 8B5C24 5C mov ebx,dword ptr ss:[esp+5C]; m* @( ?8 k5 C. I: c8 ^* K
0071B828 |. 55 push ebp0 b. w: O. w# ^ ~3 n# j: f
0071B829 |. 56 push esi
0 |# K+ x9 t6 K( d2 `0071B82A |. 8B43 08 mov eax,dword ptr ds:[ebx+8]
; f6 ]6 U5 v% V7 Q' b0071B82D |. 8BF1 mov esi,ecx
, k8 r5 ?% c' s, ]$ R8 g. o; z0071B82F |. 8B4B 04 mov ecx,dword ptr ds:[ebx+4]
; F% m1 L3 A# |0071B832 |. 57 push edi1 a- i5 t7 P$ F% S0 t+ `
0071B833 |. 50 push eax- V( u, h2 {; [0 ^7 B$ H' T3 D6 Y/ g& A
0071B834 |. 51 push ecx
j2 m0 b$ h0 u0 u8 c. h0071B835 |. 6A 00 push 0$ _4 x3 }/ y5 \6 r- P$ E4 O
0071B837 |. 6A 00 push 0
7 p& g% _% t2 W7 C0071B839 |. 8D4C24 54 lea ecx,dword ptr ss:[esp+54]* g! w" K; M& z" n
0071B83D |. 897424 20 mov dword ptr ss:[esp+20],esi8 l3 d% |9 x6 [0 D2 A2 }
0071B841 |. E8 6ABCCEFF call heroes4.004074B0
! t/ g0 U* o# _: v1 l/ E0071B846 |. 8B56 08 mov edx,dword ptr ds:[esi+8]5 \8 j. q* l. `2 q+ D
0071B849 |. 8B46 04 mov eax,dword ptr ds:[esi+4]! {/ i% A/ c! l! A2 ?- n
0071B84C |. 52 push edx4 t) k3 C' R W( h$ X0 U. J) `
0071B84D |. 50 push eax1 l9 a/ I2 e; }$ b, ]
0071B84E |. 6A 00 push 0
2 n- k# _4 u Y0 u& V0071B850 |. 6A 00 push 0
. M$ a. ^0 t2 H: A, b( K; [" K0071B852 |. 8D4C24 44 lea ecx,dword ptr ss:[esp+44]
* m. e8 G% P% R' s: M0071B856 |. E8 55BCCEFF call heroes4.004074B0: X- V+ m9 v8 Q1 w* g( C
0071B85B |. 8B4C24 34 mov ecx,dword ptr ss:[esp+34]
6 X8 U. ?4 e! F( j2 S, P0071B85F |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
5 h& I' _4 ]# }3 Q) L% X0071B863 |. 8B4424 3C mov eax,dword ptr ss:[esp+3C]
! Y5 c: P* \2 M, j0071B867 |. 894C24 24 mov dword ptr ss:[esp+24],ecx
7 g1 `, p# h4 k3 k/ J# a* H# E0071B86B |. 8B4C24 40 mov ecx,dword ptr ss:[esp+40]& I4 J" J' ]6 l d- W* Z4 k
0071B86F |. 895424 28 mov dword ptr ss:[esp+28],edx# w- J9 P% n `+ `% h1 ?% J
0071B873 |. 8D5424 6C lea edx,dword ptr ss:[esp+6C]# J& M5 X% [7 q8 M$ I2 |
0071B877 |. 894C24 30 mov dword ptr ss:[esp+30],ecx
% _0 x/ e+ X4 P$ ]3 n0071B87B |. 52 push edx/ b' f4 u- E9 |9 x/ \% M
0071B87C |. 8D4C24 28 lea ecx,dword ptr ss:[esp+28]( d3 R0 e; S0 A2 ~
0071B880 |. 894424 30 mov dword ptr ss:[esp+30],eax
- Q; G2 I* w! _# b0071B884 |. E8 47BCCEFF call heroes4.004074D04 a( X( t' v2 b. K3 M
0071B889 |. 8B4424 30 mov eax,dword ptr ss:[esp+30]
& w' h+ f) `9 Z$ ]- r! |! y$ v$ S7 G5 J0071B88D |. 8B4C24 50 mov ecx,dword ptr ss:[esp+50]
% i7 e9 m p% Y. M Q0071B891 |. 3BC1 cmp eax,ecx8 t2 f, B2 D" d* W) h6 U
0071B893 |. 8BF8 mov edi,eax0 }8 ?" p- K* c0 G% ~
0071B895 |. 7C 02 jl short heroes4.0071B899
- b$ Y. @+ u# L, k( [8 s5 L0071B897 |. 8BF9 mov edi,ecx! }' Y6 U# o$ B' j- U, t5 X
0071B899 |> 8B4424 2C mov eax,dword ptr ss:[esp+2C]
9 e* I7 j( T2 D+ F) g0071B89D |. 8B5424 4C mov edx,dword ptr ss:[esp+4C]
! L0 ~. ^/ ]9 {7 F# ?9 D) j0071B8A1 |. 3BC2 cmp eax,edx" ?0 v/ \3 c3 W8 G' H9 J4 e
0071B8A3 |. 7D 02 jge short heroes4.0071B8A7
U1 {& @* Q& V4 p' e! ~0071B8A5 |. 8BD0 mov edx,eax
6 [: L* c4 |) u1 z$ {) n0071B8A7 |> 8B4424 28 mov eax,dword ptr ss:[esp+28]
6 O# `% F$ F9 H( x/ G" a0071B8AB |. 8B4C24 48 mov ecx,dword ptr ss:[esp+48]# t' `1 ^ J$ @$ m- h
0071B8AF |. 3BC1 cmp eax,ecx
/ S% U9 d! v- X0 ~0071B8B1 |. 7E 02 jle short heroes4.0071B8B5
9 F3 Y/ M7 O/ G9 ?3 `1 u6 Y$ K& K3 c0071B8B3 |. 8BC8 mov ecx,eax
' I3 g$ M. T7 I( _- B0071B8B5 |> 8B4424 24 mov eax,dword ptr ss:[esp+24]
) z# T f1 e( ]( N6 {0071B8B9 |. 8B7424 44 mov esi,dword ptr ss:[esp+44]
; F# I' W9 @- @8 ~- C8 F6 v0071B8BD |. 3BC6 cmp eax,esi
8 N( k6 \5 J/ f9 O0071B8BF |. 7F 02 jg short heroes4.0071B8C3
' l- k' ~# p: W1 Y9 G" o8 y* u# k0071B8C1 |. 8BC6 mov eax,esi
1 h f' F9 s% e* ]* U0071B8C3 |> 57 push edi
; t/ m& v/ A+ Q; c9 y, N G9 I0071B8C4 |. 52 push edx5 h( _) w# N5 F" Z- q+ }6 D- }
0071B8C5 |. 51 push ecx
2 r( X0 f. `1 q0071B8C6 |. 50 push eax- Y+ M, W' K, ^4 j& Z! D
0071B8C7 |. 8D4C24 64 lea ecx,dword ptr ss:[esp+64]
& c! }- s1 r9 N' K0071B8CB |. E8 E0BBCEFF call heroes4.004074B0( g1 f- ^% [% o- s- ~" `3 C
0071B8D0 |. 8B4424 60 mov eax,dword ptr ss:[esp+60]3 B! p, q& i2 L1 X$ ~- {
0071B8D4 |. 8B7424 58 mov esi,dword ptr ss:[esp+58] Y6 B: [2 S5 X9 G" ^
0071B8D8 |. 2BC6 sub eax,esi# p1 c$ t8 s6 _9 K. `
0071B8DA |. 85C0 test eax,eax; c. Y- C; |% X1 F, k
0071B8DC |. 894424 18 mov dword ptr ss:[esp+18],eax4 s" i" e ?* Y& A
0071B8E0 |. 0F8E B0010000 jle heroes4.0071BA96+ Y0 V" ^! I1 y1 e
0071B8E6 |. 8B6C24 5C mov ebp,dword ptr ss:[esp+5C]
8 M- P/ U" w$ J6 w, w5 W6 Z0071B8EA |. 8B4C24 54 mov ecx,dword ptr ss:[esp+54] ; 数值上等于arg2) I1 I3 F3 ?7 Z5 D8 M# Q8 |* s
0071B8EE |. 2BE9 sub ebp,ecx8 n9 F) A- w1 i) P
0071B8F0 |. 85ED test ebp,ebp8 f8 v* l0 R* \3 }
0071B8F2 |. 896C24 1C mov dword ptr ss:[esp+1C],ebp
, f. z6 }' U0 t& ]5 i6 N8 H0071B8F6 |. 0F8E 9A010000 jle heroes4.0071BA96 Y5 t" d9 [! a5 F
0071B8FC |. 8B4424 6C mov eax,dword ptr ss:[esp+6C] ; arg20 o1 S1 K4 e+ v# a" m6 h, L* H
0071B900 |. 8BF9 mov edi,ecx/ D% N- O* I! t" K. v' ~* U
0071B902 |. 2BF8 sub edi,eax
% _9 d* ~, s; z: ]; |4 z* A0071B904 |. 8B4424 70 mov eax,dword ptr ss:[esp+70] ; arg3! [3 }; w4 i" j$ }: o% x( i$ u7 m- H& z$ e
0071B908 |. 8BD6 mov edx,esi ~ \8 c8 E9 a! ]* L# x( _
0071B90A |. 894C24 24 mov dword ptr ss:[esp+24],ecx! ]* z% B4 c& g% V6 \
0071B90E |. 2BD0 sub edx,eax. a, u6 ~6 w/ ]0 K/ ?# F4 s2 J2 X# N
0071B910 |. 8B43 0C mov eax,dword ptr ds:[ebx+C]
# b. n6 B, Y4 n* t0071B913 |. 8BD8 mov ebx,eax
9 K, @+ S7 f+ M+ E# R- t0071B915 |. 0FAFDE imul ebx,esi
8 C+ U8 r* g6 e" W% R2 z1 w0071B918 |. 8D344B lea esi,dword ptr ds:[ebx+ecx*2]
/ s1 W; K% U. K* ~0071B91B |. 8B4C24 68 mov ecx,dword ptr ss:[esp+68]
, T7 F! R; E+ ?3 I8 s0 D0071B91F |. 8B59 10 mov ebx,dword ptr ds:[ecx+10]9 d! O8 t! q! |5 O- l) Y
0071B922 |. 8B4C24 10 mov ecx,dword ptr ss:[esp+10]% D' I8 g6 v0 ?) c1 U/ q- p
0071B926 |. 03F3 add esi,ebx3 b9 }# v6 c9 F
0071B928 |. 8B49 0C mov ecx,dword ptr ds:[ecx+C]
% n/ o& l9 y/ u h0071B92B |. 897424 68 mov dword ptr ss:[esp+68],esi; 重点:将缓冲区地址写入栈内(原arg1处)- x3 N. {: v: y+ M+ }9 L+ ^
0071B92F |. 8BD9 mov ebx,ecx
8 E/ r% E" s9 f1 I) D* V0071B931 |. 2BCD sub ecx,ebp
" n* e& _ }# Q- p3 q5 b( `0071B933 |. 0FAFDA imul ebx,edx3 r5 v3 u4 A' ` ?, H4 ^0 h. M
0071B936 |. 8B5424 10 mov edx,dword ptr ss:[esp+10]# N0 C, @9 n4 c3 u2 Y8 c
0071B93A |. 894C24 20 mov dword ptr ss:[esp+20],ecx
+ w; U" R$ P; R1 m) J0071B93E |. 8D4C2D 00 lea ecx,dword ptr ss:[ebp+ebp]
0 X* f: X4 w5 h( `# L7 x# S0071B942 |. 035A 10 add ebx,dword ptr ds:[edx+10]( I, U- {& Q4 U& o/ U
0071B945 |. 8B5424 18 mov edx,dword ptr ss:[esp+18]
; w Z+ J4 {8 B3 u9 B p' D2 S0071B949 |. 2BC1 sub eax,ecx, h( a0 ]; ^; I1 n" d! m
0071B94B |. 894424 24 mov dword ptr ss:[esp+24],eax( M- y3 `% K# ]5 O
0071B94F |. 03DF add ebx,edi
. i* n0 G l$ u0 G% d9 E$ x7 @0071B951 |. 8BC2 mov eax,edx8 S4 f$ Y5 D4 ?7 a
0071B953 |. 4A dec edx
2 ~, ], v) {/ N- R7 I V0071B954 |. 85C0 test eax,eax% P. o Q5 ^7 D( z; _
0071B956 |. 0F84 3A010000 je heroes4.0071BA96 Z9 v; H, Y# Q& }. M+ \4 Z3 O
0071B95C |. 42 inc edx
\5 Q @ `, q2 }0071B95D |. 895424 18 mov dword ptr ss:[esp+18],edx
/ T! p' V0 X0 T2 {6 ~( ?0071B961 |> 85ED /test ebp,ebp
6 [1 N* y0 v. ?* e6 u% b* V1 Y0071B963 |. 0F84 0E010000 |je heroes4.0071BA773 I; S8 j; r+ b+ G6 z: g6 `0 U: P, p
0071B969 |. 8B4424 74 |mov eax,dword ptr ss:[esp+74]8 R( S# V z3 U6 E
0071B96D |. 896C24 14 |mov dword ptr ss:[esp+14],ebp
2 p$ y2 m* a; |5 e) g9 h& n- D0071B971 |. 25 FFFF0000 |and eax,0FFFF
. s8 c2 }# @9 [/ A. D0071B976 |. 894424 10 |mov dword ptr ss:[esp+10],eax0 _1 d: H9 E, w, f
0071B97A |> 8A4424 78 |/mov al,byte ptr ss:[esp+78]
( t% e* ~ _( w, m8 h5 C0071B97E |. 8B2D DCF0AA00 ||mov ebp,dword ptr ds:[AAF0DC]
, r* s: N r- g$ _( F; L+ E3 ?# H9 ?0071B984 |. 84C0 ||test al,al8 z& [9 L& C, B
0071B986 |. 74 6A ||je short heroes4.0071B9F2
e, X" Y! c7 N, V- g/ s1 e T( k0071B988 |. 8A0B ||mov cl,byte ptr ds:[ebx] ; 取字模的像素点, y/ b3 t! O' S- ~% Y* x: I
0071B98A |. 8B4424 7C ||mov eax,dword ptr ss:[esp+7C]: s- o9 c" w' M3 {
0071B98E |. 83E1 0F ||and ecx,0F ; 取低四位
. q' w8 d' L4 ]: q1 c0071B991 |. 25 FFFF0000 ||and eax,0FFFF e! H* K2 U5 P
0071B996 |. 8BF9 ||mov edi,ecx$ f; d5 y1 U) o- B
0071B998 |. 33C9 ||xor ecx,ecx
$ p, G$ b: [# g, g P0071B99A |. 66:8B0E ||mov cx,word ptr ds:[esi] ; 取缓冲区的原值
8 T& [3 |; {. J/ j2 ~3 b: B( g4 F' t0071B99D |. 85FF ||test edi,edi ; 检查字模的像素点低四位是否为0! N. M! U$ u; r2 f: E3 V
0071B99F |. 74 54 ||je short heroes4.0071B9F5 ; 为0则不作处理
/ n2 q6 \4 O+ q8 W3 {( R9 f9 M0071B9A1 |. 8BD7 ||mov edx,edi
. r, }" c0 J5 {( D4 ~4 c; ~" c0071B9A3 |. 8BF1 ||mov esi,ecx
/ g U( `0 t0 u% L) x4 Z% V0071B9A5 |. C1FA 03 ||sar edx,3# w/ t1 u' Z# T
0071B9A8 |. 83E2 01 ||and edx,1" [: a5 c" q5 j/ t
0071B9AB |. 03FA ||add edi,edx4 @- ?+ M! \ C1 }1 n, E
0071B9AD |. 8BD1 ||mov edx,ecx
0 B! j N* w1 A+ o0071B9AF |. 8B0D 04F1AA00 ||mov ecx,dword ptr ds:[AAF104]
/ I& C( h/ y3 ^1 K0071B9B5 |. 23D5 ||and edx,ebp
# W3 G9 X2 R* E/ H+ X+ b0071B9B7 |. 23F1 ||and esi,ecx( C- x' y; s1 s. ?6 }
0071B9B9 |. 8BC8 ||mov ecx,eax
) o) @* }0 U4 h0071B9BB |. 230D 04F1AA00 ||and ecx,dword ptr ds:[AAF104]! v1 s7 R/ ^- k7 l! t, d
0071B9C1 |. 23C5 ||and eax,ebp
* D* w) H6 K7 n0071B9C3 |. 2BC2 ||sub eax,edx0 z7 ~; i- C5 u$ M
0071B9C5 |. 2BCE ||sub ecx,esi6 e w" ?; M4 O* B
0071B9C7 |. 0FAFC7 ||imul eax,edi
, ?6 T9 t, @. i: G8 W; m0071B9CA |. 0FAFCF ||imul ecx,edi
& _ x0 B* p/ n, r0071B9CD |. C1E6 04 ||shl esi,4' y4 U9 |- `) T5 ?- I, F
0071B9D0 |. 03CE ||add ecx,esi
$ y- n& Y. d. O4 C0 [) h4 a+ C0071B9D2 |. 8B35 F4F0AA00 ||mov esi,dword ptr ds:[AAF0F4] c9 D8 G, G3 {& x4 K- _- y
0071B9D8 |. C1E2 04 ||shl edx,4
7 R9 i E7 I" H# \' |* D0 ^' W0071B9DB |. 23CE ||and ecx,esi
( r# B* ^; e) a, q- G0071B9DD |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]5 k$ k8 J& n. `- h$ u4 [8 }2 J
0071B9E3 |. 03C2 ||add eax,edx
& `2 T3 H) l/ V2 w# f& q0071B9E5 |. 23C6 ||and eax,esi8 X, n5 K$ y5 K6 T# ?3 u- V
0071B9E7 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]. C/ b/ D" s* e* |4 I9 P5 A. c- R$ \
0071B9EB |. 03C8 ||add ecx,eax
" V. c3 j# F& k% m P6 I% c0071B9ED |. C1F9 04 ||sar ecx,4
$ N: z @ g) D G# `# }9 n0071B9F0 |. EB 03 ||jmp short heroes4.0071B9F56 O8 C+ M7 Z& n/ v( {3 _2 l( \
0071B9F2 |> 66:8B0E ||mov cx,word ptr ds:[esi]
' z0 Q" Y" A4 j- d0071B9F5 |> 33D2 ||xor edx,edx
. v, K* c. w, P W& E0071B9F7 |. 81E1 FFFF0000 ||and ecx,0FFFF
5 [# P# D! s6 S- c+ d5 H/ N( |0071B9FD |. 8A13 ||mov dl,byte ptr ds:[ebx]. C2 t0 c) c* u" G* }: ~* m& U$ O
0071B9FF |. 8BC1 ||mov eax,ecx
& {! L/ v9 M, @1 j0071BA01 |. C1EA 04 ||shr edx,4 ; 取高四位
+ S! [) r) I+ z0071BA04 |. 85D2 ||test edx,edx ; 检查字模的像素点高四位是否为09 W* U1 B9 x& `; g2 ]+ u
0071BA06 |. 74 51 ||je short heroes4.0071BA59 ; 为0则不作处理
$ K/ j+ X, H5 f- W/ J: ^0071BA08 |. 8BCA ||mov ecx,edx
) a& e+ H4 i6 f6 x+ V0071BA0A |. 8BF0 ||mov esi,eax% z9 ]* e4 C3 c5 A" X$ K3 w7 h' m
0071BA0C |. C1F9 03 ||sar ecx,3( A. r p# p! y; d
0071BA0F |. 83E1 01 ||and ecx,1! b R% Q# Z3 m& v$ Z
0071BA12 |. 23F5 ||and esi,ebp
. `4 d! d, k9 J! M4 N) {# `0071BA14 |. 03D1 ||add edx,ecx4 Y. k( X* \5 H# K( P5 V9 Q
0071BA16 |. 8BC8 ||mov ecx,eax5 J9 {. D7 G, Z8 X8 j, R8 z* n
0071BA18 |. 8B4424 10 ||mov eax,dword ptr ss:[esp+10]& O& o3 e5 ]# N+ W! @4 l
0071BA1C |. 8B3D 04F1AA00 ||mov edi,dword ptr ds:[AAF104]3 G, B' c. Z/ ~& O! r
0071BA22 |. 23C5 ||and eax,ebp
: `: E* q0 W/ s; Y% A/ l0071BA24 |. 23CF ||and ecx,edi2 o4 j7 a% ?/ A
0071BA26 |. 2BC6 ||sub eax,esi
9 x' w6 f6 W% w8 A2 }0071BA28 |. 0FAFC2 ||imul eax,edx
1 }) O" |- p) @7 J3 `" k7 r0071BA2B |. C1E6 04 ||shl esi,4
. L6 o: }: o4 l& T/ W$ l* i0071BA2E |. 03C6 ||add eax,esi, i: S6 z' Z8 X) L, K1 l
0071BA30 |. 8B35 D8F0AA00 ||mov esi,dword ptr ds:[AAF0D8]4 n9 ? K3 Q3 e2 a/ Z9 q! O; U
0071BA36 |. 23C6 ||and eax,esi
: y. W7 d) A2 S; P: ]- D: `0071BA38 |. 8B7424 10 ||mov esi,dword ptr ss:[esp+10]+ Z! X7 T( Q$ }% k4 ]
0071BA3C |. 23F7 ||and esi,edi
0 u E- X, K) P0071BA3E |. 8B3D F4F0AA00 ||mov edi,dword ptr ds:[AAF0F4]
$ {9 E' B- D; x$ v9 ^0071BA44 |. 2BF1 ||sub esi,ecx
3 l- ?+ ]! b: _0071BA46 |. 0FAFF2 ||imul esi,edx6 R' r1 V5 A f' @. \& d- J* b5 G
0071BA49 |. C1E1 04 ||shl ecx,4
! s/ V* |$ a' E$ ?0071BA4C |. 03F1 ||add esi,ecx
, c% {1 f1 ^( ]5 I0071BA4E |. 23F7 ||and esi,edi
. E( f# L# }& P" E9 b9 ^0071BA50 |. 03C6 ||add eax,esi; E& W0 P( N; q. m
0071BA52 |. 8B7424 68 ||mov esi,dword ptr ss:[esp+68]& x/ L5 q0 g7 M" e( y" B2 |4 K1 r
0071BA56 |. C1F8 04 ||sar eax,4$ z, G* J; i6 }' @
0071BA59 |> 66:8906 ||mov word ptr ds:[esi],ax ; 将经过处理后的缓冲区值放回原处, O9 s' Y9 x7 ^
0071BA5C |. 8B4424 14 ||mov eax,dword ptr ss:[esp+14]$ ~) a* u5 C% |/ n
0071BA60 |. 43 ||inc ebx ; 指向字模的下个像素点
- m! y2 W3 a! `* }0071BA61 |. 83C6 02 ||add esi,2 ; 指向缓冲区的下个点
# x3 b9 R* f! O7 C6 [% Q- s0071BA64 |. 48 ||dec eax ; 计数值减1( v$ p5 B% P8 i5 P* @2 H, { m
0071BA65 |. 897424 68 ||mov dword ptr ss:[esp+68],esi2 e" A8 I' n3 F# \8 l) }
0071BA69 |. 894424 14 ||mov dword ptr ss:[esp+14],eax7 |8 F; ~0 o4 W. ]
0071BA6D |.^ 0F85 07FFFFFF |\jnz heroes4.0071B97A$ y. Y! n, U1 ?/ C6 @* f
0071BA73 |. 8B6C24 1C |mov ebp,dword ptr ss:[esp+1C]
: O: M4 m* i( y0071BA77 |> 8B5424 20 |mov edx,dword ptr ss:[esp+20]
: q+ Y4 h7 F% `3 ^& h# E3 f0071BA7B |. 8B4C24 24 |mov ecx,dword ptr ss:[esp+24]
. @* I& \ j) i2 `0071BA7F |. 8B4424 18 |mov eax,dword ptr ss:[esp+18]
9 q" D+ M: c" D% x! s( ?0071BA83 |. 03DA |add ebx,edx ; 指向字模的下行像素点& W0 m0 b# h1 o: P" h. A0 ?/ e8 q
0071BA85 |. 03F1 |add esi,ecx ; 指向缓冲区的下行点
7 a3 g0 U* p6 m3 s2 p8 b! N2 L0071BA87 |. 48 |dec eax ; 计数值减10 I2 ]9 B% w% k) w7 e/ O) X
0071BA88 |. 897424 68 |mov dword ptr ss:[esp+68],esi
/ i# J2 f6 W, J) h! e+ v" Z& q* z0071BA8C |. 894424 18 |mov dword ptr ss:[esp+18],eax
, {; D9 M' H, `# Q, D0071BA90 |.^ 0F85 CBFEFFFF \jnz heroes4.0071B961! J: |. @" c' _- f! K+ F* k
0071BA96 |> 5F pop edi
* m& l$ ^9 z: u& k0071BA97 |. 5E pop esi/ U8 C: g a$ g6 g7 C
0071BA98 |. 5D pop ebp
% c9 D" E5 w7 N+ N# R f3 e0071BA99 |. 5B pop ebx: e- b. E' J6 Z
0071BA9A |. 83C4 54 add esp,54+ j1 V4 b( q% B. l: b
0071BA9D \. C2 1800 retn 18! {: z5 k8 `* U) U
本函数的核心是两层循环,从71B9A1开始就是循环体,整个换算过程是一个比较复杂的算法,可以简单表示为:: p# T2 {- U; [0 U& y4 O' M8 w
7 Y& b( M y" Q$ O7 g9 i2 ?( _% b
buf[x][y]=func(buf[x][y],zm[x/2][y/2]) @3 [( z5 b- O" r2 ]
4 v; a/ P/ V& R/ p! b; G
buf:缓冲区二维数组,两个字节表示一个点
8 K8 g7 _; i" @6 N! H2 ?zm:字模二维数组,一个字节表示一个点 |