Fasm Native for Examples

 

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 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章