	.file	"180155.c"
	.intel_syntax noprefix
	.text
	.globl	shsucdx
	.data
	.align 16
	.type	shsucdx, @object
	.size	shsucdx, 18
shsucdx:
	.string	"\273\276\272\270"
	.ascii	"\021\315/\201\373\276\272t\001\303)\300\303"
	.section	.rodata
.LC0:
	.string	"/?"
.LC1:
	.string	"--help"
	.align 8
.LC2:
	.ascii	"Patch SMARTDrive 5.02 to cache SHSUCDX (version 3.00 and hig"
	.ascii	"her).\nOnly one parameter is accepted, which is the filename"
	.ascii	" of SMARTDrive.\nIf absent, it will try the path "
	.string	"given in the \"winbootdir\" environment\nvariable, or C:\\WINDOWS, with SMARTDRV.EXE. If the patch is successful,\nSMARTCDX.EXE will be created in the current directory.\nNote: SMARTCDX will not cache MSCDEX.\n\nJason Hood <jadoxa@yahoo.com.au>, 28 November, 2004."
.LC3:
	.string	"winbootdir"
.LC4:
	.string	"c:/windows"
.LC5:
	.string	"rb"
.LC6:
	.string	"Unable to open \"%s\".\n"
	.align 8
.LC7:
	.string	"Not enough memory (wanted to allocate %u).\n"
	.align 8
.LC8:
	.string	"Unrecognised SMARTDrive version.\n"
.LC9:
	.string	"wb"
.LC10:
	.string	"smartcdx.exe"
	.align 8
.LC11:
	.string	"Unable to create SMARTCDX.EXE\n"
