Antidebug C++ Debug Error Visual Studio

Asked

Viewed 38 times

0

I am adding an Antidebug project to my game, the project itself is already functional, but the part of the code that detects ollydbg for example, is giving me an error after I compile the new project.

In short, as soon as I compile the new game.exe and try to run the game normally as a normal player, it returns me the following error.

inserir a descrição da imagem aqui

Give me the following error in the right part of the image, and in the left part there is the piece of code that I believe is responsible for the possible error.

My question is, how can I fix this? what should I modify in ASM code to no longer have this problem?

Here’s the full Antidebug CPP

int security::internal::cpu::mov_ss() {
BOOL found = FALSE;

_asm
{
	push ss;
	pop ss;
	pushfd;
	test byte ptr[esp + 1], 1;
	jn fnd;
	jmp end;
fnd:
	mov found, 1;
end:
	nop;
}

return (found) ? security::internal::debug_results::mov_ss : security::internal::debug_results::none;
}

  • 3

    You know this is a fallacy, you can’t really protect, you’re at best creating a difficulty for fools, so it’s more creating a difficulty for you than for anyone who wants to manipulate something in your game.

  • I understand, but anyway, how can I correct this error in that function?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.