asm
pushad
call @SetupSEHAndRaiseException
mov ecx, dword ptr [esp+12]
mov eax, fs:[$30]
movzx eax, byte ptr [eax+$2]
and eax, eax
jnz @NoAddOpCodeSize
mov dword ptr [ecx+$B8], offset @AfterExceptionCause
@NoAddOpCodeSize:
mov dword ptr [ecx+$04], eax
mov dword ptr [ecx+$08], eax
mov dword ptr [ecx+$0C], eax
mov dword ptr [ecx+$10], eax
mov dword ptr [ecx+$14], eax
and dword ptr [ecx+$18], $155
and dword ptr [ecx+$C0], $FFFFFEFF
xor eax, eax
ret
@SetupSEHAndRaiseException:
xor eax, eax
push dword ptr fs:[eax]
mov fs:[eax], esp
@KillCode:
and dword ptr [eax+$18], $155
@AfterExceptionCause:
pop dword ptr fs:[$0]
add esp, $4
popad
end;