VMProtectGetCurrentHWID - 2 different string on same laptop

See the attached image for source code.

  1. Delphi EXE form, that outputs the Hardware ID to the TextBox
  2. Delphi DLL COM, and use a VBScript to call the method that Msgbox the hardware ID
  3. In both case, it uses the GetHardwareID defined in RPM_VMP.pas unit.

I don’t understand, why there are two different hardware id???

Please provide us both HWIDs in the text format.

zHlXs93aFhwC7ux2dlFioybdJCm3bJnz

and


zHlXs93aFhy3bJnzAu7sdnZRYqMm3SQp

It seems that you have used the different versions of VMProtect. Anyway both HWIDs are valid:

zHlXs93aFhwC7ux2dlFioybdJCm3bJnz

CPU	B35779CC
Host	1C16DADC
Ethernet	76ECEE00
Ethernet	A3625174
Ethernet	2924DD24
HDD	F3996CB4

zHlXs93aFhy3bJnzAu7sdnZRYqMm3SQp

CPU	B35779CC
Host	1C16DADC
HDD	F3996CB4
Ethernet	76ECEE00
Ethernet	A3625174
Ethernet	2924DD24

so,

what do you mean by ‘valid’?

I can pick any one to generate license key?
and both would work?

I can pick any one to generate license key?
and both would work?

Exactly!

Thanks.

Yes, I tested it, both are fine.

Maybe this is caused by the fact that both are compiled with different versions of VMProtectSDK32.dll ?

Maybe this is caused by the fact that both are compiled with different versions of VMProtectSDK32.dll ?

I aready wrote:

It seems that you have used the different versions of VMProtect.

is there a way decode the hardware id ?

base64decode will return array of DWORDs. Two right bits of each DWORD is the type of device:
00 - CPU
01 - Host
10 - Ethernet
11 - HDD

HWID1 = "zHlXs93aFhwC7ux2dlFioybdJCm3bJnz"
HWID2 = "zHlXs93aFhy3bJnzAu7sdnZRYqMm3SQp"

Function DecodeHWID(HWID)
	Dim s, sz, r, i, t1, t2, t3, t4, t5, t6
	s = Base64Decode(HWID)
	sz = Len(s)
	If ((sz = 0) Or (sz Mod 4 <> 0)) Then
		DecodeHWID = ""	
	Else
		r = ""
		For i = 1 To sz Step 4  
			' t1 t2 t3 t4
			t1 = Asc(Mid(s, i + 0, 1))
			t2 = Asc(Mid(s, i + 1, 1))	
			t3 = Asc(Mid(s, i + 2, 1))	
			t4 = Asc(Mid(s, i + 3, 1))
			t5 = t1 And 3
			Select Case t5
				Case 0: r = r & "CPU="
				Case 1: r = r & "Host="
				Case 2: r = r & "Ethernet="
				Case 3: r = r & "HDD="
			End Select 
			t6 = Hex(t4 * (2^22) + t3 * (2^14) + t2 * (2^6) + t1 \ 4)
			r = r & t6 & Chr(13) & Chr(10)			
		Next
		DecodeHWID = r
	End If
End Function

WScript.Echo DecodeHWID(HWID1)
WScript.Echo DecodeHWID(HWID2)

CPU=2CD5DE73
Host=705B6B7
Ethernet=1DBB3B80
Ethernet=28D8945D
Ethernet=A493749
HDD=3CE65B2D

CPU=2CD5DE73
Host=705B6B7
HDD=3CE65B2D
Ethernet=1DBB3B80
Ethernet=28D8945D
Ethernet=A493749

Why is it different ?

You decode the same ID as

CPU B35779CC
Host 1C16DADC
HDD F3996CB4
Ethernet 76ECEE00
Ethernet A3625174
Ethernet 2924DD24

CPU=2CD5DE73
Host=705B6B7
Ethernet=1DBB3B80
Ethernet=28D8945D
Ethernet=A493749
HDD=3CE65B2D

CPU=2CD5DE73
Host=705B6B7
HDD=3CE65B2D
Ethernet=1DBB3B80
Ethernet=28D8945D
Ethernet=A493749

These HWIDs are equal.

But the HWIds i’ve got are different from yours..

If you mean that “zHlXs93aFhwC7ux2dlFioybdJCm3bJnz” and “zHlXs93aFhy3bJnzAu7sdnZRYqMm3SQp” are different - you are right, but for VMProtect these HWIDs are equal because VMProtect compares HWIDs by devices instead of string value.

no, you misunderstood me.

THe same string, zHlXs93aFhy3bJnzAu7sdnZRYqMm3SQp

what you provided in early replied are
CPU B35779CC
Host 1C16DADC
HDD F3996CB4
Ethernet 76ECEE00
Ethernet A3625174
Ethernet 2924DD24

mine are:
CPU=2CD5DE73
Host=705B6B7
HDD=3CE65B2D
Ethernet=1DBB3B80
Ethernet=28D8945D
Ethernet=A493749


anyway I figure out the difference,
your decode algorithm is : r := r + IntToHex((a and $FC) + (b shl :sunglasses: + (c shl 16) + (d shl 24), 1)
my decode algorithm is: r := r + IntToHex((a shr 2) + (b shl 6) + (c shl 14) + (d shl 22), 1)

Oh. I understand now :slight_smile:)