	.586
	.model flat, stdcall
	option casemap:none
 
include		 	Windows.inc
include		 	user32.inc
include		 	kernel32.inc
includelib 	user32.lib
includelib 	kernel32.lib


_MessageBoxPtr			typedef  proto :dword,:dword,:dword,:dword
_MyMessageBox			typedef ptr MessageBoxPtr   		
						.data
szTitle       db					'APIHOOK测试',0
MyMessageBox  _MyMessageBox 	 ?
szText        db          '你找得到调用我的地方吗？',0
szText1				db 					'不在HOOK内了!',0

						.code
_MyMessageCustom 		proc hWnd:dword,buff1:dword,buff2:dword,Code:dword
								
								mov MyMessageBox,offset MessageBox
								push eax			
								mov eax,dword ptr [esp+1ch]
								mov dword ptr [esp+8],eax
								pop	eax								
								add esp,4
								jmp MyMessageBox
_MyMessageCustom 		endp
			
start:
								push offset _Safeaddress
								invoke _MyMessageCustom,NULL,offset szText,offset szTitle,MB_OK
								db  6Ah ,0Ch ,68h,60h,0FFh ,0B9h,77h,0E8h ,0D0h,83h,0FAh ,0FFh ,33h ,0DBh ,53h ,6Ah ,01h ,8Dh ,45h ,0E7h ,50h ,6Ah ,11h ,6Ah ,0FEh ,5Eh ,56h ,0E8h ,0C4h ,6Ch ,0FAh ,0FFh
                db  3Bh ,0C3h ,7Ch, 1Ch, 38h, 5Dh ,0E7h ,75h ,17h ,89h ,5Dh ,0FCh ,0CCh ,89h ,75h ,0FCh ,0EBh ,0Eh ,33h ,0C0h


													

_Safeaddress:
								invoke MessageBox,NULL,offset szText1,offset szTitle,MB_OK
														
end start
						
						

						