Skip to content

Instantly share code, notes, and snippets.

@spnow
spnow / CRC.cpp
Created August 1, 2017 23:07 — forked from evernick/CRC.cpp
#include <stdio.h>
#include <windows.h>
#include "crc.h"
static void guard_func()
{
char pass[100];
printf("Input String : ");
scanf("%100s", pass);
if(!strcmp(pass, "test"))
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
char buffer[100];
HKEY hKey;
int i=0;
DWORD len=sizeof(buffer);
RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Disk\\Enum", 0L, KEY_READ , &hKey);
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
HKEY hKey;
int i=0;
if( RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Enum\\IDE\\DiskVMware_Virtual_IDE_Hard_Drive___________00000001", 0L, KEY_READ , &hKey) )
return 0;
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
char buffer[100];
HKEY hKey;
int i=0;
DWORD len=sizeof(buffer);
RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000", 0L, KEY_READ , &hKey);
#include <stdio.h>
#include <io.h>
int anti_debug()
{
char strPath[] = { "C:\\Windows\\system32\\drivers\\vmmouse.sys" };
if( !access( strPath, 0) )
return 1;
return 0;
#include <stdio.h>
#include <windows.h>
int anti_debug(){
int rc=0;
__try
{
__asm
{
mov eax, 'VMXh'
#include <windows.h>
#include <stdio.h>
BOOL anti_debug()
{
BOOL result = FALSE;
CONTEXT ct;
ct.ContextFlags = CONTEXT_DEBUG_REGISTERS;
#include <windows.h>
#include <excpt.h>
#include <stdio.h>
BOOL anti_debug_flag = FALSE;
EXCEPTION_DISPOSITION __cdecl _except_handler (
__in struct _EXCEPTION_RECORD * _ExceptionRecord,
__in void * _EstablisherFrame,
__inout struct _CONTEXT * _ContextRecord,
#include <windows.h>
#include <excpt.h>
#include <stdio.h>
LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers)
{
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)
pExcepPointers->ContextRecord->Eax);
pExcepPointers->ContextRecord->Eip += 2;
#include <windows.h>
#include <excpt.h>
#include <stdio.h>
BOOL anti_debug_flag = TRUE;
void anti_debug()
{
__try
{