forked from Adastra-thw/ExploitSerie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoopingMASM32.asm
46 lines (40 loc) · 1.1 KB
/
LoopingMASM32.asm
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
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data
String1 db "string 1", 13, 10, 0
String2 db "string 2", 13, 10, 0
String3 db "string 3", 13, 10, 0
counter1 DWORD 0
counter2 DWORD 0
counter3 DWORD 0
.code
start:
; Pintar String1 5 veces
mov counter1, 10
.while ( counter1 > 0 )
dec counter1
.continue .if counter1 < 5
invoke StdOut, addr String1
.endw
; Pintar String2 10 veces
mov counter2, 10
.repeat
invoke StdOut, addr String2
dec counter2
.until ( counter2 == 0)
; Pintar String2 2 veces
mov counter3, 10
.while (counter3 > 0)
invoke StdOut, addr String3
dec counter3
.break .if counter3 == 8
.endw
; Salir del programa
invoke ExitProcess, 0
end start