-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructure.lst
282 lines (250 loc) · 15.1 KB
/
Structure.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
Microsoft (R) Macro Assembler Version 6.15.8803 08/06/22 19:03:31
our first testing project (structure.asm) Page 1 - 1
TITLE our first testing project (structure.asm)
INCLUDE Irvine32.inc
C ; Include file for Irvine32.lib (Irvine32.inc)
C
C ;OPTION CASEMAP:NONE ; optional: make identifiers case-sensitive
C
C INCLUDE SmallWin.inc ; MS-Windows prototypes, structures, and constants
C .NOLIST
C .LIST
C
C
C .NOLIST
C .LIST
C
00000000 .data
00000000 0C num1 BYTE 1100b ;nameOfVar databyte value
00000001 01 num2 BYTE 1b ; num2 = 1
00000000 .code
00000000 main PROC
00000000 A0 00000000 R mov aL, num1 ; nameOfInstruct nameOfReg, valueThatFitsTheReg
00000005 02 05 00000001 R add aL, num2 ; aL = 11d+2d = 13d =3D
0000000B E8 00000000 E call dumpRegs ;display the registers, so simply: dumpRegs is a function
exit
00000010 6A 00 * push +000000000h
00000012 E8 00000000 E * call ExitProcess
00000017 main ENDP
END main
comment p
32 bit EAX => 16 bit ax + ax => 8 bit aH + aL
eax = 0000 0011h 32bit
EAX = 16 BIT 0000 | ax 16bit |8 bit 00 | 8 bit 00h
= 0000 0000 0000 0000 0000 0000 0000 0000 b
.......................
Microsoft (R) Macro Assembler Version 6.15.8803 08/06/22 19:03:31
our first testing project (structure.asm) Symbols 2 - 1
Structures and Unions:
N a m e Size
Offset Type
CONSOLE_CURSOR_INFO . . . . . . 00000008
dwSize . . . . . . . . . . . . 00000000 DWord
bVisible . . . . . . . . . . . 00000004 DWord
CONSOLE_SCREEN_BUFFER_INFO . . . 00000016
dwSize . . . . . . . . . . . . 00000000 DWord
dwCursorPos . . . . . . . . . 00000004 DWord
wAttributes . . . . . . . . . 00000008 Word
srWindow . . . . . . . . . . . 0000000A QWord
maxWinSize . . . . . . . . . . 00000012 DWord
COORD . . . . . . . . . . . . . 00000004
X . . . . . . . . . . . . . . 00000000 Word
Y . . . . . . . . . . . . . . 00000002 Word
FILETIME . . . . . . . . . . . . 00000008
loDateTime . . . . . . . . . . 00000000 DWord
hiDateTime . . . . . . . . . . 00000004 DWord
SMALL_RECT . . . . . . . . . . . 00000008
Left . . . . . . . . . . . . . 00000000 Word
Top . . . . . . . . . . . . . 00000002 Word
Right . . . . . . . . . . . . 00000004 Word
Bottom . . . . . . . . . . . . 00000006 Word
SYSTEMTIME . . . . . . . . . . . 00000010
wYear . . . . . . . . . . . . 00000000 Word
wMonth . . . . . . . . . . . . 00000002 Word
wDayOfWeek . . . . . . . . . . 00000004 Word
wDay . . . . . . . . . . . . . 00000006 Word
wHour . . . . . . . . . . . . 00000008 Word
wMinute . . . . . . . . . . . 0000000A Word
wSecond . . . . . . . . . . . 0000000C Word
wMilliseconds . . . . . . . . 0000000E Word
Segments and Groups:
N a m e Size Length Align Combine Class
FLAT . . . . . . . . . . . . . . GROUP
STACK . . . . . . . . . . . . . 32 Bit 00001000 DWord Stack 'STACK'
_DATA . . . . . . . . . . . . . 32 Bit 00000002 DWord Public 'DATA'
_TEXT . . . . . . . . . . . . . 32 Bit 00000017 DWord Public 'CODE'
Procedures, parameters and locals:
N a m e Type Value Attr
CloseHandle . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Clrscr . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
CreateFileA . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Crlf . . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Delay . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
DumpMem . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
DumpRegs . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ExitProcess . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
FlushConsoleInputBuffer . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetCommandLineA . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetCommandtail . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleCP . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleCursorInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleMode . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleScreenBufferInfo . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetDateTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetKeyState . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetLastError . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetLocalTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetMaxXY . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetMseconds . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetNumberOfConsoleInputEvents . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetProcessHeap . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetStdHandle . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetSystemTime . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetTickCount . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Gotoxy . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapAlloc . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapCreate . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapDestroy . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapFree . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapSize . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
IsDigit . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
PeekConsoleInputA . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Random32 . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
RandomRange . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Randomize . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadChar . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadConsoleA . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadConsoleInputA . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadDec . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadFile . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadHex . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadInt . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadString . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleCursorInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleCursorPosition . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleMode . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleScreenBufferSize . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleTextAttribute . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleTitleA . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleWindowInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetFilePointer . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetLocalTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetTextColor . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Sleep . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_compare . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_copy . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_length . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_trim . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_ucase . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SystemTimeToFileTime . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WaitMsg . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteBinB . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteBin . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteChar . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleA . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleOutputAttribute . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleOutputCharacterA . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteDec . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteFile . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteHexB . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteHex . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteInt . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteString . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
main . . . . . . . . . . . . . . P Near 00000000 _TEXT Length= 00000017 Public STDCALL
Symbols:
N a m e Type Value Attr
@CodeSize . . . . . . . . . . . Number 00000000h
@DataSize . . . . . . . . . . . Number 00000000h
@Interface . . . . . . . . . . . Number 00000003h
@Model . . . . . . . . . . . . . Number 00000007h
@code . . . . . . . . . . . . . Text _TEXT
@data . . . . . . . . . . . . . Text FLAT
@fardata? . . . . . . . . . . . Text FLAT
@fardata . . . . . . . . . . . . Text FLAT
@stack . . . . . . . . . . . . . Text FLAT
CREATE_ALWAYS . . . . . . . . . Number 00000002h
CREATE_NEW . . . . . . . . . . . Number 00000001h
CreateFile . . . . . . . . . . . Text CreateFileA
DO_NOT_SHARE . . . . . . . . . . Number 00000000h
ENABLE_ECHO_INPUT . . . . . . . Number 00000004h
ENABLE_LINE_INPUT . . . . . . . Number 00000002h
ENABLE_MOUSE_INPUT . . . . . . . Number 00000010h
ENABLE_PROCESSED_INPUT . . . . . Number 00000001h
ENABLE_PROCESSED_OUTPUT . . . . Number 00000001h
ENABLE_WINDOW_INPUT . . . . . . Number 00000008h
ENABLE_WRAP_AT_EOL_OUTPUT . . . Number 00000002h
FALSE . . . . . . . . . . . . . Number 00000000h
FILE_APPEND_DATA . . . . . . . . Number 00000004h
FILE_ATTRIBUTE_ARCHIVE . . . . . Number 00000020h
FILE_ATTRIBUTE_COMPRESSED . . . Number 00000800h
FILE_ATTRIBUTE_DEVICE . . . . . Number 00000040h
FILE_ATTRIBUTE_DIRECTORY . . . . Number 00000010h
FILE_ATTRIBUTE_ENCRYPTED . . . . Number 00004000h
FILE_ATTRIBUTE_HIDDEN . . . . . Number 00000002h
FILE_ATTRIBUTE_NORMAL . . . . . Number 00000080h
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED . Number 00002000h
FILE_ATTRIBUTE_OFFLINE . . . . . Number 00001000h
FILE_ATTRIBUTE_READONLY . . . . Number 00000001h
FILE_ATTRIBUTE_REPARSE_POINT . . Number 00000400h
FILE_ATTRIBUTE_SPARSE_FILE . . . Number 00000200h
FILE_ATTRIBUTE_SYSTEM . . . . . Number 00000004h
FILE_ATTRIBUTE_TEMPORARY . . . . Number 00000100h
FILE_BEGIN . . . . . . . . . . . Number 00000000h
FILE_CURRENT . . . . . . . . . . Number 00000001h
FILE_DELETE_CHILD . . . . . . . Number 00000040h
FILE_END . . . . . . . . . . . . Number 00000002h
FILE_READ_DATA . . . . . . . . . Number 00000001h
FILE_SHARE_DELETE . . . . . . . Number 00000004h
FILE_SHARE_READ . . . . . . . . Number 00000001h
FILE_SHARE_WRITE . . . . . . . . Number 00000002h
FILE_WRITE_DATA . . . . . . . . Number 00000002h
FOCUS_EVENT . . . . . . . . . . Number 00000010h
GENERIC_ALL . . . . . . . . . . Number 10000000h
GENERIC_EXECUTE . . . . . . . . Number 20000000h
GENERIC_READ . . . . . . . . . . Number -80000000h
GENERIC_WRITE . . . . . . . . . Number 40000000h
GetCommandLine . . . . . . . . . Text GetCommandLineA
HEAP_GENERATE_EXCEPTIONS . . . . Number 00000004h
HEAP_GROWABLE . . . . . . . . . Number 00000002h
HEAP_NO_SERIALIZE . . . . . . . Number 00000001h
HEAP_REALLOC_IN_PLACE_ONLY . . . Number 00000010h
HEAP_ZERO_MEMORY . . . . . . . . Number 00000008h
INVALID_HANDLE_VALUE . . . . . . Number -00000001h
KEY_EVENT . . . . . . . . . . . Number 00000001h
MENU_EVENT . . . . . . . . . . . Number 00000008h
MOUSE_EVENT . . . . . . . . . . Number 00000002h
NULL . . . . . . . . . . . . . . Number 00000000h
OPEN_ALWAYS . . . . . . . . . . Number 00000004h
OPEN_EXISTING . . . . . . . . . Number 00000003h
PeekConsoleInput . . . . . . . . Text PeekConsoleInputA
ReadConsoleInput . . . . . . . . Text ReadConsoleInputA
ReadConsole . . . . . . . . . . Text ReadConsoleA
STD_INPUT_HANDLE . . . . . . . . Number -0000000Ah
STD_OUTPUT_HANDLE . . . . . . . Number -0000000Bh
SetConsoleTitle . . . . . . . . Text SetConsoleTitleA
TRUE . . . . . . . . . . . . . . Number 00000001h
TRUNCATE_EXISTING . . . . . . . Number 00000005h
WINDOW_BUFFER_SIZE_EVENT . . . . Number 00000004h
WriteConsoleOutputCharacter . . Text WriteConsoleOutputCharacterA
WriteConsole . . . . . . . . . . Text WriteConsoleA
black . . . . . . . . . . . . . Number 00000000h
blue . . . . . . . . . . . . . . Number 00000001h
brown . . . . . . . . . . . . . Number 00000006h
cyan . . . . . . . . . . . . . . Number 00000003h
exit . . . . . . . . . . . . . . Text INVOKE ExitProcess,0
gray . . . . . . . . . . . . . . Number 00000008h
green . . . . . . . . . . . . . Number 00000002h
lightBlue . . . . . . . . . . . Number 00000009h
lightCyan . . . . . . . . . . . Number 0000000Bh
lightGray . . . . . . . . . . . Number 00000007h
lightGreen . . . . . . . . . . . Number 0000000Ah
lightMagenta . . . . . . . . . . Number 0000000Dh
lightRed . . . . . . . . . . . . Number 0000000Ch
magenta . . . . . . . . . . . . Number 00000005h
num1 . . . . . . . . . . . . . . Byte 00000000 _DATA
num2 . . . . . . . . . . . . . . Byte 00000001 _DATA
red . . . . . . . . . . . . . . Number 00000004h
white . . . . . . . . . . . . . Number 0000000Fh
yellow . . . . . . . . . . . . . Number 0000000Eh
0 Warnings
0 Errors