	.file	"431432.c"
	.intel_syntax noprefix
	.text
	.globl	test
	.bss
	.align 32
	.type	test, @object
	.size	test, 160
test:
	.zero	160
	.text
	.globl	win_function1
	.type	win_function1, @function
win_function1:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, test[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, test[rip]
	add	rax, rdx
	mov	DWORD PTR [rax], 1852268871
	mov	BYTE PTR 4[rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	win_function1, .-win_function1
	.globl	win_function2
	.type	win_function2, @function
win_function2:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], -1412567279
	jne	.L4
	lea	rdi, test[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, test[rip]
	add	rax, rdx
	mov	DWORD PTR [rax], 555854275
	mov	BYTE PTR 4[rax], 0
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	win_function2, .-win_function2
	.globl	flag
	.type	flag, @function
flag:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -4[rbp], -889262134
	jne	.L5
	cmp	DWORD PTR -8[rbp], -559039810
	jne	.L5
	lea	rdi, test[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	flag, .-flag
	.section	.rodata
.LC0:
	.string	"ROP ME:"
	.text
	.globl	vuln
	.type	vuln, @function
vuln:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	vuln, .-vuln
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
	call	getegid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	setresgid@PLT
	mov	eax, 0
	call	vuln
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"431432.c"
	.text
	.comm	test,80,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Gagn\000"
	.text
	.align	2
	.global	win_function1
	.syntax unified
	.arm
	.fpu softvfp
	.type	win_function1, %function
win_function1:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L2
	add	r3, r2, r3
	ldr	r2, .L2+4
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	test
	.word	.LC0
	.size	win_function1, .-win_function1
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\303\251!!\000"
	.text
	.align	2
	.global	win_function2
	.syntax unified
	.arm
	.fpu softvfp
	.type	win_function2, %function
win_function2:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L7
	cmp	r3, r2
	bne	.L6
	ldr	r0, .L7+4
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L7+4
	add	r3, r2, r3
	ldr	r2, .L7+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
.L6:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	-1412567279
	.word	test
	.word	.LC1
	.size	win_function2, .-win_function2
	.align	2
	.global	flag
	.syntax unified
	.arm
	.fpu softvfp
	.type	flag, %function
flag:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, .L11
	cmp	r3, r2
	bne	.L9
	ldr	r3, [fp, #-12]
	ldr	r2, .L11+4
	cmp	r3, r2
	bne	.L9
	ldr	r0, .L11+8
	bl	printf
	nop
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	-889262134
	.word	-559039810
	.word	test
	.size	flag, .-flag
	.section	.rodata
	.align	2
.LC2:
	.ascii	"ROP ME:\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	vuln
	.syntax unified
	.arm
	.fpu softvfp
	.type	vuln, %function
vuln:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L16+4
	bl	printf
	sub	r3, fp, #24
	mov	r0, r3
	bl	gets
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	.LC2
	.size	vuln, .-vuln
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L20
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
	bl	getegid
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	setresgid
	bl	vuln
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
