Parsi Coders

نسخه‌ی کامل: Anti-Debbuger
شما در حال مشاهده نسخه آرشیو هستید. برای مشاهده نسخه کامل کلیک کنید.
here is an asm code integrated in C based on an Api
کد:
void main(){
__asm {
MOV ECX,23;
MOV EAX,0;
INC ECX;
MOV ECX,DWORD PTR FS:[ECX];
ADD ECX,48;
MOV EAX,DWORD PTR DS:[ECX];
ADD EAX,2;
MOVZX EAX,BYTE PTR DS:[EAX];
CMP EAX,0;
JE continue1;
MOV ESP,0x12FFC4;
RET;
continue1:
}
//your code here
}

کد:
mov ecx, dword ptr fs:[0x30]        // get PEB
add ecx, 2                // add address for BeingDebugged
movzx eax, byte ptr [ecx]        // get BeingDebugged flag
cmp eax, 0                // compare it with 0
je continue1                // if its zero goto continue1
mov esp, 0xdeadc0de            // oh noes, fuck up esp
ret                                    
continue1: