// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/installshld.c
// Function: de_run_is_sfx
static void de_run_is_sfx(deark *c, de_module_params *mparams)
{
	struct ishieldsfxdata *d = NULL;

	d = de_malloc(c, sizeof(struct ishieldsfxdata));

	// This module isn't smart enough to decode NE format to find the
	// pointers it needs. It can only be used via the exe module.
	if(c->module_disposition!=DE_MODDISP_INTERNAL) {
		goto done;
	}

	d->rsrc_pos = (i64)mparams->in_params.uint1;
	d->rsrc_len = (i64)mparams->in_params.uint2;

	is_sfx_main(c, d);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Failed to extract InstallShield SFX data");
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x30
popq %rsi
callq 0xdecaf
movq %rax, %r14
cmpl $0x3, 0x24(%rbx)
jne 0x9ca64
movsd 0x10(%r15), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movups %xmm0, 0x8(%r14)
leaq 0x14(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x88f36(%rip), %rsi     # 0x125756
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpq $0x10, 0x10(%r14)
jl 0x9ca6f
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x8, %rsi
callq 0xe409f
movq %rax, 0x18(%r14)
leaq 0x88f08(%rip), %rsi     # 0x12576d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0xc, %rsi
callq 0xe409f
movq %rax, 0x28(%r14)
leaq 0x88ef1(%rip), %rsi     # 0x12577f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, 0x8(%rsp)
movb $0x1, 0x8(%rax)
movq 0x18(%r14), %rax
movq %rsp, %r13
movq %rax, (%r13)
xorl %edx, %edx
movq %r14, 0x18(%rsp)
cmpq 0x28(%r14), %rdx
jge 0x9ca6f
movq (%rsp), %rcx
movq %rbx, %rdi
leaq 0x88ea3(%rip), %rsi     # 0x125790
movq %rdx, %r12
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq (%rsp), %rax
addq $0xc, %rax
cmpq 0x20(%r14), %rax
jg 0x9ca6b
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe40bf
movq %rax, %r15
movq %rbx, %rdi
leaq 0x88e74(%rip), %rsi     # 0x1257a1
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
cmpq $0x400, %r15            # imm = 0x400
jg 0x9ca6b
movq (%rsp), %rax
addq %r15, %rax
addq $0x4, %rax
movq %rax, (%rsp)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe40bf
movq %rax, %rbp
movq (%rsp), %r13
movq %rbx, %rdi
leaq 0x88e40(%rip), %rsi     # 0x1257b0
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
leaq 0x88e3d(%rip), %rsi     # 0x1257c1
movq %rbp, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, %rax
addq %rbp, %rax
movq %rax, (%rsp)
cmpq 0x20(%r14), %rax
jg 0x9ca6b
movq %rbx, %rdi
pushq $0x78
popq %rsi
callq 0xdecaf
movq %rax, %r15
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r15)
movq %r13, 0x18(%r15)
movq %rbp, 0x20(%r15)
leaq 0x6d879(%rip), %rax     # 0x10a240
movq %rax, 0x8(%r15)
movb $0xa, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xee4da
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r14
leaq 0x6c(%r15), %r8
movq %rax, %rdi
pushq $0x5
popq %rsi
leaq 0x88ddc(%rip), %rdx     # 0x1257d2
movq %r12, 0x20(%rsp)
movl %r12d, %ecx
xorl %eax, %eax
callq 0xeae8b
movq %rbx, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xdfd55
movq %r14, %rdi
movq 0x18(%rsp), %r14
callq 0xeaf3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
movq %r12, %r8
movq %rsp, %r13
xorl %r9d, %r9d
callq 0xe4e0b
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x20(%rsp), %rdx
incq %rdx
jmp 0x9c8d5
testq %r14, %r14
jne 0x9ca88
jmp 0x9caaa
movb $0x1, (%r14)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xdfd24
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, (%r14)
je 0x9ca9f
leaq 0x88c98(%rip), %rsi     # 0x12572d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq