写屏函数:
/ s' j6 J8 ~$ m0 ]( ?02A0EA4C |> /8B00 |/mov eax,dword ptr ds:[eax]2 m w4 F( T [. E0 H. f
02A0EA4E |. |0FB70450 ||movzx eax,word ptr ds:[eax+edx*2] ; [eax+edx*2]存放字符的UNICODE码
+ o5 U6 p9 {7 ]' q! l+ |& g02A0EA52 |. |8B7C24 14 ||mov edi,dword ptr ss:[esp+14]
7 C5 s+ V& v4 S; ~8 M6 N02A0EA56 |. |8B7F 2C ||mov edi,dword ptr ds:[edi+2C]3 W( X9 a/ B, {2 {6 A9 _* d
02A0EA59 |. |8D04C0 ||lea eax,dword ptr ds:[eax+eax*8]
+ W, n, y) \& b7 X+ k" C# c02A0EA5C |. |8D0487 ||lea eax,dword ptr ds:[edi+eax*4] ; eax存放字符编码表- l, H9 |; h$ k5 z2 }
每个字符码表占24(16进制)个字节
6 `- b4 f, ^3 F+ M( C02A0EA5F |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
. U' W% W' m, i' T) ]02A0EA63 |. |8D7C39 14 ||lea edi,dword ptr ds:[ecx+edi+14] ; edi就是显存地址+ }# P5 z; k9 n/ O O# y' W
02A0EA67 |. |D940 04 ||fld dword ptr ds:[eax+4]9 c9 }3 `4 p. g6 H( m" i
02A0EA6A |. |83C2 01 ||add edx,1 字符个数加一/ {% v7 G4 B1 L+ F- g( L6 P
02A0EA6D |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
+ M# h/ \8 ^7 `' m D02A0EA71 |. |D900 ||fld dword ptr ds:[eax]
1 M( v! r* R4 a02A0EA73 |. |D91F ||fstp dword ptr ds:[edi] ; edi就是显存地址7 F0 i# Z2 e8 ]6 a8 t7 D8 j
每个字符占1C个字节,最后的四个字节都是一样的,可以认为是结束标志
' c; b* Y6 C2 d3 W( ^' x8 n02A0EA75 |. |D94424 30 ||fld dword ptr ss:[esp+30], I1 V" Q7 x9 ?) s4 u1 a' B
02A0EA79 |. |D95F 04 ||fstp dword ptr ds:[edi+4] s! x: N' z, u- [7 @4 N
02A0EA7C |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
5 g6 c$ m6 W4 Y4 G) X, f v' U; }02A0EA80 |. |D940 04 ||fld dword ptr ds:[eax+4]
4 u+ s, g* Y! L Y O, K02A0EA83 |. |8D7C39 30 ||lea edi,dword ptr ds:[ecx+edi+30]
$ N# Q! b+ Z+ y R0 Z, _02A0EA87 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
) _3 x& Z0 E5 ?1 h3 n' F0 {( W9 Q02A0EA8B |. |D940 08 ||fld dword ptr ds:[eax+8]; n, q7 {- ?( D( X) T+ }% N8 W
02A0EA8E |. |D91F ||fstp dword ptr ds:[edi]
5 L' ?. [1 ?) j6 N02A0EA90 |. |D94424 30 ||fld dword ptr ss:[esp+30]
. J4 j5 y* Z6 i02A0EA94 |. |D95F 04 ||fstp dword ptr ds:[edi+4]' F5 V) y# R) S: g( u
02A0EA97 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]
' ~3 N9 R3 A3 S' h& U8 @02A0EA9B |. |D940 0C ||fld dword ptr ds:[eax+C]
0 c% k7 k C$ u" K7 h4 O6 ?/ j3 U& A02A0EA9E |. |8D7C39 4C ||lea edi,dword ptr ds:[ecx+edi+4C]' P$ B9 b& J- v5 c9 E' F
02A0EAA2 |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
8 y0 _* x7 y4 j% f) F02A0EAA6 |. |D900 ||fld dword ptr ds:[eax] U5 q; Y/ R: s X4 {
02A0EAA8 |. |D91F ||fstp dword ptr ds:[edi]
/ |# h9 E( S3 S" q; A$ \02A0EAAA |. |D94424 30 ||fld dword ptr ss:[esp+30]
" o) T0 u/ ?. @02A0EAAE |. |D95F 04 ||fstp dword ptr ds:[edi+4]4 i( O0 ?) x, R7 o
02A0EAB1 |. |8B7C24 0C ||mov edi,dword ptr ss:[esp+C]) m' }# q: M; T. g# U8 ~
02A0EAB5 |. |D940 0C ||fld dword ptr ds:[eax+C]+ {. {5 A/ F7 d) O5 e6 [; u: O
02A0EAB8 |. |8D7C39 68 ||lea edi,dword ptr ds:[ecx+edi+68]
, w" O# H' E, D, o: C! L; R02A0EABC |. |D95C24 30 ||fstp dword ptr ss:[esp+30]
" [% G& u0 @/ V4 G; O V02A0EAC0 |. |83C1 70 ||add ecx,70+ N9 Q+ d$ {# `
02A0EAC3 |. |D940 08 ||fld dword ptr ds:[eax+8]7 _2 E1 D; o" q, m2 W
02A0EAC6 |. |D91F ||fstp dword ptr ds:[edi]
" t4 R& F% z# a5 J! Z9 \02A0EAC8 |. |D94424 30 ||fld dword ptr ss:[esp+30]
. X) y' p0 { V; a4 y$ x$ h02A0EACC |. |D95F 04 ||fstp dword ptr ds:[edi+4]
+ C8 Z7 W# L8 ?: K( U02A0EACF |. |8B46 58 ||mov eax,dword ptr ds:[esi+58]# a1 t) v" I, P; g* }
02A0EAD2 |. |03C3 ||add eax,ebx3 i& J {3 f4 R' u! ~3 i6 J4 p
02A0EAD4 |. |3B50 08 ||cmp edx,dword ptr ds:[eax+8]
0 P6 t" {) Z: F6 P' v: M1 |02A0EAD7 |.^\\0F8C 6FFFFF>|\\jl xcDxShad.02A0EA4C1 Y8 N# e: V9 L6 F' b4 }. ~
. q% T, h/ U, o9 F- v本游戏字符编码采用UNICODE,+ X ~, k9 c" H; F* w
对字符码表的操作:6 w5 Y: Q9 J$ ]- W) L
10028807 |> /0FB702 /movzx eax,word ptr ds:[edx] 读字符的UNICODE码 f I. q4 c5 t; o9 z
1002880A |. |8D04C0 |lea eax,dword ptr ds:[eax+eax*8]" n0 }9 A7 c" @0 \* e' C2 ~
1002880D |. |8D0483 |lea eax,dword ptr ds:[ebx+eax*4] 根据UNICODE码求得字符码表的地址
) A- F) P* `# M' |10028810 |. |33C9 |xor ecx,ecx7 x/ Q* w1 ?3 O5 K9 z
10028812 |. |DB40 20 |fild dword ptr ds:[eax+20]- v- J. o9 A2 }6 _0 |2 l
10028815 |. |D95C24 14 |fstp dword ptr ss:[esp+14]
0 k. t9 c1 p6 E+ o10028819 |. |D94424 14 |fld dword ptr ss:[esp+14]
2 m$ V. m; U, K* j/ L1002881D |. |D9C0 |fld st
; k7 W8 {, a U G& }1002881F |. |D84E 14 |fmul dword ptr ds:[esi+14]/ ~) x; r' g( F( ]
10028822 |. |D94424 0C |fld dword ptr ss:[esp+C]
4 @) h/ E* B& s& W z10028826 |. |D9C0 |fld st( x: @8 c3 i1 M/ g
10028828 |. |DEC2 |faddp st(2),st4 ?. D9 a6 g1 }4 W
1002882A |. |D9C9 |fxch st(1)1 }, R1 E6 O4 u I2 V3 A
1002882C |. |D95C24 14 |fstp dword ptr ss:[esp+14]. |* y2 S" J& o. q/ s# @) e# _+ s
10028830 |. |D8D3 |fcom st(3)0 u8 [$ L O* s) k' |
10028832 |. |DFE0 |fstsw ax
: z, i" B# E9 c1 O5 u10028834 |. |F6C4 01 |test ah,1
% m+ F; G* t* g1 q. W. B10028837 |. |74 2B |je short xcEngine.100288643 U: u0 M$ y+ l' w& ]2 x @4 F6 F
10028839 |. |D94424 14 |fld dword ptr ss:[esp+14]
# [0 d7 G; O* @1002883D |. |D8D3 |fcom st(3)0 R4 R5 x0 W* O& e& p& m0 W/ D5 _
1002883F |. |DFE0 |fstsw ax
8 {2 X$ x. r: \/ o5 K10028841 |. |F6C4 41 |test ah,41 `5 F9 k( F M9 t8 C: k
10028844 |. |7A 04 |jpe short xcEngine.1002884A
+ Z. x j0 O) T9 S7 D10028846 |. |DDD8 |fstp st. h8 |3 K: u/ D6 t, ?
10028848 |. |EB 1A |jmp short xcEngine.10028864
, \# Z! {0 W. n5 p' h! I/ S( w& L1002884A |> |D9C9 |fxch st(1)
! c# e1 x8 b& [: G) m( l1002884C |. |D8D3 |fcom st(3)0 U* {7 x9 I X8 }1 L0 T6 C
1002884E |. |DFE0 |fstsw ax% I' }4 e( |; k- R# }, u
10028850 |. |F6C4 05 |test ah,5: p1 B+ G8 K. y K; v" d
10028853 |. |7A 04 |jpe short xcEngine.10028859' K& m; B9 X. e1 y! t/ F
10028855 |. |DDD9 |fstp st(1)
- B7 m. t V, H. b- B! t! r10028857 |. |EB 0B |jmp short xcEngine.10028864
0 t, ^4 ~- A, k. P& Y10028859 |> |D9C9 |fxch st(1)8 Y. F3 i2 B$ \+ Y2 s3 |
1002885B |. |D8DC |fcomp st(4)2 e3 E) T% I; y9 G& h6 l# L
1002885D |. |DFE0 |fstsw ax
8 L3 j2 z0 g. {+ S q1002885F |. |F6C4 41 |test ah,41
3 ]5 o7 y/ J- \" R4 f; Q# o10028862 |. |75 05 |jnz short xcEngine.10028869
1 {" L9 h1 U" d8 }* R% a10028864 |> |B9 01000000 |mov ecx,1+ x! k, D" h" E- C [/ M
10028869 |> |85C9 |test ecx,ecx$ d" r& V$ Z& X) b# H$ J3 e+ s
1002886B |. |8B4424 18 |mov eax,dword ptr ss:[esp+18]
9 e+ Z2 R/ p# Y8 N8 H0 E1002886F |. |D940 14 |fld dword ptr ds:[eax+14]( |# w, [/ J* m# C# N( u' ~0 d& X
10028872 |. |DECA |fmulp st(2),st
$ [" j- R3 g9 I" s& A: v10028874 |. |DEC1 |faddp st(1),st. C1 \9 ]3 D l, |
10028876 |. |D95C24 0C |fstp dword ptr ss:[esp+C]& t* r7 B9 Y5 c( ?0 q; q6 {
1002887A |. |75 05 |jnz short xcEngine.10028881
* L+ N" J0 N0 w/ u" T1 [1 r r7 m1 r1002887C |. |834424 10 0>|add dword ptr ss:[esp+10],1% A9 j) ]/ \7 `7 L+ ^, ]- a
10028881 |> |83C2 02 |add edx,2
* T+ f% s8 H% ~5 h3 t$ R10028884 |. |83EF 01 |sub edi,1. `1 V4 R# d% W9 K8 a6 D4 s% ?
10028887 |.^\\0F85 7AFFFF>\\jnz xcEngine.10028807
; t3 G1 O. Q3 ]) X: w8 d4 I由于算法采用了浮点数指令,本人不太懂,边学习边研究中。。。。。。。。。 |