Got this far with it:
Code:
Break ON
$=SetOption("WrapAtEOL","ON")

Dim $aiKeyChars[24]
Dim $sProductID
Dim $ilByte
Dim $i

$i=0
For Each $c In Split("B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9")
$aiKeyChars[$i]=Asc($c)
$i=$i+1
Next

$sProductID=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion","DigitalProductID")

Dim $bProductKey[15]
For $i = 52*2-1 To 66*2-1 Step 2
$bProductKey[($i-(52*2-1))/2]=Execute("Exit &"+SubStr($sProductId,$i,2))
Next

;Now we are going to 'base24' decode the Product Key

For $ilByte = 24 To 0 Step -1
;Step through each character in the CD key
$nCur = 0.0

For $i=14 To 0 Step -1
;Step through each byte in the Product Key
$nCur = $nCur * 256 ^ (CInt($bProductKey[$i])& &FF) ; NOTE THE XOR!
$bProductKey[$i] = Int($nCur / 24)
$nCur = $nCur Mod 24
Next

$sCDKey = Chr($aiKeyChars[$nCur]) + $sCDKey
If $ilByte Mod 5 = 0 And $ilByte <> 0 $sCDKey = "-" + $sCDKey EndIf
Next
$sCDKey ?

; vim600: sw=4 ts=4 ai fdc=4 fdm=marker



Unfortunately I have to deal with an Exchange 5.5 restore so I'm not going to take it any further - somethings not quite right, either I'm picking up the wrong offset of the math is screwy.

Note the "^" - this resquires 4.50 RC1 which has XOR built in.