// File: /workspace/github_c_makefile_star2_O1/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 0xe969b
movq %rax, %r14
cmpl $0x3, 0x24(%rbx)
jne 0xa3138
movl 0x10(%r15), %eax
movq %rax, 0x8(%r14)
movl 0x14(%r15), %eax
movq %rax, 0x10(%r14)
leaq 0x14(%rsp), %rsi
movq %rbx, %rdi
callq 0xe958c
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x8f7f7(%rip), %rsi     # 0x1326be
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
cmpq $0x10, 0x10(%r14)
jl 0xa311f
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x8, %rsi
callq 0xef37e
movq %rax, 0x18(%r14)
leaq 0x8f7c7(%rip), %rsi     # 0x1326d5
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0xc, %rsi
callq 0xef37e
movq %rax, 0x28(%r14)
leaq 0x8f7b0(%rip), %rsi     # 0x1326e7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbx, %rdi
callq 0xea9a9
movq %rax, 0x8(%rsp)
movb $0x1, 0x8(%rax)
movq 0x18(%r14), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x28(%r14)
jle 0xa311f
movq %rsp, %r12
xorl %ebp, %ebp
movq %r14, 0x18(%rsp)
movq (%rsp), %rcx
movq %rbx, %rdi
leaq 0x8f75f(%rip), %rsi     # 0x1326f8
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%rsp), %rax
addq $0xc, %rax
cmpq 0x20(%r14), %rax
jg 0xa311b
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef3a0
movq %rax, %r15
movq %rbx, %rdi
leaq 0x8f72f(%rip), %rsi     # 0x132709
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpq $0x400, %r15            # imm = 0x400
jg 0xa311b
movq (%rsp), %rax
addq %r15, %rax
addq $0x4, %rax
movq %rax, (%rsp)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef3a0
movq %rax, %r12
movq (%rsp), %r13
movq %rbx, %rdi
leaq 0x8f6fb(%rip), %rsi     # 0x132718
movq %r13, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
leaq 0x8f6f8(%rip), %rsi     # 0x132729
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9226
leaq (%r12,%r13), %rax
movq %rax, (%rsp)
cmpq 0x20(%r14), %rax
jg 0xa311b
movl $0x78, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r15
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r15)
movq %r13, 0x18(%r15)
movq %r12, 0x20(%r15)
leaq 0x741bc(%rip), %rax     # 0x117230
movq %rax, 0x8(%r15)
movb $0xa, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfa395
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
leaq 0x6c(%r15), %r8
movq %rax, %rdi
movl $0x5, %esi
leaq 0x8f695(%rip), %rdx     # 0x13273a
movl %ebp, %ecx
xorl %eax, %eax
callq 0xf6ab0
movq %rbx, %rdi
movq %rbp, 0x20(%rsp)
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xea9e4
movq %r14, %rdi
movq 0x18(%rsp), %r14
callq 0xf6bb0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe9752
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 0xf0321
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
incq %rbp
cmpq 0x28(%r14), %rbp
jl 0xa2f8b
jmp 0xa311f
movb $0x1, (%r14)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xea9b3
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
testq %r14, %r14
je 0xa315f
cmpb $0x0, (%r14)
je 0xa3154
leaq 0x8f54b(%rip), %rsi     # 0x132695
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq