Look what I reverse-engineered today mommy!
Public Function VerifySCkey(key As String) As Boolean
Dim eax As Integer, _
ebx As Integer, _
ecx As Integer, _
edx As Integer, _
esp As Integer, _
ebp As Integer, _
edi As Integer, _
esi As Integer
eax = 3 'mov eax, 3
esi = 1 'mov esi, ecx ;set esi = ecx (pointer to CD-Key)
ecx = 0 'xor ecx, ecx
Top: 'Top:
edx = Mid(key, esi, 1) 'movsx edx, byte ptr [ecx+esi] ;moves first number of cd-key to edx
edx = edx = &H30 'sub edx, 30h
edi = eax * 2 'lea edi, [eax+eax]
edx = edx Xor edi 'xor edx, edi
eax = eax + edx 'add eax, edx
ecx = ecx + 1 'inc ecx
If ecx < &HC Then GoTo Top 'cmp ecx, 0Ch
'jl short Top
edx = 0 'xor edx, edx
ecx = &HA 'mov ecx, 0Ah
edx = eax Mod ecx 'div ecx ;edx = eax % ecx (eax = checksum, ecx = 10)
eax = Mid(key, 13, 1) 'movsx eax, byte ptr [esi+0Ch] ;eax = last num of key
'18 movsx edx, dl ;"this line does nothing" -iago
edx = edx + &H30 'add edx, 30h (see line 6)
If eax <> edx Then eax = 0
VerifySCkey = CBool(eax)
'20 cmp eax, edx ;compare eax to eax (eax = last num of key, edx = result of checksum mod 10)
'21 jnz bottom ;if not equal jump to bottom
'22 mov eax, 1 ;if we didn't jump, set eax to 1
'23 ret ;return eax
End Function