Log in

View Full Version : cyclic redundancy code blows


Brill0
July 20th, 2001, 20:47
okay, i have asked about crc before and found some tuts on it. but i still can not really know what the assembler code for this really looks like. i have been tring to crack a screen saver, but it detects it has been cracked. the ss which is pretty cool, at least i think is called firemagic (http://www.fpsoftlab.com/firemagic.exe) if someone could look at this could give me a little help.

LaptoniC
July 21st, 2001, 07:26
I dont think that it use classic crc algo.However this programs crc check is easy I guess.Only one reference to error messsage.
Code:

:00409647 E8747D0000 call 004113C0 ;Check file integrity
:0040964C 85C0 test eax, eax
:0040964E 7511 jne 00409661 ;good boy
:00409650 50 push eax
:00409651 50 push eax

* Possible StringData Ref from Data Obj ->"Executable file is damaged (or "
->"ckracked)!"
|
:00409652 68E8DA4300 push 0043DAE8

I didnt check reg check.I have just changed one byte and changed above jump.It worked.Be carefull that this crc call is called two times.I guess you can patch your self this one also if needed.

FatHead_Slim
July 25th, 2001, 09:29
I dont know how much u know about crc ing but pretty much all it does is XOR a sectionbyte by byte or word by word....(etc.) to ensure that it does not change

normally in the following fashion of somesort

/************************************
* This C code snippet Wont show u what an *
* asm code will look like but will let understand *
* the theory behind it... I hope *
***********************************/

int i=0;
char *SectionToBeChecked;
char GoodCheck = WhateverIsValueOfGoodCheck;
char XORValue = 0;

/************************************
* iterate through the section Byte by Byte
* XOR'ing the value of each byte with the
* current XORValue variable and storing it there
* so any one different byte should change the
* final value of the variable
***********************************/
while(i<LengthOfSection)
{
XORValue^=SectionToBeChecked[i++];
}

/* test the variable agianst the good */

if(XORValue == GoodCheck) // passed the CRC
else /* DOH!!!!!!!! But Ma-arge! */

anyway... find a tiny loop that is just XOR-ing a String and you should have found a CRC procedure
then u got all sorts of ways to fix your problem

gl hope i helped

LaptoniC
July 26th, 2001, 03:19
Off course in this call there is a xor and shift operations.I mean classic CRC32 or CRC16 standard. like this for example
Code:

CRC32 proc lpbufferWORD, lsizeWORD
uses ebx, esi, edi
mov esi, lpbuffer
mov ebx, lsize
xor ecx, ecx
lea eax, [ecx-1]
mov edi, 0EDB88320h
@@m1: xor edx, edx
mov dl, [esi]
xor dl, al
@@m2: shr edx, 1
jnc @@m3
xor edx, edi
@@m3: inc ecx
and cl, 7
jnz @@m2
shr eax, 8
xor eax, edx
inc esi
dec ebx
jg @@m1
not eax
RET
CRC32 endp

Brill0
July 26th, 2001, 09:54
thanks,
i finally know what it is.
brill0