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
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.
anyway I figure out the difference,
your decode algorithm is : r := r + IntToHex((a and $FC) + (b shl + (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)