-
-
[求助]win32 调试API
-
发表于:
2012-8-29 16:29
3423
-
_debugThread_proc proc uses esi edi ebx lpParam
LOCAL @nReaderNumber
invoke RtlZeroMemory,addr @nReaderNumber,sizeof @nReaderNumber
invoke GetStartupInfo,offset stStartUp
invoke CreateProcess,offset szFilePath,NULL,NULL,NULL,NULL,DEBUG_PROCESS or DEBUG_ONLY_THIS_PROCESS,NULL,\
NULL,offset stStartUp,offset stPF
.while TRUE
invoke WaitForDebugEvent,offset stDebugEvent,INFINITE
invoke _showerror_proc,stPF.hProcess
invoke _showerror_proc,stPF.hThread
.break .if stDebugEvent.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT
.if stDebugEvent.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT
invoke ReadProcessMemory,stPF.hProcess,lpEntryPointer,offset Oldcommand,1,@nReaderNumber
invoke WriteProcessMemory,stPF.hProcess,lpEntryPointer,offset dbINT3,1,@nReaderNumber
.endif
invoke ContinueDebugEvent,stPF.hProcess,stPF.hThread,DBG_CONTINUE
.endw
invoke ExitThread,12
ret
_debugThread_proc endp
这是一个线程函数
为什么第二次循环的时候卡在WaitForDebugEvent 不执行了呢???
[课程]FART 脱壳王!加量不加价!FART作者讲授!