// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r15
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0xefb8a(%rip), %rdx     # 0x113cd5
movl $0x4, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
je 0x24205
leaq 0xefbce(%rip), %rsi     # 0x113d34
movq %rbx, %rdi
callq 0xeb125
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeead3
movzbl %al, %r15d
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0xeead3
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 0x244f7
testl %eax, %eax
je 0x24426
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 0x24426
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 0x244f7
jmp 0x24426
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeebc8
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xeebc8
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe8f88
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf1db1
testl %eax, %eax
je 0x242f0
movq (%r14), %r13
leaq 0x7(%r13), %rax
leaq 0xe(%r13), %r12
testq %rax, %rax
cmovnsq %rax, %r12
movq 0x8(%r14), %rax
sarq $0x3, %r12
movq %rax, %rbp
imulq %r13, %rbp
movq 0x18(%rbx), %rdi
leaq 0x30c(%rbp), %rdx
movq 0x18(%rdi), %rcx
cmpq %rcx, %rdx
jg 0x242a7
leaq 0x8(%rbp), %rsi
leaq 0xefaa2(%rip), %rdx     # 0x113d2f
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
je 0x242f7
movq 0x8(%r14), %rax
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rcx
leaq (,%r12,4), %r13
movq %rax, %rbp
imulq %r13, %rbp
leaq 0x3c(%rbp), %rax
cmpq %rcx, %rax
jg 0x242d8
leaq 0x8(%rbp), %rsi
leaq 0xefa65(%rip), %rdx     # 0x113d2f
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
je 0x2431a
leaq 0xefa2d(%rip), %rsi     # 0x113d0c
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x2441e
xorl %ebp, %ebp
jmp 0x2441e
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x20(%rsp)
movl $0x1, 0x18(%rsp)
leaq 0xef9ca(%rip), %rsi     # 0x113cda
movl $0x0, 0x1c(%rsp)
jmp 0x24339
movb $0x1, %al
movl %eax, 0x1c(%rsp)
movl $0x10, %eax
movq %rax, 0x20(%rsp)
movl $0x0, 0x18(%rsp)
leaq 0xef9ba(%rip), %rsi     # 0x113cf3
movq %rbx, %rdi
callq 0xeb125
movl 0x18(%rsp), %eax
movl %eax, 0x10(%r14)
leaq 0xef9d6(%rip), %rsi     # 0x113d26
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x2436b
movq %rax, %rdi
callq 0xe9c2a
movl %eax, 0x10(%r14)
jmp 0x2436f
movl 0x10(%r14), %eax
addq $0xc, %rbp
movq 0x18(%rbx), %rsi
addq $0x14, %r15
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, (%rsp)
movl $0x2, 0x8(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
movq %rbp, %rdx
movq %r15, %r9
callq 0xf2cb1
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, %rbp
movq 0x18(%rbx), %rdi
cmpb $0x0, 0x1c(%rsp)
je 0x243f3
movq %rbp, (%rsp)
movl $0x2, 0x8(%rsp)
movl $0x8, %esi
movl $0x4, %edx
movq %r13, %rcx
movq %r12, %r8
movq %r15, %r9
callq 0xf30b3
jmp 0x24412
movl $0x0, (%rsp)
movl $0x8, %esi
movl $0x8, %edx
movq %r13, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0xf2f79
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq %rbp, %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2