mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
42 lines
764 B
NASM
42 lines
764 B
NASM
format PE console
|
|
entry ___ENTRYPOINT___
|
|
|
|
|
|
section '.code' code readable executable
|
|
|
|
___ENTRYPOINT___:
|
|
call System_Void___Program_Main____
|
|
pushd 0
|
|
call [ExitProcess]
|
|
|
|
System_Void___Program_Main____:
|
|
mov ebp,esp
|
|
; IL: Nop
|
|
nop
|
|
; IL: Call System.Void Program::TheMethod()
|
|
call System_Void___Program_TheMethod____
|
|
; IL: Nop
|
|
nop
|
|
; IL: Ret
|
|
ret
|
|
|
|
System_Void___Program_TheMethod____:
|
|
mov ebp,esp
|
|
; IL: Nop
|
|
nop
|
|
; IL: Ret
|
|
ret
|
|
|
|
section '.idata' import data readable writeable
|
|
|
|
dd 0,0,0,rva kernel32_dll_name,rva kernel32_dll_table
|
|
dd 0,0,0,0,0
|
|
|
|
kernel32_dll_table:
|
|
ExitProcess dd rva _ExitProcess
|
|
dd 0
|
|
|
|
kernel32_dll_name db 'kernel32.dll',0
|
|
|
|
_ExitProcess dw 0
|
|
db 'ExitProcess',0
|