forked from Adastra-thw/ExploitSerie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrachingMASM32.asm
45 lines (35 loc) · 1.19 KB
/
BrachingMASM32.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
.386
.model flat, stdcall
option casemap :none
include C:\masm32\include\windows.inc
include C:\masm32\include\masm32.inc
include C:\masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\kernel32.lib
.data
InvalidRange db "Rango Invalido", 0
Between1to25 db "Numero entre 1 y 25", 0
Between25to50 db "Numero entre 25 y 50", 0
Between50to75 db "Numero entre 50 y 75", 0
Between75to100 db "Numero entre 75 y 100", 0
UserInput db 10 DUP(0)
.code
start:
invoke StdIn, addr UserInput, 10
invoke StripLF, addr UserInput
; string a integer
invoke atodw, addr UserInput
.if eax >= 1 && eax <= 25
invoke StdOut, addr Between1to25
.elseif eax > 25 && eax < 50
invoke StdOut, addr Between25to50
.elseif eax >= 50 && eax <= 75
invoke StdOut, addr Between50to75
.elseif eax > 75 && eax <= 100
invoke StdOut, addr Between75to100
.else
invoke StdOut, addr InvalidRange
.endif
; Exit the program
invoke ExitProcess, 0
end start