Jump to content
vladiii

IsDebuggerPresent [ASM]

Recommended Posts

Posted


include 'C:\Documents and Settings\Vlad\Desktop\FASM W 167\INCLUDE\win32ax.inc'
section '.code' code readable writeable executable
tit db 'Rezultat', 0
este db 'Este prezent debuggerul', 0
nueste db 'Nu este prezent debuggerul', 0
;aici am declarat varabilele
start:
mov eax, 0
Call [IsDebuggerPresent] ;"Chemam" functia API
cmp eax, 1 ;Comparam rezultatul cu 1(1=true, 0=false)
je @esteprezent ;Daca este egal, sari la @esteprezent
jne @nuesteprezent ;Daca nu este egal sari la @nuesteprezent
@nuesteprezent:
push 0
push tit
push nueste
push 0
Call [MessageBox] ;Chemam MessageBoxul de confirmare
push 0
Call [ExitProcess] ;Iesim din program

@esteprezent:
push 0
push tit
push este
push 0
Call [MessageBox] ;Chemam MessageBoxul de confirmare
push 0
Call [ExitProcess] ;Iesim din program

.end start

Folositi-va imaginatia ! :)

Posted

Si eu imi permit sa scriu acelasi lucru ca pe skullbox si anume:

Shocker, am impresia ca te inseli. Daca este egal, se executa JE si sare la @esteprezent, iar labelul @nuesteprezent nu se mai executa si invers. Am testat codul folosind debugger si a mers, iar in conditii normale functioneaza perfect(adica fara debugger).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...