pe-assembler 0.1.1

PE/COFF assembler for Windows instruction sets - strongly typed, object-oriented, zero-dependency core
Documentation
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
[
    {
        "exe_name": "notepad",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Windows",
            "entry_point": 6576,
            "image_base": 5368709120,
            "section_count": 8,
            "file_size": 360448
        },
        "export_count": 0,
        "import_count": 315,
        "section_count": 8,
        "sample_exports": [],
        "sample_imports": [
            "SetMapMode",
            "SetViewportExtEx",
            "SetWindowExtEx",
            "LPtoDP",
            "SetBkMode",
            "GetTextMetricsW",
            "TextOutW",
            "AbortDoc",
            "EndDoc",
            "SetAbortProc",
            "StartDocW",
            "StartPage",
            "CreateDCW",
            "EnumFontsW",
            "GetTextFaceW",
            "GetDeviceCaps",
            "DeleteDC",
            "DeleteObject",
            "SetBkColor",
            "CreateSolidBrush"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".rdata",
            ".data",
            ".pdata",
            ".didat",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 418294,
        "dll_characteristics": 49504,
        "stack_reserve_size": 524288,
        "stack_commit_size": 69632,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 163840,
        "initialized_data_size": 200704,
        "uninitialized_data_size": 0,
        "analysis_success": true
    },
    {
        "exe_name": "calc",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Windows",
            "entry_point": 5952,
            "image_base": 5368709120,
            "section_count": 7,
            "file_size": 49152
        },
        "export_count": 0,
        "import_count": 34,
        "section_count": 7,
        "sample_exports": [],
        "sample_imports": [
            "ShellExecuteW",
            "GetCurrentThreadId",
            "GetSystemTimeAsFileTime",
            "GetTickCount",
            "RtlCaptureContext",
            "GetCurrentProcessId",
            "RtlVirtualUnwind",
            "UnhandledExceptionFilter",
            "SetUnhandledExceptionFilter",
            "GetCurrentProcess",
            "TerminateProcess",
            "QueryPerformanceCounter",
            "RtlLookupFunctionEntry",
            "__setusermatherr",
            "_initterm",
            "__C_specific_handler",
            "memset",
            "_wcmdln",
            "_fmode",
            "_commode"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".rdata",
            ".data",
            ".pdata",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 90741,
        "dll_characteristics": 49504,
        "stack_reserve_size": 524288,
        "stack_commit_size": 8192,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 8192,
        "initialized_data_size": 36864,
        "uninitialized_data_size": 0,
        "analysis_success": true
    },
    {
        "exe_name": "cmd",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Console",
            "entry_point": 162928,
            "image_base": 5368709120,
            "section_count": 8,
            "file_size": 339968
        },
        "export_count": 0,
        "import_count": 286,
        "section_count": 8,
        "sample_exports": [],
        "sample_imports": [
            "wcscmp",
            "wcsncmp",
            "memset",
            "wcsspn",
            "_time32",
            "_initterm",
            "_initterm_e",
            "_register_thread_local_exe_atexit_callback",
            "_c_exit",
            "_o__get_initial_narrow_environment",
            "_o__get_osfhandle",
            "_o__getch",
            "_o__initialize_narrow_environment",
            "_o__initialize_onexit_table",
            "_o__invalid_parameter_noinfo",
            "_o__open_osfhandle",
            "_o__pclose",
            "_o__pipe",
            "_o__purecall",
            "_o__register_onexit_function"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".rdata",
            ".data",
            ".pdata",
            ".didat",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 399297,
        "dll_characteristics": 49504,
        "stack_reserve_size": 1048576,
        "stack_commit_size": 1032192,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 233472,
        "initialized_data_size": 217088,
        "uninitialized_data_size": 0,
        "analysis_success": true
    },
    {
        "exe_name": "powershell",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Console",
            "entry_point": 21760,
            "image_base": 5368709120,
            "section_count": 7,
            "file_size": 454656
        },
        "export_count": 0,
        "import_count": 133,
        "section_count": 7,
        "sample_exports": [],
        "sample_imports": [
            "_unlock",
            "_lock",
            "_commode",
            "_fmode",
            "_initterm",
            "__setusermatherr",
            "_cexit",
            "_exit",
            "exit",
            "__set_app_type",
            "__wgetmainargs",
            "__CxxFrameHandler4",
            "__dllonexit",
            "_amsg_exit",
            "_onexit",
            "?terminate↯↯YAXXZ",
            "_vsnwprintf",
            "_wcsicmp",
            "_wcsnicmp",
            "fclose"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".rdata",
            ".data",
            ".pdata",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 498581,
        "dll_characteristics": 49504,
        "stack_reserve_size": 524288,
        "stack_commit_size": 8192,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 45056,
        "initialized_data_size": 405504,
        "uninitialized_data_size": 0,
        "analysis_success": true
    },
    {
        "exe_name": "explorer",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Windows",
            "entry_point": 750320,
            "image_base": 5368709120,
            "section_count": 9,
            "file_size": 3191352
        },
        "export_count": 1,
        "import_count": 778,
        "section_count": 9,
        "sample_exports": [
            "g_trayTriageBlock"
        ],
        "sample_imports": [
            "?_Syserror_map↯std↯↯YAPEBDH↯Z",
            "?_ReportUnobservedException↯details↯Concurrency↯↯YAXXZ",
            "?_Pninc↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯IEAAPEAGXZ",
            "?xsputn↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAA_JPEBG_J↯Z",
            "?pptr↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯IEBAPEAGXZ",
            "?sync↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAAHXZ",
            "?_Unlock↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯UEAAXXZ",
            "?_Lock↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯UEAAXXZ",
            "?_Winerror_map↯std↯↯YAHH↯Z",
            "??1?$basic_ios↯GU?$char_traits↯G↯std↯↯↯std↯↯UEAA↯XZ",
            "?_Xinvalid_argument↯std↯↯YAXPEBD↯Z",
            "?gptr↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯IEBAPEAGXZ",
            "?gbump↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯IEAAXH↯Z",
            "??1?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯UEAA↯XZ",
            "?uflow↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAAGXZ",
            "_Cnd_unregister_at_thread_exit",
            "_Cnd_broadcast",
            "?showmanyc↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAA_JXZ",
            "?xsgetn↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAA_JPEAG_J↯Z",
            "?setbuf↯?$basic_streambuf↯GU?$char_traits↯G↯std↯↯↯std↯↯MEAAPEAV12↯PEAG_J↯Z"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".imrsiv",
            ".rdata",
            ".data",
            ".pdata",
            ".didat",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 3203375,
        "dll_characteristics": 49600,
        "stack_reserve_size": 524288,
        "stack_commit_size": 57344,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 1933312,
        "initialized_data_size": 1232896,
        "uninitialized_data_size": 4096,
        "analysis_success": true
    },
    {
        "exe_name": "taskmgr",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Windows",
            "entry_point": 1187024,
            "image_base": 5368709120,
            "section_count": 9,
            "file_size": 5559048
        },
        "export_count": 0,
        "import_count": 1104,
        "section_count": 9,
        "sample_exports": [],
        "sample_imports": [
            "_register_thread_local_exe_atexit_callback",
            "_c_exit",
            "_initterm",
            "_initterm_e",
            "_o_wcstod",
            "_o_wcstok_s",
            "_o_wcstol",
            "_o_wcstoul",
            "__C_specific_handler",
            "__current_exception",
            "__current_exception_context",
            "_o_wcscpy_s",
            "memmove",
            "_o__wcsnicmp",
            "_o__wcsicmp",
            "_o__ui64tow_s",
            "_o__strnicmp",
            "_o__stricmp",
            "_o__set_new_mode",
            "_o__set_fmode"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".imrsiv",
            ".rdata",
            ".data",
            ".pdata",
            ".didat",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 5566047,
        "dll_characteristics": 49632,
        "stack_reserve_size": 524288,
        "stack_commit_size": 8192,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 2637824,
        "initialized_data_size": 2895872,
        "uninitialized_data_size": 4096,
        "analysis_success": true
    },
    {
        "exe_name": "regedit",
        "basic_info": {
            "target_arch": "X86_64",
            "subsystem": "Windows",
            "entry_point": 8096,
            "image_base": 5368709120,
            "section_count": 8,
            "file_size": 585728
        },
        "export_count": 0,
        "import_count": 387,
        "section_count": 8,
        "sample_exports": [],
        "sample_imports": [
            "SetTextAlign",
            "SetROP2",
            "GetTextExtentPoint32W",
            "Polyline",
            "GetStockObject",
            "StartPage",
            "AbortDoc",
            "EndDoc",
            "DeleteDC",
            "SetViewportOrgEx",
            "SetAbortProc",
            "StartDocW",
            "EndPage",
            "CreatePatternBrush",
            "CreateBitmap",
            "PatBlt",
            "SelectClipRgn",
            "GetObjectW",
            "ExcludeClipRect",
            "SelectObject"
        ],
        "section_names": [
            ".text",
            "fothk",
            ".rdata",
            ".data",
            ".pdata",
            ".didat",
            ".rsrc",
            ".reloc"
        ],
        "linker_version": "14.38",
        "os_version": "10.0",
        "image_version": "10.0",
        "subsystem_version": "10.0",
        "checksum": 624998,
        "dll_characteristics": 49504,
        "stack_reserve_size": 524288,
        "stack_commit_size": 16384,
        "heap_reserve_size": 1048576,
        "heap_commit_size": 4096,
        "code_size": 184320,
        "initialized_data_size": 667648,
        "uninitialized_data_size": 0,
        "analysis_success": true
    }
]