- UID
- 39200
注册时间2007-12-2
阅读权限60
最后登录1970-1-1
亢龙有悔
TA的每日心情 | 擦汗 2019-3-1 23:51 |
---|
签到天数: 559 天 [LV.9]以坛为家II
|
楼主 |
发表于 2015-6-2 17:20:14
|
显示全部楼层
我的查找函数是扣代码的,所以不好意思放出来
Private Sub Command4_Click()
Dim tt&, i&, s1_add&, s2_add&, j&
tt = GetTickCount
Dim l_byte() As Byte '要被转化的Byte()
Dim scanhex(255) As Byte
Open App.Path & "\PitStop Pro.dll" For Binary As #1
i = LOF(1) - 1
ReDim l_byte(i)
Get #1, , l_byte
Close
scanhex(0) = &HFD
scanhex(1) = &HFD
scanhex(2) = &HF0
s1_add = VarPtr(l_byte(0))
s2_add = VarPtr(scanhex(0))
j = findhex(s1_add, s2_add, 0, i, 7)
DoEvents
MsgBox GetTickCount - tt & vbNewLine & "findhex" & j
Text1 = ss
End Sub
Function addhex2(ByVal s1&, ByVal s3&) As Long
'_asm{overall}
' _asm{
' mov ecx,[esp+36-32]
' mov eax,[esp+40-32]
' mov edx,[eax]
' add edx,[ecx]
' mov [eax],edx
' mov edx,[eax+4]
' adc edx,[ecx+4]
' mov [eax+4],edx
' mov edx,[eax+8]
' adc edx,[ecx+8]
' mov [eax+8],edx
' mov edx,[eax+12]
' adc edx,[ecx+12]
' mov [eax+12],edx
' retn 8
' }
End Function
Function findhex(ByVal s1&, ByVal s2&, ByVal j&, ByVal k&, ByVal g&) As Long
'_asm{overall}
' _asm{
' pushad
' mov esi,[esp+4*8+4]
' mov ebp,[esp+4*8+8]
' mov eax,[esp+4*8+12]
' mov edx,esi
' add esi,eax
' mov eax,[esp+4*8+16]
' add edx,eax
' mov edi,[esp+4*8+20]
' xor eax,eax
' xor ebx,ebx
' @menglv1:
' cmp esi,edx
' jg @menglv2
' xor ecx,ecx
' mov al,[esi]
' mov bl,[ebp]
' inc esi
' cmp al,bl
' jne @menglv1
' dec esi
' @menglv3:
' inc ecx
' inc esi
' inc ebp
' mov bl,[ebp]
' cmp bl,0
' jne @menglv4
' sub esi,ecx
' mov [esp+4*8+20],esi
' popad
' mov eax,[esp+20]
' mov ecx,[esp+4]
' sub eax,ecx
' retn 4*5
' @menglv4:
' bt edi,ecx
' jnc @menglv3
' mov al,[esi]
' cmp al,bl
' je @menglv3
' mov ebp,[esp+4*8+8]
' sub esi,ecx
' inc esi
' inc esi
' @menglv5:
' jmp @menglv1
' @menglv2:
' popad
' xor eax,eax
' retn 4*5
'}
End Function |
|