写屏函数:' c" B2 [# s: Z4 [, [+ w+ ~
02A0EA4C |> /8B00 |/mov eax,dword ptr ds:[eax]2 S I' e+ n: M9 Z) B
02A0EA4E |. |0FB70450 ||movzx eax,word ptr ds:[eax+edx*2] ; [eax+edx*2]存放字符的UNICODE码
. |* k5 I. z$ ^- w. v1 [2 `02A0EA52 |. |8B7C24 14 ||mov edi,dword ptr ss:[esp+14]
9 |+ i( ~- m3 d+ ~7 [' d02A0EA56 |. |8B7F 2C ||mov edi,dword ptr ds:[edi+2C]
; j% h/ x2 X, h( K02A0EA59 |. |8D04C0 ||lea eax,dword ptr ds:[eax+eax*8]8 P8 I% u Y, j% c& F& t5 i/ a- ]
02A0EA5C |. |8D0487 ||lea eax,dword ptr ds:[edi+eax*4] ; eax存放字符编码表
1 w) r9 h6 Z% J# c3 s9 M每个字符码表占24(16进制)个字节
8 q1 Z4 E. s1 b8 O02A0EA5F |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]+ z4 }+ p+ b& v. h- E
02A0EA63 |. |8D7C39 14 ||lea edi,dword ptr ds:[ecx+edi+14] ; edi就是显存地址
3 T8 M8 z3 v: A% u7 V02A0EA67 |. |D940 04 ||fld dword ptr ds:[eax+4]
" L1 L# Y1 x/ ]; F02A0EA6A |. |83C2 01 ||add edx,1 字符个数加一
# f9 h2 L3 ~4 t7 h ?02A0EA6D |. |D95C24 30 ||fstp dword ptr ss:[esp+30]6 ~: n4 R6 E; G' H7 r
02A0EA71 |. |D900 ||fld dword ptr ds:[eax]. A% Z* J" V j' a. k2 q
02A0EA73 |. |D91F ||fstp dword ptr ds:[edi] ; edi就是显存地址
% \, ]$ P$ Y& j/ k k! A5 ^! H每个字符占1C个字节,最后的四个字节都是一样的,可以认为是结束标志* @- k- q+ X7 y9 ?+ f9 ^: k
02A0EA75 |. |D94424 30 ||fld dword ptr ss:[esp+30]* i2 b3 W1 s. i) w" C6 V- B
02A0EA79 |. |D95F 04 ||fstp dword ptr ds:[edi+4]& ^ C U. U" R& g5 p
02A0EA7C |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
! \7 K. U _9 E6 H02A0EA80 |. |D940 04 ||fld dword ptr ds:[eax+4]6 @6 d* L; R/ l" o8 t6 h
02A0EA83 |. |8D7C39 30 ||lea edi,dword ptr ds:[ecx+edi+30]2 V0 b* g/ ^: L' }
02A0EA87 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]; D& M+ U5 B4 k( }
02A0EA8B |. |D940 08 ||fld dword ptr ds:[eax+8]
6 P S# _; s+ g- @$ O: t' k02A0EA8E |. |D91F ||fstp dword ptr ds:[edi]' `9 c- p6 b E& S+ o9 E3 ]
02A0EA90 |. |D94424 30 ||fld dword ptr ss:[esp+30]7 p% s" }# y7 _4 b- I2 |
02A0EA94 |. |D95F 04 ||fstp dword ptr ds:[edi+4]
- ?; z7 g* H; U' J1 f02A0EA97 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
+ R8 D3 M$ N4 i F5 t) ~02A0EA9B |. |D940 0C ||fld dword ptr ds:[eax+C]; g; W7 }& h3 r7 T% g! s
02A0EA9E |. |8D7C39 4C ||lea edi,dword ptr ds:[ecx+edi+4C]5 w2 \3 }: x5 H5 ]# q9 c
02A0EAA2 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]* k, e- O) ~. g# V
02A0EAA6 |. |D900 ||fld dword ptr ds:[eax]
- s( O7 g. @. `0 b; N( k02A0EAA8 |. |D91F ||fstp dword ptr ds:[edi]: l E0 I Q& c" U* x7 a
02A0EAAA |. |D94424 30 ||fld dword ptr ss:[esp+30]# q- S9 A" A- T
02A0EAAE |. |D95F 04 ||fstp dword ptr ds:[edi+4]8 D- b2 q& N5 ` b4 o
02A0EAB1 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
9 j6 m4 B# @$ i. u7 R/ l( F+ D02A0EAB5 |. |D940 0C ||fld dword ptr ds:[eax+C]' O3 I: v7 w4 M2 r1 f6 y2 b
02A0EAB8 |. |8D7C39 68 ||lea edi,dword ptr ds:[ecx+edi+68]9 ~7 r' I5 Q: X4 N* o& \
02A0EABC |. |D95C24 30 ||fstp dword ptr ss:[esp+30]. U; ]3 r/ {$ T" K% A/ q7 }
02A0EAC0 |. |83C1 70 ||add ecx,708 k' v5 i$ u& N
02A0EAC3 |. |D940 08 ||fld dword ptr ds:[eax+8]
w- g, V1 b4 {# @% V) B, r, x, M5 D02A0EAC6 |. |D91F ||fstp dword ptr ds:[edi]$ }% O! `* q! `( H Q7 W& ^
02A0EAC8 |. |D94424 30 ||fld dword ptr ss:[esp+30], f+ D, N% J1 Y' F' n0 V( u1 L
02A0EACC |. |D95F 04 ||fstp dword ptr ds:[edi+4]
/ h; F3 Y6 h& h5 x6 V$ z, q02A0EACF |. |8B46 58 ||mov eax,dword ptr ds:[esi+58]7 P3 v& F1 K: t3 k, {' g! x% V
02A0EAD2 |. |03C3 ||add eax,ebx
2 b! u, R: w- P. Q( f/ B02A0EAD4 |. |3B50 08 ||cmp edx,dword ptr ds:[eax+8]
7 c3 `/ p8 e, V1 D' o- ^02A0EAD7 |.^\\0F8C 6FFFFF>|\\jl xcDxShad.02A0EA4C# r, ] X! b; p$ J5 J
6 v8 Q: _* e5 R, q4 v
本游戏字符编码采用UNICODE,
' V9 b5 B& C! W2 n2 e对字符码表的操作:! P$ N$ U) @' g- j! x
10028807 |> /0FB702 /movzx eax,word ptr ds:[edx] 读字符的UNICODE码
- {5 N- \4 N) p6 N1002880A |. |8D04C0 |lea eax,dword ptr ds:[eax+eax*8]
0 o8 d' x1 e, E. H1002880D |. |8D0483 |lea eax,dword ptr ds:[ebx+eax*4] 根据UNICODE码求得字符码表的地址
8 {+ t. [; E+ x" J& e- i; |! a10028810 |. |33C9 |xor ecx,ecx
2 Z. A" `+ A# X3 D+ Q6 E10028812 |. |DB40 20 |fild dword ptr ds:[eax+20]- V1 g8 s4 B ?6 j
10028815 |. |D95C24 14 |fstp dword ptr ss:[esp+14]7 A4 P6 E. X: S0 @5 y! P9 {8 d
10028819 |. |D94424 14 |fld dword ptr ss:[esp+14]
/ `8 T; {# [' l* ^! r; t( q1002881D |. |D9C0 |fld st
: k h6 L6 G3 l8 ~1002881F |. |D84E 14 |fmul dword ptr ds:[esi+14]
; \2 z% u3 ~# _ T6 ?& \10028822 |. |D94424 0C |fld dword ptr ss:[esp+C]
3 Y" U( M& h; w) r; \% {1 N* Q10028826 |. |D9C0 |fld st
1 ^. e% c' }. v7 G6 o10028828 |. |DEC2 |faddp st(2),st- `* G3 w7 Y" _ b1 W2 Y
1002882A |. |D9C9 |fxch st(1)6 I2 Z- c& r, t
1002882C |. |D95C24 14 |fstp dword ptr ss:[esp+14]
6 p& P+ r6 O' k# M9 I* R, N( e10028830 |. |D8D3 |fcom st(3)7 H# C% |, N2 _9 {
10028832 |. |DFE0 |fstsw ax
2 Y/ N$ @. g( O" \6 Q10028834 |. |F6C4 01 |test ah,1
1 j4 t- ~4 N, Q/ G! w2 I10028837 |. |74 2B |je short xcEngine.100288649 S5 t) H) B4 I# b5 p; K4 b
10028839 |. |D94424 14 |fld dword ptr ss:[esp+14]
# q/ P. K1 `: ?5 ]8 k) Q' `, M1002883D |. |D8D3 |fcom st(3) g- k. A- ~/ e- B0 B* t
1002883F |. |DFE0 |fstsw ax
" }$ @ ^( a! B+ o: B/ v10028841 |. |F6C4 41 |test ah,415 R1 }0 d# E0 p) i
10028844 |. |7A 04 |jpe short xcEngine.1002884A
. N+ K$ V7 D- J" ~9 | l" X10028846 |. |DDD8 |fstp st/ e6 f& Y1 Q7 ~ O1 _) [
10028848 |. |EB 1A |jmp short xcEngine.10028864
0 n" `9 j) n: d ?& B) s) J1002884A |> |D9C9 |fxch st(1)8 s2 U; q) I! h# R/ u1 z- `, K
1002884C |. |D8D3 |fcom st(3)
& i6 \! Z$ m- p4 m U/ U& O1002884E |. |DFE0 |fstsw ax4 s N( @/ Q6 r! T1 I: D7 D
10028850 |. |F6C4 05 |test ah,5
p( r( }6 F& B: n10028853 |. |7A 04 |jpe short xcEngine.10028859
. z6 o" A q" [& ?; D2 v10028855 |. |DDD9 |fstp st(1)2 o7 e( L2 ~0 D! |" J% M! H; a
10028857 |. |EB 0B |jmp short xcEngine.10028864
! E3 o _9 Y2 g2 v: x2 g10028859 |> |D9C9 |fxch st(1)
- E2 g) W2 \7 r2 c% a% ?1002885B |. |D8DC |fcomp st(4)4 Q' Z v1 ~2 F r0 q% L
1002885D |. |DFE0 |fstsw ax
, D/ A2 T" h6 J' W1002885F |. |F6C4 41 |test ah,418 k0 N2 J/ e7 q" P/ B8 w( G& W
10028862 |. |75 05 |jnz short xcEngine.10028869
7 |, Q$ d5 o; j3 g8 @2 y10028864 |> |B9 01000000 |mov ecx,1
- J8 P+ v7 B& @ p# C3 N, }3 p! E10028869 |> |85C9 |test ecx,ecx: h6 G- {7 l0 s5 p) C( |* ]9 ^
1002886B |. |8B4424 18 |mov eax,dword ptr ss:[esp+18]
9 h; C) L8 G. H8 t2 W$ Z1002886F |. |D940 14 |fld dword ptr ds:[eax+14]) T" ]( K; }5 e4 w/ i- Y
10028872 |. |DECA |fmulp st(2),st: q& f0 K. ]# S! P3 l
10028874 |. |DEC1 |faddp st(1),st
1 \! u# P' } `' d, A8 g# o10028876 |. |D95C24 0C |fstp dword ptr ss:[esp+C]$ j) _0 {# {/ x& V* z6 |* ^: a( Y% b ^
1002887A |. |75 05 |jnz short xcEngine.10028881
2 a) Q+ X/ X9 G% `! f1002887C |. |834424 10 0>|add dword ptr ss:[esp+10],1
: l' B, |2 f. ^. z. i' V: X' H, t0 z# U10028881 |> |83C2 02 |add edx,2
! u3 q3 n6 o$ K8 }* r6 `, n8 q$ Z9 M10028884 |. |83EF 01 |sub edi,1
* O7 i+ U6 s A* h# u6 x10028887 |.^\\0F85 7AFFFF>\\jnz xcEngine.10028807' q l* |# K3 `# [5 k
由于算法采用了浮点数指令,本人不太懂,边学习边研究中。。。。。。。。。 |