⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello_fasm.asm

📁 Win32病毒入门源码
💻 ASM
字号:
format  PE GUI 4.0
entry   __start


;
; data section...
;

section '.data' data    readable

    pszText         db      'Hello, FASM world!',0
    pszCaption      db      'Flat Assembler',0


;
; code section...
;

section '.text' code    readable executable

    __start:
            push    0
            push    pszCaption
            push    pszText
            push    0
            call    [MessageBox]
            push    0
            call    [ExitProcess]


;
; import section...
;

section '.idata' import data    readable

    ; image import descriptor
    dd      0,0,0,RVA usr_dll,RVA usr_thunk
    dd      0,0,0,RVA krnl_dll,RVA krnl_thunk
    dd      0,0,0,0,0

    ; dll name
    usr_dll     db      'user32.dll',0
    krnl_dll    db      'kernel32.dll',0

    ; image thunk data
    usr_thunk:
        MessageBox      dd      RVA __imp_MessageBox
                        dd      0

    krnl_thunk:
        ExitProcess     dd      RVA __imp_ExitProcess
                        dd      0

    ; image import by name
    __imp_MessageBox    dw      0
                        db      'MessageBoxA',0

    __imp_ExitProcess   dw      0
                        db      'ExitProcess',0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -