写屏函数:
$ ]5 d+ T# X: z/ g: [% W9 u02A0EA4C |> /8B00 |/mov eax,dword ptr ds:[eax]
! I9 O3 V! e1 {, C; I$ D02A0EA4E |. |0FB70450 ||movzx eax,word ptr ds:[eax+edx*2] ; [eax+edx*2]存放字符的UNICODE码
4 j1 } i. G; D$ c9 l( W02A0EA52 |. |8B7C24 14 ||mov edi,dword ptr ss:[esp+14]
5 q6 E: N5 s+ ^( e4 \4 t02A0EA56 |. |8B7F 2C ||mov edi,dword ptr ds:[edi+2C]
& b$ m3 A& ^. {4 @- t4 {02A0EA59 |. |8D04C0 ||lea eax,dword ptr ds:[eax+eax*8]
4 i5 E2 [7 c w1 u W' E$ }( y02A0EA5C |. |8D0487 ||lea eax,dword ptr ds:[edi+eax*4] ; eax存放字符编码表8 D( B1 X; n' z1 U+ I1 Q
每个字符码表占24(16进制)个字节
8 Q: m0 \' h3 r( w2 ]& |& `02A0EA5F |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
! H: e0 j9 y. D8 p02A0EA63 |. |8D7C39 14 ||lea edi,dword ptr ds:[ecx+edi+14] ; edi就是显存地址
1 r* i/ D; C, l5 K02A0EA67 |. |D940 04 ||fld dword ptr ds:[eax+4]
! d( L5 K+ H7 W02A0EA6A |. |83C2 01 ||add edx,1 字符个数加一; x3 S2 h8 }; b) u
02A0EA6D |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
+ j& N( E" r0 ~) o; a+ {02A0EA71 |. |D900 ||fld dword ptr ds:[eax]
" a. B" \9 T. b* q. t# ~. D02A0EA73 |. |D91F ||fstp dword ptr ds:[edi] ; edi就是显存地址& N! f- K# H4 R3 I) y
每个字符占1C个字节,最后的四个字节都是一样的,可以认为是结束标志, h8 \1 m8 U# z: w+ B) |
02A0EA75 |. |D94424 30 ||fld dword ptr ss:[esp+30]% S' b( K$ C% K5 U7 s( _
02A0EA79 |. |D95F 04 ||fstp dword ptr ds:[edi+4]. U6 f2 y' ]7 z5 N1 ]+ {6 J
02A0EA7C |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]0 I, J4 S: `$ p, O3 I4 h7 L
02A0EA80 |. |D940 04 ||fld dword ptr ds:[eax+4]+ ^% k; O, y: g( g: o. x; u& c5 e
02A0EA83 |. |8D7C39 30 ||lea edi,dword ptr ds:[ecx+edi+30]
6 }8 V4 [. D4 B3 O8 U. p2 D02A0EA87 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]+ d% T; l, u" U8 J7 v2 B/ b
02A0EA8B |. |D940 08 ||fld dword ptr ds:[eax+8]
" a# n0 J3 k8 x1 ^02A0EA8E |. |D91F ||fstp dword ptr ds:[edi]" B4 h$ Z+ c. M, S5 s6 c
02A0EA90 |. |D94424 30 ||fld dword ptr ss:[esp+30]1 I* l' _; B. ]! {9 f
02A0EA94 |. |D95F 04 ||fstp dword ptr ds:[edi+4]% z% I" ?1 N, a) @1 a% L
02A0EA97 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]$ o; a' J, u+ ]4 z
02A0EA9B |. |D940 0C ||fld dword ptr ds:[eax+C]: \9 A7 N* T* `) }) t3 f: o
02A0EA9E |. |8D7C39 4C ||lea edi,dword ptr ds:[ecx+edi+4C]% I n- B3 f# y
02A0EAA2 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
! Z/ B' J8 x! O8 W02A0EAA6 |. |D900 ||fld dword ptr ds:[eax]" X: \. X1 ]( L m5 _+ `
02A0EAA8 |. |D91F ||fstp dword ptr ds:[edi]) o: l2 h4 E2 [( |# ~
02A0EAAA |. |D94424 30 ||fld dword ptr ss:[esp+30]
2 ]/ D1 |/ H. `. E02A0EAAE |. |D95F 04 ||fstp dword ptr ds:[edi+4]
' A+ U; l) }- ^0 b02A0EAB1 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
3 _: |4 e( U ]; Z0 f02A0EAB5 |. |D940 0C ||fld dword ptr ds:[eax+C]
3 o% R, H# a& h" h02A0EAB8 |. |8D7C39 68 ||lea edi,dword ptr ds:[ecx+edi+68]$ Y/ K. ?0 v3 e$ c o: }& l
02A0EABC |. |D95C24 30 ||fstp dword ptr ss:[esp+30]) X C) y( e) d/ {: k
02A0EAC0 |. |83C1 70 ||add ecx,702 I, r" e0 q0 ?' }8 V3 O
02A0EAC3 |. |D940 08 ||fld dword ptr ds:[eax+8]; M) y8 Y! _8 c \0 H
02A0EAC6 |. |D91F ||fstp dword ptr ds:[edi]3 `2 m4 O, S/ j# m0 |# Y
02A0EAC8 |. |D94424 30 ||fld dword ptr ss:[esp+30]! P$ U' j- N2 C# {- p
02A0EACC |. |D95F 04 ||fstp dword ptr ds:[edi+4]
9 K1 Q3 V' [% G" L02A0EACF |. |8B46 58 ||mov eax,dword ptr ds:[esi+58]
) ?% x5 A) p; @! a2 P% }02A0EAD2 |. |03C3 ||add eax,ebx
! q* G) c$ E9 m. v02A0EAD4 |. |3B50 08 ||cmp edx,dword ptr ds:[eax+8]
* q9 e6 C! M2 X! C2 |* j& [02A0EAD7 |.^\\0F8C 6FFFFF>|\\jl xcDxShad.02A0EA4C+ p" S& V3 G, R' V3 h5 e I
; ]( J x8 M: a R
本游戏字符编码采用UNICODE,; e' [' K' ]+ v
对字符码表的操作:
: M, y* Q* A- M10028807 |> /0FB702 /movzx eax,word ptr ds:[edx] 读字符的UNICODE码- h" z) b7 w# X) z+ y( E
1002880A |. |8D04C0 |lea eax,dword ptr ds:[eax+eax*8]% J" Y, ]- n: q, K) a( q
1002880D |. |8D0483 |lea eax,dword ptr ds:[ebx+eax*4] 根据UNICODE码求得字符码表的地址( u+ E" Y: y$ \7 m) s
10028810 |. |33C9 |xor ecx,ecx- |# g- j* j m; H
10028812 |. |DB40 20 |fild dword ptr ds:[eax+20]
* G9 J& L7 o e' B8 _10028815 |. |D95C24 14 |fstp dword ptr ss:[esp+14]
) P; N' J, p' y" b9 O/ O: }4 b; E10028819 |. |D94424 14 |fld dword ptr ss:[esp+14]3 V" h% A( Z7 t9 L
1002881D |. |D9C0 |fld st* @, J0 z4 @$ k0 v& H! H- c
1002881F |. |D84E 14 |fmul dword ptr ds:[esi+14]* g0 g& `% T- o# t
10028822 |. |D94424 0C |fld dword ptr ss:[esp+C]
$ J# u2 f" t9 l& s, r10028826 |. |D9C0 |fld st; X! C. K% y- C- ^+ z. c g) c+ q
10028828 |. |DEC2 |faddp st(2),st( Z( c' p0 C" a! o
1002882A |. |D9C9 |fxch st(1): {& c4 p# h+ L# c
1002882C |. |D95C24 14 |fstp dword ptr ss:[esp+14]0 x H0 \& t) c) R1 b& x
10028830 |. |D8D3 |fcom st(3)
! h, q) s# c( x) w0 D* Y0 [6 J10028832 |. |DFE0 |fstsw ax
& s, |* K! ?3 S10028834 |. |F6C4 01 |test ah,1
k9 r' Y( a) \4 [10028837 |. |74 2B |je short xcEngine.10028864; J3 G+ ?3 Z. y) P$ {
10028839 |. |D94424 14 |fld dword ptr ss:[esp+14]
9 T( e' Y8 O/ s; z6 v1002883D |. |D8D3 |fcom st(3)6 A! P: n4 X r" [8 k
1002883F |. |DFE0 |fstsw ax4 j$ z$ k _/ Q/ X
10028841 |. |F6C4 41 |test ah,41
# J ]: ?) x) |10028844 |. |7A 04 |jpe short xcEngine.1002884A. c) v1 G! H& F( \) A; W
10028846 |. |DDD8 |fstp st+ |! r8 y! m" r' W
10028848 |. |EB 1A |jmp short xcEngine.10028864
4 Y0 q% T# B4 |: m5 j1002884A |> |D9C9 |fxch st(1)
* W8 X1 k1 V( ^0 c, x" K2 W) P0 u1002884C |. |D8D3 |fcom st(3)
' u* `; y: \6 H* v1002884E |. |DFE0 |fstsw ax
8 c3 z: c, U/ a" q/ C( H' F10028850 |. |F6C4 05 |test ah,5" G& D3 e$ ^; |2 A- K! u8 e
10028853 |. |7A 04 |jpe short xcEngine.10028859
6 r* ~1 C$ D3 x5 S) v* F10028855 |. |DDD9 |fstp st(1)2 `1 j( d# D9 }3 p* W% h
10028857 |. |EB 0B |jmp short xcEngine.10028864
2 t$ n2 B3 W1 U4 h/ V10028859 |> |D9C9 |fxch st(1)
6 Q( A- @: \9 D1002885B |. |D8DC |fcomp st(4)
1 \0 u; e0 x" |1002885D |. |DFE0 |fstsw ax
6 ? u, d/ m8 l& w" Y1 Z1 i1002885F |. |F6C4 41 |test ah,413 B" E2 o$ N; C/ p. |* p4 }
10028862 |. |75 05 |jnz short xcEngine.100288696 I) E9 ]5 V; G* f- I8 U# k' H
10028864 |> |B9 01000000 |mov ecx,1
2 J4 A1 h! Q# }' y% z& _) {+ P0 x+ @9 w10028869 |> |85C9 |test ecx,ecx2 u, o0 Y' p9 R+ j) q
1002886B |. |8B4424 18 |mov eax,dword ptr ss:[esp+18]& x% V0 ^6 q# G7 S5 Z
1002886F |. |D940 14 |fld dword ptr ds:[eax+14]
F/ g0 c- K; F10028872 |. |DECA |fmulp st(2),st- A* [# V3 v v& f- }
10028874 |. |DEC1 |faddp st(1),st
7 H7 V% P5 T6 G10028876 |. |D95C24 0C |fstp dword ptr ss:[esp+C]
" l" L% z* Y6 d1002887A |. |75 05 |jnz short xcEngine.10028881
/ k! ]. u# I2 |8 a# i. {3 ?1002887C |. |834424 10 0>|add dword ptr ss:[esp+10],1$ ]: {! X" [$ k9 z
10028881 |> |83C2 02 |add edx,2
% X2 K* e. ~- \/ L: g) X" C& }10028884 |. |83EF 01 |sub edi,15 l, t5 S5 r8 P [7 B& ^: F5 z
10028887 |.^\\0F85 7AFFFF>\\jnz xcEngine.10028807
9 A; @$ Q; m* m+ J7 ]$ P由于算法采用了浮点数指令,本人不太懂,边学习边研究中。。。。。。。。。 |