News:

Happy New Year! Yes, the current one, not a previous one; this is a new post, we swear!

Main Menu

I BEAT IAGO

Started by Joe, March 12, 2005, 11:02:17 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joe

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.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


iago


Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Warrior

IAGO SUCKLES LITTLE MONKEY MEN ON THE BEACH IN WALES
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Joe

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
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


drka

...

wth does the code mean?

iago

Look at the name of the function, knob ;)

Quik

Or a bunch of the comments he added.
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

drka

me = confused.  ???me just sees a bunch of ecx edx or w/e that make no sense.

nvm now i get it.

iago

Those are variables :P

rabbit

Quote from: iago on March 13, 2005, 06:01:13 PM
Those are variables :P
But they are registers in assembly :P

iago

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

rabbit

I said "in assemly".

Joe

It didn't work, yago. :(. It always says my key is invalid. People go and fix my code kthx.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.