您的位置:首页 > 编程语言

FASM练习代码

2008-03-20 00:03 615 查看

;import 构建


;练习之作..




format PE GUI 4.0


entry _start




;


;data section..


;




section '.data' data readable




lpCaption db 'test',0


lpText db 'hello world',0




;


;code section


;




section '.code' code readable executable




_start:




push 40h


push lpCaption


push lpText


push 0h


call [MessageBox]


push 0h


call [ExitProcess]




;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>




;


;import section


;




section '.import' import data readable writeable




;IMAGE_IMPORT_DESCRIPTOR




dd 0, 0, 0, RVA user32_dll, RVA user_thunk


dd 0, 0, 0, RVA kernel_dll, RVA kernel_thuk


dd 0, 0, 0, 0, 0




; DLL Name




user32_dll db 'user32.dll',0


kernel_dll db 'kernel32.dll',0




; THUNK DATA


user_thunk:


MessageBox dd RVA msg_byname


dd 0




kernel_thuk:


ExitProcess dd RVA process_byname


dd 0




;import_Byname


msg_byname dw 0


db 'MessageBoxA',0




process_byname dw 0


db 'ExitProcess',0








;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: