13.07.2013 Views

The art of Unpacking 번역 - SecretOfSh의 블로그

The art of Unpacking 번역 - SecretOfSh의 블로그

The art of Unpacking 번역 - SecretOfSh의 블로그

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

43 | 페이지<br />

push .exception_handler<br />

push dword [fs:0]<br />

mov [fs:0],esp<br />

; throw an exception<br />

xor eax,eax<br />

mov dword [eax],0<br />

; restore exception handler<br />

pop dword [fs:0]<br />

add esp,4<br />

:::<br />

.exception_handler<br />

;EAX = CONTEXT record<br />

mov eax,[esp+0xc]<br />

;Clear Debug Registers: Context .Dr0-Dr3,Dr6,Dr7<br />

mov dword [eax+0x04].0<br />

mov dword [eax+0x08].0<br />

mov dword [eax+0x0c].0<br />

mov dword [eax+0x10].0<br />

mov dword [eax+0x14].0<br />

mov dword [eax+0x18].0<br />

;set Context.EIP upon return<br />

add dword [eax+0xb8],6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!