Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-18-2006, 08:56
MeteO
 
Posts: n/a
Bulding true dongle emulator can solve all your problems. Here is the part of my source code:

;-------------------------------------------------------------------------
BeginProc spro_Find1st
xor ebx, ebx
mov word ptr _pDataPatch, bx ; Restore previous state
mov word ptr _pAlgoPatch, bx ; Restore previous state
mov word ptr _pLicPatch, bx ; Restore previous state

mov bl, byte ptr [edi._RBP_SPRO_APIPACKET.bUnitNumber]
rol ebx, 10h

mov bx, word ptr [edi._RBP_SPRO_APIPACKET.DevId] ; 100% bug support
cmp bx, _DEVID_DUMPER ; DevID==FFFF check
je @@dumper

movy DeviceID, ebx ; Save Device Id

call _DongleScan
jnc @@found

push ebx
call _LoadKey ; At Prog
jc @@quit

@@found:
call GetDongleMemOffset ; ESI points to Memory

mov ax, word ptr [SP_CELL_SN*2+esi] ; Store SN of dongle into packet
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryContents], ax

mov ax, word ptr [SP_CELL_DI*2+esi] ; Store SN of dongle into packet
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryAddress], ax

mov eax, SP_SUCCESS or SPRO_STATUS_BASE
@@quit:
ret

;---------------------------------------------------------------------------------
; Scan for 0xFFFF case of search dongle
;
@@dumper:
movx esi, pKeyCell
mov eax, dword ptr [esi.Cell._DevId]; Also take UnitNo
movy DeviceID, eax

jmp @@found
EndProc spro_Find1st
;
;-------------------------------------------------------------------------
BeginProc spro_FindNext
movx ebx, DeviceID ; Save Device Id
cmp bx, _DEVID_DUMPER ; DevID==FFFF check
je @@caseFFFF

rol ebx, 10h
mov bl, byte ptr [edi._RBP_SPRO_APIPACKET.bUnitNumber]
inc bl
rol ebx, 10h

call _DongleScan
jnc @@found

push ebx
call _LoadKey
jnc @@found

@@absent:
mov eax, SP_UNIT_NOT_FOUND or SPRO_STATUS_BASE
ret

@@found:
call GetDongleMemOffset ; ESI points to Memory

mov ax, word ptr [SP_CELL_SN*2+esi] ; Store SN of dongle into packet
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryContents], ax

mov ax, word ptr [SP_CELL_DI*2+esi] ; Store SN of dongle into packet
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryAddress], ax

mov eax, SP_SUCCESS or SPRO_STATUS_BASE
ret
;---------------------------------------------------------------------------------
; Scan for 0xFFFF case of search dongle
;
@@caseFFFF:
mov eax, SP_UNIT_NOT_FOUND
ret

movx esi, pKeyCell
mov ebx, dword ptr [esi.Cell._DevId]

call _DongleScan
@@match:
cmp ecx, 0
jz @@absent

add esi, (size Cell)
mov ax, word ptr [esi.Cell._DevId]
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryAddress], ax

mov esi, [esi.Cell._Memory] ; Get ptr to memory
mov ax, word ptr [SP_CELL_SN*2+esi] ; Store SN of dongle into packet
mov word ptr [edi._RBP_SPRO_APIPACKET.wMemoryContents], ax

mov eax, SP_SUCCESS or SPRO_STATUS_BASE
ret
EndProc spro_FindNext
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 18:33.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )