	.file	"627129.c"
	.intel_syntax noprefix
	.text
	.globl	buffer
	.bss
	.type	buffer, @object
	.size	buffer, 5
buffer:
	.zero	5
	.text
	.globl	vuln
	.type	vuln, @function
vuln:
.LFB0:
	.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	eax, 0
	call	get_flag
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, buffer[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	vuln, .-vuln
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 4
	lea	rsi, buffer[rip]
	mov	edi, 0
	call	read@PLT
	mov	eax, 0
	call	vuln
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"/home/ctf/flag"
	.align 8
.LC1:
	.string	"STT{The_Correct_Flag_is_On_The_Server}"
	.text
	.globl	get_flag
	.type	get_flag, @function
get_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, 32
	mov	esi, 1
	mov	edi, 50
	call	calloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L5
	lea	rax, .LC1[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L6
.L5:
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 49
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
.L6:
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_flag, .-get_flag
	.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	"627129.c"
	.text
	.global	buffer
	.bss
	.align	2
	.type	buffer, %object
	.size	buffer, 5
buffer:
	.space	5
	.text
	.align	2
	.global	vuln
	.syntax unified
	.arm
	.fpu softvfp
	.type	vuln, %function
vuln:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	get_flag
	str	r0, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	buffer
	.size	vuln, .-vuln
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #4
	ldr	r1, .L6
	mov	r0, #0
	bl	read
	bl	vuln
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	buffer
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/home/ctf/flag\000"
	.align	2
.LC1:
	.ascii	"STT{The_Correct_Flag_is_On_The_Server}\000"
	.text
	.align	2
	.global	get_flag
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_flag, %function
get_flag:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r1, #1
	mov	r0, #50
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r1, #0
	ldr	r0, .L12
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L9
	ldr	r3, .L12+4
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	memcpy
	b	.L10
.L9:
	mov	r2, #49
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	read
	ldr	r0, [fp, #-12]
	bl	close
.L10:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.size	get_flag, .-get_flag
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
