1// Copyright (c) 2008 KJK::Hyperion 2 3// Permission is hereby granted, free of charge, to any person obtaining a copy 4// of this software and associated documentation files (the "Software"), to deal 5// in the Software without restriction, including without limitation the rights 6// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7// copies of the Software, and to permit persons to whom the Software is 8// furnished to dos so, subject to the following conditions: 9 10// The above copyright notice and this permission notice shall be included in all 11// copies or substantial portions of the Software. 12 13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19// SOFTWARE. 20 21.text 22.intel_syntax noprefix 23 24.func _SEH2EnterHandleTrylevel 25.globl __SEH2EnterHandleTrylevel 26__SEH2EnterHandleTrylevel: 27 mov eax, [esp+8] 28 mov ecx, [esp+12] 29 mov [eax+8], ecx 30 mov [eax+16], ebp 31 mov [eax+20], ebx 32 mov [eax+24], esi 33 mov [eax+28], edi 34 35 mov edx, [esp+4] 36 mov [edx+8], eax 37 38 xor eax, eax 39 ret 40.endfunc 41 42.func _SEH2EnterFrameAndHandleTrylevel 43.globl __SEH2EnterFrameAndHandleTrylevel 44__SEH2EnterFrameAndHandleTrylevel: 45 mov eax, [esp+8] 46 mov ecx, [esp+12] 47 mov [eax+8], ecx 48 mov [eax+16], ebp 49 mov [eax+20], ebx 50 mov [eax+24], esi 51 mov [eax+28], edi 52 53.extern __SEH2EnterFrameAndTrylevel 54 jmp __SEH2EnterFrameAndTrylevel 55.endfunc 56 57.func __SEH2Handle 58.globl ___SEH2Handle 59___SEH2Handle: 60 mov eax, [esp+4] 61 mov ebp, [esp+12] 62 mov ebx, [esp+16] 63 mov esi, [esp+20] 64 mov edi, [esp+24] 65 mov esp, [esp+8] 66 jmp eax 67.endfunc 68 69.func __SEH2FrameHandler 70.globl ___SEH2FrameHandler 71___SEH2FrameHandler: 72 73.extern __SEH2FrameHandler 74 75 cld 76 jmp __SEH2FrameHandler 77.endfunc 78 79.func __SEH2UnwindHandler 80.globl ___SEH2UnwindHandler 81___SEH2UnwindHandler: 82 83.extern __SEH2UnwindHandler 84 85 cld 86 jmp __SEH2UnwindHandler 87.endfunc 88 89// EOF 90