i've found this prog by Andycar on the board but it's Unicode and a little complicated for me
can someone convert it or rewrote it (in a simpler even less efficient way)

please it's a so fun tool

here's the code :
.586p
.model flat,STDCALL
OPTION CASEMAP:NONE
UNICODE = 0

;include WINDOWS.inc
include APImacro.mac
;include MyINC\WINEXTRA.def

includelib iKernel32.lib
includelib iUser32.lib
includelib iADVAPI32.lib
;includelib EXTRALIB.lib

.DATA?
My_hKey dd ?
keyType dd ?
dwDisp dd ?
RegRetCode dd ?

.DATA
Buf dw 30 dup(0) ;(0)!

.CODE
TEXTW strUNICODE, <BCDFGHJKMPQRTVWXY2346789/0>
TEXTA zWinNTCurVer, <SOFTWARE\Microsoft\Windows NT\CurrentVersion/0>
TEXTA zDigProdID, <DigitalProductId/0>
TEXTW zYorKeyCapt, <Your WinXP key:/0>

GetRegValueInt PROC dwLocation:DWORD, pszKey:PTR SIGN, pszValue:PTR SIGN, pLong:PTR DWORD
LOCAL hSubkey :DWORD

KEY_READ EQU 020019h
REG_DWORD EQU 4

iWin32i RegOpenKeyEx, dwLocation, pszKey, 0, KEY_READ, offset My_hKey
.if eax==0;ERROR_SUCCESS
mov keyType, REG_DWORD
lea eax, hSubkey
iWin32i RegQueryValueEx, My_hKey, pszValue, 0, offset keyType, pLong, eax
mov RegRetCode, eax
iWin32 RegCloseKey, My_hKey
.endif
ret
GetRegValueInt ENDP

GetWinXPKey PROC uses edi esi ebx pOutBuf:PTR WORD, dwBufSize:DWORD
LOCAL dwDigIdBuf[0A5h]:DWORD ;Fixed Buffer size for fixed Digital Product ID binary string
LOCAL iCurSym:DWORD
LOCAL iSymLeft:DWORD

cmp dwBufSize, 30
jl Exit
;====================Get Digital Product ID binary data from registry===================================
HKEY_LOCAL_MACHINE equ 80000002h
sWin32 GetRegValueInt, HKEY_LOCAL_MACHINE, szWinNTCurVer, szDigProdID, addr dwDigIdBuf
;========================================================================================

mov iCurSym, 0
mov iSymLeft, 29 ;Total of 29 symbols (incl. dashes)
mov ebx, dword ptr
add ebx, (28*2)

KeyStart:
mov eax, iCurSym
xor ecx, ecx
inc eax
mov iCurSym,eax
mov edi, 6
cdq
idiv edi
test edx,edx
jnz @F
mov word ptr , 2Dh
jmp MoreSym
@@:
mov edi, 14 ;Eh
GetOneSym:
xor edx, edx
mov eax,02AAAAAABh
mov dl,BYTE PTR
shl ecx, 8
add ecx,edx
imul ecx
sar edx, 2
mov eax,edx
shr eax, 01Fh
add edx,eax
mov eax,ecx
mov BYTE PTR , DL
mov ecx, 018h
cdq
idiv ecx
dec edi
mov ecx,edx
jns GetOneSym
mov dx,WORD PTR strUNICODE

mov word ptr , dx
MoreSym:
mov eax, iSymLeft
sub ebx, 2
dec eax
mov iSymLeft, eax
jnz KeyStart
Exit:
ret
GetWinXPKey ENDP

Start:
sWin32 GetWinXPKey, offset Buf, 30 ;Buffer must be at least 30 widechars long and zero-inited.
iWin32 MessageBoxW, 0, offset Buf, szYorKeyCapt, 0;MB_ICONEXCLAMATION or MB_YESNO
iWin32 ExitProcess, eax
End Start

and here's the orginal zipfile

thanks
Posted on 2002-12-09 07:27:21 by Thor0Asgard
Exactly what is your problem with it? Do you want to convert it from UniCode to ASCII strings? Or what? Have you tried stepping through it in a debugger to understand the program flow?
Posted on 2002-12-09 16:21:46 by sluggy
I can get the serial number of my disk drive and
the product id from the DigitalProductId too. Does
that work for other people? What else can you get from it?
Posted on 2002-12-09 23:46:52 by roaknog
it is pretty,and works all fine thanks
can you do the inverse algo:With a Winxp Key String mke a valid Digital Product Id
thanks
Posted on 2002-12-10 06:22:10 by Thor0Asgard

can you do the inverse algo:With a Winxp Key String mke a valid Digital Product Id
What? this sounds somewhat suspicous? ( :grin: )
Posted on 2002-12-10 07:09:38 by natas
What? this sounds somewhat suspicous?
No it's just to know how MS did his productkey (encrypted and stored).
it's a good start to implement one for my softs
that's the only reason of my asking and there is no resverse or hacking there.
Posted on 2002-12-10 16:15:17 by Thor0Asgard