// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/awbm.c
// Function: de_run_awbm
static void de_run_awbm(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));

	if(!dbuf_memcmp(c->infile, 0, "AWBM", 4)) {
		do_v2(c, d);
	}
	else {
		do_v1(c, d);
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x418, %esi            # imm = 0x418
callq 0xe969b
movq %rax, %r15
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0xefa92(%rip), %rdx     # 0x113c25
movl $0x4, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
je 0x2424d
leaq 0xefad6(%rip), %rsi     # 0x113c84
movq %rbx, %rdi
callq 0xeb6d6
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef0d5
movzbl %al, %r15d
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0xef0d5
movzbl %al, %r12d
movl $0x0, (%rsp)
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x2453d
testl %eax, %eax
je 0x2446c
imulq %r12, %r15
leaq (%r15,%r15,4), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
addq $0x48, %rdx
cmpq %rdx, 0x18(%rcx)
jl 0x2446c
leaq (%rax,%rax,2), %rdx
addq $0x2, %rdx
movl $0x1, (%rsp)
movl $0x3, %ecx
movl $0x2, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r9d
callq 0x2453d
jmp 0x2446c
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xef1ca
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef1ca
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe9b05
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf241d
testl %eax, %eax
je 0x242fd
movq (%r14), %r12
leaq 0x7(%r12), %rax
leaq 0xe(%r12), %r13
testq %rax, %rax
cmovnsq %rax, %r13
sarq $0x3, %r13
movq 0x8(%r14), %rbp
imulq %r12, %rbp
leaq 0x30c(%rbp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jg 0x242db
leaq 0x8(%rbp), %rsi
leaq 0xef9b2(%rip), %rdx     # 0x113c7f
movl $0x4, %ecx
callq 0xf025e
testl %eax, %eax
je 0x2432c
leaq (,%r13,4), %r12
movq 0x8(%r14), %rbp
imulq %r12, %rbp
leaq 0x3c(%rbp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jle 0x24304
movb $0x1, %cl
jmp 0x2431f
xorl %ebp, %ebp
jmp 0x24464
leaq 0x8(%rbp), %rsi
leaq 0xef970(%rip), %rdx     # 0x113c7f
movl $0x4, %ecx
callq 0xf025e
movb $0x1, %cl
testl %eax, %eax
je 0x24341
xorl %eax, %eax
movq $0x0, 0x18(%rsp)
jmp 0x24368
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x18(%rsp)
leaq 0xef8ed(%rip), %rsi     # 0x113c2a
xorl %ecx, %ecx
jmp 0x24352
movl $0x10, %eax
movq %rax, 0x18(%rsp)
leaq 0xef8f1(%rip), %rsi     # 0x113c43
movl %ecx, %eax
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
callq 0xeb6d6
movq 0x20(%rsp), %rax
xorl %ecx, %ecx
testb %cl, %cl
je 0x24384
leaq 0xef8e9(%rip), %rsi     # 0x113c5c
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x24464
movq %rax, 0x20(%rsp)
xorb $0x1, %al
movzbl %al, %eax
movl %eax, 0x10(%r14)
leaq 0xef8dd(%rip), %rsi     # 0x113c76
movq %rbx, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x243b2
movq %rax, %rdi
callq 0xea781
movl %eax, 0x10(%r14)
addq $0xc, %rbp
movq 0x18(%rbx), %rsi
addq $0x14, %r15
xorl %eax, %eax
cmpl $0x0, 0x10(%r14)
sete %al
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, (%rsp)
movl $0x2, 0x8(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
movq %rbp, %rdx
movq %r15, %r9
callq 0xf32f2
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %rbp
movq 0x18(%rbx), %rdi
cmpb $0x0, 0x20(%rsp)
je 0x24439
movq %rbp, (%rsp)
movl $0x2, 0x8(%rsp)
movl $0x8, %esi
movl $0x4, %edx
movq %r12, %rcx
movq %r13, %r8
movq %r15, %r9
callq 0xf36f9
jmp 0x24458
movl $0x0, (%rsp)
movl $0x8, %esi
movl $0x8, %edx
movq %r12, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0xf35b8
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf2923
movq %rbp, %rdi
callq 0xf28d4
movq %rbx, %rdi
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752