// File: /workspace/github_c_makefile_star2_O3/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
movl $0x30, %esi
callq 0xe8b2b
movq %rax, %r14
cmpl $0x3, 0x24(%rbx)
jne 0xa2855
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 0xe8a1c
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x90455(%rip), %rsi     # 0x132a56
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0x10, 0x10(%r14)
jl 0xa2860
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x8, %rsi
callq 0xeed61
movq %rax, 0x18(%r14)
leaq 0x90425(%rip), %rsi     # 0x132a6d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0xc, %rsi
callq 0xeed61
movq %rax, 0x28(%r14)
leaq 0x9040e(%rip), %rsi     # 0x132a7f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
callq 0xea504
movq %rax, 0x8(%rsp)
movb $0x1, 0x8(%rax)
movq 0x18(%r14), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x28(%r14)
jle 0xa2860
movq %rsp, %r12
xorl %ebp, %ebp
movq %r14, 0x18(%rsp)
movq (%rsp), %rcx
movq %rbx, %rdi
leaq 0x903bd(%rip), %rsi     # 0x132a90
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq (%rsp), %rax
addq $0xc, %rax
cmpq 0x20(%r14), %rax
jg 0xa285c
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
movq %rax, %r15
movq %rbx, %rdi
leaq 0x9038d(%rip), %rsi     # 0x132aa1
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpq $0x400, %r15            # imm = 0x400
jg 0xa285c
movq (%rsp), %rax
addq %r15, %rax
addq $0x4, %rax
movq %rax, (%rsp)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeed83
movq %rax, %r12
movq (%rsp), %r13
movq %rbx, %rdi
leaq 0x90359(%rip), %rsi     # 0x132ab0
movq %r13, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
leaq 0x90356(%rip), %rsi     # 0x132ac1
movq %r12, %rdx
xorl %eax, %eax
callq 0xe8617
leaq (%r12,%r13), %rax
movq %rax, (%rsp)
cmpq 0x20(%r14), %rax
jg 0xa285c
movl $0x78, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r15
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r15)
movq %r13, 0x18(%r15)
movq %r12, 0x20(%r15)
leaq 0x74b22(%rip), %rax     # 0x1172d0
movq %rax, 0x8(%r15)
movb $0xa, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf9e98
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
leaq 0x6c(%r15), %r8
movq %rax, %rdi
movl $0x5, %esi
leaq 0x902f3(%rip), %rdx     # 0x132ad2
movl %ebp, %ecx
xorl %eax, %eax
callq 0xf6653
movq %rbx, %rdi
movq %rbp, 0x20(%rsp)
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xea53f
movq %r14, %rdi
movq 0x18(%rsp), %r14
callq 0xf6753
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe8be2
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %rbp, %r8
movq 0x20(%rsp), %rbp
movq %rsp, %r12
xorl %r9d, %r9d
callq 0xefd48
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
cmpq 0x28(%r14), %rbp
jl 0xa26c5
jmp 0xa2860
testq %r14, %r14
jne 0xa2879
jmp 0xa289b
movb $0x1, (%r14)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xea50e
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
cmpb $0x0, (%r14)
je 0xa2890
leaq 0x901a7(%rip), %rsi     # 0x132a2d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq