Clan x86

Member Forums => iago's forum => Topic started by: Joe on March 12, 2005, 11:02:17 PM

Title: I BEAT IAGO
Post by: Joe on March 12, 2005, 11:02:17 PM
Quote(18:54:49) [x86] iago: cdkeys are actually 14 characters, though
(18:54:50) [x86] iago: 0..13
(18:55:04) JoeTheOdd (ICQ): their 14 characters?
(18:55:04) [x86] iago: but it's doing a checksum of 0..12
(18:55:06) [x86] iago: yes
(18:55:13) [x86] iago: I think?
(18:55:20) JoeTheOdd (ICQ): grabs sc case
(18:55:28) JoeTheOdd (ICQ): 4, 5, 4
(18:55:32) JoeTheOdd (ICQ): 13 chars
(18:55:35) [x86] iago: ok shush
(18:55:38) JoeTheOdd (ICQ): :P
(18:55:40) [x86] iago: no proving me wrong
(18:55:43) [x86] iago: I was thinking 5-4-5
(18:55:44) JoeTheOdd (ICQ): I BEAT IAGO!
(18:55:47) [x86] iago: You win this roudn!
(18:55:50) [x86] iago: round*

We were discussing the ASM version of the SC key-checking method on install.
Title: Re: I BEAT IAGO
Post by: iago on March 12, 2005, 11:05:40 PM
SHUT UP
Title: Re: I BEAT IAGO
Post by: Joe on March 12, 2005, 11:08:58 PM
Yes, Mr. 14.
Title: Re: I BEAT IAGO
Post by: Warrior on March 12, 2005, 11:22:22 PM
IAGO SUCKLES LITTLE MONKEY MEN ON THE BEACH IN WALES
Title: Re: I BEAT IAGO
Post by: Joe on March 12, 2005, 11:47:05 PM
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
Title: Re: I BEAT IAGO
Post by: drka on March 13, 2005, 06:15:33 AM
...

wth does the code mean?
Title: Re: I BEAT IAGO
Post by: iago on March 13, 2005, 01:43:31 PM
Look at the name of the function, knob ;)
Title: Re: I BEAT IAGO
Post by: Quik on March 13, 2005, 02:21:57 PM
Or a bunch of the comments he added.
Title: Re: I BEAT IAGO
Post by: drka on March 13, 2005, 05:35:56 PM
me = confused.  ???me just sees a bunch of ecx edx or w/e that make no sense.

nvm now i get it.
Title: Re: I BEAT IAGO
Post by: iago on March 13, 2005, 06:01:13 PM
Those are variables :P
Title: Re: I BEAT IAGO
Post by: rabbit on March 13, 2005, 07:15:02 PM
Quote from: iago on March 13, 2005, 06:01:13 PM
Those are variables :P
But they are registers in assembly :P
Title: Re: I BEAT IAGO
Post by: iago on March 14, 2005, 12:55:59 AM
Quote from: R.a.B.B.i.T on March 13, 2005, 07:15:02 PM
Quote from: iago on March 13, 2005, 06:01:13 PM
Those are variables :P
But they are registers in assembly :P

That's not assembly, though! It's VB :P
Title: Re: I BEAT IAGO
Post by: rabbit on March 14, 2005, 07:31:52 PM
I said "in assemly".
Title: Re: I BEAT IAGO
Post by: Joe on March 14, 2005, 10:28:33 PM
It didn't work, yago. :(. It always says my key is invalid. People go and fix my code kthx.