.LC12:
	.string	"Not all bytes written!\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
	sub	rsp, 160
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -148[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
.L3:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L19
.L2:
	cmp	DWORD PTR -148[rbp], 1
	jne	.L5
	lea	rdi, .LC3[rip]
	call	getenv@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	jne	.L6
	lea	rax, .LC4[rip]
	mov	QWORD PTR -128[rbp], rax
.L6:
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -96[rbp]
	add	rax, rdx
	movabs	rcx, 8242841252604506927
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 2019896950
	mov	WORD PTR 12[rax], 101
	jmp	.L7
.L5:
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L7:
	lea	rax, -96[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -96[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L19
.L8:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -112[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L19
.L9:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rcx, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -132[rbp], 256
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36131[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cmp	ax, 629
	je	.L21
	sub	DWORD PTR -132[rbp], 1
.L10:
	cmp	DWORD PTR -132[rbp], -1023
	jge	.L13
	jmp	.L12
.L21:
	nop
.L12:
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36117[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cmp	ax, 276
	je	.L14
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36117[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cmp	ax, 275
	jne	.L15
.L14:
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36131[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cmp	ax, 629
	je	.L16
.L15:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 3
	jmp	.L19
.L16:
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	eax, 4
	jmp	.L19
.L17:
	mov	eax, DWORD PTR -132[rbp]
	add	eax, 36111
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 25
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36142[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -28528
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36240[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -28528
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36293[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -28528
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36334[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -28528
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36344[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -28528
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36355[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], -11519
	mov	eax, DWORD PTR -132[rbp]
	add	eax, 36357
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], -112
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	lea	rdx, 36364[rax]
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR shsucdx[rip]
	mov	rdx, QWORD PTR shsucdx[rip+8]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	movzx	eax, WORD PTR shsucdx[rip+16]
	mov	WORD PTR 16[rcx], ax
	mov	rcx, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	QWORD PTR -112[rbp], rax
	je	.L18
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	eax, 5
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"180155.c"
	.text
	.global	shsucdx
	.data
	.align	2
	.type	shsucdx, %object
	.size	shsucdx, 18
shsucdx:
	.ascii	"\273\276\272\270\000\021\315/\201\373\276\272t\001\303"
	.ascii	")\300\303"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/?\000"
	.align	2
.LC1:
	.ascii	"--help\000"
	.align	2
.LC2:
	.ascii	"Patch SMARTDrive 5.02 to cache SHSUCDX (version 3.0"
	.ascii	"0 and higher).\012Only one parameter is accepted, w"
	.ascii	"hich is the filename of SMARTDrive.\012If absent, i"
	.ascii	"t will try the path given in the \"winbootdir\" env"
	.ascii	"ironment\012variable, or C:\\WINDOWS, with SMARTDRV"
	.ascii	".EXE. If the patch is successful,\012SMARTCDX.EXE w"
	.ascii	"ill be created in the current directory.\012Note: S"
	.ascii	"MARTCDX will not cache MSCDEX.\012\012Jason Hood <j"
	.ascii	"adoxa@yahoo.com.au>, 28 November, 2004.\000"
	.align	2
.LC3:
	.ascii	"winbootdir\000"
	.align	2
.LC4:
	.ascii	"c:/windows\000"
	.align	2
.LC5:
	.ascii	"/smartdrv.exe\000"
	.align	2
.LC6:
	.ascii	"rb\000"
	.align	2
.LC7:
	.ascii	"Unable to open \"%s\".\012\000"
	.align	2
.LC8:
	.ascii	"Not enough memory (wanted to allocate %u).\012\000"
	.align	2
.LC9:
	.ascii	"Unrecognised SMARTDrive version.\012\000"
	.align	2
.LC10:
	.ascii	"wb\000"
	.align	2
.LC11:
	.ascii	"smartcdx.exe\000"
	.align	2
.LC12:
	.ascii	"Unable to create SMARTCDX.EXE\012\000"
	.align	2
.LC13:
	.ascii	"Not all bytes written!\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 = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-112]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L22+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L22+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
.L3:
	ldr	r0, .L22+12
	bl	puts
	mov	r3, #0
	b	.L19
.L2:
	ldr	r3, [fp, #-112]
	cmp	r3, #1
	bne	.L5
	ldr	r0, .L22+16
	bl	getenv
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L22+20
	str	r3, [fp, #-104]
.L6:
	sub	r3, fp, #88
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #88
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #88
	add	r3, r3, r2
	ldr	r2, .L22+24
	mov	r0, r3
	mov	r1, r2
	mov	r3, #14
	mov	r2, r3
	bl	memcpy
	b	.L7
.L5:
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
.L7:
	sub	r3, fp, #88
	ldr	r1, .L22+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L22+32
	ldr	r3, [r3]
	sub	r2, fp, #88
	ldr	r1, .L22+36
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L19
.L8:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-100]
	bl	fseek
	ldr	r0, [fp, #-100]
	bl	ftell
	mov	r3, r0
	str	r3, [fp, #-96]
	ldr	r0, [fp, #-96]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L22+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-96]
	ldr	r1, .L22+40
	mov	r0, r3
	bl	fprintf
	mov	r3, #2
	b	.L19
.L9:
	ldr	r0, [fp, #-100]
	bl	rewind
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-96]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	fread
	ldr	r0, [fp, #-100]
	bl	fclose
	mov	r3, #256
	str	r3, [fp, #-108]
	b	.L10
.L13:
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #35
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldrsh	r3, [r3]
	ldr	r2, .L22+44
	cmp	r3, r2
	beq	.L21
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	str	r3, [fp, #-108]
.L10:
	ldr	r3, [fp, #-108]
	cmn	r3, #1024
	bgt	.L13
	b	.L12
.L21:
	nop
.L12:
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #21
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldrsh	r3, [r3]
	cmp	r3, #276
	beq	.L14
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #21
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldrsh	r3, [r3]
	ldr	r2, .L22+48
	cmp	r3, r2
	bne	.L15
.L14:
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #35
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldrsh	r3, [r3]
	ldr	r2, .L22+44
	cmp	r3, r2
	beq	.L16
.L15:
	ldr	r3, .L22+32
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L22+52
	bl	fwrite
	mov	r3, #3
	b	.L19
.L16:
	ldr	r1, .L22+56
	ldr	r0, .L22+60
	bl	fopen
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L22+32
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L22+64
	bl	fwrite
	mov	r3, #4
	b	.L19
.L17:
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #15
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	mov	r2, #25
	strb	r2, [r3]
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #46
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+68
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #144
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+68
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #197
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+68
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #238
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+68
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36096
	add	r3, r3, #248
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+68
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36352
	add	r3, r3, #3
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+72
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-108]
	add	r3, r3, #36352
	add	r3, r3, #5
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	mvn	r2, #111
	strb	r2, [r3]
	ldr	r3, [fp, #-108]
	add	r3, r3, #36352
	add	r3, r3, #12
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, .L22+76
	mov	r0, r3
	mov	r1, r2
	mov	r3, #18
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-96]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-96]
	cmp	r3, r2
	beq	.L18
	ldr	r3, .L22+32
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L22+80
	bl	fwrite
	mov	r3, #5
	b	.L19
.L18:
	ldr	r0, [fp, #-100]
	bl	fclose
	mov	r3, #0
.L19:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC14
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stderr
	.word	.LC7
	.word	.LC8
	.word	629
	.word	275
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	-28528
	.word	-11519
	.word	shsucdx
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
