- UID
- 2
注册时间2004-12-1
阅读权限255
最后登录1970-1-1
总坛主
TA的每日心情 | 开心 2024-12-1 11:04 |
---|
签到天数: 12 天 [LV.3]偶尔看看II
|
发表于 2010-6-3 09:34:45
|
显示全部楼层
好早的东西都顶上来了啊~~
算法:
Private Sub Check_Click() '4023A4
'Data Table: 401C3C
loc_402240: FLdRfVar var_98
loc_402243: FLdPrThis
loc_402244: VCallAd Text2 //文本框2:注册码框
loc_402247: FStAdFunc var_94
loc_40224A: FLdPr var_94
loc_40224D: Get Me.TextBox.Text //获取值
loc_402252: ILdRf var_98
loc_402255: ImpAdCallFPR4 Val(arg_1)
loc_40225A: CI4R8
loc_40225B: FStR4 var_88
loc_40225E: FFree1Str var_98
loc_402261: FFree1Ad var_94
loc_402264: FLdRfVar var_98
loc_402267: FLdPrThis
loc_402268: VCallAd Text1 //文本框1:用户名
loc_40226B: FStAdFunc var_94
loc_40226E: FLdPr var_94
loc_402271: Get Me.TextBox.Text //获取值
loc_402276: ILdRf var_98
loc_402279: FnLenStr //Len函数,取其长度
loc_40227A: CI2I4
loc_40227B: FStI2 var_8E
loc_40227E: FFree1Str var_98
loc_402281: FFree1Ad var_94
loc_402284: LitI4 &H0
loc_402289: FStR4 var_8C
loc_40228C: FLdI2 var_8E
loc_40228F: LitI2_Byte &H4 //参数 4
loc_402291: LtI2
loc_402292: BranchF loc_4022C9 //用户名长度小于4则跳转
loc_402295: LitVar_Missing var_118
loc_402298: LitVar_Missing var_F8
loc_40229B: LitVarStr var_C8, "提示"
loc_4022A0: FStVarCopyObj var_D8
loc_4022A3: FLdRfVar var_D8
loc_4022A6: LitI4 &H30
loc_4022AB: LitVarStr var_A8, "姓名要四个字符以上!"
loc_4022B0: FStVarCopyObj var_B8
loc_4022B3: FLdRfVar var_B8
loc_4022B6: ImpAdCallFPR4 MsgBox(arg_1, arg_2, arg_3, arg_4, arg_5)
loc_4022C6: Branch loc_4023A0 //跳到结束~Game Over
loc_4022C9: ' Referenced from: 402292
//若用户名长度符合要求,来到这里继续玩
loc_4022C9: LitI2_Byte &H1 //步长 1
loc_4022CB: FLdRfVar var_90
loc_4022CE: FLdI2 var_8E
loc_4022D1: ForI2 var_11C //For 循环
loc_4022D7: FLdRfVar var_98
loc_4022DA: FLdPrThis
loc_4022DB: VCallAd Text1
loc_4022DE: FStAdFunc var_94
loc_4022E1: FLdPr var_94
loc_4022E4: Get Me.TextBox.Text //取用户
loc_4022E9: LitVarI2 "", 1
loc_4022EE: FLdI2 var_90
loc_4022F1: CI4UI1
loc_4022F2: FLdZeroAd var_98
loc_4022F5: CVarStr ""
loc_4022F8: FLdRfVar ""
loc_4022FB: ImpAdCallFPR4 arg_1 = Mid$(arg_2, arg_3, arg_4) //逐位取字符
loc_402300: FLdRfVar ""
loc_402303: CStrVarVal var_120
loc_402307: ImpAdCallI2 Asc(arg_1) //转换成Ascii
loc_40230C: CI4UI1
loc_40230D: ILdRf var_8C
loc_402310: AddI4 //累加
loc_402311: FStR4 var_8C
loc_402314: FFree1Str var_120
loc_402317: FFree1Ad var_94
loc_402323: FLdRfVar var_90
loc_402326: NextI2 var_11C, loc_4022D7 //Next
loc_40232B: ILdRf var_88 //假码
loc_40232E: ILdRf var_8C //真码
loc_402331: SubI4 //相减
loc_402332: LitI4 &H0 //0
loc_402337: EqI4 //测试是否为0(注册码正确)
loc_402338: BranchF loc_40236F //关键跳转了
loc_40233B: LitVar_Missing var_118
loc_40233E: LitVar_Missing ""
loc_402341: LitVarStr var_C8, "恭喜"
loc_402346: FStVarCopyObj ""
loc_402349: FLdRfVar ""
loc_40234C: LitI4 &H40
loc_402351: LitVarStr var_A8, "成功。"
loc_402356: FStVarCopyObj ""
loc_402359: FLdRfVar ""
loc_40235C: ImpAdCallFPR4 MsgBox(arg_1, arg_2, arg_3, arg_4, arg_5)
loc_40236C: Branch loc_4023A0
loc_40236F: ' Referenced from: 402338
loc_40236F: LitVar_Missing var_118
loc_402372: LitVar_Missing ""
loc_402375: LitVarStr var_C8, "对不起"
loc_40237A: FStVarCopyObj ""
loc_40237D: FLdRfVar ""
loc_402380: LitI4 &H10
loc_402385: LitVarStr var_A8, "不成功。"
loc_40238A: FStVarCopyObj ""
loc_40238D: FLdRfVar ""
loc_402390: ImpAdCallFPR4 MsgBox(arg_1, arg_2, arg_3, arg_4, arg_5)
loc_4023A0: ' Referenced from: 4022C6
loc_4023A0: ' Referenced from: 40236C
loc_4023A0: ExitProcHresult
End Sub
VB还原算法之后:- Private Sub btCalc_Click()
- LenName = CInt(Len(TxtUserName.Text))
- Sn = 0
-
- If (LenName < 4) Then
- MsgBox "用户名需要大于4位!", 64, "提示"
- Exit Sub
- End If
-
- For i = 1 To LenName
- n = Mid(TxtUserName.Text, i, 1)
- Sn = (Asc(CStr(n)) + Sn)
- Next
-
- TxtSn.Text = Sn
- End Sub
复制代码 ASM算法函数:
;=================================================
;注册算法:
;用户名逐位ASCII相加转换成字符串输出
;Code By PiaoYun[P.Y.G]
;bbs.chinapyg.com
;blog.piaoyunsoft.com
;=================================================
KeyGen proc uses ecx edx lpUserName:DWORD
LOCAL @szKey[128]:BYTE
invoke RtlZeroMemory,addr @szKey,sizeof @szKey
invoke lstrlen,lpUserName
mov edx,eax
xor ecx,ecx
mov esi,lpUserName
@@:
movzx eax, byte ptr [esi+ecx]
add ebx, eax
inc ecx
dec edx
jnz @B
invoke dw2a,ebx,addr @szKey
lea eax,@szKey
ret
KeyGen endp |
|