File tree Expand file tree Collapse file tree 3 files changed +149
-1
lines changed Expand file tree Collapse file tree 3 files changed +149
-1
lines changed Original file line number Diff line number Diff line change 1+ form at PE CONSOLE
2+ entry start
3+ include 'win32a.inc'
4+ section '.data' data readable writable
5+ helo db "Hello World" , 0
6+
7+ section '.text' code readable executable
8+ start: xor ecx , ecx
9+ push helo
10+ call [ printf ]
11+ add esp , 4
12+
13+
14+ push ecx
15+ call [ ExitProcess ]
16+
17+
18+
19+ section '.idata' import data readable
20+ library kernel , 'kernel32.dll' , \
21+ msvcrt , 'msvcrt.dll '
22+
23+ import kernel , \
24+ ExitProcess , 'ExitProcess'
25+ import msvcrt , \
26+ printf , 'printf'
Original file line number Diff line number Diff line change 1+ BITS 64
2+ SECTION .text
3+ global main
4+ main:
5+ xor rcx , rcx
6+ mov rax , [ gs : rcx + 0x60 ]
7+ mov rax , [ rax + 0x18 ]
8+ mov rsi , [ rax + 0x20 ]
9+ lodsq
10+ xchg rax , rsi
11+ lodsq
12+ mov rbx , [ rax + 0x20 ]
13+ xor r8 , r8
14+ mov r8d , [ rbx + 0x3c ]
15+ mov rdx , r8
16+ add rdx , rbx
17+ mov r8d , [ rdx + 0x88 ]
18+ add r8 , rbx
19+ xor rsi , rsi
20+ mov esi , [ r8 + 0x20 ]
21+ add rsi , rbx
22+ xor rcx , rcx
23+ mov r9 , 0x41636f7250746547
24+
25+
26+ Get_Function:
27+
28+ inc rcx
29+ xor rax , rax
30+ mov eax , [ rsi + rcx * 4 ]
31+ add rax , rbx
32+ cmp QWORD [ rax ], r9
33+ jnz Get_Function
34+ xor rsi , rsi
35+ mov esi , [ r8 + 0x24 ]
36+ add rsi , rbx
37+ mov cx , [ rsi + rcx * 2 ]
38+ xor rsi , rsi
39+ mov esi , [ r8 + 0x1c ]
40+ add rsi , rbx
41+ xor rdx , rdx
42+ mov edx , [ rsi + rcx * 4 ]
43+ add rdx , rbx
44+ mov rdi , rdx
45+
46+
47+ mov rcx , 0x41797261
48+ push rcx
49+ mov rcx , 0x7262694c64616f4c
50+ push rcx
51+ mov rdx , rsp
52+ mov rcx , rbx
53+ sub rsp , 0x30
54+ call rdi
55+ add rsp , 0x30
56+ add rsp , 0x10
57+ mov rsi , rax
58+
59+ mov rcx , 0x41656C6F73
60+ push rcx
61+ mov rcx , 0x6E6F436574697257
62+ push rcx
63+ mov rdx , rsp
64+ mov rcx , rbx
65+ sub rsp , 0x30
66+ call rdi
67+ mov rsi , rax
68+
69+
70+ mov rcx , 0x656C646E
71+ push rcx
72+ mov rcx , 0x6148647453746547
73+ push rcx
74+ mov rdx , rsp
75+ mov rcx , rbx
76+ sub rsp , 0x30
77+ call rdi
78+ add rsp , 0x28
79+ add rsp , 0x18
80+ mov r15 , rax
81+
82+ mov rcx , offset
83+ sub rsp , 0x30
84+ call r15
85+ mov r15 , rax
86+ add RSP , 32
87+
88+ sub RSP , 32 + 8 + 8
89+ mov rcx , r15
90+ mov rdx , message
91+ mov r8 , len
92+ mov r9 , written
93+ mov qword [ rsp + 2 * 8 ], 0
94+ sub rsp , 0x30
95+ call rsi
96+
97+ xor rcx , rcx
98+ mov rcx , 0x737365
99+ push rcx
100+ mov rcx , 0x636f725074697845
101+ push rcx
102+ mov rdx , rsp
103+ mov rcx , rbx
104+ sub rsp , 0x30
105+ call rdi
106+ add rsp , 0x30
107+ add rsp , 0x10
108+ mov r15 , rax
109+
110+
111+ mov rcx , 0
112+ call r15
113+ section .data
114+
115+ offset equ - 11
116+ message db "Hello World" , 0
117+ len equ $ - message
118+
119+ section .bss
120+ written resq 1
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Thanks to everyone who continues to contribute; new languages are created every
88Make sure to see [ contributing.md] ( /contributing.md ) for instructions on contributing to the project!
99
1010<!-- Languages start-->
11- ## Languages (1002 total)
11+ ## Languages (1004 total)
1212
1313* [ !] ( %23/%21 )
1414* [ !@#$%^&* ()_ +] ( %23/%21%40%23%24%25%5E%26%E2%88%97%28%29_%2B )
@@ -123,6 +123,7 @@ Make sure to see [contributing.md](/contributing.md) for instructions on contrib
123123* [ Assembler Bootsect] ( a/Assembler%20Bootsect.asm )
124124* [ Assembler DCPU16] ( a/Assembler%20DCPU16.asm )
125125* [ Assembler FASM DOS] ( a/Assembler%20FASM%20DOS.asm )
126+ * [ Assembler FASM Win32] ( a/Assembler%20FASM%20Win32.asm )
126127* [ Assembler hla] ( a/Assembler%20hla.hla )
127128* [ Assembler HP85] ( a/Assembler%20HP85.asm )
128129* [ Assembler IBM360] ( a/Assembler%20IBM360.asm )
@@ -139,6 +140,7 @@ Make sure to see [contributing.md](/contributing.md) for instructions on contrib
139140* [ Assembler NASM Linux64] ( a/Assembler%20NASM%20Linux64.asm )
140141* [ Assembler NASM Macho64] ( a/Assembler%20NASM%20Macho64.asm )
141142* [ Assembler NASM Win32] ( a/Assembler%20NASM%20Win32.asm )
143+ * [ Assembler NASM Win64] ( a/Assembler%20NASM%20Win64.asm )
142144* [ Assembler pdp10 midas] ( a/Assembler%20pdp10%20midas.mid )
143145* [ Assembler pdp11 palx] ( a/Assembler%20pdp11%20palx.palx )
144146* [ Assembler RISC-V] ( a/Assembler%20RISC-V.s )
You can’t perform that action at this time.
0 commit comments