	.file	"230570.c"
	.intel_syntax noprefix
	.text
	.globl	decoder1
	.data
	.align 16
	.type	decoder1, @object
	.size	decoder1, 18
decoder1:
	.string	"\353\025^V1\311\212\006\300\310\004\210\006FA\203\371"
	.globl	decoder2
	.align 8
	.type	decoder2, @object
	.size	decoder2, 11
decoder2:
	.string	"u\362\377\024$\350\346\377\377\377"
	.section	.rodata
.LC0:
	.string	"usage: %s <file>\n"
	.align 8
.LC1:
	.string	"ROR 4 encoding shellcode contained in %s\n\n"
.LC2:
	.string	"stat"
	.align 8
.LC3:
	.string	"Shellcode larger than 255 bytes (%ld).\n"
.LC4:
	.string	"open"
	.align 8
.LC5:
	.string	"Unable to read %ld bytes from %s\n"
	.align 8
.LC6:
	.string	"SHELLCODE CONTAINS NULL BYTES!\n"
.LC7:
	.string	"%s%c%s%s"
.LC8:
	.string	"char shellcode[] = \""
.LC9:
	.string	"\""
.LC10:
	.string	"                   \""
.LC11:
	.string	"\\x%.2x"
.LC12:
	.string	"\";\n"
.LC13:
	.string	"Length: %d\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 232
	.cfi_offset 3, -24
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -128[rbp]
	cmp	rax, 255
	jle	.L4
	mov	rdx, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -208[rbp], eax
	cmp	DWORD PTR -208[rbp], -1
	jne	.L5
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -128[rbp]
	mov	ebx, eax
	lea	rdi, decoder1[rip]
	call	strlen@PLT
	add	ebx, eax
	lea	rdi, decoder2[rip]
	call	strlen@PLT
	add	eax, ebx
	add	eax, 1
	mov	DWORD PTR -204[rbp], eax
	mov	eax, DWORD PTR -204[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -192[rbp]
	mov	eax, DWORD PTR -208[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	rdx, QWORD PTR -128[rbp]
	cmp	rax, rdx
	je	.L6
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -208[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -212[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	jmp	.L9
.L8:
	add	DWORD PTR -212[rbp], 1
.L7:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	cmp	rdx, rax
	jl	.L10
.L9:
	mov	DWORD PTR -212[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	shr	al, 4
	mov	ecx, eax
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 4
	or	ecx, eax
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -212[rbp], 1
.L11:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	cmp	rdx, rax
	jl	.L12
	mov	rax, QWORD PTR -128[rbp]
	movzx	edx, al
	mov	rcx, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	r9, rcx
	lea	r8, decoder2[rip]
	mov	ecx, edx
	lea	rdx, decoder1[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -212[rbp], 0
	jmp	.L13
.L15:
	mov	ecx, DWORD PTR -212[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	test	edx, edx
	jne	.L14
	cmp	DWORD PTR -212[rbp], 0
	je	.L14
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -200[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -212[rbp], 1
.L13:
	mov	eax, DWORD PTR -212[rbp]
	cmp	eax, DWORD PTR -204[rbp]
	jl	.L15
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -204[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	QWORD PTR -184[rbp], rax
	mov	rdx, QWORD PTR -184[rbp]
	mov	eax, 0
	call	rdx
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"230570.c"
	.text
	.global	decoder1
	.data
	.align	2
	.type	decoder1, %object
	.size	decoder1, 18
decoder1:
	.ascii	"\353\025^V1\311\212\006\300\310\004\210\006FA\203\371"
	.ascii	"\000"
	.global	decoder2
	.align	2
	.type	decoder2, %object
	.size	decoder2, 11
decoder2:
	.ascii	"u\362\377\024$\350\346\377\377\377\000"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s <file>\012\000"
	.align	2
.LC1:
	.ascii	"ROR 4 encoding shellcode contained in %s\012\012\000"
	.align	2
.LC2:
	.ascii	"stat\000"
	.align	2
.LC3:
	.ascii	"Shellcode larger than 255 bytes (%ld).\012\000"
	.align	2
.LC4:
	.ascii	"open\000"
	.align	2
.LC5:
	.ascii	"Unable to read %ld bytes from %s\012\000"
	.align	2
.LC6:
	.ascii	"SHELLCODE CONTAINS NULL BYTES!\012\000"
	.align	2
.LC7:
	.ascii	"%s%c%s%s\000"
	.align	2
.LC8:
	.ascii	"char shellcode[] = \"\000"
	.align	2
.LC9:
	.ascii	"\"\000"
	.align	2
.LC10:
	.ascii	"                   \"\000"
	.align	2
.LC11:
	.ascii	"\\x%.2x\000"
	.align	2
.LC12:
	.ascii	"\";\012\000"
	.align	2
.LC13:
	.ascii	"Length: %d\012\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #140
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L18+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L18+16
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-64]
	cmp	r3, #255
	ble	.L4
	ldr	r3, .L18+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	ldr	r1, .L18+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L18+24
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-64]
	mov	r4, r3
	ldr	r0, .L18+28
	bl	strlen
	mov	r3, r0
	add	r4, r4, r3
	ldr	r0, .L18+32
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-124]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-64]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-64]
	mov	r2, r3
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-128]
	bl	read
	mov	r2, r0
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	beq	.L6
	ldr	r3, .L18+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L18+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, [fp, #-128]
	bl	close
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L7
.L10:
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-116]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L18+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L18+40
	bl	fwrite
	b	.L9
.L8:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L7:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-132]
	cmp	r2, r3
	blt	.L10
.L9:
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L11
.L12:
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-116]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-132]
	ldr	r1, [fp, #-116]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #4
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-132]
	ldr	r1, [fp, #-116]
	add	r3, r1, r3
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L11:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-132]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-64]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-116]
	str	r3, [sp, #4]
	ldr	r3, .L18+32
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, .L18+28
	ldr	r1, .L18+44
	ldr	r0, [fp, #-120]
	bl	sprintf
	ldr	r0, .L18+48
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L13
.L15:
	ldr	r1, [fp, #-132]
	ldr	r3, .L18+52
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L14
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L18+56
	bl	puts
	ldr	r0, .L18+60
	bl	printf
.L14:
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L18+64
	bl	printf
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L13:
	ldr	r2, [fp, #-132]
	ldr	r3, [fp, #-124]
	cmp	r2, r3
	blt	.L15
	ldr	r0, .L18+68
	bl	puts
	ldr	r1, [fp, #-124]
	ldr	r0, .L18+72
	bl	printf
	ldr	r3, [fp, #-120]
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-112]
	blx	r3
	ldr	r0, [fp, #-120]
	bl	free
	ldr	r0, [fp, #-116]
	bl	free
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC14
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	decoder1
	.word	decoder2
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	1717986919
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
