Advertisement
Advertisement
| 01.28.2008 at 11:20AM PST, ID: 23117199 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: |
static unsigned int addressStart;
static unsigned int addressEnd;
_asm mov eax,GUARD_1_BEGIN
_asm mov ebx,GUARD_1_END
_asm mov addressStart,eax
_asm mov addressEnd,ebx
unsigned int a = addressStart;
unsigned int sum = 0;
while (a <= addressEnd) {
unsigned rawVal = *(unsigned int*)(a);
sum += rawVal;
a += 4;
}
if ( sum != 0x00127d69) {
return 0;
} else {
// it worked!!!
}
|