! Y- M1 |. I9 U;余数是否为0& N9 ?7 _# K# a( j9 ^
0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B1 M1 T$ {2 T3 X6 W1 J
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE725 Z" |$ e( [, e* d) t1 w
0041DE5A |. EB 0B |JMP SHORT flashget.0041DE67 9 q( S4 q2 w. `( Z* u9 T( j: l0 `6 x9 B4 [
;余数是否为8 * j/ U8 W/ ~$ P& z$ [0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B% Q3 t" c+ ?/ o e- E
0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72 1 c, A# q% x4 q8 ^3 W4 m5 T4 o0041DE61 |. EB 04 |JMP SHORT flashget.0041DE67/ r" c5 \! n. U! `
' U: r# n0 x4 B, \: S;余数是否为0 3 R. t8 T* U+ w3 J& C1 y% o0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B 3 x5 ?. R+ d# J$ i) J! Y. M0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72 3 Q8 [: D7 [( L$ k 6 @/ I+ X2 X0 P: N" M5 _6 k0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B1 G6 f$ d- k# v0 [
0041DE68 |. 83FE 03 |CMP ESI,3, d+ o, ]6 d8 c
0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90 1 e k/ T3 U# f4 W; M& }7 S0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA. \, i/ |" w7 `: m- x
# D3 I5 Y# m% F7 {4 V) m所以这三段的KEY的验证算法是: : n+ o d7 \# e& ^/ }- L* X& \; ~Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'* t% {& W' Z2 \: P
Case 1(B AND C) * D + A) MOD X = 0,这儿X是'e' " Y; ]9 J; p2 R: q( ECase 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'5 r0 a; m6 Q, D6 W: }- [5 z7 ~
' b/ f& M% d! D: I$ u8 [LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……- h8 t: C9 o% b- }' v* Q
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]! d6 T+ C: Q5 e( E, k( [
0042514F |. 83C0 10 ADD EAX,10 1 U9 J8 h) ^6 I* b A5 F8 e3 `00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX4 s* c! I( C! |
00425156 |. 6A FF PUSH -1" }; A5 w& ^% B. I
00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E] " V0 Q, e6 ]: A& I- L5 q3 l0042515D |. 0FBED5 MOVSX EDX,CH" T) |; t) \3 F. V3 K
00425160 |. 0BC2 OR EAX,EDX$ B) O1 _) `& ?; n5 z0 L) V1 h
00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F] " }4 e2 e9 G) I& z4 B5 z+ R' |00425167 |. 0FAFC2 IMUL EAX,EDX # Y, C+ Y! s0 C* M, o. t4 [. y0042516A |. 0FBEC9 MOVSX ECX,CL) R3 `0 Y% E6 E" v1 y: p: `
0042516D |. 03C1 ADD EAX,ECX 9 O. ^, Z, s! r( h" N$ A1 M. w; l;跟踪分析得EAX = (B OR C) * D + A: q, c: Q2 W9 b$ z) l! G) R
# K8 N! X5 h3 t; a8 n. X0042516F |. 33D2 XOR EDX,EDX 5 M- f% I, z# }0 u6 ?* [" Z% |4 _4 b6 r0 V$ w) V
;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i' G, F! n) [# l s. q00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]' {5 ]- j; M5 f2 }6 T; @
00425178 |. F7F1 DIV ECX / b& Y) \( i+ D; H: R/ h& W0 _0042517A |. 8BCE MOV ECX,ESI & G6 }) D1 a- o% ?5 b# \$ I2 A, o& g: T9 r# h7 S; Z9 u" q' o
;判断余数是否为0, O' n! ^2 z+ I8 e2 }
0042517C |. 85D2 TEST EDX,EDX/ @7 I% s. P% e; v- e8 `- J
0042517E |. 74 1E JE SHORT flashget.0042519E( u4 y% C6 c/ a. F) P
$ h6 B4 @ ? Z
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'3 n9 y# C0 n0 u
: W( F! ? H, s5 U/ v) o / G* r1 \: a- s% |* V' P5 X8 g只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:; m- l# R+ \; y$ {. X* }
Randomize8 j! P9 y/ w9 G$ C6 e: ^
Dim intEbx As Integer ( N0 b& B! J$ j' L/ U2 L) ?5 g6 h Dim i As Integer, j As Integer, k As Integer, intChar As Integer* \8 @8 q- [' ] v
Dim strCode As String ( l- s% X: R1 |3 ^ % {# o+ N# U7 b# n$ u- D If fgf Then " D& M; D' ~. q. c2 Z strCode = "fgf-" ! }0 V- Z7 x. E% a5 e; ?+ h intEbx = 118# [9 L! z/ _! u5 I( u0 \
Else # Z9 m. _+ C/ o. E- ^7 G strCode = "fgc-"8 J z8 h) f2 R/ v$ q
intEbx = 105 % P6 G) ?5 g* o. y$ ~0 H6 v End If: t7 j( \! c% k3 I1 U
4 t9 j( x$ V" b8 t Do; S1 j& N3 ?7 m2 Y& R7 u d1 R \
intChar = 97 + Int(Rnd() * 25)1 w0 { ~: q; E# R9 v
For i = 48 To 57 + m$ T( ^" u7 N+ Z For j = 48 To 579 `& S. X8 i% y& Q9 u
For k = 48 To 570 B: H# T4 h5 W7 Z
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then y' R+ g) W) q7 _/ [/ ` strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k) 9 \; N2 ]. d& F Exit Do [* I! I. d3 [% Y8 s End If4 t. G8 @4 h! U$ F% r% V9 A
Next k e3 |# d- d6 [ z9 U3 a8 b6 V% F Next j . x' x% {: j0 I Next i 9 y7 j. e( x: V( p- n6 o8 B% j Loop 3 Y2 p; z2 r9 r8 \. E 9 i- S. L: M$ U$ q( J/ ]6 e( x
Do# {& c% k" ]4 ~# B& Q0 U
intChar = 97 + Int(Rnd() * 25)' q+ O2 c% l) h5 ~
For i = 48 To 57 # b3 ]/ R0 F. X For j = 48 To 57( e" P( @% \6 t# J7 I
For k = 48 To 575 X3 y; l' K# g5 x! d) W! n/ v) W
If ((i And j) * k + intChar) Mod 101 = 8 Then- E5 _3 }* q- w2 |. U- s
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)/ J1 E) G: Z5 u" X+ ^
Exit Do % f: D6 P8 C% C7 v( t c* F End If ; V) g- {, y( d3 i: N% F% t( W; B# g: K8 K Next k# e0 ?9 f6 j3 m9 d1 J6 {. ~4 m
Next j4 s& Y6 R1 O4 d- ?0 U
Next i" f/ p* [; @3 [: ^2 O3 |
Loop r8 ]( O8 X; O- [1 t 8 L% }# u$ H/ f0 _. C* [/ i) R1 e
Do 5 V$ P' B( X- {- u- F0 S intChar = 97 + Int(Rnd() * 25). L N6 t; m; R" [+ {$ N/ i" i
For i = 48 To 57: x4 ~' W- s5 P- ^, o
For j = 48 To 57 1 |* }7 @/ ?. }( m @/ V For k = 48 To 57& H: E7 N) V1 g4 a
If (i * j + k + intChar) Mod intEbx = 0 Then7 C' A& d9 t5 N+ t
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k) ! ^) q8 Y/ d, W2 k0 \" \ Exit Do 8 z* J' [, ?( m) b5 ` End If " b$ u! p3 l1 A! P: _ Next k - `( a, s9 G# T0 _ Next j. o" L+ X: d' J' v' f* ?9 A& w2 p
Next i8 |( z5 ]6 |" ?0 _$ M5 R, h4 R' Z
Loop 6 m @7 s1 X2 v/ w9 I3 W$ x 3 l( r' ?- t5 V* S- _3 N
Do 9 A3 H3 M' T- s: Z- u& ?+ V R intChar = 97 + Int(Rnd() * 25)) W0 _: g* O) n5 @( W5 a: S
For i = 48 To 57 7 i3 W9 D# A" K" H* F3 h For j = 48 To 57 3 y' s4 O. I' ~ For k = 48 To 57 & o8 N( X, U0 {% l: T1 K If ((i Or j) * k + intChar) Mod 105 = 0 Then' j T. k- Y' i# U0 Q5 n+ { X/ G1 o
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)9 p4 z+ b- S4 ?9 V! y E' n& B% C
Exit Do " m5 n- z: g) l, s. ~2 V End If & F, I, `/ l+ s4 [- Z5 q Next k - Z! m: g. N( M4 k! Y) n# R Next j / b: ^# Y4 z( q8 E7 y4 i Next i ( i3 X. Q( V8 y% }) Z: T7 y Loop8 M& q9 H" a# ?0 b: v+ v: o
! z4 B% b5 d# }
; x+ s7 i5 B9 _7 i '后面的24位随机生成。$ B1 o( n2 s# S+ }$ A
For i = 1 To 6; t+ x2 c* Q ?. r) H
intChar = 97 + Int(Rnd() * 25) j. f' p3 B0 J strCode = strCode & Chr(intChar)) x7 ^3 x0 {' @3 W) E
For j = 1 To 3 ; W, p; y d9 [$ N( _+ `* }4 w intChar = 48 + Int(Rnd() * 9). J/ t- y# n" b2 b% R' z
strCode = strCode & Chr(intChar) * D4 k' q4 W0 V5 l7 ^3 w Next j / T) ^3 y# I- I1 T" I Next i 1 ^0 P$ L; M- I & k( Z) r y. {6 W 2 x3 L& l" K$ ^! v1 k$ L最后字符串strCode就是所要求的KEY