Fasm Native for Examples

来源:互联网 发布:csmar数据库多少钱 编辑:程序博客网 时间:2024/04/28 07:38

 

format PE native 5.02 at 10000h 
entry start 

include 
'win32a.inc' 

section 
'.text' code readable executable 

start: 

        push    UNICODE_STRING 
        call    dword [NtDisplayString] 

        xor     eax,eax 
delay_loop: 
        dec     eax 
        jnz     delay_loop 

        push    
0 
        push    
-1 
        call    dword [NtTerminateProcess] 


align 
16 
UNICODE_STRING  dw      MsgW_0_size 
                dw      MsgW_0_size 
+ 2 
                dd      MsgW_0 

align 
16 
MsgW_0          du      
'Fatal system error! Cannot continue.',0Ah 
                                        du      
'formatting system partition... 100%',0 
MsgW_0_size     
=       $ - MsgW_0 

section 
'.rdata' import readable notpageable 
         
        library ntdll,
'ntdll.dll' 
         
        
import  ntdll, 
                                        NtDisplayString,
'NtDisplayString'
                                        NtTerminateProcess,
'NtTerminateProcess' 

section 
'.reloc' data fixups readable discardable 
原创粉丝点击