// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dsstore.c
// Function: do_blob
static void do_blob(deark *c, lctx *d, struct record_info *ri)
{
	i64 len;
	i64 blobpos;

	len = de_getu32be(ri->dpos);
	de_dbg(c, "blob len: %d", (int)len);
	ri->dlen = 4+len;
	blobpos = ri->dpos+4;

	if(len>=8 && !dbuf_memcmp(c->infile, blobpos, "bplist00", 8)) {
		de_finfo *fi = NULL;
		de_ucstring *fn = NULL;

		de_dbg(c, "binary plist at %d", (int)blobpos);
		de_dbg_indent(c, 1);
		fn = ucstring_create(c);
		if(c->filenames_from_file) {
			ucstring_append_ucstring(fn, ri->filename);
			ucstring_append_sz(fn, ".", DE_ENCODING_LATIN1);
		}
		ucstring_printf(fn, DE_ENCODING_LATIN1, "%s.plist", ri->rtype.id_sanitized_sz);
		fi = de_finfo_create(c);
		de_finfo_set_name_from_ucstring(c, fi, fn, 0);
		fmtutil_handle_plist(c, c->infile, blobpos, len, fi, 0);
		ucstring_destroy(fn);
		de_finfo_destroy(c, fi);
		de_dbg_indent(c, -1);
	}
	else {
		de_dbg_hexdump(c, c->infile, blobpos, len, 256, NULL, 0x1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165470
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x12d629(%rip), %rsi    # 0x1ada36
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rcx
addq $0x4, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
cmpq $0x8, -0x20(%rbp)
jl 0x80563
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x122677(%rip), %rdx    # 0x1a2ac8
movl $0x8, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x80563
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x12d5be(%rip), %rsi    # 0x1ada43
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd0(%rax)
je 0x804da
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x171460
movq -0x38(%rbp), %rdi
leaq 0x146cd3(%rip), %rsi    # 0x1c71a3
movl $0x5, %edx
callq 0x1715e0
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
addq $0x8, %rcx
movl $0x5, %esi
leaq 0x12d560(%rip), %rdx    # 0x1ada56
movb $0x0, %al
callq 0x171660
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x173c10
movq -0x38(%rbp), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15d260
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0x8058e
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)