name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
qpdf::Array::setFromVector(std::vector<QPDFObjectHandle, std::allocator<QPDFObjectHandle>> const&) | void
Array::setFromVector(std::vector<QPDFObjectHandle> const& v)
{
auto a = array();
a->elements.resize(0);
a->elements.reserve(v.size());
for (auto const& item: v) {
checkOwnership(item);
a->elements.emplace_back(item);
}
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
callq 0x14f652
movq %rax, %r14
addq $0x8, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x151a74
movq 0x8(%r12), %rsi
subq (%r12), %rsi
sarq $0x4, %rsi
movq %r14, %rdi
callq 0x120ed2
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpq %r12, %r15
je 0x14fead
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1519d2
movq %r14, %rdi
movq %r15, %rsi
callq 0x122094
addq $0x10, %r15
jmp 0x14fe8c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
qpdf::Array::push_back(QPDFObjectHandle const&) | void
Array::push_back(QPDFObjectHandle const& item)
{
auto a = array();
checkOwnership(item);
if (a->sp) {
a->sp->elements[(a->sp->size)++] = item;
} else {
a->elements.emplace_back(item);
}
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x14f652
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1519d2
movq (%r14), %rax
testq %rax, %rax
je 0x150121
leaq 0x8(%rax), %rdi
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
leaq 0xc(%rsp), %rsi
movl %ecx, (%rsi)
callq 0x151ae8
movq (%rbx), %rcx
movq %rcx, (%rax)
leaq 0x8(%rax), %rdi
addq $0x8, %rbx
movq %rbx, %rsi
callq 0x6c300
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x122094
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::getArrayItem(int) const | QPDFObjectHandle
QPDFObjectHandle::getArrayItem(int n) const
{
if (auto array = as_array(strict)) {
if (auto const [success, oh] = array.at(n); success) {
return oh;
} else {
objectWarning("returning null for out of bounds array access");
QTC::TC("qpdf", "QPDFObjectHandle array bounds");
}
} else {
typeWarning("array", "returning null");
QTC::TC("qpdf", "QPDFObjectHandle array null for non-array");
}
static auto constexpr msg = " -> null returned from invalid array access"sv;
return QPDF_Null::create(obj, msg, "");
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x15049d
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x1504a1
cmpl $0xd, %eax
jne 0x1504af
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x1504a6
xorl %eax, %eax
jmp 0x1504b2
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x1504b2
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x1504e2
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x1504ea
movq 0xf890c(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1505d4
incl 0x8(%rax)
jmp 0x1504ea
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x150549
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl %ebp, %edx
callq 0x14fc90
movb 0x50(%rsp), %bpl
cmpb $0x1, %bpl
jne 0x150592
movq 0x58(%rsp), %rax
movq %rax, (%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1505e1
movq 0xf88a8(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1505dd
incl 0x8(%rax)
jmp 0x1505e1
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x82c0e(%rip), %rsi # 0x1d3167
leaq 0x82c15(%rip), %rdx # 0x1d3175
movq %rsp, %rdi
callq 0x68bb0
leaq 0x84675(%rip), %rsi # 0x1d4be4
movq %rsp, %rdx
movq %r14, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1505f9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1505f9
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x82b97(%rip), %rsi # 0x1d3139
leaq 0x82bbd(%rip), %rdx # 0x1d3166
movq %rsp, %rdi
callq 0x68bb0
movq %rsp, %rsi
movq %r14, %rdi
callq 0x11f77c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1505e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1505e1
lock
incl 0x8(%rax)
jmp 0x1504ea
lock
incl 0x8(%rax)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1505f0
callq 0x69d60
testb %bpl, %bpl
je 0x1505f9
xorl %ebp, %ebp
jmp 0x1505fc
movb $0x1, %bpl
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x94af2
movq -0x8(%r15), %rdi
testq %rdi, %rdi
je 0x150617
callq 0x69d60
testb %bpl, %bpl
je 0x1506c6
movq (%r14), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x15064b
movq 0xf87a3(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x150647
incl 0x8(%rax)
jmp 0x15064b
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x825cb(%rip), %rdx # 0x1d2c26
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0xf6891(%rip), %rdx # 0x246f00
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
leaq 0x68(%rsp), %rcx
callq 0x151b4c
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rsp)
movq %rcx, 0x8(%rbx)
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1506b7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1506c6
callq 0x69d60
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1506f5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1506f5
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x150756
callq 0x69d60
jmp 0x150756
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x150756
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x150756
jmp 0x150753
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x150742
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x150742
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x150760
callq 0x69d60
jmp 0x150760
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::getArrayAsRectangle() const | QPDFObjectHandle::Rectangle
QPDFObjectHandle::getArrayAsRectangle() const
{
if (auto array = as_array(strict)) {
if (array.size() != 4) {
return {};
}
double items[4];
for (int i = 0; i < 4; ++i) {
if (auto item = array.at(i).second; !item.getValueAsNumber(items[i])) {
return {};
}
}
return {
std::min(items[0], items[2]),
std::min(items[1], items[3]),
std::max(items[0], items[2]),
std::max(items[1], items[3])};
}
return {};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x150a5e
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x150a62
cmpl $0xd, %eax
jne 0x150a70
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x150a67
xorl %eax, %eax
jmp 0x150a73
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x150a73
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x150aa3
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x150aad
movq 0xf834b(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x150c10
incl 0x8(%rax)
jmp 0x150aad
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x150bca
leaq 0x10(%rsp), %rdi
callq 0x14f652
movq (%rax), %rcx
testq %rcx, %rcx
je 0x150ada
movl (%rcx), %ecx
jmp 0x150ae6
movq 0x10(%rax), %rcx
subq 0x8(%rax), %rcx
shrq $0x4, %rcx
cmpl $0x4, %ecx
jne 0x150b95
leaq 0x40(%rsp), %r14
xorl %r15d, %r15d
leaq 0x60(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x30(%rsp), %rbp
movq %r12, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x14fc90
movupd 0x68(%rsp), %xmm0
movupd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x68160
testb %al, %al
je 0x150ba9
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x150b3e
callq 0x69d60
incq %r15
addq $0x8, %r14
cmpq $0x4, %r15
jne 0x150b06
movsd 0x50(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
movapd %xmm0, %xmm3
minsd %xmm1, %xmm3
movsd 0x58(%rsp), %xmm4
movapd %xmm4, %xmm5
minsd %xmm2, %xmm5
maxsd %xmm1, %xmm0
maxsd %xmm2, %xmm4
movq 0x8(%rsp), %rax
movsd %xmm3, (%rax)
movsd %xmm5, 0x8(%rax)
movsd %xmm0, 0x10(%rax)
movsd %xmm4, 0x18(%rax)
jmp 0x150bca
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
jmp 0x150bca
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x150bca
callq 0x69d60
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x94af2
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x150be5
callq 0x69d60
testq %rbx, %rbx
jne 0x150bfc
xorpd %xmm0, %xmm0
movq 0x8(%rsp), %rax
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq 0x8(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x150aad
jmp 0x150c1b
movq %rax, %rbx
jmp 0x150c32
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x150c32
callq 0x69d60
leaq 0x10(%rsp), %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::getArrayAsMatrix() const | QPDFObjectHandle::Matrix
QPDFObjectHandle::getArrayAsMatrix() const
{
if (auto array = as_array(strict)) {
if (array.size() != 6) {
return {};
}
double items[6];
for (int i = 0; i < 6; ++i) {
if (auto item = array.at(i).second; !item.getValueAsNumber(items[i])) {
return {};
}
}
return {items[0], items[1], items[2], items[3], items[4], items[5]};
}
return {};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x150c80
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x150c84
cmpl $0xd, %eax
jne 0x150c92
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x150c89
xorl %eax, %eax
jmp 0x150c95
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x150c95
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x150cc4
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x150ccb
movq 0xf812a(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x150df1
incl 0x8(%rax)
jmp 0x150ccb
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rsp), %r15
testq %r15, %r15
je 0x150db1
movq %rsp, %rdi
callq 0x14f652
movq (%rax), %rcx
testq %rcx, %rcx
je 0x150cf5
movl (%rcx), %ecx
jmp 0x150d01
movq 0x10(%rax), %rcx
subq 0x8(%rax), %rcx
shrq $0x4, %rcx
cmpl $0x6, %ecx
jne 0x150d7f
movq %r15, 0x18(%rsp)
leaq 0x30(%rsp), %r14
xorl %r15d, %r15d
leaq 0x60(%rsp), %r12
movq %rsp, %r13
leaq 0x20(%rsp), %rbp
movq %r12, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x14fc90
movups 0x68(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x68160
testb %al, %al
je 0x150d8f
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x150d56
callq 0x69d60
incq %r15
addq $0x8, %r14
cmpq $0x6, %r15
jne 0x150d20
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movaps 0x50(%rsp), %xmm2
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm2, 0x20(%rbx)
jmp 0x150dac
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x150db1
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x150dac
callq 0x69d60
movq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x94af2
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x150dcc
callq 0x69d60
testq %r15, %r15
jne 0x150ddf
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x150ccb
jmp 0x150dfc
movq %rax, %rbx
jmp 0x150e13
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x150e13
callq 0x69d60
movq %rsp, %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::setArrayItem(int, QPDFObjectHandle const&) | void
QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item)
{
if (auto array = as_array(strict)) {
if (!array.setAt(n, item)) {
objectWarning("ignoring attempt to set out of bounds array item");
QTC::TC("qpdf", "QPDFObjectHandle set array bounds");
}
} else {
typeWarning("array", "ignoring attempt to set item");
QTC::TC("qpdf", "QPDFObjectHandle array ignoring set item");
}
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x150fb8
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x150fbc
cmpl $0xd, %eax
jne 0x150fca
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x150fc1
xorl %eax, %eax
jmp 0x150fcd
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x150fcd
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x150ffd
movq (%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x151005
movq 0xf7df1(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1510c0
incl 0x8(%rax)
jmp 0x151005
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x151055
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x14fdac
testb %al, %al
jne 0x15109c
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x82169(%rip), %rsi # 0x1d31a2
leaq 0x82192(%rip), %rdx # 0x1d31d2
movq %rsp, %rdi
callq 0x68bb0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x11f77c
jmp 0x151086
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8216e(%rip), %rsi # 0x1d31d3
leaq 0x82183(%rip), %rdx # 0x1d31ef
movq %rsp, %rdi
callq 0x68bb0
leaq 0x83b69(%rip), %rsi # 0x1d4be4
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x15109c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x94af2
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1510b7
callq 0x69d60
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x151005
jmp 0x1510cd
jmp 0x1510ea
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1510ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1510ed
jmp 0x1510ea
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::setArrayFromVector(std::vector<QPDFObjectHandle, std::allocator<QPDFObjectHandle>> const&) | void
QPDFObjectHandle::setArrayFromVector(std::vector<QPDFObjectHandle> const& items)
{
if (auto array = as_array(strict)) {
array.setFromVector(items);
} else {
typeWarning("array", "ignoring attempt to replace items");
QTC::TC("qpdf", "QPDFObjectHandle array ignoring replace items");
}
} | pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x151135
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x151139
cmpl $0xd, %eax
jne 0x151147
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x15113e
xorl %eax, %eax
jmp 0x15114a
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x15114a
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x151179
movq (%rbx), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x151180
movq 0xf7c75(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x15120c
incl 0x8(%rax)
jmp 0x151180
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, (%rsp)
je 0x15119d
movq %rsp, %rdi
movq %r14, %rsi
callq 0x14fe4a
jmp 0x1511e9
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x82043(%rip), %rsi # 0x1d31f0
leaq 0x8205d(%rip), %rdx # 0x1d3211
leaq 0x18(%rsp), %rdi
callq 0x68bb0
leaq 0x83a1f(%rip), %rsi # 0x1d4be4
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x11859c
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x1511e9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x94af2
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x151204
callq 0x69d60
addq $0x38, %rsp
popq %rbx
popq %r14
retq
lock
incl 0x8(%rax)
jmp 0x151180
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x151236
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x151236
jmp 0x151233
movq %rax, %rbx
movq %rsp, %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::insertItemAndGetNew(int, QPDFObjectHandle const&) | QPDFObjectHandle
QPDFObjectHandle::insertItemAndGetNew(int at, QPDFObjectHandle const& item)
{
insertItem(at, item);
return item;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
movq %rcx, %rdx
callq 0x6de40
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x151405
movq 0xf79e9(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x151401
incl 0x8(%rax)
jmp 0x151405
lock
incl 0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::appendItemAndGetNew(QPDFObjectHandle const&) | QPDFObjectHandle
QPDFObjectHandle::appendItemAndGetNew(QPDFObjectHandle const& item)
{
appendItem(item);
return item;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x6c840
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x151593
movq 0xf785b(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x15158f
incl 0x8(%rax)
jmp 0x151593
lock
incl 0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObjectHandle::eraseItem(int) | void
QPDFObjectHandle::eraseItem(int at)
{
if (auto array = as_array(strict)) {
if (!array.erase(at)) {
objectWarning("ignoring attempt to erase out of bounds array item");
QTC::TC("qpdf", "QPDFObjectHandle erase array bounds");
}
} else {
typeWarning("array", "ignoring attempt to erase item");
QTC::TC("qpdf", "QPDFObjectHandle array ignoring erase item");
}
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1515d3
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x1515d7
cmpl $0xd, %eax
jne 0x1515e5
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x1515dc
xorl %eax, %eax
jmp 0x1515e8
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x1515e8
movsbl %al, %eax
cmpl $0x8, %eax
jne 0x151618
movq (%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x151620
movq 0xf77d6(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1516d8
incl 0x8(%rax)
jmp 0x151620
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x15166d
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x15013a
testb %al, %al
jne 0x1516b4
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x81c35(%rip), %rsi # 0x1d3286
leaq 0x81c60(%rip), %rdx # 0x1d32b8
movq %rsp, %rdi
callq 0x68bb0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x11f77c
jmp 0x15169e
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x81c3c(%rip), %rsi # 0x1d32b9
leaq 0x81c53(%rip), %rdx # 0x1d32d7
movq %rsp, %rdi
callq 0x68bb0
leaq 0x83551(%rip), %rsi # 0x1d4be4
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1516b4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x94af2
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1516cf
callq 0x69d60
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x151620
jmp 0x1516e5
jmp 0x151702
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x151705
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x151705
jmp 0x151702
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x94406
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Array.cc |
QPDFObject::setChildDescription(QPDF*, std::shared_ptr<QPDFObject>, std::basic_string_view<char, std::char_traits<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | void
setChildDescription(
QPDF* a_qpdf,
std::shared_ptr<QPDFObject> parent,
std::string_view const& static_descr,
std::string var_descr)
{
object_description =
std::make_shared<Description>(ChildDescr(parent, static_descr, var_descr));
qpdf = a_qpdf;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdx), %rax
movq %rax, (%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x151d28
movq 0xf70c6(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x151d24
incl 0x8(%rax)
jmp 0x151d28
lock
incl 0x8(%rax)
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x68320
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
leaq 0x10(%rsp), %rcx
movq %r15, %rdx
callq 0x151ece
movl $0x50, %edi
callq 0x68ab0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xf496e(%rip), %rcx # 0x2466e8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0x58(%rsp), %r15
movq -0x28(%r15), %rdx
movq %rdx, 0x10(%rax)
movq -0x20(%r15), %rdx
movq %rdx, 0x18(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x28(%r15)
movq -0x18(%r15), %rdx
movq %rdx, 0x20(%rax)
movq %rax, %rdx
addq $0x38, %rdx
movq %rdx, 0x28(%rax)
movq -0x10(%r15), %rsi
cmpq %r15, %rsi
je 0x151dc9
movq %rsi, 0x28(%rax)
movq 0x58(%rsp), %rdx
movq %rdx, 0x38(%rax)
jmp 0x151dd0
movups (%r15), %xmm0
movups %xmm0, (%rdx)
movq 0x50(%rsp), %rdx
movq %rdx, 0x30(%rax)
movq %r15, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
movb $0x2, 0x48(%rax)
movq %rcx, 0x38(%r14)
movq 0x40(%r14), %rdi
movq %rax, 0x40(%r14)
testq %rdi, %rdi
je 0x151e06
callq 0x69d60
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x151e1d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x151e53
movq 0xf6fb2(%rip), %rax # 0x248de0
cmpb $0x0, (%rax)
je 0x151e3e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x151e48
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x151e53
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x151e6a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x151e79
callq 0x69d60
movq %rbx, 0x48(%r14)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x115928
jmp 0x151e9b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x151eb7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x151eb7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x151ec6
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDFObject::ChildDescr::ChildDescr(std::shared_ptr<QPDFObject>, std::basic_string_view<char, std::char_traits<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | ChildDescr(
std::shared_ptr<QPDFObject> parent,
std::string_view const& static_descr,
std::string var_descr) :
parent(parent),
static_descr(static_descr),
var_descr(var_descr)
{
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x151efd
movq 0xf6ef1(%rip), %rsi # 0x248de0
cmpb $0x0, (%rsi)
je 0x151ef9
incl 0xc(%rax)
jmp 0x151efd
lock
incl 0xc(%rax)
movq %rdx, 0x10(%rbx)
leaq 0x18(%rbx), %rdi
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
callq 0x68320
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x151f38
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDFObjectHandle::checkOwnership(QPDFObjectHandle const&) const | void
QPDFObjectHandle::checkOwnership(QPDFObjectHandle const& item) const
{
auto qpdf = getOwningQPDF();
auto item_qpdf = item.getOwningQPDF();
if (qpdf && item_qpdf && qpdf != item_qpdf) {
QTC::TC("qpdf", "QPDFObjectHandle check ownership");
throw std::logic_error(
"Attempting to add an object from a different QPDF. Use "
"QPDF::copyForeignObject to add objects from another file.");
}
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x6c940
movq %rax, %rbx
movq %r14, %rdi
callq 0x6c940
cmpq %rax, %rbx
je 0x152c98
testq %rbx, %rbx
je 0x152c98
testq %rax, %rax
jne 0x152ca0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x8065f(%rip), %rsi # 0x1d3313
movq %rax, %rdi
callq 0x6c820
movq 0xf62f5(%rip), %rsi # 0x248fb8
movq 0xf625e(%rip), %rdx # 0x248f28
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Dictionary.cc |
QPDFObjectHandle::getKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | QPDFObjectHandle
QPDFObjectHandle::getKey(std::string const& key) const
{
if (auto dict = as_dictionary(strict)) {
return dict.getKey(key);
}
typeWarning("dictionary", "returning null for attempted key retrieval");
QTC::TC("qpdf", "QPDFObjectHandle dictionary null for getKey");
static auto constexpr msg = " -> null returned from getting key $VD from non-Dictionary"sv;
return QPDF_Null::create(obj, msg, "");
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x152e60
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x152e64
cmpl $0xd, %eax
jne 0x152e72
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x152e69
xorl %eax, %eax
jmp 0x152e75
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x152e75
movsbl %al, %eax
cmpl $0x9, %eax
jne 0x152ea4
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x152eab
movq 0xf5f4a(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x152f48
incl 0x8(%rax)
jmp 0x152eab
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rsp), %r12
testq %r12, %r12
je 0x152ec2
movq %rsp, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1529f8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x152ed1
callq 0x69d60
testq %r12, %r12
jne 0x152fd0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x80517(%rip), %rsi # 0x1d3401
leaq 0x8053a(%rip), %rdx # 0x1d342b
movq %rsp, %rdi
callq 0x68bb0
leaq 0x62a55(%rip), %rsi # 0x1b5955
movq %rsp, %rdx
movq %r14, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x152f21
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x152f55
movq 0xf5ea2(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x152f51
incl 0x8(%rax)
jmp 0x152f55
lock
incl 0x8(%rax)
jmp 0x152eab
lock
incl 0x8(%rax)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x7fcc1(%rip), %rdx # 0x1d2c26
leaq 0x38(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0xf3fa7(%rip), %rdx # 0x246f20
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x151b4c
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rsp)
movq %rcx, 0x8(%rbx)
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x152fc1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x152fd0
callq 0x69d60
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x152ffe
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x152ffe
movq %rax, %rbx
movq 0x30(%rsp), %rdi
jmp 0x15302d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x153037
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x153037
movq %rax, %rbx
jmp 0x153037
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x153037
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Dictionary.cc |
QPDFObjectHandle::getDictAsMap[abi:cxx11]() const | std::map<std::string, QPDFObjectHandle>
QPDFObjectHandle::getDictAsMap() const
{
if (auto dict = as_dictionary(strict)) {
return dict.getAsMap();
}
typeWarning("dictionary", "treating as empty");
QTC::TC("qpdf", "QPDFObjectHandle dictionary empty map for asMap");
return {};
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x153213
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x153217
cmpl $0xd, %eax
jne 0x153225
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x15321c
xorl %eax, %eax
jmp 0x153228
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x153228
movsbl %al, %eax
cmpl $0x9, %eax
jne 0x153257
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x15325e
movq 0xf5b97(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x153304
incl 0x8(%rax)
jmp 0x15325e
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rsp), %r15
testq %r15, %r15
je 0x15327a
movq %rsp, %rdi
callq 0x152958
movq %rbx, %rdi
movq %rax, %rsi
callq 0x12372c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x153289
callq 0x69d60
testq %r15, %r15
jne 0x1532f7
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7fe89(%rip), %rsi # 0x1d3127
leaq 0x7fe93(%rip), %rdx # 0x1d3138
movq %rsp, %rdi
callq 0x68bb0
leaq 0x626a1(%rip), %rsi # 0x1b5955
movq %rsp, %rdx
movq %r14, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1532d5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
lock
incl 0x8(%rax)
jmp 0x15325e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x15333f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15333f
movq %rax, %rbx
jmp 0x15333f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15333f
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Dictionary.cc |
QPDFObjectHandle::removeKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void
QPDFObjectHandle::removeKey(std::string const& key)
{
if (auto dict = as_dictionary(strict)) {
dict.removeKey(key);
return;
}
typeWarning("dictionary", "ignoring key removal request");
QTC::TC("qpdf", "QPDFObjectHandle dictionary ignoring removeKey");
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1536e5
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x1536e9
cmpl $0xd, %eax
jne 0x1536f7
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x1536ee
xorl %eax, %eax
jmp 0x1536fa
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x1536fa
movsbl %al, %eax
cmpl $0x9, %eax
jne 0x153729
movq (%rbx), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x153730
movq 0xf56c5(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1537a9
incl 0x8(%rax)
jmp 0x153730
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rsp), %r15
testq %r15, %r15
je 0x153744
movq %rsp, %rdi
movq %r14, %rsi
callq 0x152bda
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x153753
callq 0x69d60
testq %r15, %r15
jne 0x15379f
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x7fd20(%rip), %rsi # 0x1d3488
leaq 0x7fd35(%rip), %rdx # 0x1d34a4
movq %rsp, %rdi
callq 0x68bb0
leaq 0x621d7(%rip), %rsi # 0x1b5955
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x11859c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x15379f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
lock
incl 0x8(%rax)
jmp 0x153730
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1537e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1537e1
movq %rax, %rbx
jmp 0x1537e1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1537e1
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Dictionary.cc |
qpdf::Stream::getStreamJSON(int, qpdf_json_stream_data_e, qpdf_stream_decode_level_e, Pipeline*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | JSON
Stream::getStreamJSON(
int json_version,
qpdf_json_stream_data_e json_data,
qpdf_stream_decode_level_e decode_level,
Pipeline* p,
std::string const& data_filename)
{
Pl_Buffer pb{"streamjson"};
JSON::Writer jw{&pb, 0};
decode_level =
writeStreamJSON(json_version, jw, json_data, decode_level, p, data_filename, true);
pb.finish();
auto result = JSON::parse(pb.getString());
if (json_data == qpdf_sj_inline) {
result.addDictionaryMember("data", JSON::makeBlob(StreamBlobProvider(*this, decode_level)));
}
return result;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, %r12
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x7f6ef(%rip), %rsi # 0x1d363f
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x69ec0
leaq 0xb0(%rsp), %rdx
movq %rbx, (%rdx)
movb $0x1, 0x8(%rdx)
movq $0x0, 0x10(%rdx)
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %ecx
movl %ebp, %r8d
movq %r12, %r9
pushq $0x1
pushq 0x108(%rsp)
callq 0x1541da
addq $0x10, %rsp
movl %eax, %ebp
leaq 0x78(%rsp), %rdi
callq 0x6b710
leaq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x6eca0
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6d750
leaq 0x20(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x153fdf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
cmpl $0x1, %r15d
jne 0x1540f7
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x6274b(%rip), %rsi # 0x1b6743
leaq 0x62748(%rip), %rdx # 0x1b6747
callq 0x68bb0
movq (%r14), %r15
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x15403c
movq 0xf4dc9(%rip), %rax # 0x248de0
cmpb $0x0, (%rax)
je 0x154022
incl 0x8(%r14)
jmp 0x154027
lock
incl 0x8(%r14)
testq %r14, %r14
je 0x15403c
cmpb $0x0, (%rax)
je 0x154037
incl 0x8(%r14)
jmp 0x15403c
lock
incl 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movl $0x18, %edi
callq 0x68ab0
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movl %ebp, 0x10(%rax)
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x3d58(%rip), %rax # 0x157dc4
movq %rax, 0x18(%rsi)
leaq 0x3d6d(%rip), %rax # 0x157de4
movq %rax, 0x10(%rsi)
leaq 0x30(%rsp), %rdi
callq 0x693e0
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %rsi
callq 0x6bc90
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1540ab
callq 0x69d60
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1540ba
callq 0x69d60
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x1540d3
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
testq %r14, %r14
je 0x1540e0
movq %r14, %rdi
callq 0x69d60
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1540f7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x78(%rsp), %rdi
callq 0x6ace0
movq %r12, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15414c
movq %rax, %r15
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x15412f
callq 0x69d60
jmp 0x15412f
movq %rax, %r15
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x154148
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %edi, %edi
jmp 0x15415a
movq %rax, %rdi
callq 0x7cc8d
movq %rax, %r15
movq %r14, %rdi
testq %rdi, %rdi
je 0x154164
callq 0x69d60
testq %r14, %r14
je 0x154171
movq %r14, %rdi
callq 0x69d60
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15418d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15418d
movq %rax, %r15
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x1541c7
callq 0x69d60
jmp 0x1541c7
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1541c7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1541c7
jmp 0x1541c4
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0x6ace0
movq %r15, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::pipeStreamData(Pipeline*, bool*, int, qpdf_stream_decode_level_e, bool, bool) | bool
Stream::pipeStreamData(
Pipeline* pipeline,
bool* filterp,
int encode_flags,
qpdf_stream_decode_level_e decode_level,
bool suppress_warnings,
bool will_retry)
{
auto s = stream();
std::vector<std::shared_ptr<QPDFStreamFilter>> filters;
bool specialized_compression = false;
bool lossy_compression = false;
bool ignored;
if (filterp == nullptr) {
filterp = &ignored;
}
bool& filter = *filterp;
filter = (!((encode_flags == 0) && (decode_level == qpdf_dl_none)));
bool success = true;
if (filter) {
filter = filterable(filters, specialized_compression, lossy_compression);
if ((decode_level < qpdf_dl_all) && lossy_compression) {
filter = false;
}
if ((decode_level < qpdf_dl_specialized) && specialized_compression) {
filter = false;
}
QTC::TC(
"qpdf",
"QPDF_Stream special filters",
(!filter) ? 0
: lossy_compression ? 1
: specialized_compression ? 2
: 3);
}
if (pipeline == nullptr) {
QTC::TC("qpdf", "QPDF_Stream pipeStreamData with null pipeline");
// Return value is whether we can filter in this case.
return filter;
}
// Construct the pipeline in reverse order. Force pipelines we create to be deleted when this
// function finishes. Pipelines created by QPDFStreamFilter objects will be deleted by those
// objects.
std::vector<std::shared_ptr<Pipeline>> to_delete;
std::shared_ptr<ContentNormalizer> normalizer;
std::shared_ptr<Pipeline> new_pipeline;
if (filter) {
if (encode_flags & qpdf_ef_compress) {
new_pipeline =
std::make_shared<Pl_Flate>("compress stream", pipeline, Pl_Flate::a_deflate);
to_delete.push_back(new_pipeline);
pipeline = new_pipeline.get();
}
if (encode_flags & qpdf_ef_normalize) {
normalizer = std::make_shared<ContentNormalizer>();
new_pipeline =
std::make_shared<Pl_QPDFTokenizer>("normalizer", normalizer.get(), pipeline);
to_delete.push_back(new_pipeline);
pipeline = new_pipeline.get();
}
for (auto iter = s->token_filters.rbegin(); iter != s->token_filters.rend(); ++iter) {
new_pipeline =
std::make_shared<Pl_QPDFTokenizer>("token filter", (*iter).get(), pipeline);
to_delete.push_back(new_pipeline);
pipeline = new_pipeline.get();
}
for (auto f_iter = filters.rbegin(); f_iter != filters.rend(); ++f_iter) {
auto decode_pipeline = (*f_iter)->getDecodePipeline(pipeline);
if (decode_pipeline) {
pipeline = decode_pipeline;
}
auto* flate = dynamic_cast<Pl_Flate*>(pipeline);
if (flate != nullptr) {
flate->setWarnCallback([this](char const* msg, int code) { warn(msg); });
}
}
}
if (s->stream_data.get()) {
QTC::TC("qpdf", "QPDF_Stream pipe replaced stream data");
pipeline->write(s->stream_data->getBuffer(), s->stream_data->getSize());
pipeline->finish();
} else if (s->stream_provider.get()) {
Pl_Count count("stream provider count", pipeline);
if (s->stream_provider->supportsRetry()) {
if (!s->stream_provider->provideStreamData(
obj->getObjGen(), &count, suppress_warnings, will_retry)) {
filter = false;
success = false;
}
} else {
s->stream_provider->provideStreamData(obj->getObjGen(), &count);
}
qpdf_offset_t actual_length = count.getCount();
qpdf_offset_t desired_length = 0;
if (success && s->stream_dict.hasKey("/Length")) {
desired_length = s->stream_dict.getKey("/Length").getIntValue();
if (actual_length == desired_length) {
QTC::TC("qpdf", "QPDF_Stream pipe use stream provider");
} else {
QTC::TC("qpdf", "QPDF_Stream provider length mismatch");
// This would be caused by programmer error on the part of a library user, not by
// invalid input data.
throw std::runtime_error(
"stream data provider for " + obj->getObjGen().unparse(' ') + " provided " +
std::to_string(actual_length) + " bytes instead of expected " +
std::to_string(desired_length) + " bytes");
}
} else if (success) {
QTC::TC("qpdf", "QPDF_Stream provider length not provided");
s->stream_dict.replaceKey("/Length", QPDFObjectHandle::newInteger(actual_length));
}
} else if (obj->getParsedOffset() == 0) {
QTC::TC("qpdf", "QPDF_Stream pipe no stream data");
throw std::logic_error("pipeStreamData called for stream with no data");
} else {
QTC::TC("qpdf", "QPDF_Stream pipe original stream data");
if (!QPDF::Pipe::pipeStreamData(
obj->getQPDF(),
obj->getObjGen(),
obj->getParsedOffset(),
s->length,
s->stream_dict,
isRootMetadata(),
pipeline,
suppress_warnings,
will_retry)) {
filter = false;
success = false;
}
}
if (filter && (!suppress_warnings) && normalizer.get() && normalizer->anyBadTokens()) {
warn("content normalization encountered bad tokens");
if (normalizer->lastTokenWasBad()) {
QTC::TC("qpdf", "QPDF_Stream bad token at end during normalize");
warn(
"normalized content ended with a bad token; you may be able to resolve this by "
"coalescing content streams in combination with normalizing content. From the "
"command line, specify --coalesce-contents");
}
warn(
"Resulting stream data may be corrupted but is may still useful for manual "
"inspection. For more information on this warning, search for content normalization "
"in the manual.");
}
return success;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, 0x20(%rsp)
callq 0x94c74
movq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movq $0x0, 0x110(%rsp)
xorl %eax, %eax
movb %al, 0xf(%rsp)
movb %al, 0xe(%rsp)
movl %r12d, %eax
orl %ebx, %eax
setne %cl
testq %r14, %r14
je 0x154817
movb %cl, (%r14)
movb %cl, 0xd(%rsp)
movq %r14, 0x28(%rsp)
testl %eax, %eax
je 0x1548c0
leaq 0x100(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq 0x20(%rsp), %rdi
callq 0x155bec
movq 0x28(%rsp), %rcx
testq %rcx, %rcx
je 0x154852
movb %al, (%rcx)
jmp 0x154856
movb %al, 0xd(%rsp)
cmpl $0x2, %r12d
jg 0x15488b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
sete %al
movb 0xe(%rsp), %cl
movl %ecx, %edx
xorb $0x1, %dl
orb %al, %dl
movzbl 0xd(%rsp), %esi
xorl %eax, %eax
testb %cl, %cl
cmovel %esi, %eax
testb %dl, %dl
je 0x154888
movb %al, 0xd(%rsp)
jmp 0x15488b
movb $0x0, (%rdi)
cmpl $0x1, %r12d
jg 0x1548c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
sete %al
movb 0xf(%rsp), %cl
movl %ecx, %edx
xorb $0x1, %dl
orb %al, %dl
movzbl 0xd(%rsp), %esi
xorl %eax, %eax
testb %cl, %cl
cmovel %esi, %eax
testb %dl, %dl
je 0x1548bd
movb %al, 0xd(%rsp)
jmp 0x1548c0
movb $0x0, (%rdi)
cmpq $0x0, 0x10(%rsp)
je 0x1549bc
xorps %xmm0, %xmm0
movaps %xmm0, 0x130(%rsp)
movq $0x0, 0x140(%rsp)
movaps %xmm0, 0x30(%rsp)
movb 0xd(%rsp), %al
movq 0x28(%rsp), %rcx
testq %rcx, %rcx
je 0x1548f8
movb (%rcx), %al
testb %al, %al
je 0x1549d3
testb $0x1, %bl
je 0x154998
leaq 0xc0(%rsp), %r9
movl $0x1, (%r9)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x7ef61(%rip), %rcx # 0x1d388d
leaq 0x50(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x10(%rsp), %r8
callq 0x68190
movaps 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movaps %xmm0, 0x30(%rsp)
testq %rdi, %rdi
je 0x154964
callq 0x69d60
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x154973
callq 0x69d60
movq $0x0, 0x18(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b0c0
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
testb $0x2, %bl
movl %r15d, 0x94(%rsp)
jne 0x1549e3
movq $0x0, 0x18(%rsp)
movq $0x0, 0x48(%rsp)
jmp 0x154ab4
movq 0x28(%rsp), %rax
testq %rax, %rax
movb 0xd(%rsp), %cl
je 0x1549cc
movb (%rax), %cl
movl %ecx, %ebx
jmp 0x1551d4
xorl %ebx, %ebx
movq $0x0, 0x48(%rsp)
jmp 0x154c6a
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x159c6c
movq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x154a28
callq 0x69d60
leaq 0xc0(%rsp), %r8
movq 0x48(%rsp), %rax
movq %rax, (%r8)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x7ee51(%rip), %rcx # 0x1d389d
leaq 0x50(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x10(%rsp), %r9
movq %rbx, 0x18(%rsp)
callq 0x159d38
movaps 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movaps %xmm0, 0x30(%rsp)
testq %rdi, %rdi
je 0x154a89
callq 0x69d60
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x154a98
callq 0x69d60
leaq 0x130(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b0c0
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%r13), %rbp
movq %r13, 0xb8(%rsp)
cmpq 0x40(%r13), %rbp
je 0x154b7b
leaq 0x98(%rsp), %r14
leaq 0xc0(%rsp), %r15
leaq 0x10(%rsp), %r13
leaq 0x130(%rsp), %rbx
leaq 0x30(%rsp), %r12
movq -0x10(%rbp), %rax
movq %rax, 0xc0(%rsp)
movq $0x0, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
leaq 0x7ed93(%rip), %rcx # 0x1d38a8
movq %r15, %r8
movq %r13, %r9
callq 0x6f1e0
movaps 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movaps %xmm0, 0x30(%rsp)
testq %rdi, %rdi
je 0x154b41
callq 0x69d60
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x154b50
callq 0x69d60
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6b0c0
addq $-0x10, %rbp
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rax
cmpq 0x40(%rax), %rbp
jne 0x154aec
movq 0x108(%rsp), %r14
cmpq 0x100(%rsp), %r14
je 0x154c55
leaq 0x32ea(%rip), %r15 # 0x157e82
leaq 0x3357(%rip), %r13 # 0x157ef6
leaq 0x150(%rsp), %rbx
movq 0xf424a(%rip), %rbp # 0x248df8
movq 0xf3eb3(%rip), %r12 # 0x248a68
movq -0x10(%r14), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
testq %rax, %rax
je 0x154bce
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x154be7
movq %rbp, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x6d850
jmp 0x154be9
xorl %eax, %eax
testq %rax, %rax
je 0x154c43
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x160(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x150(%rsp)
movq %r15, 0x168(%rsp)
movq %r13, 0x160(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6a810
movq 0x160(%rsp), %rax
testq %rax, %rax
je 0x154c43
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x10, %r14
cmpq 0x100(%rsp), %r14
jne 0x154bb5
movq 0x18(%rsp), %rbx
movl 0x94(%rsp), %r15d
movq 0xb8(%rsp), %r13
movq 0x20(%r13), %rdi
testq %rdi, %rdi
movq %rbx, 0x18(%rsp)
je 0x154caf
movq 0x10(%rsp), %rbx
callq 0x6b660
movq %rax, %r14
movq 0x20(%r13), %rdi
callq 0x68e70
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq *0x10(%rcx)
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movb $0x1, %bl
callq *0x18(%rax)
jmp 0x155095
movb 0x290(%rsp), %bpl
cmpq $0x0, 0x30(%r13)
je 0x154d43
movq 0x10(%rsp), %rdx
leaq 0x7ebe7(%rip), %rsi # 0x1d38b5
leaq 0x50(%rsp), %rdi
callq 0x6b050
movq 0x30(%r13), %rdi
callq 0x6c480
movq 0x30(%r13), %rdi
testb %al, %al
je 0x154da3
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movq (%rdi), %rax
movzbl %r15b, %ecx
movzbl %bpl, %r8d
leaq 0x50(%rsp), %rdx
callq *0x18(%rax)
movl %eax, %ebx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl 0xd(%rsp), %edx
xorl %eax, %eax
testb %bl, %bl
cmovnel %edx, %eax
testb %cl, %cl
je 0x154dc9
movb %al, 0xd(%rsp)
jmp 0x154dce
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rbx
testq %rbx, %rbx
je 0x1551f5
movq %r13, %rcx
movl %r15d, %r13d
movq 0x48(%rax), %r14
movq 0x50(%rax), %r15
movq 0x8(%rcx), %rax
movq 0x18(%rcx), %r12
movq %rax, 0x120(%rsp)
movq 0x10(%rcx), %rax
movq %rax, 0x128(%rsp)
testq %rax, %rax
je 0x155017
movq 0xf404e(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x155013
incl 0x8(%rax)
jmp 0x155017
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movq (%rdi), %rax
leaq 0x50(%rsp), %rdx
callq *0x10(%rax)
movb $0x1, %bl
jmp 0x154dce
movb $0x0, (%rsi)
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
callq 0x6bc10
movq %rax, %r14
testb %bl, %bl
je 0x154e27
movq %r14, %r12
movl %r15d, %r14d
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x68a16(%rip), %rsi # 0x1bd80e
leaq 0x68a16(%rip), %rdx # 0x1bd815
leaq 0xc0(%rsp), %rdi
callq 0x68bb0
leaq 0x8(%r13), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x69f70
movl %eax, %ebp
movl %r14d, %r15d
movq %r12, %r14
jmp 0x154e29
xorl %ebp, %ebp
testb %bl, %bl
je 0x154e4e
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x154e4e
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x154f74
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x689a3(%rip), %rsi # 0x1bd80e
leaq 0x689a3(%rip), %rdx # 0x1bd815
leaq 0x98(%rsp), %rdi
callq 0x68bb0
addq $0x8, %r13
leaq 0xe0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
movq %r13, %rsi
callq 0x6ba70
leaq 0xe0(%rsp), %rdi
callq 0x6db80
movq %rax, %r13
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x154ebd
callq 0x69d60
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x154eda
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
cmpq %r13, %r14
je 0x155004
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x1f0(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x1f8(%rsp), %rdi
movl $0x20, %edx
callq 0x9401a
leaq 0x7e9ab(%rip), %rsi # 0x1d38cb
leaq 0x218(%rsp), %rdi
leaq 0x1f8(%rsp), %rdx
callq 0x69970
leaq 0x7e9a9(%rip), %rsi # 0x1d38e5
leaq 0x218(%rsp), %rdi
callq 0x6b8d0
leaq 0x1a0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x15522c
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x15523f
testb %bl, %bl
je 0x155004
movl %r15d, %ebp
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6887c(%rip), %rsi # 0x1bd80e
leaq 0x6887c(%rip), %rdx # 0x1bd815
leaq 0x98(%rsp), %rdi
callq 0x68bb0
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x6a820
addq $0x8, %r13
leaq 0x98(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
movq %r13, %rdi
callq 0x6c930
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x154fe4
callq 0x69d60
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x155001
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
movl %ebp, %r15d
leaq 0x50(%rsp), %rdi
callq 0x6b5d0
jmp 0x155095
lock
incl 0x8(%rax)
movq 0x20(%rsp), %rdi
callq 0x1559f4
subq $0x8, %rsp
movzbl %bpl, %r10d
movzbl %r13b, %r11d
movzbl %al, %r9d
leaq 0x128(%rsp), %r8
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
pushq %r10
pushq %r11
pushq 0x28(%rsp)
callq 0x1586da
addq $0x20, %rsp
movl %eax, %ebx
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x15506a
callq 0x69d60
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
sete %cl
orb %bl, %cl
movzbl 0xd(%rsp), %edx
xorl %eax, %eax
testb %bl, %bl
cmovnel %edx, %eax
testb %cl, %cl
movl %r13d, %r15d
je 0x155090
movb %al, 0xd(%rsp)
jmp 0x155095
movb $0x0, (%rsi)
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x1550a5
movb (%rax), %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %cl
xorb $0x1, %cl
orb %r15b, %cl
cmpq $0x0, 0x48(%rsp)
sete %al
orb %cl, %al
jne 0x1551a9
movq 0x48(%rsp), %rdi
callq 0x74a78
testb %al, %al
je 0x1551a9
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7e858(%rip), %rsi # 0x1d393a
leaq 0x7e87d(%rip), %rdx # 0x1d3966
leaq 0x50(%rsp), %rdi
callq 0x68bb0
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x1563b4
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x155119
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
callq 0x74a7c
testb %al, %al
je 0x155168
leaq 0x50(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x7e831(%rip), %rsi # 0x1d3967
leaq 0x7e8ee(%rip), %rdx # 0x1d3a2b
callq 0x68bb0
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x1563b4
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x155168
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x50(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x7e8b5(%rip), %rsi # 0x1d3a2c
leaq 0x7e959(%rip), %rdx # 0x1d3ad7
callq 0x68bb0
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x1563b4
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1551a9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1551b8
callq 0x69d60
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1551c7
callq 0x69d60
leaq 0x130(%rsp), %rdi
callq 0x6de80
leaq 0x100(%rsp), %rdi
callq 0x697b0
movl %ebx, %eax
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x7e703(%rip), %rsi # 0x1d390c
movq %rax, %rdi
callq 0x6c820
movq 0xf3da0(%rip), %rsi # 0x248fb8
movq 0xf3d09(%rip), %rdx # 0x248f28
movq %rbx, %rdi
callq 0x6b420
jmp 0x1553ab
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x198(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1d0(%rsp), %rdi
movq %r14, %rsi
callq 0x6bd40
leaq 0x238(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
callq 0x68050
leaq 0x7e662(%rip), %rsi # 0x1d38f0
leaq 0x238(%rsp), %rdi
callq 0x6b8d0
leaq 0x180(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1552c6
movups (%rcx), %xmm0
leaq 0x180(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x1552d9
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x178(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1b0(%rsp), %rdi
movq %r13, %rsi
callq 0x6bd40
leaq 0xe0(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0x68050
leaq 0x6183d(%rip), %rsi # 0x1b6b65
leaq 0xe0(%rsp), %rdi
callq 0x6b8d0
movq %r12, 0x98(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x155356
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x155369
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x695f0
xorl %ebp, %ebp
movq 0xf3b04(%rip), %rsi # 0x248ea0
movq 0xf3a25(%rip), %rdx # 0x248dc8
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x1553d3
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1553d3
movq %rax, %r14
movb $0x1, %bpl
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1553fc
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1553fc
movq %rax, %r14
movb $0x1, %bpl
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x155425
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155425
movq %rax, %r14
movb $0x1, %bpl
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x155452
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155452
movq %rax, %r14
movb $0x1, %bpl
leaq 0x248(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15547b
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15547b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1554a4
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1554a4
movq %rax, %r14
movb $0x1, %bpl
movq 0x190(%rsp), %rdi
cmpq %r15, %rdi
je 0x1554c9
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1554c9
movq %rax, %r14
movb $0x1, %bpl
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1554f2
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1554f2
movq %rax, %r14
movb $0x1, %bpl
leaq 0x208(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15551b
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15551b
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1555d3
movq %rbx, %rdi
callq 0x6cf40
jmp 0x1555d3
movq %rax, %r14
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x15554b
callq 0x69d60
jmp 0x15554b
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
jne 0x155593
jmp 0x1555d3
jmp 0x1555d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
jmp 0x155671
movq %rax, %r14
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x155586
callq 0x69d60
jmp 0x155586
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x1555d3
movq 0xa8(%rsp), %rsi
jmp 0x1555b7
jmp 0x1555d0
movq %rax, %r14
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1555d3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1555d3
jmp 0x1555d0
jmp 0x1555d0
jmp 0x1555d0
jmp 0x1555ee
jmp 0x15566e
jmp 0x1555d0
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x6b5d0
jmp 0x155671
jmp 0x15566e
jmp 0x1555ee
jmp 0x15566e
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x155671
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155671
jmp 0x15566e
jmp 0x15566e
jmp 0x155610
movq %rax, %r14
movq $0x0, 0x18(%rsp)
jmp 0x155671
movq %rax, %r14
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x155671
callq 0x69d60
jmp 0x155671
movq %rax, %r14
jmp 0x15569f
jmp 0x15566e
jmp 0x155662
movq %rax, %r14
movq 0x160(%rsp), %rax
testq %rax, %rax
je 0x155671
leaq 0x150(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x155671
movq %rax, %rdi
callq 0x7cc8d
jmp 0x15566e
jmp 0x15566e
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x155680
callq 0x69d60
cmpq $0x0, 0x18(%rsp)
je 0x155692
movq 0x18(%rsp), %rdi
callq 0x69d60
leaq 0x130(%rsp), %rdi
callq 0x6de80
leaq 0x100(%rsp), %rdi
callq 0x697b0
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::getStreamData(qpdf_stream_decode_level_e) | std::shared_ptr<Buffer>
Stream::getStreamData(qpdf_stream_decode_level_e decode_level)
{
Pl_Buffer buf("stream data buffer");
bool filtered;
pipeStreamData(&buf, &filtered, 0, decode_level, false, false);
if (!filtered) {
throw QPDFExc(
qpdf_e_unsupported,
obj->getQPDF()->getFilename(),
"",
obj->getParsedOffset(),
"getStreamData called on unfilterable stream");
}
QTC::TC("qpdf", "QPDF_Stream getStreamData");
return buf.getBufferSharedPointer();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7b667(%rip), %rsi # 0x1d0d39
leaq 0x78(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x69ec0
movl $0x0, (%rsp)
leaq 0x17(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x1547b8
cmpb $0x0, 0x17(%rsp)
je 0x155731
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b4e0
leaq 0x78(%rsp), %rdi
callq 0x6ace0
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbx
movq (%r14), %rax
movq 0x48(%rax), %rsi
leaq 0x58(%rsp), %rdi
callq 0x6d810
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7d4c7(%rip), %rdx # 0x1d2c26
leaq 0x38(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
movq (%r14), %rax
movq 0x58(%rax), %r14
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7e05a(%rip), %rsi # 0x1d37de
leaq 0x7e07e(%rip), %rdx # 0x1d3809
leaq 0x18(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %r9
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %r8
callq 0x68550
xorl %ebp, %ebp
movq 0xf3528(%rip), %rsi # 0x248ce8
movq 0xf34a1(%rip), %rdx # 0x248c68
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x1557f1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1557f1
movq %rax, %r14
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x155810
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155810
movq %rax, %r14
movb $0x1, %bpl
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x155833
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155833
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x155845
movq %rbx, %rdi
callq 0x6cf40
jmp 0x155845
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x6ace0
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::getRawStreamData() | std::shared_ptr<Buffer>
Stream::getRawStreamData()
{
Pl_Buffer buf("stream data buffer");
if (!pipeStreamData(&buf, nullptr, 0, qpdf_dl_none, false, false)) {
throw QPDFExc(
qpdf_e_unsupported,
obj->getQPDF()->getFilename(),
"",
obj->getParsedOffset(),
"error getting raw stream data");
}
QTC::TC("qpdf", "QPDF_Stream getRawStreamData");
return buf.getBufferSharedPointer();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7b4c5(%rip), %rsi # 0x1d0d39
leaq 0x68(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x69ec0
movl $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1547b8
testb %al, %al
je 0x1558cd
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b4e0
leaq 0x68(%rsp), %rdi
callq 0x6ace0
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbx
movq (%r14), %rax
movq 0x48(%rax), %rsi
leaq 0x48(%rsp), %rdi
callq 0x6d810
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7d32b(%rip), %rdx # 0x1d2c26
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
movq (%r14), %rax
movq 0x58(%rax), %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7deea(%rip), %rsi # 0x1d380a
leaq 0x7df00(%rip), %rdx # 0x1d3827
leaq 0x8(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x48(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %r8
callq 0x68550
xorl %ebp, %ebp
movq 0xf338c(%rip), %rsi # 0x248ce8
movq 0xf3305(%rip), %rdx # 0x248c68
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x15598d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15598d
movq %rax, %r14
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1559ac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1559ac
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1559cf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1559cf
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1559e1
movq %rbx, %rdi
callq 0x6cf40
jmp 0x1559e1
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x6ace0
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::isRootMetadata() const | bool
Stream::isRootMetadata() const
{
if (!getDict().isDictionaryOfType("/Metadata", "/XML")) {
return false;
}
auto root_metadata = qpdf()->getRoot().getKey("/Metadata");
return root_metadata.isSameObjectAs(obj);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x158660
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6765f(%rip), %rsi # 0x1bd07d
leaq 0x67661(%rip), %rdx # 0x1bd086
leaq 0x8(%rsp), %rdi
callq 0x68bb0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7dde9(%rip), %rsi # 0x1d3828
leaq 0x7dde6(%rip), %rdx # 0x1d382c
leaq 0x38(%rsp), %rdi
callq 0x68bb0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x6bdb0
movl %eax, %ebp
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x155a7d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x155a94
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x155aa3
callq 0x69d60
testb %bpl, %bpl
je 0x155b39
movq (%rbx), %rax
movq 0x48(%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0x6ac80
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x675b1(%rip), %rsi # 0x1bd07d
leaq 0x675b3(%rip), %rdx # 0x1bd086
callq 0x68bb0
leaq 0x38(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6ba70
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x155b03
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x155b12
callq 0x69d60
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x155b41
movq 0xf32b1(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x155b3d
incl 0x8(%rax)
jmp 0x155b41
xorl %ebx, %ebx
jmp 0x155b70
lock
incl 0x8(%rax)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x680f0
movl %eax, %ebx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x155b61
callq 0x69d60
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x155b70
callq 0x69d60
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x155b8f
callq 0x69d60
movq 0x40(%rsp), %rdi
jmp 0x155bda
jmp 0x155bb6
jmp 0x155bd2
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x155bb9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155bb9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x155bd5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155bd5
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x155be4
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::filterable(std::vector<std::shared_ptr<QPDFStreamFilter>, std::allocator<std::shared_ptr<QPDFStreamFilter>>>&, bool&, bool&) | bool
Stream::filterable(
std::vector<std::shared_ptr<QPDFStreamFilter>>& filters,
bool& specialized_compression,
bool& lossy_compression)
{
auto s = stream();
// Check filters
QPDFObjectHandle filter_obj = s->stream_dict.getKey("/Filter");
bool filters_okay = true;
std::vector<std::string> filter_names;
if (filter_obj.isNull()) {
// No filters
} else if (filter_obj.isName()) {
// One filter
filter_names.push_back(filter_obj.getName());
} else if (filter_obj.isArray()) {
// Potentially multiple filters
int n = filter_obj.getArrayNItems();
for (int i = 0; i < n; ++i) {
QPDFObjectHandle item = filter_obj.getArrayItem(i);
if (item.isName()) {
filter_names.push_back(item.getName());
} else {
filters_okay = false;
}
}
} else {
filters_okay = false;
}
if (!filters_okay) {
QTC::TC("qpdf", "QPDF_Stream invalid filter");
warn("stream filter type is not name or array");
return false;
}
bool filterable = true;
for (auto& filter_name: filter_names) {
if (filter_abbreviations.count(filter_name)) {
QTC::TC("qpdf", "QPDF_Stream expand filter abbreviation");
filter_name = filter_abbreviations[filter_name];
}
auto ff = filter_factories.find(filter_name);
if (ff == filter_factories.end()) {
filterable = false;
} else {
filters.push_back((ff->second)());
}
}
if (!filterable) {
return false;
}
// filters now contains a list of filters to be applied in order. See which ones we can support.
// See if we can support any decode parameters that are specified.
QPDFObjectHandle decode_obj = s->stream_dict.getKey("/DecodeParms");
std::vector<QPDFObjectHandle> decode_parms;
if (decode_obj.isArray() && (decode_obj.getArrayNItems() == 0)) {
decode_obj = QPDFObjectHandle::newNull();
}
if (decode_obj.isArray()) {
for (int i = 0; i < decode_obj.getArrayNItems(); ++i) {
decode_parms.push_back(decode_obj.getArrayItem(i));
}
} else {
for (unsigned int i = 0; i < filter_names.size(); ++i) {
decode_parms.push_back(decode_obj);
}
}
// Ignore /DecodeParms entirely if /Filters is empty. At least one case of a file whose
// /DecodeParms was [ << >> ] when /Filters was empty has been seen in the wild.
if ((filters.size() != 0) && (decode_parms.size() != filters.size())) {
warn("stream /DecodeParms length is inconsistent with filters");
filterable = false;
}
if (!filterable) {
return false;
}
for (size_t i = 0; i < filters.size(); ++i) {
auto filter = filters.at(i);
auto decode_item = decode_parms.at(i);
if (filter->setDecodeParms(decode_item)) {
if (filter->isSpecializedCompression()) {
specialized_compression = true;
}
if (filter->isLossyCompression()) {
specialized_compression = true;
lossy_compression = true;
}
} else {
filterable = false;
}
}
return filterable;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, 0xb0(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x98(%rsp)
callq 0x94c74
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x61de2(%rip), %rsi # 0x1b7a14
leaq 0x61de2(%rip), %rdx # 0x1b7a1b
movq %rsp, %rdi
callq 0x68bb0
addq $0x8, %r14
leaq 0x40(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0x6ba70
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x155c70
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x6db30
testb %al, %al
movq %r14, 0xa8(%rsp)
jne 0x155d92
leaq 0x40(%rsp), %rdi
callq 0x6a170
testb %al, %al
je 0x155cea
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x6b430
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x6cbe0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x155d92
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155d92
leaq 0x40(%rsp), %rdi
callq 0x6c8b0
testb %al, %al
je 0x1561a8
leaq 0x40(%rsp), %rdi
callq 0x6f1d0
movl %eax, %ebx
testl %eax, %eax
jle 0x155d92
movb $0x1, %r15b
xorl %ebp, %ebp
leaq 0x50(%rsp), %r14
leaq 0x40(%rsp), %r12
movq %rsp, %r13
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x6ac00
movq %r14, %rdi
callq 0x6a170
testb %al, %al
je 0x155d70
movq %r13, %rdi
movq %r14, %rsi
callq 0x6b430
leaq 0x70(%rsp), %rdi
movq %r13, %rsi
callq 0x6cbe0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x155d73
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x155d73
xorl %r15d, %r15d
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x155d82
callq 0x69d60
incl %ebp
cmpl %ebp, %ebx
jne 0x155d22
testb $0x1, %r15b
je 0x1561a8
movq 0x70(%rsp), %rbx
movq 0x78(%rsp), %r15
movb $0x1, %al
cmpq %r15, %rbx
je 0x155e4d
movl %eax, 0x24(%rsp)
leaq 0xf7816(%rip), %r14 # 0x24d5c8
leaq 0xf783f(%rip), %r12 # 0x24d5f8
leaq 0xf7840(%rip), %rbp # 0x24d600
movq %rsp, %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6e710
leaq 0xf77fb(%rip), %rcx # 0x24d5d0
cmpq %rcx, %rax
je 0x155df0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6a6f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6e940
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6e690
cmpq %rbp, %rax
je 0x155e36
cmpq $0x0, 0x50(%rax)
je 0x156223
movq %rax, %rsi
addq $0x40, %rsi
movq %r13, %rdi
callq *0x58(%rax)
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x69f30
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x155e3e
callq 0x69d60
jmp 0x155e3e
movl $0x0, 0x24(%rsp)
addq $0x20, %rbx
cmpq %r15, %rbx
jne 0x155dc3
jmp 0x155e51
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %r15d
testb $0x1, %r15b
je 0x1561f1
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x61baa(%rip), %rsi # 0x1b7a1c
leaq 0x61baf(%rip), %rdx # 0x1b7a28
callq 0x68bb0
leaq 0x30(%rsp), %rdi
movq %rsp, %rdx
movq 0xa8(%rsp), %rsi
callq 0x6ba70
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x155eae
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x6c8b0
testb %al, %al
je 0x155f11
leaq 0x30(%rsp), %rdi
callq 0x6f1d0
testl %eax, %eax
jne 0x155f11
movq %rsp, %rdi
callq 0x6b240
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x38(%rsp), %rdi
movups %xmm0, 0x30(%rsp)
testq %rdi, %rdi
je 0x155f02
callq 0x69d60
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x155f11
callq 0x69d60
leaq 0x30(%rsp), %rdi
callq 0x6c8b0
testb %al, %al
je 0x155f65
xorl %ebx, %ebx
leaq 0x30(%rsp), %r14
movq %rsp, %r12
leaq 0x50(%rsp), %r13
movq %r14, %rdi
callq 0x6f1d0
cmpl %eax, %ebx
jge 0x155fa2
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x6ac00
movq %r13, %rdi
movq %r12, %rsi
callq 0xace3e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x155f61
callq 0x69d60
incl %ebx
jmp 0x155f2e
movq 0x78(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x155fa2
movl $0x1, %ebp
leaq 0x50(%rsp), %rbx
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x943c6
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
movl %ebp, %ecx
sarq $0x5, %rax
incl %ebp
cmpq %rcx, %rax
ja 0x155f80
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
je 0x15600b
movq 0x58(%rsp), %rcx
subq 0x50(%rsp), %rcx
cmpq %rax, %rcx
je 0x15600b
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x7d884(%rip), %rsi # 0x1d3855
leaq 0x7d8b4(%rip), %rdx # 0x1d388c
callq 0x68bb0
movq %rsp, %rsi
movq 0x98(%rsp), %rdi
callq 0x1563b4
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x156008
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
xorl %r15d, %r15d
testb $0x1, %r15b
je 0x15618b
movl %r15d, 0x24(%rsp)
movq 0x28(%rsp), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x156185
movl $0x8, %r15d
xorl %r13d, %r13d
movq -0x8(%rax,%r15), %rbx
movq (%rax,%r15), %r12
testq %r12, %r12
je 0x15605c
movq 0xf2d96(%rip), %rax # 0x248de0
cmpb $0x0, (%rax)
je 0x156056
incl 0x8(%r12)
jmp 0x15605c
lock
incl 0x8(%r12)
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %r13, %rdx
jbe 0x156228
movq -0x8(%rcx,%r15), %rax
movq (%rcx,%r15), %r14
testq %r14, %r14
je 0x156096
movq 0xf2d55(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1560a8
incl 0x8(%r14)
jmp 0x1560ad
movq %rax, 0x88(%rsp)
movq %r14, 0x90(%rsp)
jmp 0x1560d9
lock
incl 0x8(%r14)
movq %rax, 0x88(%rsp)
movq %r14, 0x90(%rsp)
testq %r14, %r14
je 0x1560d9
movq 0xf2d17(%rip), %rax # 0x248de0
cmpb $0x0, (%rax)
je 0x1560d4
incl 0x8(%r14)
jmp 0x1560d9
lock
incl 0x8(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
leaq 0x88(%rsp), %rsi
callq *0x10(%rax)
movl %eax, %ebp
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1560fe
callq 0x69d60
testb %bpl, %bpl
je 0x156140
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
testb %al, %al
je 0x15611b
movq 0xa0(%rsp), %rax
movb $0x1, (%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
testb %al, %al
je 0x156148
movq 0xa0(%rsp), %rax
movb $0x1, %cl
movb %cl, (%rax)
movq 0xb0(%rsp), %rax
movb %cl, (%rax)
jmp 0x156148
movl $0x0, 0x24(%rsp)
testq %r14, %r14
je 0x156155
movq %r14, %rdi
callq 0x69d60
testq %r12, %r12
je 0x156162
movq %r12, %rdi
callq 0x69d60
incq %r13
movq 0x28(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r15
cmpq %rcx, %r13
jb 0x156035
movl 0x24(%rsp), %ebx
jmp 0x15618d
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
callq 0x94700
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1561f3
callq 0x69d60
jmp 0x1561f3
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x7d673(%rip), %rsi # 0x1d382d
leaq 0x7d693(%rip), %rdx # 0x1d3854
callq 0x68bb0
movq %rsp, %rsi
movq 0x98(%rsp), %rdi
callq 0x1563b4
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1561f1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
xorl %ebx, %ebx
leaq 0x70(%rsp), %rdi
callq 0x6f2e8
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x15620c
callq 0x69d60
andb $0x1, %bl
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6e740
leaq 0x5fcad(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
xorl %eax, %eax
callq 0x682c0
jmp 0x156361
jmp 0x15638f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x156364
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x156364
jmp 0x156361
jmp 0x15627d
jmp 0x15638f
jmp 0x15627d
jmp 0x15638f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x156392
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x156392
jmp 0x15638f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1563ab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1563ab
movq %rax, %rbx
jmp 0x1563ab
jmp 0x156361
jmp 0x156309
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15630c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15630c
jmp 0x15638f
jmp 0x15638f
movq %rax, %rbx
movq 0x58(%rsp), %rdi
jmp 0x156381
movq %rax, %rbx
jmp 0x15633f
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x156332
callq 0x69d60
jmp 0x156332
movq %rax, %rbx
testq %r14, %r14
je 0x15633f
movq %r14, %rdi
callq 0x69d60
testq %r12, %r12
je 0x156364
movq %r12, %rdi
jmp 0x156358
jmp 0x156361
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x156364
callq 0x69d60
jmp 0x156364
jmp 0x156361
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x94700
movq 0x38(%rsp), %rdi
jmp 0x156381
jmp 0x15638f
jmp 0x15638f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x156392
callq 0x69d60
jmp 0x156392
jmp 0x15638f
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x6f2e8
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1563ab
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::replaceStreamData(std::shared_ptr<Buffer>, QPDFObjectHandle const&, QPDFObjectHandle const&) | void
Stream::replaceStreamData(
std::shared_ptr<Buffer> data,
QPDFObjectHandle const& filter,
QPDFObjectHandle const& decode_parms)
{
auto s = stream();
s->stream_data = data;
s->stream_provider = nullptr;
replaceFilterData(filter, decode_parms, data->getSize());
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0x94c74
movq %rax, %r13
movq (%r12), %rax
movq %rax, 0x20(%r13)
leaq 0x28(%r13), %rdi
leaq 0x8(%r12), %rsi
callq 0x6c300
xorps %xmm0, %xmm0
movq 0x38(%r13), %rdi
movups %xmm0, 0x30(%r13)
testq %rdi, %rdi
je 0x156495
callq 0x69d60
movq (%r12), %rdi
callq 0x68e70
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1564b8
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
qpdf::Stream::replaceStreamData(std::shared_ptr<QPDFObjectHandle::StreamDataProvider>, QPDFObjectHandle const&, QPDFObjectHandle const&) | void
Stream::replaceStreamData(
std::shared_ptr<QPDFObjectHandle::StreamDataProvider> provider,
QPDFObjectHandle const& filter,
QPDFObjectHandle const& decode_parms)
{
auto s = stream();
s->stream_provider = provider;
s->stream_data = nullptr;
replaceFilterData(filter, decode_parms, 0);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0x94c74
movq %rax, %r13
movq (%r12), %rax
movq %rax, 0x30(%r13)
leaq 0x38(%r13), %rdi
addq $0x8, %r12
movq %r12, %rsi
callq 0x6c300
xorps %xmm0, %xmm0
movq 0x28(%r13), %rdi
movups %xmm0, 0x20(%r13)
testq %rdi, %rdi
je 0x1566e3
callq 0x69d60
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1564b8
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
QPDFObjectHandle::pipeStreamData(Pipeline*, bool*, int, qpdf_stream_decode_level_e, bool, bool) | bool
QPDFObjectHandle::pipeStreamData(
Pipeline* p,
bool* filtering_attempted,
int encode_flags,
qpdf_stream_decode_level_e decode_level,
bool suppress_warnings,
bool will_retry)
{
return as_stream(error).pipeStreamData(
p, filtering_attempted, encode_flags, decode_level, suppress_warnings, will_retry);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r15d
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x156dc9
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x156dcd
cmpl $0xd, %eax
jne 0x156ddb
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x156dd2
xorl %eax, %eax
jmp 0x156dde
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x156dde
movsbl %al, %eax
movb 0x60(%rsp), %dl
cmpl $0xa, %eax
jne 0x156e0f
movq (%r13), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x156e2e
movq 0xf1fdb(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x156e6f
incl 0x8(%rax)
jmp 0x156e2e
leaq 0x7df43(%rip), %rsi # 0x1d4d59
movq %r13, %rdi
movl %edx, %r13d
xorl %edx, %edx
callq 0x11f898
movl %r13d, %edx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movzbl %dl, %eax
movl %eax, (%rsp)
movzbl %r15b, %r9d
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x1547b8
movl %eax, %ebx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x156e5e
callq 0x69d60
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x156e2e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x156e87
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
QPDFObjectHandle::pipeStreamData(Pipeline*, bool, bool, bool) | bool
QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, bool normalize, bool compress)
{
int encode_flags = 0;
qpdf_stream_decode_level_e decode_level = qpdf_dl_none;
if (filter) {
decode_level = qpdf_dl_generalized;
if (normalize) {
encode_flags |= qpdf_ef_normalize;
}
if (compress) {
encode_flags |= qpdf_ef_compress;
}
}
return pipeStreamData(p, encode_flags, decode_level, false);
} | movl %edx, %eax
leal (%r8,%rcx,2), %edx
testl %eax, %eax
cmovel %eax, %edx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
jmp 0x68a70
| /jberkenbilt[P]qpdf/libqpdf/QPDF_Stream.cc |
SF_DCTDecode::factory() | static std::shared_ptr<QPDFStreamFilter>
factory()
{
return std::make_shared<SF_DCTDecode>();
} | pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x68ab0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xeeef9(%rip), %rcx # 0x2471e8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
leaq 0xeef2c(%rip), %rdx # 0x247238
movq %rdx, 0x10(%rax)
movups %xmm0, 0x18(%rax)
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
| /jberkenbilt[P]qpdf/libqpdf/qpdf/SF_DCTDecode.hh |
SF_ASCIIHexDecode::factory() | static std::shared_ptr<QPDFStreamFilter>
factory()
{
return std::make_shared<SF_ASCIIHexDecode>();
} | pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x68ab0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xeeff1(%rip), %rcx # 0x247388
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
leaq 0xef024(%rip), %rdx # 0x2473d8
movq %rdx, 0x10(%rax)
movups %xmm0, 0x18(%rax)
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
| /jberkenbilt[P]qpdf/libqpdf/qpdf/SF_ASCIIHexDecode.hh |
JSON::Writer::writeBase64(std::basic_string_view<char, std::char_traits<char>>) | Writer&
writeBase64(std::string_view sv)
{
Pl_Concatenate cat{"writer concat", p};
Pl_Base64 base{"writer base64", &cat, Pl_Base64::a_encode};
base.write(reinterpret_cast<unsigned char const*>(sv.data()), sv.size());
base.finish();
return *this;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdx
leaq 0x7b598(%rip), %rsi # 0x1d3b31
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x684c0
leaq 0x7b592(%rip), %rsi # 0x1d3b3f
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x87a20
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x87acc
leaq 0x8(%rsp), %rdi
callq 0x87fae
movq 0xf04d3(%rip), %rax # 0x248ab0
addq $0x10, %rax
leaq 0x20(%rsp), %rcx
movq %rax, -0x18(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x158600
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x50(%rsp), %rdi
callq 0x6d570
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x15864e
movq %rax, %rbx
movq 0xf0485(%rip), %rax # 0x248ab0
addq $0x10, %rax
leaq 0x20(%rsp), %rcx
movq %rax, -0x18(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x15864e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x50(%rsp), %rdi
callq 0x6d570
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/qpdf/JSON_writer.hh |
qpdf::Stream::getDict() const | QPDFObjectHandle
getDict() const
{
return stream()->stream_dict;
} | pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x94c74
movq 0x8(%rax), %rcx
movq %rcx, (%rbx)
movq 0x10(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x158695
movq 0xf0759(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x158691
incl 0x8(%rax)
jmp 0x158695
lock
incl 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObjectHandle_private.hh |
QPDF::Pipe::pipeStreamData(QPDF*, QPDFObjGen, long long, unsigned long, QPDFObjectHandle, bool, Pipeline*, bool, bool) | static bool
pipeStreamData(
QPDF* qpdf,
QPDFObjGen og,
qpdf_offset_t offset,
size_t length,
QPDFObjectHandle dict,
bool is_root_metadata,
Pipeline* pipeline,
bool suppress_warnings,
bool will_retry)
{
return qpdf->pipeStreamData(
og, offset, length, dict, is_root_metadata, pipeline, suppress_warnings, will_retry);
} | pushq %rbx
subq $0x10, %rsp
movb 0x30(%rsp), %r11b
movb 0x28(%rsp), %r10b
movq 0x20(%rsp), %rax
movq (%r8), %rbx
movq %rbx, (%rsp)
movq 0x8(%r8), %r8
movq %r8, 0x8(%rsp)
testq %r8, %r8
je 0x15871a
movq 0xf06d6(%rip), %rbx # 0x248de0
cmpb $0x0, (%rbx)
je 0x158715
incl 0x8(%r8)
jmp 0x15871a
lock
incl 0x8(%r8)
subq $0x8, %rsp
movzbl %r11b, %r11d
movzbl %r10b, %r10d
movzbl %r9b, %r9d
leaq 0x8(%rsp), %r8
pushq %r11
pushq %r10
pushq %rax
callq 0x93572
addq $0x20, %rsp
movl %eax, %ebx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15874e
callq 0x69d60
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x158768
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDF_private.hh |
SF_RunLengthDecode::getDecodePipeline(Pipeline*) | Pipeline*
getDecodePipeline(Pipeline* next) override
{
this->pipeline =
std::make_shared<Pl_RunLength>("runlength decode", next, Pl_RunLength::a_decode);
return this->pipeline.get();
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r8
movq %rsi, (%r8)
leaq 0xc(%rsp), %r9
movl $0x1, (%r9)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x7b158(%rip), %rcx # 0x1d3af6
leaq 0x10(%rsp), %r14
leaq 0xb(%rsp), %rdx
movq %r14, %rsi
callq 0x6c750
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x10(%rbx), %rdi
movups %xmm0, 0x8(%rbx)
testq %rdi, %rdi
je 0x1589cd
callq 0x69d60
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1589dc
callq 0x69d60
movq 0x8(%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
| /jberkenbilt[P]qpdf/libqpdf/qpdf/SF_RunLengthDecode.hh |
SF_ASCIIHexDecode::getDecodePipeline(Pipeline*) | Pipeline*
getDecodePipeline(Pipeline* next) override
{
this->pipeline = std::make_shared<Pl_ASCIIHexDecoder>("asciiHex decode", next);
return this->pipeline.get();
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r8
movq %rsi, (%r8)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x7abcb(%rip), %rcx # 0x1d3b21
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x158fa0
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x10(%rbx), %rdi
movups %xmm0, 0x8(%rbx)
testq %rdi, %rdi
je 0x158f85
callq 0x69d60
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x158f94
callq 0x69d60
movq 0x8(%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
| /jberkenbilt[P]qpdf/libqpdf/qpdf/SF_ASCIIHexDecode.hh |
QPDF_Stream::QPDF_Stream(QPDFObjectHandle, unsigned long) | QPDF_Stream(QPDFObjectHandle stream_dict, size_t length) :
m(std::make_unique<Members>(stream_dict, length))
{
if (!stream_dict.isDictionary()) {
throw std::logic_error(
"stream object instantiated with non-dictionary object for dictionary");
}
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x58, %edi
callq 0x68ab0
movq (%r14), %rcx
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x159561
movq 0xef88d(%rip), %rsi # 0x248de0
cmpb $0x0, (%rsi)
je 0x15955d
incl 0x8(%rdx)
jmp 0x159561
lock
incl 0x8(%rdx)
movb $0x1, (%rax)
movq %rcx, 0x8(%rax)
movq %rdx, 0x10(%rax)
movq %r15, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movq $0x0, 0x50(%rax)
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x6b6a0
testb %al, %al
je 0x15959c
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %r15
leaq 0x7a59d(%rip), %rsi # 0x1d3b4d
movq %rax, %rdi
callq 0x6c820
movq 0xef9f9(%rip), %rsi # 0x248fb8
movq 0xef962(%rip), %rdx # 0x248f28
movq %r15, %rdi
callq 0x6b420
movq %rax, %r14
movq %r15, %rdi
callq 0x6cf40
jmp 0x1595de
movq %rax, %r14
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x1595ee
movq %rbx, %rdi
callq 0x94872
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDF_String::create_utf16(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::shared_ptr<QPDFObject>
QPDF_String::create_utf16(std::string const& utf8_val)
{
std::string result;
if (!QUtil::utf8_to_pdf_doc(utf8_val, result, '?')) {
result = QUtil::utf8_to_utf16(utf8_val);
}
return QPDFObject::create<QPDF_String>(result);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rsp, %rsi
movq %r14, %rdi
movl $0x3f, %edx
callq 0x69650
testb %al, %al
jne 0x159f9b
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x6dd60
movq %rsp, %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x6abd0
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x159f9b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x120b86
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x159fbc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x159fcb
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x159fe4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_String.cc |
QPDF_String::writeJSON(int, JSON::Writer&) | void
QPDF_String::writeJSON(int json_version, JSON::Writer& p)
{
auto candidate = getUTF8Val();
if (json_version == 1) {
p << "\"" << JSON::Writer::encode_string(candidate) << "\"";
} else {
// See if we can unambiguously represent as Unicode.
if (QUtil::is_utf16(this->val) || QUtil::is_explicit_utf8(this->val)) {
p << "\"u:" << JSON::Writer::encode_string(candidate) << "\"";
return;
} else if (!useHexString()) {
std::string test;
if (QUtil::utf8_to_pdf_doc(candidate, test, '?') && (test == this->val)) {
// This is a PDF-doc string that can be losslessly encoded as Unicode.
p << "\"u:" << JSON::Writer::encode_string(candidate) << "\"";
return;
}
}
p << "\"b:" << QUtil::hex_encode(val) << "\"";
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x15a2ca
cmpl $0x1, %ebp
jne 0x15a061
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x6497d(%rip), %rsi # 0x1be99a
movl $0x1, %edx
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x76840
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x64946(%rip), %rsi # 0x1be99a
movl $0x1, %edx
callq *0x10(%rax)
jmp 0x15a18d
movq %r14, %rdi
callq 0x6a100
testb %al, %al
jne 0x15a079
movq %r14, %rdi
callq 0x6cb30
testb %al, %al
je 0x15a0ca
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x79efa(%rip), %rsi # 0x1d3f80
movl $0x3, %edx
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x76840
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x648dd(%rip), %rsi # 0x1be99a
movl $0x1, %edx
callq *0x10(%rax)
jmp 0x15a18d
movq %r14, %rdi
callq 0x15a328
testb %al, %al
jne 0x15a143
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x3f, %edx
callq 0x69650
testb %al, %al
je 0x15a12c
movq 0x10(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0x15a12c
testq %rdx, %rdx
je 0x15a1ce
movq (%r14), %rsi
movq 0x8(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
je 0x15a1ce
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x15a143
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x79e34(%rip), %rsi # 0x1d3f84
movl $0x3, %edx
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6b560
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x64815(%rip), %rsi # 0x1be99a
movl $0x1, %edx
callq *0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a1a8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a1c3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x79da5(%rip), %rsi # 0x1d3f80
movl $0x3, %edx
callq *0x10(%rax)
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x76840
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x64788(%rip), %rsi # 0x1be99a
movl $0x1, %edx
callq *0x10(%rax)
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a235
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x15a19b
jmp 0x15a1a8
jmp 0x15a26a
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a26d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15a26d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x15a294
jmp 0x15a2a6
jmp 0x15a2a3
jmp 0x15a283
jmp 0x15a2a3
jmp 0x15a2a3
jmp 0x15a283
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a2a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15a2a6
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15a2c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_String.cc |
QPDF_String::getUTF8Val[abi:cxx11]() const | std::string
QPDF_String::getUTF8Val() const
{
if (QUtil::is_utf16(this->val)) {
return QUtil::utf16_to_utf8(this->val);
} else if (QUtil::is_explicit_utf8(this->val)) {
// PDF 2.0 allows UTF-8 strings when explicitly prefixed with the three-byte representation
// of U+FEFF.
return this->val.substr(3);
} else {
return QUtil::pdf_doc_to_utf8(this->val);
}
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6a100
testb %al, %al
je 0x15a2ed
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c7b0
jmp 0x15a31d
movq %r14, %rdi
callq 0x6cb30
testb %al, %al
je 0x15a312
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x6dc40
jmp 0x15a31d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_String.cc |
QPDF::EncryptionData::setV5EncryptionParameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void
QPDF::EncryptionData::setV5EncryptionParameters(
std::string const& O,
std::string const& OE,
std::string const& U,
std::string const& UE,
std::string const& Perms)
{
this->O = O;
this->OE = OE;
this->U = U;
this->UE = UE;
this->Perms = Perms;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
addq $0x10, %rdi
callq 0x6e940
leaq 0x50(%r13), %rdi
movq %r12, %rsi
callq 0x6e940
leaq 0x30(%r13), %rdi
movq %r15, %rsi
callq 0x6e940
leaq 0x70(%r13), %rdi
movq %r14, %rsi
callq 0x6e940
addq $0x90, %r13
movq %r13, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6e940
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::compute_data_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, bool, int, int) | std::string
QPDF::compute_data_key(
std::string const& encryption_key,
int objid,
int generation,
bool use_aes,
int encryption_V,
int encryption_R)
{
// Algorithm 3.1 from the PDF 1.7 Reference Manual
std::string result = encryption_key;
if (encryption_V >= 5) {
// Algorithm 3.1a (PDF 1.7 extension level 3): just use encryption key straight.
return result;
}
// Append low three bytes of object ID and low two bytes of generation
result.append(1, static_cast<char>(objid & 0xff));
result.append(1, static_cast<char>((objid >> 8) & 0xff));
result.append(1, static_cast<char>((objid >> 16) & 0xff));
result.append(1, static_cast<char>(generation & 0xff));
result.append(1, static_cast<char>((generation >> 8) & 0xff));
if (use_aes) {
result += "sAlT";
}
MD5 md5;
md5.encodeDataIncrementally(result.c_str(), result.length());
MD5::Digest digest;
md5.digest(digest);
return {reinterpret_cast<char*>(digest), std::min(result.length(), toS(16))};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r12d
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x68320
cmpl $0x5, %r12d
jl 0x15a892
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsp), %rcx
cmpq %r13, %rcx
je 0x15a98f
movq %rcx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x15a997
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movsbl %r15b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x6ae80
movl %r15d, %eax
shrl $0x8, %eax
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movsbl %al, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x6ae80
shrl $0x10, %r15d
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movsbl %r15b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x6ae80
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movsbl %r14b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x6ae80
shrl $0x8, %r14d
movq %rsp, %rdi
movq 0x8(%rdi), %rsi
movsbl %r14b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x6ae80
testb %bpl, %bpl
je 0x15a927
leaq 0x796b1(%rip), %rsi # 0x1d3fd0
movq %rsp, %rdi
callq 0x6b8d0
leaq 0x20(%rsp), %rdi
callq 0x7f280
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x7f368
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7f5da
movq 0x8(%rsp), %rax
cmpq $0x10, %rax
movl $0x10, %ecx
cmovbq %rax, %rcx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x30(%rsp,%rcx), %rdx
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x68bb0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15a9b2
callq 0x69d60
jmp 0x15a9b2
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r13, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x15a9c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15a9de
jmp 0x15a9de
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15a9f7
callq 0x69d60
jmp 0x15a9f7
jmp 0x15a9f4
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x15aa0d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::compute_encryption_key_from_password(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDF::EncryptionData const&) | std::string
QPDF::compute_encryption_key_from_password(std::string const& password, EncryptionData const& data)
{
// Algorithm 3.2 from the PDF 1.7 Reference Manual
// This code does not properly handle Unicode passwords. Passwords are supposed to be converted
// from OS codepage characters to PDFDocEncoding. Unicode passwords are supposed to be
// converted to OS codepage before converting to PDFDocEncoding. We instead require the
// password to be presented in its final form.
MD5 md5;
md5.encodeDataIncrementally(pad_or_truncate_password_V4(password).c_str(), key_bytes);
md5.encodeDataIncrementally(data.getO().c_str(), key_bytes);
char pbytes[4];
int P = data.getP();
pbytes[0] = static_cast<char>(P & 0xff);
pbytes[1] = static_cast<char>((P >> 8) & 0xff);
pbytes[2] = static_cast<char>((P >> 16) & 0xff);
pbytes[3] = static_cast<char>((P >> 24) & 0xff);
md5.encodeDataIncrementally(pbytes, 4);
md5.encodeDataIncrementally(data.getId1().c_str(), data.getId1().length());
if ((data.getR() >= 4) && (!data.getEncryptMetadata())) {
char bytes[4];
memset(bytes, 0xff, 4);
md5.encodeDataIncrementally(bytes, 4);
}
MD5::Digest digest;
int key_len = std::min(toI(sizeof(digest)), data.getLengthBytes());
iterate_md5_digest(md5, digest, ((data.getR() >= 3) ? 50 : 0), key_len);
return {reinterpret_cast<char*>(digest), toS(key_len)};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x7f280
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x15abd8
movq 0x10(%rsp), %rsi
movq %rsp, %rdi
movl $0x20, %edx
callq 0x7f368
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15aab5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x10(%r14), %rsi
movq %rsp, %rdi
movl $0x20, %edx
callq 0x7f368
movl 0xc(%r14), %eax
leaq 0x34(%rsp), %rsi
movl %eax, (%rsi)
movq %rsp, %rdi
movl $0x4, %edx
callq 0x7f368
movq 0xb0(%r14), %rsi
movq 0xb8(%r14), %rdx
movq %rsp, %rdi
callq 0x7f368
cmpl $0x4, 0x4(%r14)
jl 0x15ab1d
cmpb $0x0, 0xd0(%r14)
jne 0x15ab1d
leaq 0x10(%rsp), %rsi
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
movq %rsp, %rdi
movl $0x4, %edx
callq 0x7f368
movl 0x8(%r14), %r15d
cmpl $0x10, %r15d
movl $0x10, %ebp
cmovll %r15d, %ebp
xorl %eax, %eax
cmpl $0x3, 0x4(%r14)
movl $0x32, %edx
cmovll %eax, %edx
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0x15ac7b
testl %r15d, %r15d
jns 0x15ab58
movl %ebp, %edi
callq 0x8808a
movslq %ebp, %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x68bb0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15ab86
callq 0x69d60
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15abbe
jmp 0x15abbe
jmp 0x15abbe
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15abc1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15abc1
jmp 0x15abbe
jmp 0x15abbe
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15abd0
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
pad_or_truncate_password_V4(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | static std::string
pad_or_truncate_password_V4(std::string const& password)
{
char k1[key_bytes];
pad_or_truncate_password_V4(password, k1);
return {k1, key_bytes};
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %r15
movl $0x20, %r12d
cmpq %r12, %r15
cmovaeq %r12, %r15
subq %r15, %r12
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x684e0
leaq (%rsp,%r15), %rdi
addq $0x10, %rdi
leaq 0x79391(%rip), %rsi # 0x1d3fb0
movq %r12, %rdx
callq 0x684e0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8(%rsp), %r15
movq $0x20, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x6ba80
movq %rax, (%rbx)
movq (%r15), %rcx
movq %rcx, 0x10(%rbx)
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x8(%rbx)
movq (%rbx), %rax
movb $0x0, (%rax,%rcx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
iterate_md5_digest(MD5&, unsigned char (&) [16], int, int) | static void
iterate_md5_digest(MD5& md5, MD5::Digest& digest, int iterations, int key_len)
{
md5.digest(digest);
for (int i = 0; i < iterations; ++i) {
MD5 m;
m.encodeDataIncrementally(reinterpret_cast<char*>(digest), QIntC::to_size(key_len));
m.digest(digest);
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
callq 0x7f5da
testl %ebp, %ebp
jle 0x15acdc
movslq %ebx, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x7f280
testl %ebx, %ebx
jns 0x15acb0
movl %ebx, %edi
callq 0x8808a
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7f368
movq %r12, %rdi
movq %r14, %rsi
callq 0x7f5da
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15acd8
callq 0x69d60
decl %ebp
jne 0x15ac9d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15acfb
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::recover_encryption_key_with_password(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDF::EncryptionData const&, bool&) | std::string
QPDF::recover_encryption_key_with_password(
std::string const& password, EncryptionData const& data, bool& perms_valid)
{
// Algorithm 3.2a from the PDF 1.7 extension level 3
// This code does not handle Unicode passwords correctly. Empirical evidence suggests that most
// viewers don't. We are supposed to process the input string with the SASLprep (RFC 4013)
// profile of stringprep (RFC 3454) and then convert the result to UTF-8.
perms_valid = false;
std::string key_password = truncate_password_V5(password);
std::string key_salt;
std::string user_data;
std::string encrypted_file_key;
if (check_owner_password_V5(key_password, data)) {
key_salt = data.getO().substr(40, 8);
user_data = data.getU().substr(0, 48);
encrypted_file_key = data.getOE().substr(0, 32);
} else if (check_user_password_V5(key_password, data)) {
key_salt = data.getU().substr(40, 8);
encrypted_file_key = data.getUE().substr(0, 32);
}
std::string intermediate_key = hash_V5(key_password, key_salt, user_data, data);
std::string file_key = process_with_aes(intermediate_key, false, encrypted_file_key);
// Decrypt Perms and check against expected value
std::string perms_check = process_with_aes(file_key, false, data.getPerms(), 12);
unsigned char k[16];
compute_Perms_value_V5_clear(file_key, data, k);
perms_valid = (memcmp(perms_check.c_str(), k, 12) == 0);
return file_key;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
xorl %ebp, %ebp
movb %bpl, (%rcx)
movq 0x8(%rsi), %rax
cmpq $0x7f, %rax
movl $0x7f, %ecx
cmovbq %rax, %rcx
leaq 0x90(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x6dc40
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbp, -0x8(%rax)
movb %bpl, (%rax)
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbp, -0x8(%rax)
movb %bpl, (%rax)
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rbp, -0x8(%r13)
movb %bpl, (%r13)
movq %r12, %rdi
movq %r15, %rsi
callq 0x15b15f
testb %al, %al
je 0x15ae26
leaq 0x10(%r15), %rsi
leaq 0x10(%rsp), %rdi
movl $0x28, %edx
movl $0x8, %ecx
callq 0x6dc40
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
leaq 0x20(%rsp), %rbp
cmpq %rbp, %rdi
je 0x15add2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%r15), %rsi
leaq 0x10(%rsp), %rdi
movl $0x30, %ecx
xorl %edx, %edx
callq 0x6dc40
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0x15ae0f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x50(%r15), %rsi
leaq 0x10(%rsp), %rdi
movl $0x20, %ecx
xorl %edx, %edx
callq 0x6dc40
jmp 0x15ae98
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x15b346
testb %al, %al
je 0x15aec0
leaq 0x30(%r15), %rsi
leaq 0x10(%rsp), %rdi
movl $0x28, %edx
movl $0x8, %ecx
callq 0x6dc40
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
leaq 0x20(%rsp), %rbp
cmpq %rbp, %rdi
je 0x15ae83
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x70(%r15), %rsi
leaq 0x10(%rsp), %rdi
movl $0x20, %ecx
xorl %edx, %edx
callq 0x6dc40
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0x15aec0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %r15, %r8
callq 0x15b52a
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x15ba8d
leaq 0x90(%r15), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0xc8(%rsp), %rdi
movl $0xc, %r8d
movq %rbx, %rsi
xorl %edx, %edx
movl $0x1, %r9d
callq 0x15ba8d
leaq 0xb0(%rsp), %rdx
movq %r15, %rsi
callq 0x15b10b
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
movq (%rdi), %rcx
xorq 0xb0(%rsp), %rcx
movl 0x8(%rdi), %edx
xorl 0xb8(%rsp), %edx
orq %rcx, %rdx
sete (%r14)
cmpq %rax, %rdi
je 0x15af7c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15af97
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x15afb1
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x15afcd
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x15afe9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b00a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15b08d
jmp 0x15b08d
jmp 0x15b08d
jmp 0x15b08d
jmp 0x15b08d
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b052
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15b052
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x15b06e
movq (%rbx), %rsi
incq %rsi
callq 0x68760
jmp 0x15b06e
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b090
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15b090
jmp 0x15b08d
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x15b0aa
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x15b0c6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x15b0e2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b103
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
hash_V5(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDF::EncryptionData const&) | static std::string
hash_V5(
std::string const& password,
std::string const& salt,
std::string const& udata,
QPDF::EncryptionData const& data)
{
Pl_SHA2 hash(256);
hash.writeString(password);
hash.writeString(salt);
hash.writeString(udata);
hash.finish();
std::string K = hash.getRawDigest();
std::string result;
if (data.getR() < 6) {
result = K;
} else {
// Algorithm 2.B from ISO 32000-1 chapter 7: Computing a hash
int round_number = 0;
bool done = false;
while (!done) {
// The hash algorithm has us setting K initially to the R5 value and then repeating a
// series of steps 64 times before starting with the termination case testing. The
// wording of the specification is very unclear as to the exact number of times it
// should be run since the wording about whether the initial setup counts as round 0 or
// not is ambiguous. This code counts the initial setup (R5) value as round 0, which
// appears to be correct. This was determined to be correct by increasing or decreasing
// the number of rounds by 1 or 2 from this value and generating 20 test files. In this
// interpretation, all the test files worked with Adobe Reader X. In the other
// configurations, many of the files did not work, and we were accurately able to
// predict which files didn't work by looking at the conditions under which we
// terminated repetition.
++round_number;
std::string K1 = password + K + udata;
qpdf_assert_debug(K.length() >= 32);
std::string E = process_with_aes(
K.substr(0, 16),
true,
K1,
0,
64,
QUtil::unsigned_char_pointer(K.substr(16, 16)),
16);
// E_mod_3 is supposed to be mod 3 of the first 16 bytes of E taken as as a (128-bit)
// big-endian number. Since (xy mod n) is equal to ((x mod n) + (y mod n)) mod n and
// since 256 mod n is 1, we can just take the sums of the the mod 3s of each byte to get
// the same result.
int E_mod_3 = 0;
for (unsigned int i = 0; i < 16; ++i) {
E_mod_3 += static_cast<unsigned char>(E.at(i));
}
E_mod_3 %= 3;
int next_hash = ((E_mod_3 == 0) ? 256 : (E_mod_3 == 1) ? 384 : 512);
Pl_SHA2 sha2(next_hash);
sha2.writeString(E);
sha2.finish();
K = sha2.getRawDigest();
if (round_number >= 64) {
unsigned int ch = static_cast<unsigned char>(*(E.rbegin()));
if (ch <= QIntC::to_uint(round_number - 32)) {
done = true;
}
}
}
result = K.substr(0, 32);
}
return result;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %r8, %rbx
movq %rcx, 0x38(%rsp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
leaq 0xf0(%rsp), %r13
movq %r13, %rdi
movl $0x100, %esi # imm = 0x100
xorl %edx, %edx
callq 0x8d698
movq %r13, %rdi
movq %r15, 0xa0(%rsp)
movq %r15, %rsi
callq 0x6c620
leaq 0xf0(%rsp), %rdi
movq %r12, %rsi
callq 0x6c620
leaq 0xf0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x6c620
leaq 0xf0(%rsp), %rdi
callq 0x8d82a
leaq 0x80(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x8d84e
leaq 0x10(%r14), %r15
movq %r15, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
cmpl $0x6, 0x4(%rbx)
jge 0x15b5e9
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
callq 0x6e940
jmp 0x15b8bf
movq %r15, 0x10(%rsp)
movq %r14, 0x8(%rsp)
leaq 0x28(%rsp), %r14
xorl %r15d, %r15d
leaq 0xa8(%rsp), %r12
leaq 0x80(%rsp), %r13
leaq 0x60(%rsp), %rbp
xorl %ebx, %ebx
movq %r12, %rdi
movq 0xa0(%rsp), %rsi
movq %r13, %rdx
callq 0x6bad0
movq 0x38(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x6bfe0
movq %r14, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15b65c
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x15b663
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x15b6a0
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
cmpq $0x1f, 0x88(%rsp)
jbe 0x15b91d
movl $0x10, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6dc40
movl $0x10, %edx
movl $0x10, %ecx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6dc40
movq %rbp, %rdi
callq 0x681b0
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movl $0x1, %edx
leaq 0x18(%rsp), %rcx
xorl %r8d, %r8d
movl $0x40, %r9d
pushq $0x10
pushq %rax
callq 0x15ba8d
addq $0x10, %rsp
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x15b721
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x15b746
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
leal 0x1(%rbx), %r14d
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rsi, %rdx
je 0x15b902
movzbl (%rcx,%rsi), %edi
addl %edi, %eax
incq %rsi
cmpq $0x10, %rsi
jne 0x15b758
movl %eax, %ecx
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x21, %rcx
leal (%rcx,%rcx,2), %ecx
movl %eax, %edx
subl %ecx, %edx
xorl %esi, %esi
cmpl $0x1, %edx
setne %sil
shll $0x7, %esi
addl $0x180, %esi # imm = 0x180
cmpl %ecx, %eax
movl $0x100, %eax # imm = 0x100
cmovel %eax, %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x8d698
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0x6c620
movq %r12, %rdi
callq 0x8d82a
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8d84e
movq %r13, %rdi
movq %rbp, %rsi
callq 0x6abd0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x15b7f3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
cmpl $0x3f, %ebx
jb 0x15b819
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movzbl -0x1(%rax,%rcx), %eax
addl $-0x1f, %ebx
cmpl %eax, %ebx
movzbl %r15b, %r15d
movl $0x1, %eax
cmovael %eax, %r15d
movq %r12, %rdi
callq 0x8d96a
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x15b83d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x15b859
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
movl %r14d, %ebx
testb $0x1, %r15b
leaq 0x28(%rsp), %r14
je 0x15b612
leaq 0xa8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x20, %ecx
xorl %edx, %edx
callq 0x6dc40
leaq 0xa8(%rsp), %rbx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6abd0
movq (%rbx), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x15b8bf
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b8e0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xf0(%rsp), %rdi
callq 0x8d96a
movq %r14, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0xf, %rdx
movl $0xf, %esi
cmovbq %rdx, %rsi
leaq 0x5df97(%rip), %rdi # 0x1b98ad
xorl %eax, %eax
callq 0x682c0
leaq 0x78aec(%rip), %rdi # 0x1d4410
leaq 0x78af6(%rip), %rsi # 0x1d4421
leaq 0x78b56(%rip), %rcx # 0x1d4488
movl $0x114, %edx # imm = 0x114
callq 0x68b30
jmp 0x15b957
movq %rax, %rbx
jmp 0x15ba44
jmp 0x15b948
movq %rax, %rbx
jmp 0x15ba78
jmp 0x15b9ff
jmp 0x15b99d
movq %rax, %rbx
jmp 0x15b984
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x15b984
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r15
jmp 0x15ba44
movq %rax, %rbx
jmp 0x15b9f3
movq %rax, %rbx
jmp 0x15b9ce
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x8d96a
jmp 0x15ba02
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x15b9ce
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x15b9f3
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r15
jmp 0x15ba28
movq %rax, %rbx
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r15
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x15ba28
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x15ba44
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x15ba57
movq (%r15), %rsi
incq %rsi
callq 0x68760
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15ba78
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xf0(%rsp), %rdi
callq 0x8d96a
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::interpretCF(std::shared_ptr<QPDF::EncryptionParameters>, QPDFObjectHandle) | QPDF::encryption_method_e
QPDF::interpretCF(std::shared_ptr<EncryptionParameters> encp, QPDFObjectHandle cf)
{
if (cf.isName()) {
std::string filter = cf.getName();
if (encp->crypt_filters.count(filter) != 0) {
return encp->crypt_filters[filter];
} else if (filter == "/Identity") {
return e_none;
} else {
return e_unknown;
}
} else {
// Default: /Identity
return e_none;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6a170
xorl %ebp, %ebp
testb %al, %al
je 0x15bcb1
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6b430
movq (%rbx), %r14
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x162a68
addq $0x18, %r14
cmpq %r14, %rax
je 0x15bc7d
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x8(%rsp), %rsi
callq 0x162984
movl (%rax), %ebp
jmp 0x15bc96
leaq 0x78351(%rip), %rsi # 0x1d3fd5
leaq 0x8(%rsp), %rdi
callq 0x6d210
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15bcb1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15bcdc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::getTrimmedUserPassword[abi:cxx11]() const | std::string
QPDF::getTrimmedUserPassword() const
{
std::string result = m->encp->user_password;
trim_user_password(result);
return result;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x108(%rax), %rax
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
addq %rsi, %rdx
callq 0x68320
movq %rbx, %rdi
callq 0x694a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x15efde
movq (%r15), %rsi
incq %rsi
callq 0x68760
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::getKeyForObject[abi:cxx11](std::shared_ptr<QPDF::EncryptionParameters>, QPDFObjGen, bool) | std::string
QPDF::getKeyForObject(std::shared_ptr<EncryptionParameters> encp, QPDFObjGen og, bool use_aes)
{
if (!encp->encrypted) {
throw std::logic_error("request for encryption key in non-encrypted PDF");
}
if (og != encp->cached_key_og) {
encp->cached_object_encryption_key = compute_data_key(
encp->encryption_key,
og.getObj(),
og.getGen(),
use_aes,
encp->encryption_V,
encp->encryption_R);
encp->cached_key_og = og;
}
return encp->cached_object_encryption_key;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq (%rsi), %rsi
cmpb $0x0, (%rsi)
je 0x15f124
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rax
shrq $0x20, %rax
cmpl %r15d, 0xd0(%rsi)
jne 0x15f09c
cmpl %eax, 0xd4(%rsi)
je 0x15f0f2
movl 0x4(%rsi), %r9d
addq $0x90, %rsi
movzbl %cl, %r8d
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %r15d, %edx
movl %eax, %ecx
callq 0x6ce90
movl $0xb0, %edi
addq (%r14), %rdi
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x15f0e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%r14), %rax
movq %r15, 0xd0(%rax)
movq (%r14), %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0xb0(%rax), %rsi
movq 0xb8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x68320
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x750d3(%rip), %rsi # 0x1d420b
movq %rax, %rdi
callq 0x6c820
movq 0xe9e71(%rip), %rsi # 0x248fb8
movq 0xe9dda(%rip), %rdx # 0x248f28
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::decryptString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, QPDFObjGen) | void
QPDF::decryptString(std::string& str, QPDFObjGen og)
{
if (!og.isIndirect()) {
return;
}
bool use_aes = false;
if (m->encp->encryption_V >= 4) {
switch (m->encp->cf_string) {
case e_none:
return;
case e_aes:
use_aes = true;
break;
case e_aesv3:
use_aes = true;
break;
case e_rc4:
break;
default:
warn(damagedPDF(
"unknown encryption filter for strings (check /StrF in "
"/Encrypt dictionary); strings may be decrypted improperly"));
// To avoid repeated warnings, reset cf_string. Assume we'd want to use AES if V == 4.
m->encp->cf_string = e_aes;
use_aes = true;
break;
}
}
std::string key = getKeyForObject(m->encp, og, use_aes);
try {
if (use_aes) {
QTC::TC("qpdf", "QPDF_encryption aes decode string");
Pl_Buffer bufpl("decrypted string");
Pl_AES_PDF pl(
"aes decrypt string",
&bufpl,
false,
QUtil::unsigned_char_pointer(key),
key.length());
pl.writeString(str);
pl.finish();
str = bufpl.getString();
} else {
QTC::TC("qpdf", "QPDF_encryption rc4 decode string");
size_t vlen = str.length();
// Using std::shared_ptr guarantees that tmp will be freed even if rc4.process throws an
// exception.
auto tmp = QUtil::make_unique_cstr(str);
RC4 rc4(QUtil::unsigned_char_pointer(key), toI(key.length()));
auto data = QUtil::unsigned_char_pointer(tmp.get());
rc4.process(data, vlen, data);
str = std::string(tmp.get(), vlen);
}
} catch (QPDFExc&) {
throw;
} catch (std::runtime_error& e) {
throw damagedPDF("error decrypting string for object " + og.unparse() + ": " + e.what());
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp # imm = 0x158
movq %rdx, 0x58(%rsp)
testl %edx, %edx
je 0x15f437
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x108(%rax), %rax
cmpl $0x4, 0x4(%rax)
jl 0x15f1b7
movl 0x44(%rax), %eax
cmpq $0x4, %rax
ja 0x15f1bb
leaq 0x74de2(%rip), %rcx # 0x1d3f90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %ebp, %ebp
jmp 0x15f239
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x75070(%rip), %rsi # 0x1d423b
leaq 0x750d8(%rip), %rdx # 0x1d42aa
leaq 0x20(%rsp), %rdi
callq 0x68bb0
leaq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x937f2
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0xb0(%rsp), %rdi
callq 0x6f2b8
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x15f225
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %rax
movq 0x108(%rax), %rax
movl $0x3, 0x44(%rax)
movb $0x1, %bpl
movq (%rbx), %rax
movq 0x108(%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x110(%rax), %rax
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x15f26e
movq 0xe9b80(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x15f26a
incl 0x8(%rax)
jmp 0x15f26e
lock
incl 0x8(%rax)
movq 0x58(%rsp), %rdx
movzbl %bpl, %ecx
leaq 0x70(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x15f064
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x15f295
callq 0x69d60
testb %bpl, %bpl
je 0x15f34c
leaq 0x75006(%rip), %rsi # 0x1d42ab
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x69ec0
leaq 0x70(%rsp), %rdi
callq 0x681b0
movq 0x78(%rsp), %r9
leaq 0x74ff5(%rip), %rsi # 0x1d42bc
leaq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
xorl %ecx, %ecx
movq %rax, %r8
callq 0x86cbc
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x6c620
leaq 0xb0(%rsp), %rdi
callq 0x870fa
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6eca0
movq %rsp, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6abd0
movq (%rbx), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15f330
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xb0(%rsp), %rdi
callq 0x87250
leaq 0x20(%rsp), %rdi
callq 0x6ace0
jmp 0x15f416
movq 0x8(%r14), %r15
movq %rsp, %rdi
movq %r14, %rsi
callq 0x68b40
leaq 0x70(%rsp), %rdi
callq 0x681b0
movq %rax, %r12
movq 0x78(%rsp), %r13
testq $-0x80000000, %r13 # imm = 0x80000000
je 0x15f37e
movq %r13, %rdi
callq 0xb820c
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x1a0d30
movq (%rsp), %rdi
callq 0x6bb40
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x1a0d6e
movq (%rsp), %rsi
leaq 0xc0(%rsp), %r12
movq %r12, -0x10(%r12)
addq %rsi, %r15
leaq 0xb0(%rsp), %rdi
movq %r15, %rdx
callq 0x68bb0
leaq 0xb0(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6abd0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x15f3f9
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15f408
callq 0x69d60
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x15f416
callq 0x69e90
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f437
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x158, %rsp # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x6f2b8
jmp 0x15f45e
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x15f721
movq 0x30(%rsp), %rsi
jmp 0x15f719
movq %rax, %r14
jmp 0x15f721
jmp 0x15f496
jmp 0x15f4c3
jmp 0x15f48e
jmp 0x15f486
movq %rdx, %r15
movq %rax, %r14
jmp 0x15f4e8
movq %rdx, %r15
movq %rax, %r14
jmp 0x15f4ab
movq %rdx, %r15
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15f4ab
callq 0x69d60
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x15f4b9
callq 0x69e90
movq $0x0, (%rsp)
jmp 0x15f4e8
movq %rdx, %r15
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x87250
jmp 0x15f4de
movq %rdx, %r15
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x6ace0
cmpl $0x2, %r15d
jne 0x15f500
movq %r14, %rdi
callq 0x683f0
callq 0x6c640
jmp 0x15f63d
cmpl $0x1, %r15d
jne 0x15f700
movq %r14, %rdi
callq 0x683f0
movq %rax, %r14
movl $0x80, %edi
callq 0x6a000
movq %rax, %r15
leaq 0x90(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0x2c, %edx
callq 0x9401a
leaq 0x74d8f(%rip), %rsi # 0x1d42cf
movq %rsp, %rdi
leaq 0x90(%rsp), %rdx
callq 0x69970
leaq 0x75aa0(%rip), %rsi # 0x1d4ff7
movq %rsp, %rdi
callq 0x6b8d0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x15f581
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x15f58e
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %r12
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x6b8d0
leaq 0xc0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x15f5e5
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x15f5f8
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
movq 0x8(%rax), %rsi
leaq 0xb0(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r15, %rdi
movq %rbx, %rsi
callq 0x937f2
xorl %ebp, %ebp
movq 0xe96ba(%rip), %rsi # 0x248ce8
movq 0xe9633(%rip), %rdx # 0x248c68
movq %r15, %rdi
callq 0x6b420
movq %rax, %r14
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x15f665
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15f665
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x15f684
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15f684
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f6a7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15f6a7
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f6d0
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x15f6d0
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x15f6dd
movq %r15, %rdi
callq 0x6cf40
callq 0x6c2d0
jmp 0x15f700
movq %rax, %r14
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x15f721
callq 0x69d60
jmp 0x15f721
movq %rax, %r14
callq 0x6c2d0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15f721
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r14, %rdi
callq 0x6b780
movq %rax, %rdi
callq 0x7cc8d
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::decryptStream(std::shared_ptr<QPDF::EncryptionParameters>, std::shared_ptr<InputSource>, QPDF&, Pipeline*&, QPDFObjGen, QPDFObjectHandle&, bool, std::unique_ptr<Pipeline, std::default_delete<Pipeline>>&) | void
QPDF::decryptStream(
std::shared_ptr<EncryptionParameters> encp,
std::shared_ptr<InputSource> file,
QPDF& qpdf_for_warning,
Pipeline*& pipeline,
QPDFObjGen og,
QPDFObjectHandle& stream_dict,
bool is_root_metadata,
std::unique_ptr<Pipeline>& decrypt_pipeline)
{
std::string type;
if (stream_dict.getKey("/Type").isName()) {
type = stream_dict.getKey("/Type").getName();
}
if (type == "/XRef") {
QTC::TC("qpdf", "QPDF_encryption xref stream from encrypted file");
return;
}
bool use_aes = false;
if (encp->encryption_V >= 4) {
encryption_method_e method = e_unknown;
std::string method_source = "/StmF from /Encrypt dictionary";
if (stream_dict.getKey("/Filter").isOrHasName("/Crypt")) {
if (stream_dict.getKey("/DecodeParms").isDictionary()) {
QPDFObjectHandle decode_parms = stream_dict.getKey("/DecodeParms");
if (decode_parms.isDictionaryOfType("/CryptFilterDecodeParms")) {
QTC::TC("qpdf", "QPDF_encryption stream crypt filter");
method = interpretCF(encp, decode_parms.getKey("/Name"));
method_source = "stream's Crypt decode parameters";
}
} else if (
stream_dict.getKey("/DecodeParms").isArray() &&
stream_dict.getKey("/Filter").isArray()) {
QPDFObjectHandle filter = stream_dict.getKey("/Filter");
QPDFObjectHandle decode = stream_dict.getKey("/DecodeParms");
if (filter.getArrayNItems() == decode.getArrayNItems()) {
for (int i = 0; i < filter.getArrayNItems(); ++i) {
if (filter.getArrayItem(i).isNameAndEquals("/Crypt")) {
QPDFObjectHandle crypt_params = decode.getArrayItem(i);
if (crypt_params.isDictionary() &&
crypt_params.getKey("/Name").isName()) {
QTC::TC("qpdf", "QPDF_encrypt crypt array");
method = interpretCF(encp, crypt_params.getKey("/Name"));
method_source = "stream's Crypt decode parameters (array)";
}
}
}
}
}
}
if (method == e_unknown) {
if ((!encp->encrypt_metadata) && is_root_metadata) {
QTC::TC("qpdf", "QPDF_encryption cleartext metadata");
method = e_none;
} else {
method = encp->cf_stream;
}
}
use_aes = false;
switch (method) {
case e_none:
return;
break;
case e_aes:
use_aes = true;
break;
case e_aesv3:
use_aes = true;
break;
case e_rc4:
break;
default:
// filter local to this stream.
qpdf_for_warning.warn(QPDFExc(
qpdf_e_damaged_pdf,
file->getName(),
"",
file->getLastOffset(),
"unknown encryption filter for streams (check " + method_source +
"); streams may be decrypted improperly"));
// To avoid repeated warnings, reset cf_stream. Assume we'd want to use AES if V == 4.
encp->cf_stream = e_aes;
use_aes = true;
break;
}
}
std::string key = getKeyForObject(encp, og, use_aes);
if (use_aes) {
QTC::TC("qpdf", "QPDF_encryption aes decode stream");
decrypt_pipeline = std::make_unique<Pl_AES_PDF>(
"AES stream decryption",
pipeline,
false,
QUtil::unsigned_char_pointer(key),
key.length());
} else {
QTC::TC("qpdf", "QPDF_encryption rc4 decode stream");
decrypt_pipeline = std::make_unique<Pl_RC4>(
"RC4 stream decryption",
pipeline,
QUtil::unsigned_char_pointer(key),
toI(key.length()));
}
pipeline = decrypt_pipeline.get();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %r9, %r12
movq %r8, 0x1c0(%rsp)
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, 0x1b8(%rsp)
movq %rdi, 0x80(%rsp)
leaq 0x198(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x58304(%rip), %rsi # 0x1b7a91
leaq 0x58302(%rip), %rdx # 0x1b7a96
movq %rsp, %rdi
callq 0x68bb0
leaq 0xa8(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
leaq 0xa8(%rsp), %rdi
callq 0x6a170
movl %eax, %ebx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x15f7d0
callq 0x69d60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15f7eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bl, %bl
je 0x15f89e
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5828b(%rip), %rsi # 0x1b7a91
leaq 0x58289(%rip), %rdx # 0x1b7a96
leaq 0xa8(%rsp), %rdi
callq 0x68bb0
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
movq %r12, %rsi
callq 0x6ba70
movq %rsp, %rdi
leaq 0x88(%rsp), %rsi
callq 0x6b430
leaq 0x188(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x6abd0
movq (%rbx), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15f86f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x15f881
callq 0x69d60
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15f89e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x733f0(%rip), %rsi # 0x1d2c95
leaq 0x188(%rsp), %rdi
callq 0x6d210
testl %eax, %eax
je 0x1603f9
movq 0x80(%rsp), %rax
movq (%rax), %rax
cmpl $0x4, 0x4(%rax)
jl 0x15fb64
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x74a11(%rip), %rsi # 0x1d42f3
leaq 0x74a28(%rip), %rdx # 0x1d4311
leaq 0xa8(%rsp), %rdi
callq 0x68bb0
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5810c(%rip), %rsi # 0x1b7a14
leaq 0x5810c(%rip), %rdx # 0x1b7a1b
callq 0x68bb0
movq %r15, 0x1b0(%rsp)
leaq 0xc8(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x73043(%rip), %rsi # 0x1d2985
leaq 0x73042(%rip), %rdx # 0x1d298b
leaq 0x88(%rsp), %rdi
callq 0x68bb0
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6c770
movl %eax, %ebx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x15f98a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x15f99c
callq 0x69d60
movq %rbp, 0x130(%rsp)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15f9bf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movl $0x1, %ebp
testb %bl, %bl
je 0x16007e
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5803e(%rip), %rsi # 0x1b7a1c
leaq 0x58043(%rip), %rdx # 0x1b7a28
callq 0x68bb0
leaq 0x88(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
leaq 0x88(%rsp), %rdi
callq 0x6b6a0
movl %eax, %ebx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x15fa1e
callq 0x69d60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fa39
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
testb %bl, %bl
je 0x15fb6b
movq %rax, (%rdi)
leaq 0x57fc9(%rip), %rsi # 0x1b7a1c
leaq 0x57fce(%rip), %rdx # 0x1b7a28
callq 0x68bb0
leaq 0xc8(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fa8d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x7403f(%rip), %rsi # 0x1d3ade
leaq 0x7404f(%rip), %rdx # 0x1d3af5
callq 0x68bb0
leaq 0x88(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x73169(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0xc8(%rsp), %rdi
movq %rsp, %rsi
leaq 0x88(%rsp), %rdx
callq 0x6bdb0
movl %eax, %ebx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x15fafc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fb17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movl $0x1, %ebp
testb %bl, %bl
je 0x16006c
movq 0x80(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x178(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x180(%rsp)
testq %rax, %rax
je 0x15ffc0
movq 0xe928d(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x15ffbc
incl 0x8(%rax)
jmp 0x15ffc0
xorl %ebx, %ebx
jmp 0x160281
movq %rax, (%rdi)
leaq 0x57ea7(%rip), %rsi # 0x1b7a1c
leaq 0x57eac(%rip), %rdx # 0x1b7a28
callq 0x68bb0
leaq 0xc8(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
leaq 0xc8(%rsp), %rdi
callq 0x6c8b0
movl %eax, %r14d
testb %al, %al
je 0x15fbef
leaq 0x88(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57e5a(%rip), %rsi # 0x1b7a14
leaq 0x57e5a(%rip), %rdx # 0x1b7a1b
callq 0x68bb0
leaq 0x1c8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
movq %r12, %rsi
callq 0x6ba70
leaq 0x1c8(%rsp), %rdi
callq 0x6c8b0
movl %eax, %ebx
jmp 0x15fbf1
xorl %ebx, %ebx
testb %r14b, %r14b
je 0x15fc25
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x15fc08
callq 0x69d60
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x15fc25
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x15fc37
callq 0x69d60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fc52
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bl, %bl
je 0x16007e
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57da8(%rip), %rsi # 0x1b7a14
leaq 0x57da8(%rip), %rdx # 0x1b7a1b
callq 0x68bb0
leaq 0x110(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fca6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57d64(%rip), %rsi # 0x1b7a1c
leaq 0x57d69(%rip), %rdx # 0x1b7a28
callq 0x68bb0
leaq 0xf0(%rsp), %rdi
movq %rsp, %rdx
movq %r12, %rsi
callq 0x6ba70
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fcf2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x110(%rsp), %rdi
callq 0x6f1d0
movl %eax, %ebx
leaq 0xf0(%rsp), %rdi
callq 0x6f1d0
movl $0x1, %ebp
cmpl %eax, %ebx
jne 0x15ff9d
leaq 0xd8(%rsp), %rax
movq %rax, 0x1a8(%rsp)
xorl %r12d, %r12d
leaq 0x138(%rsp), %r15
movq %rsp, %r13
leaq 0x1f8(%rsp), %rbx
leaq 0x110(%rsp), %rdi
callq 0x6f1d0
cmpl %eax, %r12d
jge 0x15ff9d
movq %r15, %rdi
leaq 0x110(%rsp), %rsi
movl %r12d, %edx
callq 0x6ac00
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0x72c08(%rip), %rsi # 0x1d2985
leaq 0x72c07(%rip), %rdx # 0x1d298b
callq 0x68bb0
movq %r15, %rdi
movq %r13, %rsi
callq 0x6a180
movl %eax, %r14d
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15fdb2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x15fdc4
callq 0x69d60
testb %r14b, %r14b
je 0x15ff95
movq %r15, %rdi
leaq 0xf0(%rsp), %rsi
movl %r12d, %edx
callq 0x6ac00
movq %r15, %rdi
callq 0x6b6a0
movl %eax, %r14d
movl %ebp, 0xec(%rsp)
movq %r15, %rbp
movq %rbx, %r13
testb %al, %al
je 0x15fe48
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xc8(%rsp), %r15
movq %r15, %rdi
leaq 0x73cba(%rip), %rsi # 0x1d3ad8
leaq 0x73cb8(%rip), %rdx # 0x1d3add
callq 0x68bb0
movq %r13, %rbx
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x6ba70
movq %rbx, %rdi
callq 0x6a170
movl %eax, %r15d
jmp 0x15fe4b
xorl %r15d, %r15d
testb %r14b, %r14b
je 0x15fe87
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x15fe62
callq 0x69d60
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x15fe87
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
testb %r15b, %r15b
movq %r13, %rbx
movq %rbp, %r15
movl 0xec(%rsp), %ebp
movq %rsp, %r13
je 0x15ff83
movq 0x80(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x168(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x170(%rsp)
testq %rax, %rax
je 0x15fed9
movq 0xe8f15(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x15fed5
incl 0x8(%rax)
jmp 0x15fed9
lock
incl 0x8(%rax)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0x73bec(%rip), %rsi # 0x1d3ad8
leaq 0x73bea(%rip), %rdx # 0x1d3add
callq 0x68bb0
leaq 0x1e8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x6ba70
leaq 0x168(%rsp), %rdi
movq %r14, %rsi
callq 0x15bc22
movl %eax, %ebp
movq 0x1f0(%rsp), %rdi
testq %rdi, %rdi
je 0x15ff32
callq 0x69d60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15ff4d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x15ff5f
callq 0x69d60
movq 0xb0(%rsp), %rdx
movl $0x28, %r8d
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
leaq 0x743b5(%rip), %rcx # 0x1d4333
callq 0x6a930
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x15ff95
callq 0x69d60
incl %r12d
jmp 0x15fd41
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x15ffaf
callq 0x69d60
movq 0x118(%rsp), %rdi
jmp 0x160074
lock
incl 0x8(%rax)
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x73b06(%rip), %rsi # 0x1d3ad8
leaq 0x73b04(%rip), %rdx # 0x1d3add
callq 0x68bb0
leaq 0x1d8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movq %rsp, %rdx
callq 0x6ba70
leaq 0x178(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x15bc22
movl %eax, %ebp
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x16001f
callq 0x69d60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16003a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x16004c
callq 0x69d60
leaq 0xa8(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x742b3(%rip), %rcx # 0x1d4312
movl $0x20, %r8d
xorl %esi, %esi
callq 0x6a930
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x16007e
callq 0x69d60
cmpl $0x1, %ebp
jne 0x1600a3
movq 0x80(%rsp), %rax
movq (%rax), %rax
cmpb $0x0, 0x240(%rsp)
je 0x1600a0
xorl %ebp, %ebp
cmpb $0x0, 0xc(%rax)
je 0x1600a3
movl 0x40(%rax), %ebp
cmpl $0x5, %ebp
movq 0x1b8(%rsp), %r14
jae 0x1600db
movl $0x1d, %eax
btl %ebp, %eax
jae 0x1600db
movb $0x1c, %r14b
movl %ebp, %ecx
shrb %cl, %r14b
movb $0x18, %bl
shrb %cl, %bl
leaq 0x198(%rsp), %r13
movq 0x130(%rsp), %rbp
jmp 0x160252
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, %rbx
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x72b2c(%rip), %rdx # 0x1d2c26
leaq 0x110(%rsp), %rdi
movq %rdx, %rsi
leaq 0x198(%rsp), %r13
callq 0x68bb0
movq 0x130(%rsp), %rbp
movq (%r14), %rdi
callq 0x6cf20
movq %rax, %r14
leaq 0x74230(%rip), %rsi # 0x1d435c
leaq 0x138(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x6c310
leaq 0x74242(%rip), %rsi # 0x1d438a
leaq 0x138(%rsp), %rdi
callq 0x6b8d0
leaq 0x100(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x160186
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x16018e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %r9
movq %rdx, 0x8(%r9)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x110(%rsp), %rcx
movl $0x5, %esi
movq %rbx, %rdx
movq %r14, %r8
callq 0x68550
movq %rsp, %rsi
movq 0x1b0(%rsp), %rdi
callq 0x6b880
movq %rsp, %rdi
callq 0x6f2b8
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1601fd
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16021e
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x16023b
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x80(%rsp), %rax
movq (%rax), %rax
movl $0x3, 0x40(%rax)
movb $0x1, %r14b
movb $0x1, %bl
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x160277
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
testb $0x1, %r14b
je 0x1603f9
movq 0x80(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x158(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x160(%rsp)
testq %rax, %rax
je 0x1602ba
movq 0xe8b34(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1602b6
incl 0x8(%rax)
jmp 0x1602ba
lock
incl 0x8(%rax)
movzbl %bl, %ecx
andl $0x1, %ecx
movq %rsp, %rdi
leaq 0x158(%rsp), %rsi
movq 0x1c0(%rsp), %rdx
callq 0x15f064
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x1602ea
callq 0x69d60
movq 0x248(%rsp), %r12
testb $0x1, %bl
je 0x16035d
movq %rsp, %rdi
callq 0x681b0
movq %rax, %rbx
movq 0x8(%rsp), %r15
movl $0xa8, %edi
callq 0x68ab0
movq %rax, %r14
movq (%rbp), %rdx
leaq 0x74092(%rip), %rsi # 0x1d43b1
movq %rax, %rdi
xorl %ecx, %ecx
movq %rbx, %r8
movq %r15, %r9
callq 0x86cbc
movq $0x0, 0xa8(%rsp)
movq (%r12), %rdi
movq %r14, (%r12)
testq %rdi, %rdi
je 0x16034e
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0xa8(%rsp), %rdi
callq 0x162a00
jmp 0x1603d6
movq %rsp, %rdi
callq 0x681b0
movq %rax, %rbx
movq 0x8(%rsp), %r14
testq $-0x80000000, %r14 # imm = 0x80000000
je 0x16037e
movq %r14, %rdi
callq 0xb820c
movl $0x58, %edi
callq 0x68ab0
movq %rax, %r15
movq (%rbp), %rdx
leaq 0x74031(%rip), %rsi # 0x1d43c7
movl $0x10000, %r9d # imm = 0x10000
movq %rax, %rdi
movq %rbx, %rcx
movl %r14d, %r8d
callq 0x8ce14
movq $0x0, 0xa8(%rsp)
movq (%r12), %rdi
movq %r15, (%r12)
testq %rdi, %rdi
je 0x1603c9
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0xa8(%rsp), %rdi
callq 0x162a34
movq (%r12), %rax
movq %rax, (%rbp)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1603f9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x188(%rsp), %rdi
cmpq %r13, %rdi
je 0x160416
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16052c
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1607ca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1607ca
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x160476
callq 0x69d60
jmp 0x160476
movq %rax, %rbx
jmp 0x1607ca
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16049b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16049b
jmp 0x1606f2
movq %rax, %rbx
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x16052f
callq 0x69d60
jmp 0x16052f
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x1606bc
callq 0x69d60
jmp 0x1606bc
jmp 0x160719
jmp 0x1606b9
jmp 0x1606db
jmp 0x1607b5
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x16050a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16050a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16052f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16052f
jmp 0x1606db
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
jmp 0x1607d2
jmp 0x1606f2
jmp 0x1606f2
jmp 0x160719
jmp 0x160719
movq %rax, %rbx
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x16058b
callq 0x69d60
jmp 0x16058b
jmp 0x16079e
movq %rax, %rbx
jmp 0x1605cc
movq %rax, %rbx
movq 0x1f0(%rsp), %rdi
testq %rdi, %rdi
je 0x1605b1
callq 0x69d60
jmp 0x1605b1
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq 0x1a8(%rsp), %rdi
je 0x1607a1
movq 0xd8(%rsp), %rsi
jmp 0x160792
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1605cc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x1607a1
callq 0x69d60
jmp 0x1607a1
movq %rax, %rbx
movq 0x90(%rsp), %rdi
jmp 0x1606e6
jmp 0x1606f2
jmp 0x160719
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6f2b8
jmp 0x160611
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x160633
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160633
movq %rax, %rbx
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16065b
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16065b
jmp 0x160658
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x1607dc
movq 0x120(%rsp), %rsi
jmp 0x16070c
jmp 0x160719
jmp 0x160719
movq %rax, %rbx
movl $0x58, %esi
movq %r15, %rdi
jmp 0x16069b
movq %rax, %rbx
movl $0xa8, %esi
movq %r14, %rdi
callq 0x68760
jmp 0x160815
jmp 0x160812
jmp 0x160812
jmp 0x160812
jmp 0x1607b5
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x1606de
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1606de
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x1606f5
callq 0x69d60
jmp 0x1606f5
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1607dc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1607dc
movq %rax, %rbx
jmp 0x1607dc
jmp 0x160832
jmp 0x160812
jmp 0x16079e
movq %rax, %rbx
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x160835
callq 0x69d60
jmp 0x160835
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x160765
callq 0x69d60
jmp 0x160765
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1607f1
jmp 0x160835
jmp 0x160832
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1607a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1607a1
jmp 0x1607b5
movq %rax, %rbx
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x1607b8
callq 0x69d60
jmp 0x1607b8
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x1607ca
callq 0x69d60
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x1607dc
callq 0x69d60
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x160835
movq 0xb8(%rsp), %rsi
jmp 0x160828
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x160815
callq 0x69d60
jmp 0x160815
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x160835
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160835
movq %rax, %rbx
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x16085a
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::compute_encryption_O_U(char const*, char const*, int, int, int, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | void
QPDF::compute_encryption_O_U(
char const* user_password,
char const* owner_password,
int V,
int R,
int key_len,
int P,
bool encrypt_metadata,
std::string const& id1,
std::string& O,
std::string& U)
{
if (V >= 5) {
throw std::logic_error("compute_encryption_O_U called for file with V >= 5");
}
EncryptionData data(V, R, key_len, P, "", "", "", "", "", id1, encrypt_metadata);
data.setO(compute_O_value(user_password, owner_password, data));
O = data.getO();
data.setU(compute_U_value(user_password, data));
U = data.getU();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rsi, 0xc8(%rsp)
movq %rdi, 0xc0(%rsp)
cmpl $0x5, %edx
jge 0x160dc7
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r13d
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7237e(%rip), %rdx # 0x1d2c26
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x72361(%rip), %rdx # 0x1d2c26
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x72344(%rip), %rdx # 0x1d2c26
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x72324(%rip), %rdx # 0x1d2c26
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x72301(%rip), %rdx # 0x1d2c26
leaq 0x98(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x68bb0
movzbl 0x1f0(%rsp), %eax
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %r9
movl %r13d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
pushq %rax
pushq 0x200(%rsp)
pushq %r12
pushq %r14
leaq 0x50(%rsp), %rax
pushq %rax
leaq 0x38(%rsp), %rax
pushq %rax
callq 0x14c690
addq $0x30, %rsp
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x16099e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1609c0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1609dc
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1609f8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x160a14
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x78(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq 0xc0(%rsp), %rsi
callq 0x6e7c0
leaq 0x98(%rsp), %rdi
leaq 0xe(%rsp), %rdx
movq 0xc8(%rsp), %rsi
callq 0x6e7c0
leaq 0x78(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
callq 0x1626d6
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rbx
movl $0x20, %r14d
cmpq %r14, %rbx
cmovaeq %r14, %rbx
subq %rbx, %r14
leaq 0x50(%rsp), %rdi
movq %rbx, %rdx
callq 0x684e0
leaq (%rsp,%rbx), %rdi
addq $0x50, %rdi
leaq 0x73510(%rip), %rsi # 0x1d3fb0
movq %r14, %rdx
callq 0x684e0
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
movq %rax, (%rdi)
leaq 0xb8(%rsp), %rsi
movq $0x10, (%rsi)
xorl %edx, %edx
callq 0x6ba80
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, (%rax)
movq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%rcx)
movslq 0xe8(%rsp), %rbx
testq %rbx, %rbx
jns 0x160b0a
movl %ebx, %edi
callq 0x8808a
movq 0x18(%rsp), %rsi
subq %rsi, %rbx
jbe 0x160b26
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x6ae80
leaq 0x50(%rsp), %rdi
callq 0x6bb40
movl 0xe8(%rsp), %ecx
cmpl $0x3, 0xe4(%rsp)
movl $0x14, %edx
movl $0x1, %r8d
cmovgel %edx, %r8d
leaq 0xd0(%rsp), %rdx
movl $0x20, %esi
movq %rax, %rdi
xorl %r9d, %r9d
callq 0x162871
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
movq %rax, (%rdi)
leaq 0xb8(%rsp), %rsi
movq $0x20, (%rsi)
xorl %edx, %edx
callq 0x6ba80
movq %rax, 0x30(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x160bd6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xf0(%rsp), %rbx
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x6e940
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x160c07
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x160c2c
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x200(%rsp), %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x160c56
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6e940
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq 0xc0(%rsp), %rsi
callq 0x6e7c0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x160fcb
leaq 0x110(%rsp), %rbx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x6e940
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x160cc0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x208(%rsp), %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x160ce4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6e940
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160d10
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160d31
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160d52
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160d73
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160d94
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160db5
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x73602(%rip), %rsi # 0x1d43dd
movq %rax, %rdi
callq 0x6c820
movq 0xe81ce(%rip), %rsi # 0x248fb8
movq 0xe8137(%rip), %rdx # 0x248f28
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
movq %r14, %rdi
callq 0x6cf40
jmp 0x160fc3
jmp 0x160f4b
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x160e32
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160e32
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x160fb6
movq 0x20(%rsp), %rsi
jmp 0x160fae
jmp 0x160f46
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x160f6f
movq 0x40(%rsp), %rsi
jmp 0x160f62
jmp 0x160f4b
movq %rax, %rbx
jmp 0x160f94
jmp 0x160f46
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x160eb3
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160eb3
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x160eda
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160eda
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x160efb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160efb
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x160f1c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160f1c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x160fc3
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160fc3
movq %rax, %rbx
jmp 0x160fc3
movq %rax, %rbx
jmp 0x160fb6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x160f6f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x160f6f
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x160f94
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x160fb6
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xe0(%rsp), %rdi
callq 0x14c870
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::compute_encryption_parameters_V5(char const*, char const*, int, int, int, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | void
QPDF::compute_encryption_parameters_V5(
char const* user_password,
char const* owner_password,
int V,
int R,
int key_len,
int P,
bool encrypt_metadata,
std::string const& id1,
std::string& encryption_key,
std::string& O,
std::string& U,
std::string& OE,
std::string& UE,
std::string& Perms)
{
EncryptionData data(V, R, key_len, P, "", "", "", "", "", id1, encrypt_metadata);
unsigned char k[key_bytes];
QUtil::initializeWithRandomBytes(k, key_bytes);
encryption_key = std::string(reinterpret_cast<char*>(k), key_bytes);
compute_U_UE_value_V5(user_password, encryption_key, data, U, UE);
compute_O_OE_value_V5(owner_password, encryption_key, data, U, O, OE);
Perms = compute_Perms_value_V5(encryption_key, data);
data.setV5EncryptionParameters(O, OE, U, UE, Perms);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rbp
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7190c(%rip), %rdx # 0x1d2c26
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
movl %r14d, 0xdc(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x718e7(%rip), %rdx # 0x1d2c26
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
movq %rbx, 0x130(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x718bf(%rip), %rdx # 0x1d2c26
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x68bb0
movq %rbp, 0x138(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x71894(%rip), %rdx # 0x1d2c26
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x71871(%rip), %rdx # 0x1d2c26
leaq 0xb8(%rsp), %rbp
movq %rbp, %rdi
movq %rdx, %rsi
callq 0x68bb0
movq 0x278(%rsp), %rax
movzbl 0x270(%rsp), %ecx
movl %ecx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movq %rbp, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movq %r14, 0x8(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, (%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x70(%rsp), %r9
movl 0xdc(%rsp), %esi
movl %r13d, %edx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x14c690
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161440
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16145c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161481
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x16149d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x1614bf
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x140(%rsp), %rdi
movl $0x20, %esi
callq 0x6eff0
leaq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %r15
movq %r15, (%rdi)
leaq 0x50(%rsp), %rsi
movq $0x20, (%rsi)
xorl %edx, %edx
callq 0x6ba80
movq 0x280(%rsp), %rbp
leaq 0x70(%rsp), %r14
movq %rax, (%r14)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%r14)
movaps 0x140(%rsp), %xmm0
movaps 0x150(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax,%rcx)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6abd0
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x161552
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x100(%rsp), %rdi
leaq 0xb7(%rsp), %rdx
movq 0x138(%rsp), %rsi
callq 0x6e7c0
leaq 0x120(%rsp), %rdi
movl $0x10, %esi
callq 0x6eff0
leaq 0x70(%rsp), %rdx
leaq 0x80(%rsp), %rax
movq %rax, (%rdx)
movq 0x120(%rsp), %rax
movq 0x128(%rsp), %rcx
movq %rax, 0x10(%rdx)
movl $0x8, %eax
movq %rax, 0x8(%rdx)
xorl %esi, %esi
movb %sil, 0x18(%rdx)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movb %sil, 0x68(%rsp)
leaq 0xf0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb %sil, (%rbx)
leaq 0xb8(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0xe0(%rsp), %rcx
leaq 0x160(%rsp), %r8
callq 0x15b52a
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6bfe0
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x161648
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x16164e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x6bfe0
movq 0x290(%rsp), %r14
leaq 0xa0(%rsp), %r13
movq %r13, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1616b5
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x1616bd
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6abd0
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1616ff
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16171b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161740
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x16175d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rcx
leaq 0x40(%rsp), %r15
movq %r15, (%rcx)
movq $0x0, 0x8(%rcx)
movb $0x0, 0x10(%rcx)
leaq 0x90(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x160(%rsp), %r8
callq 0x15b52a
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1617af
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl $0x1, %edx
movq %rbp, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x15ba8d
movq 0x2a0(%rsp), %r12
leaq 0x30(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x6abd0
movq (%r15), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16180b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161830
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x16184c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16186e
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16188f
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xe0(%rsp), %rdi
leaq 0x120(%rsp), %rdx
movq 0x130(%rsp), %rsi
callq 0x6e7c0
leaq 0x100(%rsp), %rdi
movl $0x10, %esi
callq 0x6eff0
leaq 0x70(%rsp), %rdx
leaq 0x80(%rsp), %rax
movq %rax, (%rdx)
movq 0x100(%rsp), %rax
movq 0x108(%rsp), %rcx
movq %rax, 0x10(%rdx)
movl $0x8, %eax
movq %rax, 0x8(%rdx)
xorl %esi, %esi
movb %sil, 0x18(%rdx)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movb %sil, 0x68(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x160(%rsp), %r8
movq %r14, %rcx
callq 0x15b52a
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6bfe0
movq %r14, %r15
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movq %rbx, %r14
cmpq %rcx, %rdx
je 0x16196f
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x161975
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rbp, %rbx
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x6bfe0
movq 0x288(%rsp), %rdi
leaq 0xa0(%rsp), %rbp
movq %rbp, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1619df
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x1619e6
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rsi
callq 0x6abd0
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0x161a26
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movq %rbx, %r13
je 0x161a45
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161a6a
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x90(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x160(%rsp), %r8
movq %r15, %rcx
callq 0x15b52a
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl $0x1, %edx
movq %r13, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x15ba8d
movq 0x298(%rsp), %r13
leaq 0x30(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x6abd0
movq (%rbp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x161aec
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161b11
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x161b2d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x161b4f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x161b6c
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x160(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x15b10b
leaq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
movq %rax, (%rdi)
leaq 0x30(%rsp), %rsi
movq $0x10, (%rsi)
xorl %edx, %edx
callq 0x6ba80
leaq 0x70(%rsp), %rcx
movq %rax, (%rcx)
movq 0x30(%rsp), %rdx
movq %rdx, 0x10(%rcx)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rax)
movq %rdx, 0x8(%rcx)
movq (%rcx), %rax
movb $0x0, (%rax,%rdx)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x15ba8d
movq 0x2a8(%rsp), %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x161c17
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x50(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6abd0
movq (%rbp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x161c42
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x160(%rsp), %rdi
movq 0x288(%rsp), %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x15a6ec
leaq 0x220(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161c84
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x200(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161ca5
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161cc6
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161ce7
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161d08
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161d29
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x162031
movq 0x80(%rsp), %rsi
jmp 0x161f53
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161dd9
movq 0xa0(%rsp), %rsi
jmp 0x161dc9
jmp 0x161dd6
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x161dac
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161dac
movq %rbx, %r14
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161dd9
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161dd9
movq %rbx, %r14
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x161df5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x161e1f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161e1f
movq %rbx, %r14
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x162031
movq 0xf0(%rsp), %rsi
jmp 0x161f53
jmp 0x16202e
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161ef3
movq 0xa0(%rsp), %rsi
jmp 0x161eeb
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x161ef3
movq 0x40(%rsp), %rsi
jmp 0x161eeb
movq %rbx, %r14
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x161ea9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161ea9
movq %rbx, %r14
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161ed6
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161ed6
movq %rbx, %r14
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x161ef3
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x161f0f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x161f36
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161f36
movq %rax, %rbx
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x162031
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x162031
jmp 0x16202e
jmp 0x16202e
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x161f97
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161f97
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x161fb8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161fb8
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x161fe2
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x161fe2
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x162003
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x162003
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16203e
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16203e
movq %rax, %rbx
jmp 0x16203e
jmp 0x16202e
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x14c870
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::isEncrypted(int&, int&, int&, QPDF::encryption_method_e&, QPDF::encryption_method_e&, QPDF::encryption_method_e&) | static void
iterate_md5_digest(MD5& md5, MD5::Digest& digest, int iterations, int key_len)
{
md5.digest(digest);
for (int i = 0; i < iterations; ++i) {
MD5 m;
m.encodeDataIncrementally(reinterpret_cast<char*>(digest), QIntC::to_size(key_len));
m.digest(digest);
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq (%rdi), %rax
movq 0x108(%rax), %rax
movb (%rax), %bl
cmpb $0x1, %bl
jne 0x1622c4
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r13
movq %r8, 0x38(%rsp)
movq %r9, 0x40(%rsp)
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x6e7e0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7030f(%rip), %rsi # 0x1d2422
leaq 0x70310(%rip), %rdx # 0x1d242a
leaq 0x8(%rsp), %rdi
callq 0x68bb0
leaq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6ba70
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x16214f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x6f26a(%rip), %rsi # 0x1d13c8
leaq 0x6f265(%rip), %rdx # 0x1d13ca
callq 0x68bb0
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6ba70
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x162195
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x6f231(%rip), %rsi # 0x1d13d5
leaq 0x6f22c(%rip), %rdx # 0x1d13d7
callq 0x68bb0
leaq 0x58(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6ba70
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1621db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x56e7a(%rip), %rsi # 0x1b9064
leaq 0x56e75(%rip), %rdx # 0x1b9066
callq 0x68bb0
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6ba70
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x162221
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x68(%rsp), %rdi
callq 0x6db80
movq 0x40(%rsp), %r15
movl %eax, (%r14)
leaq 0x58(%rsp), %rdi
callq 0x6bdf0
movl %eax, (%rbp)
leaq 0x48(%rsp), %rdi
callq 0x6bdf0
movq 0xc0(%rsp), %rcx
movl %eax, (%r12)
movq (%r13), %rax
movq 0x108(%rax), %rax
movl 0x40(%rax), %edx
movq 0x38(%rsp), %rsi
movl %edx, (%rsi)
movl 0x44(%rax), %edx
movl %edx, (%r15)
movl 0x48(%rax), %eax
movl %eax, (%rcx)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x162285
callq 0x69d60
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x162294
callq 0x69d60
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1622a3
callq 0x69d60
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1622b2
callq 0x69d60
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1622c4
callq 0x69d60
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x162372
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x162372
movq %rax, %rbx
jmp 0x162372
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x162381
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x162381
movq %rax, %rbx
jmp 0x162381
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x162390
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x162390
movq %rax, %rbx
jmp 0x162390
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x16239f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16239f
movq %rax, %rbx
jmp 0x16239f
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x162372
callq 0x69d60
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x162381
callq 0x69d60
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x162390
callq 0x69d60
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x16239f
callq 0x69d60
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1623b1
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::allowExtractAll() | bool
QPDF::allowExtractAll()
{
int R = 0;
int P = 0;
bool status = true;
if (isEncrypted(R, P)) {
status = is_bit_set(P, 5);
}
return status;
} | pushq %rbx
subq $0x20, %rsp
xorl %eax, %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %rbx, %rdx
callq 0x6d3b0
movl (%rbx), %ecx
andl $0x10, %ecx
shrl $0x4, %ecx
xorb $0x1, %al
orb %cl, %al
addq $0x20, %rsp
popq %rbx
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::allowPrintLowRes() | bool
QPDF::allowPrintLowRes()
{
int R = 0;
int P = 0;
bool status = true;
if (isEncrypted(R, P)) {
status = is_bit_set(P, 3);
}
return status;
} | pushq %rbx
subq $0x20, %rsp
xorl %eax, %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %rbx, %rdx
callq 0x6d3b0
movl (%rbx), %ecx
andl $0x4, %ecx
shrl $0x2, %ecx
xorb $0x1, %al
orb %cl, %al
addq $0x20, %rsp
popq %rbx
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::allowPrintHighRes() | bool
QPDF::allowPrintHighRes()
{
int R = 0;
int P = 0;
bool status = true;
if (isEncrypted(R, P)) {
status = is_bit_set(P, 3);
if ((R >= 3) && (!is_bit_set(P, 12))) {
status = false;
}
}
return status;
} | subq $0x28, %rsp
xorl %eax, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x10(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x1c(%rsp), %r9
callq 0x6d3b0
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x16251c
movl 0x10(%rsp), %eax
cmpl $0x3, 0x14(%rsp)
jl 0x162516
notl %eax
testl $0x804, %eax # imm = 0x804
sete %al
jmp 0x16251c
andl $0x4, %eax
shrl $0x2, %eax
addq $0x28, %rsp
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::allowModifyForm() | bool
QPDF::allowModifyForm()
{
int R = 0;
int P = 0;
bool status = true;
if (isEncrypted(R, P)) {
if (R < 3) {
status = is_bit_set(P, 6);
} else {
status = is_bit_set(P, 9);
}
}
return status;
} | subq $0x28, %rsp
xorl %eax, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x10(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x1c(%rsp), %r9
callq 0x6d3b0
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x1625cc
cmpl $0x2, 0x14(%rsp)
movl 0x10(%rsp), %eax
jg 0x1625c6
andl $0x20, %eax
shrl $0x5, %eax
jmp 0x1625cc
shrl $0x8, %eax
andl $0x1, %eax
addq $0x28, %rsp
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
QPDF::allowModifyOther() | bool
QPDF::allowModifyOther()
{
int R = 0;
int P = 0;
bool status = true;
if (isEncrypted(R, P)) {
status = is_bit_set(P, 4);
}
return status;
} | pushq %rbx
subq $0x20, %rsp
xorl %eax, %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %rbx, %rdx
callq 0x6d3b0
movl (%rbx), %ecx
andl $0x8, %ecx
shrl $0x3, %ecx
xorb $0x1, %al
orb %cl, %al
addq $0x20, %rsp
popq %rbx
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
compute_O_rc4_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDF::EncryptionData const&, unsigned char*) | static void
compute_O_rc4_key(
std::string const& user_password,
std::string const& owner_password,
QPDF::EncryptionData const& data,
unsigned char key[OU_key_bytes_V4])
{
if (data.getV() >= 5) {
throw std::logic_error("compute_O_rc4_key called for file with V >= 5");
}
std::string password = owner_password;
if (password.empty()) {
password = user_password;
}
MD5 md5;
md5.encodeDataIncrementally(pad_or_truncate_password_V4(password).c_str(), key_bytes);
MD5::Digest digest;
int key_len = std::min(QIntC::to_int(sizeof(digest)), data.getLengthBytes());
iterate_md5_digest(md5, digest, ((data.getR() >= 3) ? 50 : 0), key_len);
memcpy(key, digest, OU_key_bytes_V4);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
cmpl $0x5, (%rdx)
jge 0x1627d8
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x68320
cmpq $0x0, 0x8(%r12)
jne 0x16272d
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x6e940
movq %rsp, %rdi
callq 0x7f280
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x15abd8
movq 0x10(%rsp), %rsi
movq %rsp, %rdi
movl $0x20, %edx
callq 0x7f368
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x162771
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movl 0x8(%r14), %eax
cmpl $0x10, %eax
movl $0x10, %ecx
cmovll %eax, %ecx
xorl %eax, %eax
cmpl $0x3, 0x4(%r14)
movl $0x32, %edx
cmovll %eax, %edx
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x15ac7b
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1627b3
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1627ca
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x71d0d(%rip), %rsi # 0x1d44f9
movq %rax, %rdi
callq 0x6c820
movq 0xe67bd(%rip), %rsi # 0x248fb8
movq 0xe6726(%rip), %rdx # 0x248f28
movq %r14, %rdi
callq 0x6b420
jmp 0x16284f
movq %rax, %rbx
movq %r14, %rdi
callq 0x6cf40
jmp 0x162869
jmp 0x16283b
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16283e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16283e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x162852
callq 0x69d60
jmp 0x162852
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x162869
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
iterate_rc4(unsigned char*, unsigned long, unsigned char*, int, int, bool) | static void
iterate_rc4(
unsigned char* data,
size_t data_len,
unsigned char* okey,
int key_len,
int iterations,
bool reverse)
{
auto key_ph = std::make_unique<unsigned char[]>(QIntC::to_size(key_len));
unsigned char* key = key_ph.get();
for (int i = 0; i < iterations; ++i) {
int const xor_value = (reverse ? iterations - 1 - i : i);
for (int j = 0; j < key_len; ++j) {
key[j] = static_cast<unsigned char>(okey[j] ^ xor_value);
}
RC4 rc4(key, QIntC::to_int(key_len));
rc4.process(data, data_len, data);
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, %r14d
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
testl %ecx, %ecx
jns 0x1628a1
movl %ebx, %edi
callq 0x8808a
movl %ebx, 0xc(%rsp)
movslq %ebx, %r15
movq %r15, %rdi
callq 0x6a650
movq %rax, %rbx
xorl %r13d, %r13d
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x69950
movl %r14d, 0x10(%rsp)
testl %r14d, %r14d
jle 0x162946
movl 0xc(%rsp), %r14d
leaq 0x28(%rsp), %rbp
cmpl $0x0, 0xc(%rsp)
jle 0x162903
movl %r13d, %eax
notl %eax
addl 0x10(%rsp), %eax
cmpb $0x0, 0x14(%rsp)
cmovel %r13d, %eax
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
xorb %al, %dl
movb %dl, (%rbx,%rcx)
incq %rcx
cmpq %rcx, %r14
jne 0x1628f2
movq %rbp, %rdi
movq %rbx, %rsi
movl 0xc(%rsp), %edx
callq 0x1a0d30
movq %rbp, %r15
movq %rbp, %rdi
movq 0x18(%rsp), %rcx
movq %rcx, %rsi
movq 0x20(%rsp), %rdx
callq 0x1a0d6e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x162939
callq 0x69d60
incl %r13d
cmpl 0x10(%rsp), %r13d
movq %r15, %rbp
jne 0x1628d7
movq %rbx, %rdi
callq 0x69e90
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x162974
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x162974
callq 0x69d60
movq %rbx, %rdi
callq 0x69e90
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_encryption.cc |
is_obj_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, int&) | static bool
is_obj_key(std::string const& v, int& obj, int& gen)
{
if (v.substr(0, 4) != "obj:") {
return false;
}
return is_indirect_object(v.substr(4), obj, gen);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movl $0x4, %ecx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x6dc40
leaq 0x59465(%rip), %rsi # 0x1bd809
movq %r12, %rdi
callq 0x6d210
movl %eax, %ebp
movq (%r12), %rdi
leaq 0x18(%rsp), %r13
cmpq %r13, %rdi
je 0x1643c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
testl %ebp, %ebp
je 0x1643d1
xorl %ebx, %ebx
jmp 0x164414
leaq 0x8(%rsp), %r12
movl $0x4, %edx
movq %r12, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x6dc40
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1641f7
movl %eax, %ebx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x164414
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x16443f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
is_unicode_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | static bool
is_unicode_string(std::string const& v, std::string& str)
{
if (v.substr(0, 2) == "u:") {
str = v.substr(2);
return true;
}
return false;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x2, %ecx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6dc40
leaq 0x6fb0c(%rip), %rsi # 0x1d3f81
movq %r15, %rdi
callq 0x6d210
movl %eax, %ebp
movq (%r15), %rdi
leaq 0x10(%rsp), %r12
cmpq %r12, %rdi
je 0x164499
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testl %ebp, %ebp
jne 0x1644d7
movq %rsp, %r15
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x6dc40
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6abd0
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x1644d7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testl %ebp, %ebp
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
is_binary_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | static bool
is_binary_string(std::string const& v, std::string& str)
{
if (v.substr(0, 2) == "b:") {
str = v.substr(2);
int count = 0;
for (char c: str) {
if (!util::is_hex_digit(c)) {
return false;
}
++count;
}
return (count % 2 == 0);
}
return false;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x2, %ecx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6dc40
leaq 0x6fa6e(%rip), %rsi # 0x1d3f85
movq %r15, %rdi
callq 0x6d210
movl %eax, %ebp
movq (%r15), %rdi
leaq 0x10(%rsp), %r12
cmpq %r12, %rdi
je 0x16453b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testl %ebp, %ebp
je 0x164546
xorl %eax, %eax
jmp 0x1645ee
movq %rsp, %r15
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x6dc40
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6abd0
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x164580
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
sete %al
je 0x1645ee
movq (%rbx), %rdx
xorl %esi, %esi
movl $0x10, %r8d
xorl %edi, %edi
movb (%rdx,%rsi), %r10b
leal -0x30(%r10), %r9d
cmpb $0xa, %r9b
jb 0x1645c6
cmpb $0x61, %r10b
jl 0x1645b6
addb $-0x57, %r10b
movl %r10d, %r9d
jmp 0x1645c6
leal -0x37(%r10), %r9d
cmpb $0x41, %r10b
movzbl %r9b, %r9d
cmovll %r8d, %r9d
xorl %r10d, %r10d
cmpb $0x10, %r9b
setl %r10b
addl %r10d, %edi
cmpb $0x10, %r9b
jge 0x1645e5
incq %rsi
cmpq %rsi, %rcx
sete %al
jne 0x164599
testb $0x1, %dil
sete %cl
andb %cl, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::JSONReactor::error(long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void
QPDF::JSONReactor::error(qpdf_offset_t offset, std::string const& msg)
{
errors = true;
std::string object = this->cur_object;
if (is->getName() != pdf.getFilename()) {
object += " from " + is->getName();
}
pdf.warn(qpdf_e_json, object, offset, msg);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x1, 0x38(%rdi)
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x40(%rdi), %rsi
movq 0x48(%rdi), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x68320
movq 0x10(%r15), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, %r12
movq 0x8(%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6d810
movq 0x8(%r12), %rdx
movb $0x1, %bpl
cmpq 0x10(%rsp), %rdx
jne 0x16467c
testq %rdx, %rdx
je 0x16467a
movq 0x8(%rsp), %rsi
movq (%r12), %rdi
callq 0x6bbe0
testl %eax, %eax
setne %bpl
jmp 0x16467c
xorl %ebp, %ebp
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x164698
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x1646e6
movq 0x10(%r15), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x5b6ff(%rip), %rsi # 0x1bfdad
leaq 0x8(%rsp), %rdi
movq %rax, %rdx
callq 0x6c310
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x6bfe0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1646e6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%r15), %rdi
leaq 0x28(%rsp), %rdx
movl $0x8, %esi
movq %r14, %rcx
movq %rbx, %r8
callq 0x6bf00
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x164716
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x164748
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x164748
jmp 0x164745
jmp 0x164745
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x16475f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::JSONReactor::makeObject(JSON const&) | QPDFObjectHandle
QPDF::JSONReactor::makeObject(JSON const& value)
{
QPDFObjectHandle result;
std::string str_v;
bool bool_v = false;
if (value.isDictionary()) {
result = QPDFObjectHandle::newDictionary();
next_obj = result;
next_state = st_object;
} else if (value.isArray()) {
result = QPDFObjectHandle::newArray();
next_obj = result;
next_state = st_object;
} else if (value.isNull()) {
result = QPDFObjectHandle::newNull();
} else if (value.getBool(bool_v)) {
result = QPDFObjectHandle::newBool(bool_v);
} else if (value.getNumber(str_v)) {
if (QUtil::is_long_long(str_v.c_str())) {
result = QPDFObjectHandle::newInteger(QUtil::string_to_ll(str_v.c_str()));
} else {
// JSON allows scientific notation, but PDF does not.
if (str_v.find('e') != std::string::npos || str_v.find('E') != std::string::npos) {
try {
auto v = std::stod(str_v);
str_v = QUtil::double_to_string(v);
} catch (std::exception&) {
// Keep it as it was
}
}
result = QPDFObjectHandle::newReal(str_v);
}
} else if (value.getString(str_v)) {
int obj = 0;
int gen = 0;
std::string str;
if (is_indirect_object(str_v, obj, gen)) {
result = pdf.getObjectForJSON(obj, gen);
} else if (is_unicode_string(str_v, str)) {
result = QPDFObjectHandle::newUnicodeString(str);
} else if (is_binary_string(str_v, str)) {
result = QPDFObjectHandle::newString(QUtil::hex_decode(str));
} else if (is_name(str_v)) {
result = QPDFObjectHandle::newName(str_v);
} else if (is_pdf_name(str_v)) {
result = QPDFObjectHandle::parse(str_v.substr(2));
} else {
QTC::TC("qpdf", "QPDF_json unrecognized string value");
error(value.getStart(), "unrecognized string value");
result = QPDFObjectHandle::newNull();
}
}
if (!result) {
throw std::logic_error("JSONReactor::makeObject didn't initialize the object");
}
if (!result.hasObjectDescription()) {
setObjectDescription(result, value);
}
return result;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
xorl %eax, %eax
movb %al, (%r13)
movb %al, 0xf(%rsp)
movq %rdx, %rdi
callq 0x6c430
testb %al, %al
je 0x1663cd
leaq 0x30(%rsp), %rdi
callq 0x69300
jmp 0x1663e7
movq %r14, %rdi
callq 0x6e9b0
testb %al, %al
je 0x16648c
leaq 0x30(%rsp), %rdi
callq 0x6a890
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x166405
callq 0x69d60
leaq 0x8(%rbx), %r12
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x166418
callq 0x69d60
movq (%rbx), %rax
movq %rax, 0x80(%r15)
leaq 0x88(%r15), %rdi
movq %r12, %rsi
callq 0x6c300
movl $0x7, 0x90(%r15)
cmpq $0x0, (%rbx)
je 0x16687a
movq %rbx, %rdi
callq 0x6b610
testb %al, %al
jne 0x166460
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x164d98
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x166477
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x6a4a0
testb %al, %al
je 0x1664a4
leaq 0x30(%rsp), %rdi
callq 0x6b240
jmp 0x1664c4
leaq 0xf(%rsp), %rsi
movq %r14, %rdi
callq 0x6bc30
testb %al, %al
je 0x1664fa
movzbl 0xf(%rsp), %esi
leaq 0x30(%rsp), %rdi
callq 0x6e970
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x1664e2
callq 0x69d60
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x16643c
callq 0x69d60
jmp 0x16643c
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x6aa70
testb %al, %al
je 0x166536
movq 0x58(%rsp), %rdi
callq 0x6f070
testb %al, %al
je 0x16659d
movq 0x58(%rsp), %rdi
callq 0x6a510
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x6a820
jmp 0x1664c4
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x6e7b0
testb %al, %al
je 0x16643c
xorl %eax, %eax
leaq 0x7c(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x78(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x58(%rsp), %rdi
callq 0x1641f7
testb %al, %al
je 0x166629
movq 0x8(%r15), %rsi
movl 0x7c(%rsp), %edx
movl 0x78(%rsp), %ecx
leaq 0x10(%rsp), %rdi
callq 0x18804e
jmp 0x16664b
leaq 0x58(%rsp), %rdi
movl $0x65, %esi
xorl %edx, %edx
callq 0x6e3b0
cmpq $-0x1, %rax
jne 0x1665cb
leaq 0x58(%rsp), %rdi
movl $0x45, %esi
xorl %edx, %edx
callq 0x6e3b0
cmpq $-0x1, %rax
je 0x166615
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x6a950
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x6d4a0
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %r12
movq %r12, %rsi
callq 0x6abd0
movq (%r12), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x166615
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6a3d0
jmp 0x1664c4
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x164447
testb %al, %al
je 0x166698
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6e2a0
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x166669
callq 0x69d60
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x166678
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16643c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16643c
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1644e9
testb %al, %al
je 0x16670b
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6ac20
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x69060
movaps 0x80(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x80(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x1666f0
callq 0x69d60
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x1667ef
callq 0x69d60
jmp 0x1667ef
cmpq $0x2, 0x60(%rsp)
jb 0x166731
movq 0x58(%rsp), %rax
cmpb $0x2f, (%rax)
jne 0x166731
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6da40
jmp 0x16664b
leaq 0x58(%rsp), %rdi
callq 0x166a35
testb %al, %al
je 0x166813
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x6dc40
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6c4b4(%rip), %rdx # 0x1d2c26
leaq 0x80(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0xa0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x6e4e0
movaps 0xa0(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0xa0(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x1667c0
callq 0x69d60
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x1667d2
callq 0x69d60
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x1667ef
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x166678
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x166678
movq %r14, %rdi
callq 0x6edf0
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6e698(%rip), %rsi # 0x1d4ec6
leaq 0x6e6aa(%rip), %rdx # 0x1d4edf
leaq 0x10(%rsp), %rdi
callq 0x68bb0
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1645fc
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x16686b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x10(%rsp), %rdi
callq 0x6b240
jmp 0x16664b
movl $0x10, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x6e652(%rip), %rsi # 0x1d4ee0
movq %rax, %rdi
callq 0x6c820
movq 0xe271b(%rip), %rsi # 0x248fb8
movq 0xe2684(%rip), %rdx # 0x248f28
movq %r14, %rdi
callq 0x6b420
jmp 0x166938
jmp 0x166938
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
jmp 0x1668fc
movq %rax, (%rsp)
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x1668f3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1668f3
jmp 0x166938
jmp 0x1668ef
jmp 0x166938
movq %rax, (%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16693c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16693c
jmp 0x166938
jmp 0x166938
jmp 0x166938
jmp 0x166918
movq %rax, (%rsp)
cmpl $0x1, %edx
jne 0x166971
movq (%rsp), %rdi
callq 0x683f0
callq 0x6c2d0
jmp 0x166615
jmp 0x16696d
jmp 0x16696d
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x166971
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x166971
jmp 0x16696d
jmp 0x16696d
jmp 0x16696d
jmp 0x16696d
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x6cf40
jmp 0x166971
jmp 0x16696d
movq %rax, (%rsp)
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x166988
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x166996
callq 0x69d60
movq (%rsp), %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::importJSON(std::shared_ptr<InputSource>, bool) | void
QPDF::importJSON(std::shared_ptr<InputSource> is, bool must_be_complete)
{
JSONReactor reactor(*this, is, must_be_complete);
try {
JSON::parse(*is, &reactor);
} catch (std::runtime_error& e) {
throw std::runtime_error(is->getName() + ": " + e.what());
}
if (reactor.anyErrors()) {
throw std::runtime_error(is->getName() + ": errors found in JSON");
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r15
movq %rdi, %rsi
movq (%r15), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x166e0e
movq 0xe1fe0(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x166e0a
incl 0x8(%rax)
jmp 0x166e0e
lock
incl 0x8(%rax)
movzbl %dl, %ecx
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x168104
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x166e2f
callq 0x69d60
movq (%r15), %rsi
leaq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x69040
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x166e50
callq 0x69d60
cmpb $0x0, 0x98(%rsp)
jne 0x166e72
leaq 0x60(%rsp), %rdi
callq 0x168310
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x6e086(%rip), %rdx # 0x1d4f15
movq %rsp, %rdi
movq %rax, %rsi
callq 0x6e300
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x695f0
xorl %ebp, %ebp
movq 0xe1fef(%rip), %rsi # 0x248ea0
movq 0xe1f10(%rip), %rdx # 0x248dc8
movq %rbx, %rdi
callq 0x6b420
jmp 0x166fc2
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x166eeb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x166eeb
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x167018
movq %rbx, %rdi
callq 0x6cf40
jmp 0x167018
movq %rax, %r14
cmpl $0x1, %edx
jne 0x167018
movq %r14, %rdi
callq 0x683f0
movq %rax, %r14
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x6e0c2(%rip), %rdx # 0x1d4ff7
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x6e300
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x6b8d0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x166f79
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x166f85
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x695f0
xorl %ebp, %ebp
movq 0xe1eed(%rip), %rsi # 0x248ea0
movq 0xe1e0e(%rip), %rdx # 0x248dc8
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x166fe3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x166fe3
movq %rax, %r14
movb $0x1, %bpl
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x167006
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x167006
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x167013
movq %rbx, %rdi
callq 0x6cf40
callq 0x6c2d0
leaq 0x60(%rsp), %rdi
callq 0x168310
jmp 0x16703e
movq %rax, %rdi
callq 0x7cc8d
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x16703e
callq 0x69d60
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::updateFromJSON(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void
QPDF::updateFromJSON(std::string const& json_file)
{
updateFromJSON(std::make_shared<FileInputSource>(json_file.c_str()));
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq (%rsi), %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x6b6e0
movq (%r15), %rax
movq 0x8(%r15), %rbx
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq %r14, %rdi
callq 0x6bf10
testq %rbx, %rbx
je 0x1670ab
movq %rbx, %rdi
callq 0x69d60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1670ba
callq 0x69d60
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
testq %rbx, %rbx
je 0x1670d4
movq %rbx, %rdi
callq 0x69d60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1670e3
callq 0x69d60
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
writeJSONStreamFile(int, JSON::Writer&, qpdf::Stream&, int, qpdf_stream_decode_level_e, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void
writeJSONStreamFile(
int version,
JSON::Writer& jw,
qpdf::Stream& stream,
int id,
qpdf_stream_decode_level_e decode_level,
std::string const& file_prefix)
{
auto filename = file_prefix + "-" + std::to_string(id);
auto* f = QUtil::safe_fopen(filename.c_str(), "wb");
Pl_StdioFile f_pl{"stream data", f};
stream.writeStreamJSON(version, jw, qpdf_sj_file, decode_level, &f_pl, filename);
f_pl.finish();
fclose(f);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, 0xc(%rsp)
movl %ecx, %r12d
movq %rdx, 0x88(%rsp)
movq %rsi, 0x90(%rsp)
movl %edi, %ebp
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x68320
leaq 0x5259b(%rip), %rsi # 0x1b9742
movq %rbx, %rdi
callq 0x6b8d0
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x167209
movl $0x4, %ebx
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %r13d, %ecx
cmpl $0x63, %ecx
jbe 0x167202
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x167207
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x167209
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x1671d1
addl $-0x3, %ebx
jmp 0x167209
addl $-0x2, %ebx
jmp 0x167209
decl %ebx
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r12d, %edi
addq 0x30(%rsp), %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x6c7a0
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x16725d
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x167278
movl $0xf, %esi
cmpq %r15, 0x30(%rsp)
je 0x167273
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x167289
movq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6bfe0
jmp 0x167297
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1672bb
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1672c1
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1672f5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x16730c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x10(%rsp), %rdi
leaq 0x6ba7d(%rip), %rsi # 0x1d2d95
callq 0x6c400
movq %rax, %rbx
leaq 0x6497f(%rip), %rsi # 0x1cbca6
leaq 0x50(%rsp), %rdi
movq %rax, %rdx
callq 0x685d0
leaq 0x10(%rsp), %rax
leaq 0x50(%rsp), %r9
movq 0x88(%rsp), %rdi
movl %ebp, %esi
movq 0x90(%rsp), %rdx
movl $0x2, %ecx
movl 0xc(%rsp), %r8d
pushq $0x0
pushq %rax
callq 0x1541da
addq $0x10, %rsp
leaq 0x50(%rsp), %rdi
callq 0x6e680
movq %rbx, %rdi
callq 0x6a2b0
leaq 0x50(%rsp), %rdi
callq 0x6d820
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16739d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1673b1
movq %rax, %rbx
jmp 0x1673f5
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x1673d7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1673d7
jmp 0x1673d4
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x167410
movq 0x60(%rsp), %rsi
jmp 0x167408
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x6d820
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x167410
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::writeJSON(int, Pipeline*, bool, bool&, qpdf_stream_decode_level_e, qpdf_json_stream_data_e, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>) | void
QPDF::writeJSON(
int version,
Pipeline* p,
bool complete,
bool& first_key,
qpdf_stream_decode_level_e decode_level,
qpdf_json_stream_data_e json_stream_data,
std::string const& file_prefix,
std::set<std::string> wanted_objects)
{
if (version != 2) {
throw std::runtime_error("QPDF::writeJSON: only version 2 is supported");
}
JSON::Writer jw{p, 4};
if (complete) {
jw << "{";
} else if (!first_key) {
jw << ",";
}
first_key = false;
/* clang-format off */
jw << "\n"
" \"qpdf\": [\n"
" {\n"
" \"jsonversion\": " << std::to_string(version) << ",\n"
" \"pdfversion\": \"" << getPDFVersion() << "\",\n"
" \"pushedinheritedpageresources\": " << (everPushedInheritedAttributesToPages() ? "true" : "false") << ",\n"
" \"calledgetallpages\": " << (everCalledGetAllPages() ? "true" : "false") << ",\n"
" \"maxobjectid\": " << std::to_string(getObjectCount()) << "\n"
" },\n"
" {";
/* clang-format on */
bool all_objects = wanted_objects.empty();
bool first = true;
for (auto& obj: getAllObjects()) {
auto const og = obj.getObjGen();
std::string key = "obj:" + og.unparse(' ') + " R";
if (all_objects || wanted_objects.count(key)) {
if (first) {
jw << "\n \"" << key;
first = false;
} else {
jw << "\n },\n \"" << key;
}
if (auto stream = obj.as_stream()) {
jw << "\": {\n \"stream\": ";
if (json_stream_data == qpdf_sj_file) {
writeJSONStreamFile(
version, jw, stream, og.getObj(), decode_level, file_prefix);
} else {
stream.writeStreamJSON(
version, jw, json_stream_data, decode_level, nullptr, "");
}
} else {
jw << "\": {\n \"value\": ";
obj.writeJSON(version, jw, true);
}
}
}
if (all_objects || wanted_objects.count("trailer")) {
if (!first) {
jw << "\n },";
}
jw << "\n \"trailer\": {\n \"value\": ";
getTrailer().writeJSON(version, jw, true);
first = false;
}
if (!first) {
jw << "\n }";
}
/* clang-format off */
jw << "\n"
" }\n"
" ]";
/* clang-format on */
if (complete) {
jw << "\n}\n";
p->finish();
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r9d, 0x8c(%rsp)
cmpl $0x2, %esi
jne 0x167c4e
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %r13
movq %rdx, 0x8(%rsp)
movb $0x1, 0x10(%rsp)
movq $0x8, 0x18(%rsp)
testb %bpl, %bpl
je 0x1674fc
leaq 0x6db0c(%rip), %rsi # 0x1d5006
jmp 0x167508
cmpb $0x0, (%rbx)
jne 0x167517
leaq 0x4e790(%rip), %rsi # 0x1b5c98
movq (%r12), %rax
movl $0x1, %edx
movq %r12, %rdi
callq *0x10(%rax)
movb $0x0, (%rbx)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6da30(%rip), %rsi # 0x1d4f59
movl $0x28, %edx
callq *0x10(%rax)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rbx
movl $0x1, %esi
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x6b1f0
movq (%rbx), %rax
movb $0x32, (%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6da0a(%rip), %rsi # 0x1d4f82
movl $0x17, %edx
callq *0x10(%rax)
leaq 0x68(%rsp), %rdi
movq %r13, %rsi
callq 0x6d3c0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d9e9(%rip), %rsi # 0x1d4f9a
movl $0x29, %edx
callq *0x10(%rax)
movq %r13, %rdi
callq 0x6d1b0
leaq 0x68975(%rip), %r14 # 0x1cff3d
leaq 0x69311(%rip), %rbx # 0x1d08e0
testb %al, %al
movq %rbx, %rsi
cmovneq %r14, %rsi
movzbl %al, %edx
xorq $0x5, %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d9cb(%rip), %rsi # 0x1d4fc4
movl $0x1d, %edx
callq *0x10(%rax)
movq %r13, %rdi
callq 0x6e820
testb %al, %al
cmovneq %r14, %rbx
movzbl %al, %edx
xorq $0x5, %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d9af(%rip), %rsi # 0x1d4fe2
movl $0x17, %edx
callq *0x10(%rax)
movq %r13, %rdi
callq 0x6a2f0
movq %rax, %rbx
movl $0x1, %esi
cmpq $0xa, %rax
jb 0x1676a0
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x167699
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x16769e
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x1676a0
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x167663
addl $-0x3, %esi
jmp 0x1676a0
addl $-0x2, %esi
jmp 0x1676a0
decl %esi
movl %esi, %esi
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x40(%rsp), %rdi
xorl %edx, %edx
callq 0x6b1f0
movq 0x40(%rsp), %rdi
movl 0x48(%rsp), %esi
movq %rbx, %rdx
callq 0x6bea0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d90e(%rip), %rsi # 0x1d4ffa
movl $0xd, %edx
callq *0x10(%rax)
movl %ebp, 0x9c(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x167717
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x78(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x167732
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r12, 0xa8(%rsp)
movq 0x120(%rsp), %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x16775e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x28(%rbx), %rax
movq %rax, 0x90(%rsp)
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movq %r13, 0xb0(%rsp)
movq %r13, %rsi
callq 0x6c9b0
movq (%rbx), %rbp
movq 0x8(%rbx), %r13
movb $0x1, %bl
cmpq %r13, %rbp
je 0x167adc
movq 0x120(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xb8(%rsp)
movb $0x1, %bl
leaq 0x40(%rsp), %r14
movq %rbp, %rdi
callq 0x6ef20
movq %rax, 0xa0(%rsp)
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
movl $0x20, %edx
callq 0x9401a
movl $0x4, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x5601e(%rip), %rcx # 0x1bd809
callq 0x68b10
movq %r15, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x167813
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x16781a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x6ceaf(%rip), %rsi # 0x1d46ed
callq 0x6b8d0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16786b
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x167871
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x1678a0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1678bc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
cmpq $0x0, 0x90(%rsp)
je 0x1678e7
movq 0x120(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6b5a0
cmpq 0xb8(%rsp), %rax
je 0x167aa8
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
testb $0x1, %bl
je 0x16791f
movl $0x8, %edx
leaq 0x6d70d(%rip), %rsi # 0x1d5011
callq *%rax
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
xorl %ebx, %ebx
jmp 0x167942
movl $0x11, %edx
leaq 0x6d6dd(%rip), %rsi # 0x1d5008
callq *%rax
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x16796b
movzbl 0x30(%rdi), %eax
cmpl $0xf, %eax
je 0x16796f
cmpl $0xd, %eax
jne 0x16797d
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rsi
movq %rax, %rdi
callq 0x182b0a
jmp 0x167974
xorl %eax, %eax
jmp 0x167980
callq 0x94a87
movq (%rax), %rax
movsbl 0x30(%rax), %eax
jmp 0x167980
movsbl %al, %eax
cmpl $0xa, %eax
jne 0x1679b1
movq (%rbp), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%rbp), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x1679b9
movq 0xe143d(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x167ad3
incl 0x8(%rax)
jmp 0x1679b9
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
je 0x167a13
movl $0x17, %edx
leaq 0x6d641(%rip), %rsi # 0x1d501a
callq *%rax
cmpl $0x2, 0x110(%rsp)
jne 0x167a3a
movl 0xa0(%rsp), %ecx
movl $0x2, %edi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movl 0x8c(%rsp), %r8d
movq 0x118(%rsp), %r9
callq 0x167155
jmp 0x167a99
movl $0x16, %edx
leaq 0x6d62c(%rip), %rsi # 0x1d504b
callq *%rax
movq %rbp, %rdi
movl $0x2, %esi
leaq 0x8(%rsp), %rdx
movl $0x1, %ecx
callq 0x117dee
jmp 0x167a99
movq %r15, 0x68(%rsp)
leaq 0x68(%rsp), %r12
movq %r12, %rdi
leaq 0x6b1d8(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
movq %r14, %rdi
movl $0x2, %esi
leaq 0x8(%rsp), %rdx
movl 0x110(%rsp), %ecx
movl 0x8c(%rsp), %r8d
xorl %r9d, %r9d
pushq $0x0
pushq %r12
callq 0x1541da
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x167a99
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x167aa8
callq 0x69d60
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x167ac4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x10, %rbp
cmpq %r13, %rbp
jne 0x1677b2
jmp 0x167adc
lock
incl 0x8(%rax)
jmp 0x1679b9
leaq 0xc0(%rsp), %rdi
callq 0x94700
cmpq $0x0, 0x90(%rsp)
movq 0xb0(%rsp), %r13
movb $0x1, %bpl
je 0x167b3f
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, (%rdi)
leaq 0x6f163(%rip), %rsi # 0x1d6c76
leaq 0x6f163(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
leaq 0x20(%rsp), %rsi
movq 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x6b5a0
addq $0x8, %r14
cmpq %r14, %rax
setne %bpl
cmpq $0x0, 0x90(%rsp)
movq 0xa8(%rsp), %r15
je 0x167b6e
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x167b6e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x167bdf
testb $0x1, %bl
jne 0x167b8f
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d4ab(%rip), %rsi # 0x1d5032
movl $0x9, %edx
callq *0x10(%rax)
leaq 0x8(%rsp), %rbx
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x6d49b(%rip), %rsi # 0x1d503c
movl $0x25, %edx
callq *0x10(%rax)
leaq 0x68(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6e7e0
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x117dee
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x167bdd
callq 0x69d60
xorl %ebx, %ebx
testb $0x1, %bl
jne 0x167bfb
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d46f(%rip), %rsi # 0x1d5062
movl $0x8, %edx
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d461(%rip), %rsi # 0x1d506b
movl $0xa, %edx
callq *0x10(%rax)
cmpb $0x0, 0x9c(%rsp)
je 0x167c3c
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
leaq 0x6d44b(%rip), %rsi # 0x1d5076
movl $0x3, %edx
callq *0x10(%rax)
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x6d2ca(%rip), %rsi # 0x1d4f2c
movq %rax, %rdi
callq 0x69460
movq 0xe122f(%rip), %rsi # 0x248ea0
movq 0xe1150(%rip), %rdx # 0x248dc8
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x167dc8
callq 0x69d60
jmp 0x167dc8
movq %rax, %rbx
movq %r14, %rdi
callq 0x6cf40
jmp 0x167dc8
jmp 0x167cda
movq %rax, %rbx
jmp 0x167dc8
jmp 0x167cda
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x167d0f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x167d0f
jmp 0x167d0c
movq %rax, %rbx
jmp 0x167d2a
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x167d8b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x167d8b
jmp 0x167d88
jmp 0x167d9c
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x167d2a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x167dc8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x167dc8
jmp 0x167d4e
movq %rax, %rbx
jmp 0x167dbb
movq %rax, %rbx
jmp 0x167d72
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x167d72
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x167dbb
movq 0x50(%rsp), %rsi
jmp 0x167db3
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x167d9f
callq 0x69d60
jmp 0x167d9f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x167dbb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xc0(%rsp), %rdi
callq 0x94700
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDFObject::JSON_Descr::JSON_Descr(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | JSON_Descr(std::shared_ptr<std::string> input, std::string const& object) :
input(input),
object(object)
{
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x168043
movq 0xe0dab(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x16803f
incl 0x8(%rax)
jmp 0x168043
lock
incl 0x8(%rax)
leaq 0x10(%rbx), %rdi
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x68320
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x168077
callq 0x69d60
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDF::JSONReactor::JSONReactor(QPDF&, std::shared_ptr<InputSource>, bool) | JSONReactor(QPDF& pdf, std::shared_ptr<InputSource> is, bool must_be_complete) :
pdf(pdf),
is(is),
must_be_complete(must_be_complete),
descr(
std::make_shared<QPDFObject::Description>(
QPDFObject::JSON_Descr(std::make_shared<std::string>(is->getName()), "")))
{
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0xdf459(%rip), %rax # 0x247570
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movq (%rdx), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rdx), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x168147
movq 0xe0ca7(%rip), %rsi # 0x248de0
cmpb $0x0, (%rsi)
je 0x168143
incl 0x8(%rax)
jmp 0x168147
lock
incl 0x8(%rax)
movb %cl, 0x20(%rbx)
movq (%rdx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
movq %rax, %rcx
callq 0x698e0
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6aaa6(%rip), %rdx # 0x1d2c26
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
callq 0x168014
movq $0x0, 0x28(%rbx)
movl $0x50, %edi
callq 0x68ab0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xde522(%rip), %rcx # 0x2466e8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0x50(%rsp), %rdx
movq -0x20(%rdx), %rsi
movq %rsi, 0x10(%rax)
xorl %esi, %esi
movq %rsi, 0x18(%rax)
movq -0x18(%rdx), %rdi
movq %rsi, -0x18(%rdx)
movq %rdi, 0x18(%rax)
movq %rsi, -0x20(%rdx)
movq %rax, %rsi
addq $0x30, %rsi
movq %rsi, 0x20(%rax)
movq -0x10(%rdx), %rdi
cmpq %rdx, %rdi
je 0x168213
movq %rdi, 0x20(%rax)
movq 0x50(%rsp), %rsi
movq %rsi, 0x30(%rax)
jmp 0x168219
movups (%rdx), %xmm0
movups %xmm0, (%rsi)
movq 0x48(%rsp), %rsi
movq %rsi, 0x28(%rax)
movq %rdx, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movb $0x1, 0x48(%rax)
movq %rax, 0x30(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x168250
callq 0x69d60
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x168267
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x168276
callq 0x69d60
leaq 0x50(%rbx), %rax
xorl %ecx, %ecx
movl %ecx, 0x3b(%rbx)
movl %ecx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movb $0x0, 0x50(%rbx)
movl %ecx, 0x60(%rbx)
movw $0x0, 0x64(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x84(%rbx)
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x115890
jmp 0x1682c9
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1682e5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1682e5
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1682f9
callq 0x69d60
jmp 0x1682f9
movq %rax, %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x168307
callq 0x69d60
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_json.cc |
QPDF::readLinearizationData() | void
QPDF::readLinearizationData()
{
// This function throws an exception (which is trapped by checkLinearization()) for any errors
// that prevent loading.
if (!isLinearized()) {
throw std::logic_error("called readLinearizationData for file that is not linearized");
}
// /L is read and stored in linp by isLinearized()
QPDFObjectHandle H = m->lindict.getKey("/H");
QPDFObjectHandle O = m->lindict.getKey("/O");
QPDFObjectHandle E = m->lindict.getKey("/E");
QPDFObjectHandle N = m->lindict.getKey("/N");
QPDFObjectHandle T = m->lindict.getKey("/T");
QPDFObjectHandle P = m->lindict.getKey("/P");
if (!(H.isArray() && O.isInteger() && E.isInteger() && N.isInteger() && T.isInteger() &&
(P.isInteger() || P.isNull()))) {
throw damagedPDF(
"linearization dictionary",
"some keys in linearization dictionary are of the wrong type");
}
// Hint table array: offset length [ offset length ]
size_t n_H_items = toS(H.getArrayNItems());
if (!((n_H_items == 2) || (n_H_items == 4))) {
throw damagedPDF("linearization dictionary", "H has the wrong number of items");
}
std::vector<int> H_items;
for (size_t i = 0; i < n_H_items; ++i) {
QPDFObjectHandle oh(H.getArrayItem(toI(i)));
if (oh.isInteger()) {
H_items.push_back(oh.getIntValueAsInt());
} else {
throw damagedPDF("linearization dictionary", "some H items are of the wrong type");
}
}
// H: hint table offset/length for primary and overflow hint tables
int H0_offset = H_items.at(0);
int H0_length = H_items.at(1);
int H1_offset = 0;
int H1_length = 0;
if (H_items.size() == 4) {
// Acrobat doesn't read or write these (as PDF 1.4), so we don't have a way to generate a
// test case.
// QTC::TC("qpdf", "QPDF overflow hint table");
H1_offset = H_items.at(2);
H1_length = H_items.at(3);
}
// P: first page number
int first_page = 0;
if (P.isInteger()) {
QTC::TC("qpdf", "QPDF P present in lindict");
first_page = P.getIntValueAsInt();
} else {
QTC::TC("qpdf", "QPDF P absent in lindict");
}
// Store linearization parameter data
// Various places in the code use linp.npages, which is initialized from N, to pre-allocate
// memory, so make sure it's accurate and bail right now if it's not.
if (N.getIntValue() != static_cast<long long>(getAllPages().size())) {
throw damagedPDF("linearization hint table", "/N does not match number of pages");
}
// file_size initialized by isLinearized()
m->linp.first_page_object = O.getIntValueAsInt();
m->linp.first_page_end = E.getIntValue();
m->linp.npages = N.getIntValueAsInt();
m->linp.xref_zero_offset = T.getIntValue();
m->linp.first_page = first_page;
m->linp.H_offset = H0_offset;
m->linp.H_length = H0_length;
// Read hint streams
Pl_Buffer pb("hint buffer");
QPDFObjectHandle H0 = readHintStream(pb, H0_offset, toS(H0_length));
if (H1_offset) {
(void)readHintStream(pb, H1_offset, toS(H1_length));
}
// PDF 1.4 hint tables that we ignore:
// /T thumbnail
// /A thread information
// /E named destination
// /V interactive form
// /I information dictionary
// /C logical structure
// /L page label
// Individual hint table offsets
QPDFObjectHandle HS = H0.getKey("/S"); // shared object
QPDFObjectHandle HO = H0.getKey("/O"); // outline
auto hbp = pb.getBufferSharedPointer();
Buffer* hb = hbp.get();
unsigned char const* h_buf = hb->getBuffer();
size_t h_size = hb->getSize();
readHPageOffset(BitStream(h_buf, h_size));
int HSi = HS.getIntValueAsInt();
if ((HSi < 0) || (toS(HSi) >= h_size)) {
throw damagedPDF("linearization hint table", "/S (shared object) offset is out of bounds");
}
readHSharedObject(BitStream(h_buf + HSi, h_size - toS(HSi)));
if (HO.isInteger()) {
int HOi = HO.getIntValueAsInt();
if ((HOi < 0) || (toS(HOi) >= h_size)) {
throw damagedPDF("linearization hint table", "/O (outline) offset is out of bounds");
}
readHGeneric(BitStream(h_buf + HOi, h_size - toS(HOi)), m->outline_hints);
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp # imm = 0x1F8
movq %rdi, %rbx
callq 0x6ecc0
testb %al, %al
je 0x169375
movq (%rbx), %r14
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x68ddc(%rip), %rsi # 0x1d17f8
leaq 0x68dd7(%rip), %rdx # 0x1d17fa
leaq 0x58(%rsp), %rdi
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0xf0(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168a60
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r14
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x699d6(%rip), %rsi # 0x1d2448
leaq 0x699d1(%rip), %rdx # 0x1d244a
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0x140(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168ab1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r14
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x6c772(%rip), %rsi # 0x1d5235
leaq 0x6c76d(%rip), %rdx # 0x1d5237
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168b02
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r14
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x508f3(%rip), %rsi # 0x1b9407
leaq 0x508ee(%rip), %rdx # 0x1b9409
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0xe0(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168b53
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r14
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x502ba(%rip), %rsi # 0x1b8e1f
leaq 0x502b5(%rip), %rdx # 0x1b8e21
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0x120(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168ba4
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r14
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x68812(%rip), %rsi # 0x1d13c8
leaq 0x6880d(%rip), %rdx # 0x1d13ca
callq 0x68bb0
addq $0x318, %r14 # imm = 0x318
leaq 0xb0(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x168bf5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xf0(%rsp), %rdi
callq 0x6c8b0
testb %al, %al
je 0x16926b
leaq 0x140(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
je 0x16926b
leaq 0x130(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
je 0x16926b
leaq 0xe0(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
je 0x16926b
leaq 0x120(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
je 0x16926b
leaq 0xb0(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
jne 0x168c84
leaq 0xb0(%rsp), %rdi
callq 0x6db30
testb %al, %al
je 0x16926b
leaq 0xf0(%rsp), %rdi
callq 0x6f1d0
movl %eax, %ebp
testl %eax, %eax
jns 0x168c9e
movl %ebp, %edi
callq 0x8808a
movq %rbx, 0x30(%rsp)
cmpl $0x2, %ebp
je 0x168cb1
cmpl $0x4, %ebp
jne 0x1694d8
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0xa0(%rsp)
testl %ebp, %ebp
je 0x168d79
movslq %ebp, %rbx
xorl %r14d, %r14d
leaq 0xc0(%rsp), %r15
leaq 0xf0(%rsp), %r12
leaq 0x90(%rsp), %r13
leaq 0x58(%rsp), %rbp
movq %r14, %rax
shrq $0x1f, %rax
je 0x168d04
movq %r14, %rdi
callq 0xb820c
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x6ac00
movq %r15, %rdi
callq 0x6c2a0
testb %al, %al
je 0x1691e6
movq %r15, %rdi
callq 0x6bdf0
movl %eax, 0x58(%rsp)
movq 0x98(%rsp), %rsi
cmpq 0xa0(%rsp), %rsi
je 0x168d50
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x98(%rsp)
jmp 0x168d5b
movq %r13, %rdi
movq %rbp, %rdx
callq 0x6d5a0
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x168d6d
callq 0x69d60
incq %r14
cmpq %r14, %rbx
jne 0x168cf3
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
subq %rax, %rcx
je 0x1693a7
cmpq $0x1, %rdx
jbe 0x1693b7
xorl %ebp, %ebp
movl $0x0, %ebx
cmpq $0x10, %rcx
jne 0x168db9
movl 0x8(%rax), %ebx
movl 0xc(%rax), %ebp
movslq (%rax), %r14
movslq 0x4(%rax), %r15
leaq 0xb0(%rsp), %rdi
callq 0x6c2a0
xorl %r12d, %r12d
testb %al, %al
je 0x168de4
leaq 0xb0(%rsp), %rdi
callq 0x6bdf0
movl %eax, %r12d
leaq 0xe0(%rsp), %rdi
callq 0x6db80
movq %rax, %r13
movq 0x30(%rsp), %rdi
callq 0x6cfc0
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
cmpq %rcx, %r13
jne 0x1693ca
leaq 0x140(%rsp), %rdi
callq 0x6bdf0
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movl %eax, 0x330(%rcx)
leaq 0x130(%rsp), %rdi
callq 0x6db80
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq %rax, 0x338(%rcx)
leaq 0xe0(%rsp), %rdi
callq 0x6bdf0
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movl %eax, 0x340(%rcx)
leaq 0x120(%rsp), %rdi
callq 0x6db80
movq 0x30(%rsp), %r13
movq (%r13), %rcx
movq %rax, 0x348(%rcx)
movl %r12d, 0x350(%rcx)
movq %r14, 0x358(%rcx)
movq %r15, 0x360(%rcx)
leaq 0x6c46e(%rip), %rsi # 0x1d530b
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
callq 0x69ec0
testl %r15d, %r15d
jns 0x168eb6
movl %r15d, %edi
callq 0x8808a
leaq 0x110(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r13, %rsi
movq %r14, %rcx
movq %r15, %r8
callq 0x16b23e
testl %ebx, %ebx
je 0x168f0d
testl %ebp, %ebp
jns 0x168ee0
movl %ebp, %edi
callq 0x8808a
movslq %ebp, %r8
movslq %ebx, %rcx
leaq 0x170(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r13, %rsi
callq 0x16b23e
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x168f0d
callq 0x69d60
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x68376(%rip), %rsi # 0x1d1294
leaq 0x68371(%rip), %rdx # 0x1d1296
leaq 0x38(%rsp), %rdi
callq 0x68bb0
leaq 0x160(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x6ba70
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x168f60
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x38(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x694d9(%rip), %rsi # 0x1d2448
leaq 0x694d4(%rip), %rdx # 0x1d244a
callq 0x68bb0
leaq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x6ba70
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x168fac
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x150(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6b4e0
movq 0x150(%rsp), %r15
movq %r15, %rdi
callq 0x6b660
movq %rax, %r14
movq %r15, %rdi
callq 0x68e70
movq %rax, %r15
leaq 0x1d0(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x728bc
movq 0x1f0(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x1d0(%rsp), %xmm0
movups 0x1e0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0x16b9b4
leaq 0x160(%rsp), %rdi
callq 0x6bdf0
testl %eax, %eax
js 0x1692ec
movl %eax, %esi
movq %r15, %rdx
subq %rsi, %rdx
jbe 0x1692ec
addq %r14, %rsi
leaq 0x1a8(%rsp), %rdi
callq 0x728bc
movq 0x1c8(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x1a8(%rsp), %xmm0
movups 0x1b8(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0x16bbbe
leaq 0x100(%rsp), %rdi
callq 0x6c2a0
testb %al, %al
je 0x1690f9
leaq 0x100(%rsp), %rdi
callq 0x6bdf0
testl %eax, %eax
js 0x16944f
movl %eax, %eax
subq %rax, %r15
jbe 0x16944f
addq %rax, %r14
leaq 0x180(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x728bc
movl $0x400, %esi # imm = 0x400
addq (%r13), %rsi
movq 0x1a0(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x180(%rsp), %xmm0
movups 0x190(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x16bd56
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x16910b
callq 0x69d60
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x16911d
callq 0x69d60
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0x16912f
callq 0x69d60
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x169141
callq 0x69d60
leaq 0x58(%rsp), %rdi
callq 0x6ace0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x169168
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x16917a
callq 0x69d60
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x16918c
callq 0x69d60
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x16919e
callq 0x69d60
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x1691b0
callq 0x69d60
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x1691c2
callq 0x69d60
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x1691d4
callq 0x69d60
addq $0x1f8, %rsp # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
movq %rax, (%rdi)
leaq 0x6c031(%rip), %rsi # 0x1d5238
leaq 0x6c042(%rip), %rdx # 0x1d5250
callq 0x68bb0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6c08a(%rip), %rsi # 0x1d52ad
leaq 0x6c0a5(%rip), %rdx # 0x1d52cf
leaq 0x38(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdfa91(%rip), %rsi # 0x248ce8
movq 0xdfa0a(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x169558
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x58(%rsp), %rdi
movq %r15, %r12
movq %r15, (%rdi)
leaq 0x6bfae(%rip), %rsi # 0x1d5238
leaq 0x6bfbf(%rip), %rdx # 0x1d5250
callq 0x68bb0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6bfab(%rip), %rsi # 0x1d5251
leaq 0x6bfdf(%rip), %rdx # 0x1d528c
leaq 0x38(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdfa10(%rip), %rsi # 0x248ce8
movq 0xdf989(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x169558
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x38(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x6bfc8(%rip), %rsi # 0x1d52d0
leaq 0x6bfd9(%rip), %rdx # 0x1d52e8
callq 0x68bb0
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6bff0(%rip), %rsi # 0x1d5317
leaq 0x6c013(%rip), %rdx # 0x1d5341
leaq 0xc0(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x38(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdf987(%rip), %rsi # 0x248ce8
movq 0xdf900(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x169558
movl $0x10, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x6be6f(%rip), %rsi # 0x1d51f8
movq %rax, %rdi
callq 0x6c820
movq 0xdfc20(%rip), %rsi # 0x248fb8
movq 0xdfb89(%rip), %rdx # 0x248f28
movq %r14, %rdi
callq 0x6b420
leaq 0x4cb2e(%rip), %rdi # 0x1b5edc
xorl %esi, %esi
xorl %eax, %eax
callq 0x682c0
leaq 0x4cb1e(%rip), %rdi # 0x1b5edc
movl $0x1, %esi
xorl %eax, %eax
callq 0x682c0
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
movq %rax, (%rdi)
leaq 0x6bee5(%rip), %rsi # 0x1d52d0
leaq 0x6bef6(%rip), %rdx # 0x1d52e8
callq 0x68bb0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6bee2(%rip), %rsi # 0x1d52e9
leaq 0x6befc(%rip), %rdx # 0x1d530a
leaq 0x38(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdf8ad(%rip), %rsi # 0x248ce8
movq 0xdf826(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x169558
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x38(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x6be65(%rip), %rsi # 0x1d52d0
leaq 0x6be76(%rip), %rdx # 0x1d52e8
callq 0x68bb0
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6beb8(%rip), %rsi # 0x1d5342
leaq 0x6bed5(%rip), %rdx # 0x1d5366
leaq 0xc0(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x38(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdf824(%rip), %rsi # 0x248ce8
movq 0xdf79d(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x169558
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
movq %rax, (%rdi)
leaq 0x6bd3f(%rip), %rsi # 0x1d5238
leaq 0x6bd50(%rip), %rdx # 0x1d5250
callq 0x68bb0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6bd78(%rip), %rsi # 0x1d528d
leaq 0x6bd90(%rip), %rdx # 0x1d52ac
leaq 0x38(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xdf79f(%rip), %rsi # 0x248ce8
movq 0xdf718(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x16957a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16957a
movq %rax, %rbx
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
jne 0x169815
jmp 0x16982c
jmp 0x1695dd
jmp 0x1695ff
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x1695b8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1695b8
movq %rax, %rbx
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x169624
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169624
jmp 0x169826
jmp 0x16964c
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x169605
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169605
movq %rax, %rbx
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x169652
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169652
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x169913
movq %r14, %rdi
callq 0x6cf40
jmp 0x169913
movq %rax, %rbx
movq %r14, %rdi
callq 0x6cf40
jmp 0x16999c
jmp 0x1696c3
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x169847
movq %r14, %rdi
callq 0x6cf40
jmp 0x169847
jmp 0x169844
movq %rax, %rbx
jmp 0x169859
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x16986b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16986b
movq %rax, %rbx
jmp 0x16986b
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x16987d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16987d
movq %rax, %rbx
jmp 0x16987d
jmp 0x169910
jmp 0x169910
jmp 0x169910
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x169942
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169942
movq %rax, %rbx
jmp 0x169942
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x169954
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169954
movq %rax, %rbx
jmp 0x169954
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x169966
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169966
movq %rax, %rbx
jmp 0x169966
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x169978
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x169978
movq %rax, %rbx
jmp 0x169978
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x16998a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16998a
movq %rax, %rbx
jmp 0x16998a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x16999c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16999c
movq %rax, %rbx
jmp 0x16999c
movq %rax, %rbx
jmp 0x16988f
jmp 0x1698db
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x16980b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16980b
movq %rax, %rbx
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x16982c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16982c
jmp 0x169844
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x169930
movq %r14, %rdi
callq 0x6cf40
jmp 0x169930
jmp 0x169844
movq %rax, %rbx
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x169859
callq 0x69d60
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x16986b
callq 0x69d60
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0x16987d
callq 0x69d60
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x16988f
callq 0x69d60
leaq 0x58(%rsp), %rdi
callq 0x6ace0
jmp 0x169913
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x1698bd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1698bd
movq %rax, %rbx
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1698e8
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1698e8
movq %rax, %rbx
jmp 0x169930
jmp 0x169910
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1698fc
movq %r14, %rdi
callq 0x6cf40
jmp 0x1698fc
jmp 0x1698f9
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x169913
callq 0x69d60
jmp 0x169913
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x169930
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x169942
callq 0x69d60
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x169954
callq 0x69d60
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x169966
callq 0x69d60
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x169978
callq 0x69d60
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x16998a
callq 0x69d60
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x16999c
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::readHPageOffset(BitStream) | void
QPDF::readHPageOffset(BitStream h)
{
// All comments referring to the PDF spec refer to the spec for version 1.4.
HPageOffset& t = m->page_offset_hints;
t.min_nobjects = h.getBitsInt(32); // 1
t.first_page_offset = h.getBitsInt(32); // 2
t.nbits_delta_nobjects = h.getBitsInt(16); // 3
t.min_page_length = h.getBitsInt(32); // 4
t.nbits_delta_page_length = h.getBitsInt(16); // 5
t.min_content_offset = h.getBitsInt(32); // 6
t.nbits_delta_content_offset = h.getBitsInt(16); // 7
t.min_content_length = h.getBitsInt(32); // 8
t.nbits_delta_content_length = h.getBitsInt(16); // 9
t.nbits_nshared_objects = h.getBitsInt(16); // 10
t.nbits_shared_identifier = h.getBitsInt(16); // 11
t.nbits_shared_numerator = h.getBitsInt(16); // 12
t.shared_denominator = h.getBitsInt(16); // 13
std::vector<HPageOffsetEntry>& entries = t.entries;
entries.clear();
int nitems = m->linp.npages;
load_vector_int(h, nitems, entries, t.nbits_delta_nobjects, &HPageOffsetEntry::delta_nobjects);
load_vector_int(
h, nitems, entries, t.nbits_delta_page_length, &HPageOffsetEntry::delta_page_length);
load_vector_int(
h, nitems, entries, t.nbits_nshared_objects, &HPageOffsetEntry::nshared_objects);
load_vector_vector(
h,
nitems,
entries,
&HPageOffsetEntry::nshared_objects,
t.nbits_shared_identifier,
&HPageOffsetEntry::shared_identifiers);
load_vector_vector(
h,
nitems,
entries,
&HPageOffsetEntry::nshared_objects,
t.nbits_shared_numerator,
&HPageOffsetEntry::shared_numerators);
load_vector_int(
h, nitems, entries, t.nbits_delta_content_offset, &HPageOffsetEntry::delta_content_offset);
load_vector_int(
h, nitems, entries, t.nbits_delta_content_length, &HPageOffsetEntry::delta_content_length);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq (%rdi), %r12
leaq 0x30(%rsp), %rbx
movl $0x20, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x368(%r12)
movl $0x20, %esi
movq %rbx, %rdi
callq 0x72c1a
cltq
movq %rax, 0x370(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x378(%r12)
movl $0x20, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x37c(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x380(%r12)
movl $0x20, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x384(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x388(%r12)
movl $0x20, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x38c(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x390(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x394(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x398(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x39c(%r12)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x72c1a
movl %eax, 0x3a0(%r12)
leaq 0x3a8(%r12), %r15
movq 0x3a8(%r12), %rsi
movq %r15, %rdi
callq 0x17888e
movq (%r14), %rax
movl 0x340(%rax), %ebp
movl 0x378(%r12), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0x16bdac
movl 0x380(%r12), %ecx
movl $0x8, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16bf5f
movl 0x394(%r12), %ecx
movl $0x10, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16bdac
movl 0x398(%r12), %ecx
movl $0x18, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16c114
movl 0x39c(%r12), %ecx
movl $0x30, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16c114
movl 0x388(%r12), %ecx
movl $0x48, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16bf5f
movl 0x390(%r12), %ecx
movl $0x50, %r8d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x16bf5f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
void load_vector_int<QPDF::HPageOffsetEntry, int>(BitStream&, int, std::vector<QPDF::HPageOffsetEntry, std::allocator<QPDF::HPageOffsetEntry>>&, int, int QPDF::HPageOffsetEntry::*) | static void
load_vector_int(
BitStream& bit_stream, int nitems, std::vector<T>& vec, int bits_wanted, int_type T::* field)
{
bool append = vec.empty();
// nitems times, read bits_wanted from the given bit stream, storing results in the ith vector
// entry.
for (size_t i = 0; i < QIntC::to_size(nitems); ++i) {
if (append) {
vec.push_back(T());
}
vec.at(i).*field = bit_stream.getBitsInt(QIntC::to_size(bits_wanted));
}
if (QIntC::to_int(vec.size()) != nitems) {
throw std::logic_error("vector has wrong size in load_vector_int");
}
// The PDF spec says that each hint table starts at a byte boundary. Each "row" actually must
// start on a byte boundary.
bit_stream.skipToNextByte();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r15
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, (%rsp)
movq (%rdx), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x10(%rsp)
movslq %esi, %rbx
movslq %ecx, %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
testl %ebp, %ebp
jns 0x16bdf3
movl %ebp, %edi
callq 0x8808a
cmpq %r13, %rbx
je 0x16beb4
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jne 0x16be68
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x70(%rsp)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1788f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x16be51
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x16be68
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
testl %r12d, %r12d
jns 0x16be75
movl %r12d, %edi
callq 0x8808a
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x72c1a
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rsi # imm = 0x2E8BA2E8BA2E8BA3
imulq %rsi, %rdx
cmpq %r13, %rdx
jbe 0x16befa
movl %eax, (%rcx,%r15)
incq %r13
addq $0x58, %r15
jmp 0x16bde8
movq 0x8(%r14), %rbx
subq (%r14), %rbx
sarq $0x3, %rbx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rbx
testq $-0x80000000, %rbx # imm = 0x80000000
je 0x16bede
movq %rbx, %rdi
callq 0xb820c
cmpl %ebp, %ebx
jne 0x16bf0b
movq (%rsp), %rdi
callq 0x72c48
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x49fdb(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
xorl %eax, %eax
callq 0x682c0
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x6a005(%rip), %rsi # 0x1d5f24
movq %rax, %rdi
callq 0x6c820
movq 0xdd08a(%rip), %rsi # 0x248fb8
movq 0xdcff3(%rip), %rdx # 0x248f28
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
jmp 0x16bf57
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x1788be
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
void load_vector_int<QPDF::HSharedObjectEntry, int>(BitStream&, int, std::vector<QPDF::HSharedObjectEntry, std::allocator<QPDF::HSharedObjectEntry>>&, int, int QPDF::HSharedObjectEntry::*) | static void
load_vector_int(
BitStream& bit_stream, int nitems, std::vector<T>& vec, int bits_wanted, int_type T::* field)
{
bool append = vec.empty();
// nitems times, read bits_wanted from the given bit stream, storing results in the ith vector
// entry.
for (size_t i = 0; i < QIntC::to_size(nitems); ++i) {
if (append) {
vec.push_back(T());
}
vec.at(i).*field = bit_stream.getBitsInt(QIntC::to_size(bits_wanted));
}
if (QIntC::to_int(vec.size()) != nitems) {
throw std::logic_error("vector has wrong size in load_vector_int");
}
// The PDF spec says that each hint table starts at a byte boundary. Each "row" actually must
// start on a byte boundary.
bit_stream.skipToNextByte();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, 0x8(%rsp)
movq (%rdx), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x18(%rsp)
movslq %esi, %rbx
movslq %ecx, %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
testl %ebp, %ebp
jns 0x16c282
movl %ebp, %edi
callq 0x8808a
cmpq %r13, %rbx
je 0x16c321
movq 0x18(%rsp), %rax
cmpq %rax, 0x20(%rsp)
jne 0x16c2d4
movl $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x16c2c7
movl $0x0, 0x8(%rsi)
movq $0x0, (%rsi)
addq $0xc, 0x8(%r14)
jmp 0x16c2d4
movq %r14, %rdi
leaq 0x28(%rsp), %rdx
callq 0x178c04
testl %r12d, %r12d
jns 0x16c2e1
movl %r12d, %edi
callq 0x8808a
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x72c1a
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
cmpq %r13, %rdx
jbe 0x16c368
movl %eax, (%rcx,%r15)
incq %r13
addq $0xc, %r15
jmp 0x16c277
movq 0x8(%r14), %rbx
subq (%r14), %rbx
sarq $0x2, %rbx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbx
testq $-0x80000000, %rbx # imm = 0x80000000
je 0x16c34b
movq %rbx, %rdi
callq 0xb820c
cmpl %ebp, %ebx
jne 0x16c379
movq 0x8(%rsp), %rdi
callq 0x72c48
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x49b6d(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
xorl %eax, %eax
callq 0x682c0
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x69b97(%rip), %rsi # 0x1d5f24
movq %rax, %rdi
callq 0x6c820
movq 0xdcc1c(%rip), %rsi # 0x248fb8
movq 0xdcb85(%rip), %rdx # 0x248f28
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
movq %r14, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::checkHSharedObject(std::vector<QPDFObjectHandle, std::allocator<QPDFObjectHandle>> const&, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int>>>&) | void
QPDF::checkHSharedObject(std::vector<QPDFObjectHandle> const& pages, std::map<int, int>& idx_to_obj)
{
// Implementation note 125 says shared object groups always contain only one object.
// Implementation note 128 says that Acrobat always nbits_nobjects to zero. Implementation note
// 130 says that Acrobat does not support more than one shared object per group. These are all
// consistent.
// Implementation note 129 states that MD5 signatures are not implemented in Acrobat, so
// signature_present must always be zero.
// Implementation note 131 states that first_shared_obj and first_shared_offset have meaningless
// values for single-page files.
// Empirically, Acrobat and pdlin generate incorrect values for these whenever there are no
// shared objects not referenced by the first page (i.e., nshared_total == nshared_first_page).
HSharedObject& so = m->shared_object_hints;
if (so.nshared_total < so.nshared_first_page) {
linearizationWarning("shared object hint table: ntotal < nfirst_page");
} else {
// The first nshared_first_page objects are consecutive objects starting with the first page
// object. The rest are consecutive starting from the first_shared_obj object.
int cur_object = pages.at(0).getObjectID();
for (int i = 0; i < so.nshared_total; ++i) {
if (i == so.nshared_first_page) {
QTC::TC("qpdf", "QPDF lin check shared past first page");
if (m->part8.empty()) {
linearizationWarning("part 8 is empty but nshared_total > nshared_first_page");
} else {
int obj = m->part8.at(0).getObjectID();
if (obj != so.first_shared_obj) {
linearizationWarning(
"first shared object number mismatch: hint table = " +
std::to_string(so.first_shared_obj) +
"; computed = " + std::to_string(obj));
}
}
cur_object = so.first_shared_obj;
QPDFObjGen og(cur_object, 0);
if (m->xref_table.count(og) == 0) {
stopOnError("unknown object in shared object hint table");
}
qpdf_offset_t offset = getLinearizationOffset(og);
qpdf_offset_t h_offset = adjusted_offset(so.first_shared_offset);
if (offset != h_offset) {
linearizationWarning(
"first shared object offset mismatch: hint table = " +
std::to_string(h_offset) + "; computed = " + std::to_string(offset));
}
}
idx_to_obj[i] = cur_object;
HSharedObjectEntry& se = so.entries.at(toS(i));
int nobjects = se.nobjects_minus_one + 1;
int length = lengthNextN(cur_object, nobjects);
int h_length = so.min_group_length + se.delta_group_length;
if (length != h_length) {
linearizationWarning(
"shared object " + std::to_string(i) + " length mismatch: hint table = " +
std::to_string(h_length) + "; computed = " + std::to_string(length));
}
cur_object += nobjects;
}
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, 0x130(%rsp)
movq %rdi, %rbp
movq (%rdi), %r14
movl 0x3d4(%r14), %eax
cmpl 0x3d0(%r14), %eax
jge 0x16c412
leaq 0x6942c(%rip), %rdx # 0x1d5820
movl $0x2e, %esi
movq %rbp, %rdi
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1687f0
movq (%rsi), %rdi
cmpq %rdi, 0x8(%rsi)
je 0x16d2a4
callq 0x6bca0
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0x3d4(%r14)
jle 0x16d284
movl %eax, %r13d
leaq 0x20(%rsp), %r12
xorl %eax, %eax
movl $0xd1b71759, %r15d # imm = 0xD1B71759
movq %rbp, 0xb8(%rsp)
movq %r14, 0xc0(%rsp)
cmpl 0x3d0(%r14), %eax
jne 0x16cc2b
movl $0xd1b71759, %r13d # imm = 0xD1B71759
movq (%rbp), %rax
movq 0x4f8(%rax), %rdi
cmpq 0x500(%rax), %rdi
je 0x16c4e2
callq 0x6bca0
movl 0x3c0(%r14), %ebx
cmpl %ebx, %eax
je 0x16c7e9
movl %eax, %r15d
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x16c504
movl $0x4, %r14d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x16c4fb
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x16c501
cmpl $0x2710, %eax # imm = 0x2710
jb 0x16c504
movl %eax, %ecx
imulq %r13, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x16c4b2
addl $-0x3, %r14d
jmp 0x16c504
movl $0x36, %esi
movq %rbp, %rdi
leaq 0x6935e(%rip), %rdx # 0x1d584f
callq 0x1687f0
jmp 0x16c7e9
addl $-0x2, %r14d
jmp 0x16c504
decl %r14d
shrl $0x1f, %ebx
movl %ebx, %esi
addl %r14d, %esi
leaq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x90(%rsp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x6b1f0
movq 0x90(%rsp), %rdi
addq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6c7a0
movl $0x32, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x6932c(%rip), %rcx # 0x1d5886
callq 0x68b10
leaq 0x80(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60(%rsp), %r14
je 0x16c592
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x16c598
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
leaq 0x68f90(%rip), %rsi # 0x1d554c
callq 0x6b8d0
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16c5e4
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x16c5eb
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x16c658
movl $0x4, %r12d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x16c64f
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x16c655
cmpl $0x2710, %eax # imm = 0x2710
jb 0x16c658
movl %eax, %ecx
imulq %r13, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x16c61f
addl $-0x3, %r12d
jmp 0x16c658
addl $-0x2, %r12d
jmp 0x16c658
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r15d, %edi
addq 0x30(%rsp), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x6c7a0
movq 0x50(%rsp), %rcx
movl $0xf, %esi
cmpq %r14, %rcx
je 0x16c69f
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r15
movq 0xb8(%rsp), %rbp
leaq 0x20(%rsp), %r12
jbe 0x16c6ea
movl $0xf, %esi
leaq 0x40(%rsp), %rdi
cmpq %rdi, 0x30(%rsp)
je 0x16c6e5
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16c6fb
movq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6bfe0
jmp 0x16c709
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
movq %r12, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16c729
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x16c731
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
movq %rbp, %rdi
callq 0x1687f0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16c777
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16c793
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x16c7aa
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
movq 0xc0(%rsp), %r14
je 0x16c7cc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x16c7e9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movl 0x3c0(%r14), %r13d
movl %r13d, 0x110(%rsp)
movl $0x0, 0x114(%rsp)
movq (%rbp), %rbx
leaq 0x138(%rbx), %rdi
leaq 0x110(%rsp), %rsi
callq 0x179c8e
addq $0x140, %rbx # imm = 0x140
cmpq %rbx, %rax
leaq 0x10(%rsp), %rbx
movl $0xd1b71759, %r15d # imm = 0xD1B71759
jne 0x16c86f
movq %r12, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x69078(%rip), %rsi # 0x1d58b9
leaq 0x6909b(%rip), %rdx # 0x1d58e3
callq 0x68bb0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x8fc60
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16c86f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movl %r13d, 0xb4(%rsp)
movq 0x110(%rsp), %rsi
movq %rbp, %rdi
callq 0x170242
movq %rax, %r13
movq %rbp, %rax
movq 0x3c8(%r14), %rbp
movq (%rax), %rax
cmpq %rbp, 0x358(%rax)
jg 0x16c8a7
addq 0x360(%rax), %rbp
cmpq %rbp, %r13
je 0x16cc1b
movq %rbp, %r12
negq %r12
cmovsq %rbp, %r12
movl $0x1, %r14d
cmpq $0xa, %r12
jb 0x16c91a
movl $0x4, %r14d
movq %r12, %rcx
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
cmpq $0x63, %rcx
jbe 0x16c911
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x16c917
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x16c91a
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r14d
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x16c8d9
addl $-0x3, %r14d
jmp 0x16c91a
addl $-0x2, %r14d
jmp 0x16c91a
decl %r14d
shrq $0x3f, %rbp
leal (%r14,%rbp), %esi
leaq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x6b1f0
addq 0x90(%rsp), %rbp
movq %rbp, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0x6e850
movl $0x32, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x68f73(%rip), %rcx # 0x1d58e4
callq 0x68b10
leaq 0x80(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60(%rsp), %r14
movq 0xb8(%rsp), %rbp
je 0x16c9b1
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x16c9b7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq 0xa0(%rsp), %rbx
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
leaq 0x68b69(%rip), %rsi # 0x1d554c
callq 0x6b8d0
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
je 0x16ca15
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x16ca1c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %r12
negq %r12
cmovsq %r13, %r12
movl $0x1, %r14d
cmpq $0xa, %r12
jb 0x16ca94
movl $0x4, %r14d
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x16ca8b
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x16ca91
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x16ca94
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r14d
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x16ca53
addl $-0x3, %r14d
jmp 0x16ca94
addl $-0x2, %r14d
jmp 0x16ca94
decl %r14d
shrq $0x3f, %r13
leal (%r14,%r13), %esi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
addq 0x30(%rsp), %r13
movq %r13, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0x6e850
movq 0x50(%rsp), %rcx
movl $0xf, %esi
leaq 0x60(%rsp), %r14
cmpq %r14, %rcx
je 0x16cae1
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x80(%rsp), %r13
leaq 0x20(%rsp), %r12
jbe 0x16cb1c
movl $0xf, %esi
leaq 0x40(%rsp), %rdi
cmpq %rdi, 0x30(%rsp)
je 0x16cb17
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16cb2d
movq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6bfe0
jmp 0x16cb3b
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
movq %r12, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16cb5b
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x16cb63
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
movq %rbp, %rdi
callq 0x1687f0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16cba9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16cbc5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x16cbdc
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
movq 0xc0(%rsp), %r14
je 0x16cbfe
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x16cc1b
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xb8(%rsp), %rbp
movl 0xb4(%rsp), %r13d
movq 0x130(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x6aba0
movl %r13d, (%rax)
movl 0xc(%rsp), %edi
testl %edi, %edi
jns 0x16cc4d
callq 0x8808a
movslq 0xc(%rsp), %rsi
movq 0x3e8(%r14), %rbx
movq 0x3f0(%r14), %rdx
subq %rbx, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %rsi, %rdx
jbe 0x16d296
leaq (%rsi,%rsi,2), %r12
movl 0x8(%rbx,%r12,4), %edx
incl %edx
movq %rbp, %rdi
movl %r13d, 0xb4(%rsp)
movl %r13d, %esi
movl %edx, 0x10c(%rsp)
callq 0x1705d6
movl (%rbx,%r12,4), %ebx
addl 0x3dc(%r14), %ebx
cmpl %ebx, %eax
je 0x16d258
movl %eax, %r13d
movl 0xc(%rsp), %ebp
movl %ebp, %r12d
negl %r12d
cmovsl %ebp, %r12d
movl $0x1, %r14d
cmpl $0xa, %r12d
jb 0x16cd15
movl $0x4, %r14d
movl %r12d, %eax
cmpl $0x63, %eax
jbe 0x16cd0c
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x16cd12
cmpl $0x2710, %eax # imm = 0x2710
jb 0x16cd15
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x16ccdc
addl $-0x3, %r14d
jmp 0x16cd15
addl $-0x2, %r14d
jmp 0x16cd15
decl %r14d
shrl $0x1f, %ebp
movl %ebp, %esi
addl %r14d, %esi
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x6b1f0
movq 0x110(%rsp), %rdi
addq %rbp, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x6c7a0
movl $0xe, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x68a59(%rip), %rcx # 0x1d57c5
callq 0x68b10
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0xa0(%rsp), %rbp
je 0x16cda1
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x16cda7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl $0xd1b71759, %r15d # imm = 0xD1B71759
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
leaq 0x68b46(%rip), %rsi # 0x1d5917
callq 0x6b8d0
movq %rbp, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16ce02
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x16ce09
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %ebx, %r12d
negl %r12d
cmovsl %ebx, %r12d
movl $0x1, %r14d
cmpl $0xa, %r12d
jb 0x16ce7c
movl $0x4, %r14d
movl %r12d, %eax
cmpl $0x63, %eax
jbe 0x16ce73
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x16ce79
cmpl $0x2710, %eax # imm = 0x2710
jb 0x16ce7c
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x16ce43
addl $-0x3, %r14d
jmp 0x16ce7c
addl $-0x2, %r14d
jmp 0x16ce7c
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq 0xe8(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %ebx, %edi
addq 0xe8(%rsp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x6c7a0
movq 0x90(%rsp), %rcx
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x16ced4
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %r8
movq 0xf0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x80(%rsp), %rbx
leaq 0x60(%rsp), %r14
jbe 0x16cf1e
movl $0xf, %esi
leaq 0xf8(%rsp), %rdi
cmpq %rdi, 0xe8(%rsp)
je 0x16cf19
movq 0xf8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16cf35
movq 0xe8(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x6bfe0
jmp 0x16cf46
leaq 0xe8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
movq %rbx, 0x70(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16cf69
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x16cf6f
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x70(%rsp), %rdi
leaq 0x685b4(%rip), %rsi # 0x1d554c
callq 0x6b8d0
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16cfc0
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x16cfc7
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r13d, %r12d
negl %r12d
cmovsl %r13d, %r12d
movl $0x1, %r14d
cmpl $0xa, %r12d
jb 0x16d037
movl $0x4, %r14d
movl %r12d, %eax
cmpl $0x63, %eax
jbe 0x16d02e
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x16d034
cmpl $0x2710, %eax # imm = 0x2710
jb 0x16d037
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x16cffe
addl $-0x3, %r14d
jmp 0x16d037
addl $-0x2, %r14d
jmp 0x16d037
decl %r14d
shrl $0x1f, %r13d
leal (%r14,%r13), %esi
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xc8(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r13d, %edi
addq 0xc8(%rsp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x6c7a0
movq 0x50(%rsp), %rcx
movl $0xf, %esi
leaq 0x60(%rsp), %rbx
cmpq %rbx, %rcx
je 0x16d090
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0xd0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x80(%rsp), %r13
movq 0xc0(%rsp), %r14
leaq 0x20(%rsp), %r12
jbe 0x16d0df
movl $0xf, %esi
leaq 0xd8(%rsp), %rdi
cmpq %rdi, 0xc8(%rsp)
je 0x16d0da
movq 0xd8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16d0f3
movq 0xc8(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6bfe0
jmp 0x16d104
leaq 0xc8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
movq %r12, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16d124
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x16d12c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
movq 0xb8(%rsp), %rdi
callq 0x1687f0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16d177
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x16d19c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x16d1b3
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x16d1cd
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x16d1f2
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16d20f
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movq 0xb8(%rsp), %rbp
je 0x16d233
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x16d258
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movl 0xb4(%rsp), %r13d
addl 0x10c(%rsp), %r13d
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl 0x3d4(%r14), %eax
leaq 0x20(%rsp), %r12
jl 0x16c45a
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48c3f(%rip), %rdi # 0x1b5edc
xorl %eax, %eax
callq 0x682c0
leaq 0x48c31(%rip), %rdi # 0x1b5edc
xorl %esi, %esi
xorl %edx, %edx
jmp 0x16d29d
jmp 0x16d2e4
jmp 0x16d300
jmp 0x16d321
jmp 0x16d342
jmp 0x16d369
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16d4c9
movq 0x20(%rsp), %rsi
jmp 0x16d4c1
movq %rax, %rbx
jmp 0x16d4c9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16d303
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16d303
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16d324
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16d324
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x16d345
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16d345
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16d36c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16d36c
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x16d4c9
movq 0xa0(%rsp), %rsi
jmp 0x16d4c1
movq %rax, %rbx
jmp 0x16d4a4
movq %rax, %rbx
jmp 0x16d463
movq %rax, %rbx
jmp 0x16d41c
movq %rax, %rbx
jmp 0x16d3db
movq %rax, %rbx
jmp 0x16d488
movq %rax, %rbx
jmp 0x16d43e
movq %rax, %rbx
jmp 0x16d400
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x16d3db
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x16d400
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x16d41c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16d43e
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x16d463
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x16d488
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x16d4a4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x16d4c9
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::checkHOutlines() | void
QPDF::checkHOutlines()
{
// Empirically, Acrobat generates the correct value for the object number but incorrectly stores
// the next object number's offset as the offset, at least when outlines appear in part 6. It
// also generates an incorrect value for length (specifically, the length that would cover the
// correct number of objects from the wrong starting place). pdlin appears to generate correct
// values in those cases.
if (m->c_outline_data.nobjects == m->outline_hints.nobjects) {
if (m->c_outline_data.nobjects == 0) {
return;
}
if (m->c_outline_data.first_object == m->outline_hints.first_object) {
// Check length and offset. Acrobat gets these wrong.
QPDFObjectHandle outlines = getRoot().getKey("/Outlines");
if (!outlines.isIndirect()) {
// This case is not exercised in test suite since not permitted by the spec, but if
// this does occur, the code below would fail.
linearizationWarning("/Outlines key of root dictionary is not indirect");
return;
}
QPDFObjGen og(outlines.getObjGen());
if (m->xref_table.count(og) == 0) {
stopOnError("unknown object in outlines hint table");
}
qpdf_offset_t offset = getLinearizationOffset(og);
ObjUser ou(ObjUser::ou_root_key, "/Outlines");
int length = toI(maxEnd(ou) - offset);
qpdf_offset_t table_offset = adjusted_offset(m->outline_hints.first_object_offset);
if (offset != table_offset) {
linearizationWarning(
"incorrect offset in outlines table: hint table = " +
std::to_string(table_offset) + "; computed = " + std::to_string(offset));
}
int table_length = m->outline_hints.group_length;
if (length != table_length) {
linearizationWarning(
"incorrect length in outlines table: hint table = " +
std::to_string(table_length) + "; computed = " + std::to_string(length));
}
} else {
linearizationWarning("incorrect first object number in outline hints table.");
}
} else {
linearizationWarning("incorrect object count in outline hint table");
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x4a8(%rax), %ecx
cmpl 0x410(%rax), %ecx
jne 0x16f87d
testl %ecx, %ecx
je 0x16ff03
movl 0x498(%rax), %ecx
cmpl 0x400(%rax), %ecx
jne 0x16f88b
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x6ac80
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x61b74(%rip), %rsi # 0x1d11f7
leaq 0x61b76(%rip), %rdx # 0x1d1200
leaq 0xa0(%rsp), %rdi
callq 0x68bb0
leaq 0xc8(%rsp), %rdi
movq %rsp, %rsi
leaq 0xa0(%rsp), %rdx
callq 0x6ba70
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x16f6cc
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x16f6db
callq 0x69d60
leaq 0xc8(%rsp), %rdi
callq 0x6ab30
testb %al, %al
je 0x16f8b0
leaq 0xc8(%rsp), %rdi
callq 0x6ef20
leaq 0xe0(%rsp), %rsi
movq %rax, (%rsi)
movq (%rbx), %r15
leaq 0x138(%r15), %rdi
callq 0x179c8e
addq $0x140, %r15 # imm = 0x140
cmpq %r15, %rax
jne 0x16f76e
leaq 0xa0(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x66233(%rip), %rsi # 0x1d5968
leaq 0x66251(%rip), %rdx # 0x1d598d
callq 0x68bb0
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x8fc60
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x16f76e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x170242
movq %rax, %r15
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x61a66(%rip), %rsi # 0x1d11f7
leaq 0x61a68(%rip), %rdx # 0x1d1200
movq %rsp, %rdi
callq 0x68bb0
leaq 0xa0(%rsp), %rdi
movq %rsp, %rdx
movl $0x4, %esi
callq 0x18cfda
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x16f7cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1700b8
movq %rax, %r13
subq %r15, %r13
movslq %r13d, %rax
cmpq %r13, %rax
je 0x16f7f1
movq %r13, %rdi
callq 0xc4ccc
movq (%rbx), %rax
movq 0x408(%rax), %r12
cmpq %r12, 0x358(%rax)
jg 0x16f80b
addq 0x360(%rax), %r12
cmpq %r12, %r15
je 0x16fba0
movq %r13, 0xd8(%rsp)
movq %r12, %r13
negq %r13
cmovsq %r12, %r13
movl $0x1, %ebp
cmpq $0xa, %r13
jb 0x16f8d0
movl $0x4, %ebp
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %r13, %rcx
cmpq $0x63, %rcx
jbe 0x16f8c9
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x16f8ce
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x16f8d0
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %ebp
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x16f847
addl $-0x3, %ebp
jmp 0x16f8d0
leaq 0x661a4(%rip), %rdx # 0x1d5a28
movl $0x2c, %esi
jmp 0x16f897
leaq 0x66160(%rip), %rdx # 0x1d59f2
movl $0x35, %esi
movq %rbx, %rdi
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1687f0
leaq 0x66080(%rip), %rdx # 0x1d5937
movl $0x30, %esi
movq %rbx, %rdi
callq 0x1687f0
jmp 0x16fef1
addl $-0x2, %ebp
jmp 0x16f8d0
decl %ebp
shrq $0x3f, %r12
leal (%r12,%rbp), %esi
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x80(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
leaq 0x80(%rsp), %r14
addq (%r14), %r12
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x6e850
leaq 0x66079(%rip), %rcx # 0x1d598e
movl $0x31, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16f94e
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x16f954
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x65bd5(%rip), %rsi # 0x1d554c
callq 0x6b8d0
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16f9a3
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x16f9aa
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %r12
negq %r12
cmovsq %r15, %r12
movl $0x1, %r13d
cmpq $0xa, %r12
jb 0x16fa2c
movl $0x4, %r13d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x16fa23
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x16fa29
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x16fa2c
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r13d
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x16f9eb
addl $-0x3, %r13d
jmp 0x16fa2c
addl $-0x2, %r13d
jmp 0x16fa2c
decl %r13d
shrq $0x3f, %r15
leal (%r15,%r13), %esi
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x20(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
addq 0x20(%rsp), %r15
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x6e850
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x16fa81
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
leaq 0x10(%rsp), %r15
movq 0xd8(%rsp), %r13
jbe 0x16faa9
movl $0xf, %esi
cmpq %r14, 0x20(%rsp)
je 0x16faa4
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16faba
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x6bfe0
jmp 0x16fac8
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
movq %r15, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16fae6
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x16faed
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq (%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1687f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x16fb31
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x16fb48
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16fb5f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x16fb7b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x16fba0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %rax
movl 0x414(%rax), %r15d
cmpl %r13d, %r15d
je 0x16fed0
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x16fc10
movl $0x4, %r12d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x16fc07
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x16fc0d
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x16fc10
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x16fbd4
addl $-0x3, %r12d
jmp 0x16fc10
addl $-0x2, %r12d
jmp 0x16fc10
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x80(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
leaq 0x80(%rsp), %r14
addq (%r14), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x6c7a0
leaq 0x65d6b(%rip), %rcx # 0x1d59c0
movl $0x31, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16fc8e
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x16fc94
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x65895(%rip), %rsi # 0x1d554c
callq 0x6b8d0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x16fce4
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x16fcec
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x16fd61
movl $0x4, %r15d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x16fd58
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x16fd5e
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x16fd61
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x16fd25
addl $-0x3, %r15d
jmp 0x16fd61
addl $-0x2, %r15d
jmp 0x16fd61
decl %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x20(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r13d, %edi
addq 0x20(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x6c7a0
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x16fdb5
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16fdd0
movl $0xf, %esi
cmpq %r14, 0x20(%rsp)
je 0x16fdcb
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16fde1
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x6bfe0
jmp 0x16fdef
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x16fe12
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x16fe18
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq (%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1687f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16fe61
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x16fe78
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x16fe8f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x16feab
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x16fed0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16fef1
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x16ff03
callq 0x69d60
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x17009d
movq 0xb0(%rsp), %rsi
jmp 0x170062
jmp 0x17009a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16ff5e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16ff5e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x16ff7a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16ff7a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
jne 0x16ffd3
jmp 0x16ffe5
jmp 0x16ffe2
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x16ffa8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16ffa8
jmp 0x170003
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x16ffc9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16ffc9
jmp 0x170046
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16ffe5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x16ffe5
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x170006
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x170006
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x170049
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x170049
jmp 0x170046
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x17009d
movq 0x10(%rsp), %rsi
jmp 0x170062
jmp 0x17009a
jmp 0x17009a
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17009d
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17009d
jmp 0x17009a
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x170093
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x170093
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x1700a5
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x1700af
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::getLinearizationOffset(QPDFObjGen) | qpdf_offset_t
QPDF::getLinearizationOffset(QPDFObjGen og)
{
QPDFXRefEntry entry = m->xref_table[og];
qpdf_offset_t result = 0;
switch (entry.getType()) {
case 1:
result = entry.getOffset();
break;
case 2:
// For compressed objects, return the offset of the object stream that contains them.
result = getLinearizationOffset(QPDFObjGen(entry.getObjStreamNumber(), 0));
break;
default:
stopOnError("getLinearizationOffset called for xref entry not of type 1 or 2");
break;
}
return result;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %rax
movq %rsi, (%rax)
movl $0x138, %edi # imm = 0x138
addq (%rbx), %rdi
movq %rax, %rsi
callq 0x173038
movups (%rax), %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rdi)
callq 0x6cb90
cmpl $0x2, %eax
je 0x170294
cmpl $0x1, %eax
jne 0x1702aa
leaq 0x20(%rsp), %rdi
callq 0x6c1d0
jmp 0x1702ef
leaq 0x20(%rsp), %rdi
callq 0x6b2b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x170242
jmp 0x1702ef
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x65307(%rip), %rsi # 0x1d55c1
leaq 0x6533f(%rip), %rdx # 0x1d5600
movq %rsp, %r14
movq %r14, %rdi
callq 0x68bb0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8fc60
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1702ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x170312
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::getUncompressedObject(QPDFObjectHandle&, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int>>> const&) | QPDFObjectHandle
QPDF::getUncompressedObject(QPDFObjectHandle& obj, std::map<int, int> const& object_stream_data)
{
if (obj.isNull() || (object_stream_data.count(obj.getObjectID()) == 0)) {
return obj;
} else {
int repl = (*(object_stream_data.find(obj.getObjectID()))).second;
return getObject(repl, 0);
}
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6db30
testb %al, %al
jne 0x1703d5
movq %r12, %rdi
callq 0x6bca0
movq 0x10(%r15), %rdx
leaq 0x8(%r15), %r13
movq %r13, %rcx
testq %rdx, %rdx
je 0x170371
movq %r13, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x17035a
movq %r13, %rdx
cmpq %r13, %rcx
je 0x170383
cmpl 0x20(%rcx), %eax
cmovlq %r13, %rcx
movq %rcx, %rdx
cmpq %r13, %rdx
je 0x1703d5
movq %r12, %rdi
callq 0x6bca0
movq 0x10(%r15), %rdx
movq %r13, %rcx
testq %rdx, %rdx
je 0x1703b6
movq %r13, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x17039f
cmpq %r13, %rcx
je 0x1703c2
cmpl 0x20(%rcx), %eax
cmovgeq %rcx, %r13
movl 0x24(%r13), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x68560
jmp 0x1703ff
movq (%r12), %rax
movq %rax, (%rbx)
movq 0x8(%r12), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1703ff
movq 0xd89ef(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1703fb
incl 0x8(%rax)
jmp 0x1703ff
lock
incl 0x8(%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::getUncompressedObject(QPDFObjectHandle&, QPDFWriter::ObjTable const&) | QPDFObjectHandle
QPDF::getUncompressedObject(QPDFObjectHandle& oh, QPDFWriter::ObjTable const& obj)
{
if (obj.contains(oh)) {
if (auto id = obj[oh].object_stream; id > 0) {
return oh.isNull() ? oh : getObject(id, 0);
}
}
return oh;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x17044f
movq 0xd899f(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x17044b
incl 0x8(%rax)
jmp 0x17044f
lock
incl 0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x6bca0
cltq
movq 0x8(%r12), %rcx
subq (%r12), %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movb $0x1, %bpl
cmpq %rax, %rdx
ja 0x1704c5
movq 0x28(%r12), %rsi
leaq 0x20(%r12), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0x1704ab
movq %rcx, %rdx
xorl %edi, %edi
cmpq %rax, 0x20(%rsi)
setb %dil
cmovaeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x170493
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0x1704be
cmpq %rax, 0x20(%rdx)
cmovaq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
setne %bpl
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1704d4
callq 0x69d60
testb %bpl, %bpl
je 0x170573
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x170507
movq 0xd88e7(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x170503
incl 0x8(%rax)
jmp 0x170507
lock
incl 0x8(%rax)
movq %rsp, %rdi
callq 0x6bca0
movslq %eax, %rsi
movq %r12, %rdi
callq 0x179b8e
movl 0x8(%rax), %ebp
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17052c
callq 0x69d60
testl %ebp, %ebp
jle 0x170573
movq %r14, %rdi
callq 0x6db30
testb %al, %al
je 0x170560
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17056f
movq 0xd888a(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1705ab
incl 0x8(%rax)
jmp 0x17056f
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x68560
testl %ebp, %ebp
jg 0x17059b
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17059b
movq 0xd8853(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x170597
incl 0x8(%rax)
jmp 0x17059b
lock
incl 0x8(%rax)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x17056f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x1705c3
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1705cd
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::dumpHPageOffset() | void
QPDF::dumpHPageOffset()
{
HPageOffset& t = m->page_offset_hints;
*m->log->getInfo() << "min_nobjects: " << t.min_nobjects << "\n"
<< "first_page_offset: " << adjusted_offset(t.first_page_offset) << "\n"
<< "nbits_delta_nobjects: " << t.nbits_delta_nobjects << "\n"
<< "min_page_length: " << t.min_page_length << "\n"
<< "nbits_delta_page_length: " << t.nbits_delta_page_length << "\n"
<< "min_content_offset: " << t.min_content_offset << "\n"
<< "nbits_delta_content_offset: " << t.nbits_delta_content_offset << "\n"
<< "min_content_length: " << t.min_content_length << "\n"
<< "nbits_delta_content_length: " << t.nbits_delta_content_length << "\n"
<< "nbits_nshared_objects: " << t.nbits_nshared_objects << "\n"
<< "nbits_shared_identifier: " << t.nbits_shared_identifier << "\n"
<< "nbits_shared_numerator: " << t.nbits_shared_numerator << "\n"
<< "shared_denominator: " << t.shared_denominator << "\n";
for (size_t i1 = 0; i1 < toS(m->linp.npages); ++i1) {
HPageOffsetEntry& pe = t.entries.at(i1);
*m->log->getInfo() << "Page " << i1 << ":\n"
<< " nobjects: " << pe.delta_nobjects + t.min_nobjects << "\n"
<< " length: " << pe.delta_page_length + t.min_page_length
<< "\n"
// content offset is relative to page, not file
<< " content_offset: " << pe.delta_content_offset + t.min_content_offset
<< "\n"
<< " content_length: " << pe.delta_content_length + t.min_content_length
<< "\n"
<< " nshared_objects: " << pe.nshared_objects << "\n";
for (size_t i2 = 0; i2 < toS(pe.nshared_objects); ++i2) {
*m->log->getInfo() << " identifier " << i2 << ": " << pe.shared_identifiers.at(i2)
<< "\n";
*m->log->getInfo() << " numerator " << i2 << ": " << pe.shared_numerators.at(i2)
<< "\n";
}
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %r13
movq (%r13), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x6e980
movq (%r14), %rdi
leaq 0x64e15(%rip), %rsi # 0x1d5b1e
callq 0x6bc60
movl 0x368(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61f01(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64dfa(%rip), %rsi # 0x1d5b2d
movq %rax, %rdi
callq 0x6bc60
movq 0x370(%r13), %rsi
movq (%rbx), %rcx
cmpq %rsi, 0x358(%rcx)
jg 0x170d55
addq 0x360(%rcx), %rsi
movq %rax, %rdi
callq 0x68040
leaq 0x61ec1(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64dce(%rip), %rsi # 0x1d5b41
movq %rax, %rdi
callq 0x6bc60
movl 0x378(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61e94(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64db8(%rip), %rsi # 0x1d5b58
movq %rax, %rdi
callq 0x6bc60
movl 0x37c(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61e67(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d9d(%rip), %rsi # 0x1d5b6a
movq %rax, %rdi
callq 0x6bc60
movl 0x380(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61e3a(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d8a(%rip), %rsi # 0x1d5b84
movq %rax, %rdi
callq 0x6bc60
movl 0x384(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61e0d(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d72(%rip), %rsi # 0x1d5b99
movq %rax, %rdi
callq 0x6bc60
movl 0x388(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61de0(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d62(%rip), %rsi # 0x1d5bb6
movq %rax, %rdi
callq 0x6bc60
movl 0x38c(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61db3(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d4a(%rip), %rsi # 0x1d5bcb
movq %rax, %rdi
callq 0x6bc60
movl 0x390(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61d86(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d3a(%rip), %rsi # 0x1d5be8
movq %rax, %rdi
callq 0x6bc60
movl 0x394(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61d59(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d25(%rip), %rsi # 0x1d5c00
movq %rax, %rdi
callq 0x6bc60
movl 0x398(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61d2c(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64d12(%rip), %rsi # 0x1d5c1a
movq %rax, %rdi
callq 0x6bc60
movl 0x39c(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61cff(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64cfe(%rip), %rsi # 0x1d5c33
movq %rax, %rdi
callq 0x6bc60
movl 0x3a0(%r13), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61cd2(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x170f6a
callq 0x69d60
movq $0x0, 0x18(%rsp)
leaq 0x8(%rsp), %r15
leaq 0x61ca6(%rip), %r12 # 0x1d2c25
leaq 0x64071(%rip), %rbp # 0x1d4ff7
movq %r13, 0x20(%rsp)
movq (%rbx), %r14
movl 0x340(%r14), %edi
testl %edi, %edi
jns 0x170f9e
callq 0x8808a
movslq 0x340(%r14), %rax
movq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jae 0x171227
movq 0x3a8(%r13), %r14
movq 0x3b0(%r13), %rdx
subq %r14, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
cmpq %rcx, %rdx
jbe 0x171258
movq (%rbx), %rax
movq (%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x6e980
movq 0x8(%rsp), %rdi
leaq 0x61b15(%rip), %rsi # 0x1d2b10
callq 0x6bc60
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x6a470
movq %rax, %rdi
leaq 0x4c7b3(%rip), %rsi # 0x1bd7ca
callq 0x6bc60
movq %rax, %rdi
leaq 0x64c22(%rip), %rsi # 0x1d5c48
callq 0x6bc60
imulq $0x58, 0x18(%rsp), %rcx
addq %rcx, %r14
movl 0x368(%r13), %esi
addl (%r14), %esi
movq %rax, %rdi
callq 0x68740
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq %rax, %rdi
leaq 0x64bfa(%rip), %rsi # 0x1d5c55
callq 0x6bc60
movslq 0x37c(%r13), %rsi
addq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x68040
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq %rax, %rdi
leaq 0x64bd8(%rip), %rsi # 0x1d5c60
callq 0x6bc60
movslq 0x384(%r13), %rsi
addq 0x48(%r14), %rsi
movq %rax, %rdi
callq 0x68040
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq %rax, %rdi
leaq 0x64bbe(%rip), %rsi # 0x1d5c73
callq 0x6bc60
movslq 0x38c(%r13), %rsi
addq 0x50(%r14), %rsi
movq %rax, %rdi
callq 0x68040
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq %rax, %rdi
leaq 0x64ba4(%rip), %rsi # 0x1d5c86
callq 0x6bc60
movl 0x10(%r14), %esi
movq %rax, %rdi
callq 0x68740
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17110d
callq 0x69d60
xorl %r13d, %r13d
movl 0x10(%r14), %edi
testl %edi, %edi
jns 0x17111d
callq 0x8808a
movslq 0x10(%r14), %rax
cmpq %rax, %r13
jae 0x171218
movq (%rbx), %rax
movq (%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x6e980
movq 0x8(%rsp), %rdi
leaq 0x64b54(%rip), %rsi # 0x1d5c9a
callq 0x6bc60
movq %rax, %rdi
movq %r13, %rsi
callq 0x6a470
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6bc60
movq 0x18(%r14), %rcx
movq 0x20(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0x171236
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x68740
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17119f
callq 0x69d60
movq (%rbx), %rax
movq (%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x6e980
movq 0x8(%rsp), %rdi
leaq 0x64aef(%rip), %rsi # 0x1d5caa
callq 0x6bc60
movq %rax, %rdi
movq %r13, %rsi
callq 0x6a470
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6bc60
movq 0x30(%r14), %rcx
movq 0x38(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0x171247
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x68740
movq %rax, %rdi
movq %r12, %rsi
callq 0x6bc60
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x171210
callq 0x69d60
incq %r13
jmp 0x171110
incq 0x18(%rsp)
movq 0x20(%rsp), %r13
jmp 0x170f8b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44c9f(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
xorl %eax, %eax
callq 0x682c0
leaq 0x44c8e(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
xorl %eax, %eax
callq 0x682c0
leaq 0x44c7d(%rip), %rdi # 0x1b5edc
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x682c0
jmp 0x171275
jmp 0x171275
jmp 0x171275
jmp 0x171275
jmp 0x171275
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x171287
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::dumpHGeneric(QPDF::HGeneric&) | void
QPDF::dumpHGeneric(HGeneric& t)
{
*m->log->getInfo() << "first_object: " << t.first_object << "\n"
<< "first_object_offset: " << adjusted_offset(t.first_object_offset) << "\n"
<< "nobjects: " << t.nobjects << "\n"
<< "group_length: " << t.group_length << "\n";
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rsi
movq %rsp, %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x6e980
movq (%r15), %rdi
leaq 0x6478d(%rip), %rsi # 0x1d5d7b
callq 0x6bc60
movl (%rbx), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61621(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x64777(%rip), %rsi # 0x1d5d8a
movq %rax, %rdi
callq 0x6bc60
movq 0x8(%rbx), %rsi
movq (%r14), %rcx
cmpq %rsi, 0x358(%rcx)
jg 0x171632
addq 0x360(%rcx), %rsi
movq %rax, %rdi
callq 0x68040
leaq 0x615e4(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x645fa(%rip), %rsi # 0x1d5c4a
movq %rax, %rdi
callq 0x6bc60
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x615bb(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
leaq 0x646be(%rip), %rsi # 0x1d5d37
movq %rax, %rdi
callq 0x6bc60
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x68740
leaq 0x61592(%rip), %rsi # 0x1d2c25
movq %rax, %rdi
callq 0x6bc60
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1716aa
callq 0x69d60
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1716c6
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::outputLengthNextN(int, int, QPDFWriter::NewObjTable const&, QPDFWriter::ObjTable const&) | int
QPDF::outputLengthNextN(
int in_object, int n, QPDFWriter::NewObjTable const& new_obj, QPDFWriter::ObjTable const& obj)
{
// Figure out the length of a series of n consecutive objects in the output file starting with
// whatever object in_object from the input file mapped to.
int first = obj[in_object].renumber;
int last = first + n;
if (first <= 0) {
stopOnError("found object that is not renumbered while writing linearization data");
}
qpdf_offset_t length = 0;
for (int i = first; i < last; ++i) {
auto l = new_obj[i].length;
if (l == 0) {
stopOnError("found item with unknown length while writing linearization data");
}
length += l;
}
return toI(length);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movl %edx, %r12d
movq %rdi, 0x20(%rsp)
movslq %esi, %rsi
movq %r8, %rdi
callq 0x179b8e
movslq (%rax), %r15
testq %r15, %r15
jg 0x1717be
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x64614(%rip), %rsi # 0x1d5da0
leaq 0x64651(%rip), %rdx # 0x1d5de4
movq %rsp, %rdi
callq 0x68bb0
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x8fc60
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1717be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
testl %r12d, %r12d
jle 0x171837
addl %r15d, %r12d
movslq %r12d, %r14
xorl %r12d, %r12d
movq %rsp, %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0x179f80
movq 0x18(%rax), %rbp
testq %rbp, %rbp
jne 0x17182a
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0x645ef(%rip), %rsi # 0x1d5de5
leaq 0x64627(%rip), %rdx # 0x1d5e24
callq 0x68bb0
movq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x8fc60
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17182a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
addq %rbp, %r12
incq %r15
cmpq %r14, %r15
jl 0x1717cf
jmp 0x17183a
xorl %r12d, %r12d
movslq %r12d, %rax
cmpq %r12, %rax
je 0x17184a
movq %r12, %rdi
callq 0xc4ccc
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x171882
jmp 0x17188f
jmp 0x17186c
movq %rax, %rbx
jmp 0x17188f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17188f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::calculateHSharedObject(QPDFWriter::NewObjTable const&, QPDFWriter::ObjTable const&) | void
QPDF::calculateHSharedObject(
QPDFWriter::NewObjTable const& new_obj, QPDFWriter::ObjTable const& obj)
{
CHSharedObject& cso = m->c_shared_object_data;
std::vector<CHSharedObjectEntry>& csoe = cso.entries;
HSharedObject& so = m->shared_object_hints;
std::vector<HSharedObjectEntry>& soe = so.entries;
soe.clear();
int min_length = outputLengthNextN(csoe.at(0).object, 1, new_obj, obj);
int max_length = min_length;
for (size_t i = 0; i < toS(cso.nshared_total); ++i) {
// Assign absolute numbers to deltas; adjust later
int length = outputLengthNextN(csoe.at(i).object, 1, new_obj, obj);
min_length = std::min(min_length, length);
max_length = std::max(max_length, length);
soe.emplace_back();
soe.at(i).delta_group_length = length;
}
if (soe.size() != toS(cso.nshared_total)) {
stopOnError("soe has wrong size after initialization");
}
so.nshared_total = cso.nshared_total;
so.nshared_first_page = cso.nshared_first_page;
if (so.nshared_total > so.nshared_first_page) {
so.first_shared_obj = obj[cso.first_shared_obj].renumber;
so.min_group_length = min_length;
so.first_shared_offset = new_obj[so.first_shared_obj].xref.getOffset();
}
so.min_group_length = min_length;
so.nbits_delta_group_length = nbits(max_length - min_length);
for (size_t i = 0; i < toS(cso.nshared_total); ++i) {
// Adjust deltas
if (soe.at(i).delta_group_length < min_length) {
stopOnError("found too small group length while writing linearization data");
}
soe.at(i).delta_group_length -= min_length;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movq (%rdi), %rbx
movq 0x3e8(%rbx), %rax
cmpq %rax, 0x3f0(%rbx)
je 0x171fcf
movq %rax, 0x3f0(%rbx)
movq 0x480(%rbx), %rax
cmpq %rax, 0x488(%rbx)
je 0x1722d8
leaq 0x3e8(%rbx), %rcx
movq %rcx, 0x40(%rsp)
movl (%rax), %esi
movq 0x8(%rsp), %rdi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
callq 0x171750
movl %eax, %r14d
xorl %r15d, %r15d
movl %eax, %ebp
xorl %r13d, %r13d
movl 0x478(%rbx), %edi
testl %edi, %edi
jns 0x172024
callq 0x8808a
movslq 0x478(%rbx), %rdi
cmpq %rdi, %r13
jae 0x1720ec
movq 0x480(%rbx), %rax
movq 0x488(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0x1722bb
movl (%rax,%r13,4), %esi
movq 0x8(%rsp), %rdi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
callq 0x171750
movl %eax, %r12d
cmpl %ebp, %eax
cmovll %eax, %ebp
cmpl %eax, %r14d
cmovlel %eax, %r14d
movq 0x3f0(%rbx), %rsi
cmpq 0x3f8(%rbx), %rsi
je 0x1720a6
movl $0x0, 0x8(%rsi)
movq $0x0, (%rsi)
addq $0xc, 0x3f0(%rbx)
jmp 0x1720b0
movq 0x40(%rsp), %rdi
callq 0x17a072
movq 0x3e8(%rbx), %rax
movq 0x3f0(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r13, %rdx
jbe 0x1722bb
movl %r12d, (%rax,%r15)
incq %r13
addq $0xc, %r15
jmp 0x172015
movq 0x3f0(%rbx), %r15
subq 0x3e8(%rbx), %r15
sarq $0x2, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
testl %edi, %edi
jns 0x172115
callq 0x8808a
movslq 0x478(%rbx), %rax
cmpq %rax, %r15
je 0x172168
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x63d49(%rip), %rsi # 0x1d5e7a
leaq 0x63d69(%rip), %rdx # 0x1d5ea1
leaq 0x20(%rsp), %rdi
callq 0x68bb0
leaq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x8fc60
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x172168
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movl 0x474(%rbx), %eax
movl 0x478(%rbx), %ecx
movl %ecx, 0x3d4(%rbx)
movl %eax, 0x3d0(%rbx)
cmpl %eax, %ecx
jle 0x1721bd
movslq 0x470(%rbx), %rsi
movq 0x10(%rsp), %rdi
callq 0x179b8e
movslq (%rax), %rsi
movl %esi, 0x3c0(%rbx)
movl %ebp, 0x3dc(%rbx)
movq 0x18(%rsp), %rdi
callq 0x179f80
movq %rax, %rdi
callq 0x6c1d0
movq %rax, 0x3c8(%rbx)
movl %ebp, 0x3dc(%rbx)
subl %ebp, %r14d
movl %r14d, %edi
callq 0x171f8a
movl %eax, 0x3e0(%rbx)
leaq 0x30(%rsp), %r15
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
xorl %r14d, %r14d
movl 0x478(%rbx), %edi
testl %edi, %edi
jns 0x1721f3
callq 0x8808a
movslq 0x478(%rbx), %rax
cmpq %rax, %r14
jae 0x1722ac
movq 0x3e8(%rbx), %rax
movq 0x3f0(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0x1722c7
cmpl %ebp, (%rax,%r12)
jge 0x172274
movq %r15, 0x20(%rsp)
movq %r13, %rdi
leaq 0x63c5e(%rip), %rsi # 0x1d5ea2
leaq 0x63c94(%rip), %rdx # 0x1d5edf
callq 0x68bb0
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x8fc60
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x172274
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x3e8(%rbx), %rax
movq 0x3f0(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0x1722c7
subl %ebp, (%rax,%r12)
incq %r14
addq $0xc, %r12
jmp 0x1721e4
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x43c1a(%rip), %rdi # 0x1b5edc
movq %r13, %rsi
jmp 0x1722d1
leaq 0x43c0e(%rip), %rdi # 0x1b5edc
movq %r14, %rsi
xorl %eax, %eax
callq 0x682c0
leaq 0x43bfd(%rip), %rdi # 0x1b5edc
xorl %esi, %esi
xorl %edx, %edx
jmp 0x1722d1
jmp 0x1722ee
jmp 0x1722e9
movq %rax, %rbx
jmp 0x172308
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x172308
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
void write_vector_int<QPDF::HPageOffsetEntry, long long>(BitWriter&, int, std::vector<QPDF::HPageOffsetEntry, std::allocator<QPDF::HPageOffsetEntry>>&, int, long long QPDF::HPageOffsetEntry::*) | static void
write_vector_int(BitWriter& w, int nitems, std::vector<T>& vec, int bits, int_type T::* field)
{
// nitems times, write bits bits from the given field of the ith vector to the given bit writer.
for (size_t i = 0; i < QIntC::to_size(nitems); ++i) {
w.writeBits(QIntC::to_ulonglong(vec.at(i).*field), QIntC::to_size(bits));
}
// The PDF spec says that each hint table starts at a byte boundary. Each "row" actually must
// start on a byte boundary.
w.flush();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, (%rsp)
movslq %esi, %rax
movq %rax, 0x10(%rsp)
movslq %ecx, %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
testl %r13d, %r13d
jns 0x1726d9
movl %r13d, %edi
callq 0x8808a
cmpq %r14, 0x10(%rsp)
je 0x172738
movq (%r15), %r12
movq 0x8(%r15), %rdx
subq %r12, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
cmpq %r14, %rdx
jbe 0x17274f
movq (%r12,%rbx), %rdi
testq %rdi, %rdi
jns 0x17270f
callq 0x14ee0a
movq (%r12,%rbx), %r12
testl %ebp, %ebp
jns 0x17271e
movl %ebp, %edi
callq 0x8808a
movq (%rsp), %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
callq 0x731c0
incq %r14
addq $0x58, %rbx
jmp 0x1726cc
movq (%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x732fc
leaq 0x43786(%rip), %rdi # 0x1b5edc
movq %r14, %rsi
xorl %eax, %eax
callq 0x682c0
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
void write_vector_vector<QPDF::HPageOffsetEntry>(BitWriter&, int, std::vector<QPDF::HPageOffsetEntry, std::allocator<QPDF::HPageOffsetEntry>>&, int QPDF::HPageOffsetEntry::*, int, std::vector<int, std::allocator<int>> QPDF::HPageOffsetEntry::*) | static void
write_vector_vector(
BitWriter& w,
int nitems1,
std::vector<T>& vec1,
int T::* nitems2,
int bits,
std::vector<int> T::* vec2)
{
// nitems1 times, write nitems2 (from the ith element of vec1) items from the vec2 vector field
// of the ith item of vec1.
for (size_t i1 = 0; i1 < QIntC::to_size(nitems1); ++i1) {
for (size_t i2 = 0; i2 < QIntC::to_size(vec1.at(i1).*nitems2); ++i2) {
w.writeBits(QIntC::to_ulonglong((vec1.at(i1).*vec2).at(i2)), QIntC::to_size(bits));
}
}
w.flush();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rdx, %r15
movq %rdi, 0x10(%rsp)
movl %esi, 0x8(%rsp)
movslq %esi, %rax
movq %rax, 0x18(%rsp)
movl %ecx, 0xc(%rsp)
movslq %ecx, %rax
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
cmpl $0x0, 0x8(%rsp)
jns 0x1727a3
movl 0x8(%rsp), %edi
callq 0x8808a
cmpq 0x18(%rsp), %rbx
je 0x1728a7
movq (%r15), %r13
movq 0x8(%r15), %rdx
subq %r13, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
cmpq %rbx, %rdx
jbe 0x1728bf
imulq $0x58, %rbx, %rbp
xorl %r12d, %r12d
movl 0x10(%r13,%rbp), %edi
testl %edi, %edi
jns 0x1727e8
callq 0x8808a
leaq 0x10(,%rbp), %rax
addq %r13, %rax
movslq (%rax), %rax
cmpq %rax, %r12
jae 0x17289f
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rdx
cmpq %rbx, %rdx
jbe 0x1728bf
addq %rbp, %rax
movq (%r14,%rax), %r13
movq 0x8(%r14,%rax), %rdx
subq %r13, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0x1728cb
movl (%r13,%r12,4), %edi
testl %edi, %edi
jns 0x17284e
callq 0x14ef6e
movslq (%r13,%r12,4), %r13
cmpl $0x0, 0xc(%rsp)
jns 0x172863
movl 0xc(%rsp), %edi
callq 0x8808a
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq 0x20(%rsp), %rdx
callq 0x731c0
incq %r12
movq (%r15), %r13
movq 0x8(%r15), %rdx
subq %r13, %rdx
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
cmpq %rbx, %rdx
ja 0x1727da
jmp 0x1728bf
incq %rbx
jmp 0x172793
movq 0x10(%rsp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x732fc
leaq 0x43616(%rip), %rdi # 0x1b5edc
movq %rbx, %rsi
jmp 0x1728d5
leaq 0x4360a(%rip), %rdi # 0x1b5edc
movq %r12, %rsi
xorl %eax, %eax
callq 0x682c0
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
void write_vector_int<QPDF::HSharedObjectEntry, int>(BitWriter&, int, std::vector<QPDF::HSharedObjectEntry, std::allocator<QPDF::HSharedObjectEntry>>&, int, int QPDF::HSharedObjectEntry::*) | static void
write_vector_int(BitWriter& w, int nitems, std::vector<T>& vec, int bits, int_type T::* field)
{
// nitems times, write bits bits from the given field of the ith vector to the given bit writer.
for (size_t i = 0; i < QIntC::to_size(nitems); ++i) {
w.writeBits(QIntC::to_ulonglong(vec.at(i).*field), QIntC::to_size(bits));
}
// The PDF spec says that each hint table starts at a byte boundary. Each "row" actually must
// start on a byte boundary.
w.flush();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, (%rsp)
movslq %esi, %rax
movq %rax, 0x10(%rsp)
movslq %ecx, %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
testl %r13d, %r13d
jns 0x172b29
movl %r13d, %edi
callq 0x8808a
cmpq %r14, 0x10(%rsp)
je 0x172b87
movq (%r15), %r12
movq 0x8(%r15), %rdx
subq %r12, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r14, %rdx
jbe 0x172b9e
movl (%r12,%rbx), %edi
testl %edi, %edi
jns 0x172b5e
callq 0x14ef6e
movslq (%r12,%rbx), %r12
testl %ebp, %ebp
jns 0x172b6d
movl %ebp, %edi
callq 0x8808a
movq (%rsp), %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
callq 0x731c0
incq %r14
addq $0xc, %rbx
jmp 0x172b1c
movq (%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x732fc
leaq 0x43337(%rip), %rdi # 0x1b5edc
movq %r14, %rsi
xorl %eax, %eax
callq 0x682c0
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
QPDF::generateHintStream(QPDFWriter::NewObjTable const&, QPDFWriter::ObjTable const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&, int&, bool) | void
QPDF::generateHintStream(
QPDFWriter::NewObjTable const& new_obj,
QPDFWriter::ObjTable const& obj,
std::string& hint_buffer,
int& S,
int& O,
bool compressed)
{
// Populate actual hint table values
calculateHPageOffset(new_obj, obj);
calculateHSharedObject(new_obj, obj);
calculateHOutline(new_obj, obj);
// Write the hint stream itself into a compressed memory buffer. Write through a counter so we
// can get offsets.
std::string b;
auto c = compressed
? std::make_unique<pl::Count>(
0, b, pl::create<Pl_Flate>(pl::create<pl::String>(hint_buffer), Pl_Flate::a_deflate))
: std::make_unique<pl::Count>(0, hint_buffer);
BitWriter w(c.get());
writeHPageOffset(w);
S = toI(c->getCount());
writeHSharedObject(w);
O = 0;
if (m->outline_hints.nobjects > 0) {
O = toI(c->getCount());
writeHGeneric(w, m->outline_hints);
}
c->finish();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, 0x38(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movb 0xa0(%rsp), %r15b
callq 0x171898
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x171f98
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x172310
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
testb %r15b, %r15b
je 0x172cc9
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x14cb77
leaq 0x44(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x14cace
movl $0x58, %edi
callq 0x68ab0
movq %rax, %r12
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
testq %rax, %rax
je 0x172d24
movq 0x8(%rax), %rdx
jmp 0x172d26
movl $0x58, %edi
callq 0x68ab0
movq %rax, %r13
movq $0x0, 0x20(%rsp)
leaq 0x5ff40(%rip), %rsi # 0x1d2c26
movq %rax, %rdi
xorl %edx, %edx
callq 0x6db00
leaq 0xd40b1(%rip), %rax # 0x246da8
movq %rax, (%r13)
xorl %eax, %eax
movq %rax, 0x30(%r13)
movq %r12, 0x38(%r13)
leaq 0x20(%rsp), %rdi
movq (%rdi), %rcx
movq %rcx, 0x40(%r13)
movq %rax, (%rdi)
movq %rax, 0x48(%r13)
movb $0x0, 0x50(%r13)
movq %r13, 0x8(%rsp)
jmp 0x172d71
xorl %edx, %edx
leaq 0x5fef9(%rip), %rsi # 0x1d2c26
movq %r12, %rdi
callq 0x6db00
leaq 0xd406c(%rip), %rax # 0x246da8
movq %rax, (%r12)
xorl %eax, %eax
movq %rax, 0x30(%r12)
leaq 0x48(%rsp), %rcx
movq %rcx, 0x38(%r12)
leaq 0x20(%rsp), %rdi
movq (%rdi), %rcx
movq %rcx, 0x40(%r12)
movq %rax, (%rdi)
movq %rax, 0x48(%r12)
movb $0x0, 0x50(%r12)
movq %r12, 0x8(%rsp)
callq 0x14c9a4
testb %r15b, %r15b
je 0x172d8f
leaq 0x10(%rsp), %rdi
callq 0x14c9a4
leaq 0x18(%rsp), %rdi
callq 0x14c9a4
testb %r15b, %r15b
movq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x731b0
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x17239c
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rcx
leaq 0x8(%rcx), %rdx
addq $0x30, %rax
testq %rcx, %rcx
cmovneq %rdx, %rax
movq (%rax), %r12
movslq %r12d, %rax
cmpq %r12, %rax
je 0x172dd9
movq %r12, %rdi
callq 0xc4ccc
movq 0x38(%rsp), %rax
movl %r12d, (%rax)
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1728dc
movl $0x0, (%rbx)
movq (%r14), %rax
cmpl $0x0, 0x410(%rax)
jle 0x172e4e
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rcx
leaq 0x8(%rcx), %rdx
addq $0x30, %rax
testq %rcx, %rcx
cmovneq %rdx, %rax
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq (%rax), %r15
leaq -0x80000000(%r15), %rax
cmpq %rcx, %rax
jae 0x172e39
movq %r15, %rdi
callq 0xc4ccc
movl %r15d, (%rbx)
movl $0x400, %edx # imm = 0x400
addq (%r14), %rdx
leaq 0x20(%rsp), %rsi
callq 0x172bb0
movq 0x8(%rsp), %rdi
callq 0x14c9ee
leaq 0x8(%rsp), %rdi
callq 0x1782e0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x172e79
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x172ef7
jmp 0x172ef7
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x14c9a4
movl $0x58, %esi
movq %r12, %rdi
jmp 0x172eba
jmp 0x172ec9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x14c9a4
movl $0x58, %esi
movq %r13, %rdi
callq 0x68760
jmp 0x172ecc
movq %rax, %rbx
movb $0x1, %r15b
jmp 0x172edb
movq %rax, %rbx
testb %r15b, %r15b
je 0x172edb
leaq 0x10(%rsp), %rdi
callq 0x14c9a4
testb %r15b, %r15b
je 0x172ef2
leaq 0x18(%rsp), %rdi
callq 0x14c9a4
jmp 0x172ef2
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
jmp 0x172f04
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1782e0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x172f1b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
ObjTable<QPDFWriter::NewObject>::element(unsigned long) const | inline T const&
element(size_t idx) const
{
static const size_t max_size = std::vector<T>::max_size();
if (idx < std::vector<T>::size()) {
return std::vector<T>::operator[](idx);
}
if (idx < max_size) {
return sparse_elements.at(idx);
}
throw std::runtime_error("Impossibly large object id encountered accessing ObjTable");
return element(0); // doesn't return
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movb 0xd36b7(%rip), %al # 0x24d648
testb %al, %al
je 0x179fd5
movq (%rsp), %rcx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rcx
jae 0x179fb5
shlq $0x5, %rcx
addq %rcx, %rax
jmp 0x179fcd
cmpq 0xd3684(%rip), %rcx # 0x24d640
jae 0x179fdc
addq $0x18, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x17a022
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x70138
jmp 0x179f95
movl $0x10, %edi
callq 0x6a000
movq %rax, %rbx
leaq 0x58f1a(%rip), %rsi # 0x1d2f0a
movq %rax, %rdi
callq 0x69460
movq 0xceea1(%rip), %rsi # 0x248ea0
movq 0xcedc2(%rip), %rdx # 0x248dc8
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
movq %rbx, %rdi
callq 0x6cf40
movq %r14, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/qpdf/ObjTable.hh |
QPDF::findStartxref() | bool
QPDF::findStartxref()
{
if (readToken(*m->file).isWord("startxref") && readToken(*m->file).isInteger()) {
// Position in front of offset token
m->file->seek(m->file->getLastOffset(), SEEK_SET);
return true;
}
return false;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x28(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5c211(%rip), %rsi # 0x1d63d1
leaq 0x5c213(%rip), %rdx # 0x1d63da
leaq 0x8(%rsp), %rdi
callq 0x68bb0
cmpl $0xd, 0x28(%rsp)
jne 0x17a204
movq 0x38(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x17a204
testq %rdx, %rdx
je 0x17a352
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %r15b
jmp 0x17a207
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x17a245
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x90(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
cmpl $0x7, 0x90(%rsp)
sete %bpl
jmp 0x17a247
xorl %ebp, %ebp
testb %r15b, %r15b
je 0x17a2af
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a26d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a28e
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a2af
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17a2c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a2e7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a302
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a31d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17a342
movq (%rbx), %rax
movq 0xb0(%rax), %rbx
movq %rbx, %rdi
callq 0x6cf20
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq *0x28(%rcx)
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r15b
jmp 0x17a207
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17a379
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a379
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8cd50
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::parse(char const*) | void
QPDF::parse(char const* password)
{
if (password) {
m->encp->provided_password = password;
}
// Find the header anywhere in the first 1024 bytes of the file.
PatternFinder hf(*this, &QPDF::findHeader);
if (!m->file->findFirst("%PDF-", 0, 1024, hf)) {
QTC::TC("qpdf", "QPDF not a pdf file");
warn(damagedPDF("", -1, "can't find PDF header"));
// QPDFWriter writes files that usually require at least version 1.2 for /FlateDecode
m->pdf_version = "1.2";
}
// PDF spec says %%EOF must be found within the last 1024 bytes of/ the file. We add an extra
// 30 characters to leave room for the startxref stuff.
m->file->seek(0, SEEK_END);
qpdf_offset_t end_offset = m->file->tell();
m->xref_table_max_offset = end_offset;
// Sanity check on object ids. All objects must appear in xref table / stream. In all realistic
// scenarios at least 3 bytes are required.
if (m->xref_table_max_id > m->xref_table_max_offset / 3) {
m->xref_table_max_id = static_cast<int>(m->xref_table_max_offset / 3);
}
qpdf_offset_t start_offset = (end_offset > 1054 ? end_offset - 1054 : 0);
PatternFinder sf(*this, &QPDF::findStartxref);
qpdf_offset_t xref_offset = 0;
if (m->file->findLast("startxref", start_offset, 0, sf)) {
xref_offset = QUtil::string_to_ll(readToken(*m->file).getValue().c_str());
}
try {
if (xref_offset == 0) {
QTC::TC("qpdf", "QPDF can't find startxref");
throw damagedPDF("", -1, "can't find startxref");
}
try {
read_xref(xref_offset);
} catch (QPDFExc&) {
throw;
} catch (std::exception& e) {
throw damagedPDF("", -1, std::string("error reading xref: ") + e.what());
}
} catch (QPDFExc& e) {
if (m->attempt_recovery) {
reconstruct_xref(e, xref_offset > 0);
QTC::TC("qpdf", "QPDF reconstructed xref table");
} else {
throw;
}
}
initializeEncryption();
m->parsed = true;
if (m->xref_table.size() > 0 && !getRoot().getKey("/Pages").isDictionary()) {
// QPDFs created from JSON have an empty xref table and no root object yet.
throw damagedPDF("", -1, "unable to find page tree");
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %rbx
testq %rsi, %rsi
je 0x17a3fb
movq %rsi, %r14
movq (%rbx), %rax
movq 0x108(%rax), %r15
movq 0x58(%r15), %r12
addq $0x50, %r15
movq %rsi, %rdi
callq 0x6a120
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x6a930
leaq 0xcd246(%rip), %r14 # 0x247648
leaq 0x108(%rsp), %r8
movq %r14, (%r8)
movq %rbx, 0x8(%r8)
leaq -0xeab24(%rip), %rax # 0x8f8f4
movq %rax, 0x10(%r8)
movq $0x0, 0x18(%r8)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
leaq 0x3d391(%rip), %rsi # 0x1b77c6
movl $0x400, %ecx # imm = 0x400
xorl %edx, %edx
callq 0x6c500
testb %al, %al
jne 0x17a519
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x587cc(%rip), %rdx # 0x1d2c26
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5bf39(%rip), %rsi # 0x1d63b0
leaq 0x5bf47(%rip), %rdx # 0x1d63c5
leaq 0x8(%rsp), %rdi
callq 0x68bb0
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x88(%rsp), %rdi
callq 0x6f2b8
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17a4dd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a4f4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %rdi
movq 0x120(%rdi), %rdx
addq $0x118, %rdi # imm = 0x118
leaq 0x57cdf(%rip), %rcx # 0x1d21eb
movl $0x3, %r8d
xorl %esi, %esi
callq 0x6a930
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x2, %edx
callq *0x28(%rax)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %rcx
movq (%rbx), %rsi
movq %rax, 0x170(%rsi)
movslq 0x168(%rsi), %rdi
movabsq $0x5555555555555556, %rdx # imm = 0x5555555555555556
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
addq %rdx, %rax
cmpq %rdi, %rax
jge 0x17a576
movl %eax, 0x168(%rsi)
leaq -0x41e(%rcx), %rdx
xorl %eax, %eax
cmpq $0x41f, %rcx # imm = 0x41F
cmovlq %rax, %rdx
leaq 0x68(%rsp), %r8
movq %r14, (%r8)
movq %rbx, 0x8(%r8)
leaq -0x425(%rip), %rcx # 0x17a178
movq %rcx, 0x10(%r8)
movq %rax, 0x18(%r8)
movq 0xb0(%rsi), %rdi
leaq 0x5be1e(%rip), %rsi # 0x1d63d1
xorl %ecx, %ecx
callq 0x6e250
testb %al, %al
je 0x17a662
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x88(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
movq 0x90(%rsp), %rdi
callq 0x6a510
movq %rax, %r14
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a61e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a63f
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a665
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a665
xorl %r14d, %r14d
testq %r14, %r14
je 0x17a756
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17ac2a
movq %rbx, %rdi
callq 0x15bce4
movq (%rbx), %rax
movb $0x1, 0x2d4(%rax)
movq 0x160(%rax), %r14
testq %r14, %r14
je 0x17a6f5
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x6ac80
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x44a81(%rip), %rsi # 0x1bf139
leaq 0x44a80(%rip), %rdx # 0x1bf13f
leaq 0x88(%rsp), %rdi
callq 0x68bb0
leaq 0x58(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x6ba70
leaq 0x58(%rsp), %rdi
callq 0x6b6a0
movl %eax, %ebp
xorb $0x1, %bpl
jmp 0x17a6f7
xorl %ebp, %ebp
testq %r14, %r14
je 0x17a73b
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17a70b
callq 0x69d60
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17a72c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x17a73b
callq 0x69d60
testb %bpl, %bpl
jne 0x17a7e6
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r13
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x584b0(%rip), %rdx # 0x1d2c26
leaq 0x88(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5bc30(%rip), %rsi # 0x1d63c6
leaq 0x5bc3d(%rip), %rdx # 0x1d63da
leaq 0x8(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x88(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xce516(%rip), %rsi # 0x248ce8
movq 0xce48f(%rip), %rdx # 0x248c68
movq %r13, %rdi
callq 0x6b420
jmp 0x17ab5c
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x58422(%rip), %rdx # 0x1d2c26
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5bbcf(%rip), %rsi # 0x1d63f0
leaq 0x5bbe0(%rip), %rdx # 0x1d6408
leaq 0x28(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xce48e(%rip), %rsi # 0x248ce8
movq 0xce407(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ab5c
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x17a890
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a890
movq %rax, %r15
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a903
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a903
movq %rdx, %r12
movq %rax, %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17a8d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a8d6
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x17a922
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a922
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17ac22
movq %r14, %rdi
callq 0x6cf40
jmp 0x17ac22
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17aa10
movq %r13, %rdi
callq 0x6cf40
jmp 0x17aa10
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x8cd50
jmp 0x17ac22
jmp 0x17ac1f
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x6f2b8
jmp 0x17a967
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17a983
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a983
movq %rax, %r15
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x17ac22
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17ac22
jmp 0x17ac1f
movq %rax, %r15
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17a9bf
callq 0x69d60
jmp 0x17a9bf
movq %rax, %r15
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a9e1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17a9e1
movq %rax, %r15
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x17ac22
callq 0x69d60
jmp 0x17ac22
jmp 0x17ac1f
movq %rdx, %r12
movq %rax, %r15
cmpl $0x2, %r12d
je 0x17aa55
cmpl $0x1, %r12d
je 0x17aa67
cmpl $0x2, %r12d
jne 0x17ac22
movq %r15, %rdi
callq 0x683f0
movq (%rbx), %rcx
cmpb $0x1, 0x100(%rcx)
jne 0x17aa4b
xorl %edx, %edx
testq %r14, %r14
setg %dl
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17b790
callq 0x6c2d0
jmp 0x17a679
callq 0x6c640
jmp 0x17ab5c
movq %r15, %rdi
callq 0x683f0
callq 0x6c640
jmp 0x17ab5c
movq %r15, %rdi
callq 0x683f0
movq %rax, %r15
movl $0x80, %edi
callq 0x6a000
movq %rax, %r13
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x58194(%rip), %rdx # 0x1d2c26
leaq 0x88(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5b929(%rip), %rsi # 0x1d63db
leaq 0x5b936(%rip), %rdx # 0x1d63ef
leaq 0x28(%rsp), %rdi
callq 0x68bb0
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x6b8d0
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x17aafe
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x17ab0b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x88(%rsp), %rdx
movq %r13, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xce19b(%rip), %rsi # 0x248ce8
movq 0xce114(%rip), %rdx # 0x248c68
movq %r13, %rdi
callq 0x6b420
movq %rdx, %r12
movq %rax, %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17ab89
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17ab89
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x17abb0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17abb0
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x17abe0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17abe0
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17abed
movq %r13, %rdi
callq 0x6cf40
callq 0x6c2d0
jmp 0x17aa10
movq %rdx, %r12
movq %rax, %r15
callq 0x6c2d0
jmp 0x17aa10
jmp 0x17ac1f
movq %rax, %r15
callq 0x6c2d0
jmp 0x17ac22
movq %rax, %rdi
callq 0x7cc8d
jmp 0x17ac1f
jmp 0x17ac1f
movq %rax, %r15
movq %r15, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::read_xref(long long) | void
QPDF::read_xref(qpdf_offset_t xref_offset)
{
std::map<int, int> free_table;
std::set<qpdf_offset_t> visited;
while (xref_offset) {
visited.insert(xref_offset);
char buf[7];
memset(buf, 0, sizeof(buf));
m->file->seek(xref_offset, SEEK_SET);
// Some files miss the mark a little with startxref. We could do a better job of searching
// in the neighborhood for something that looks like either an xref table or stream, but the
// simple heuristic of skipping whitespace can help with the xref table case and is harmless
// with the stream case.
bool done = false;
bool skipped_space = false;
while (!done) {
char ch;
if (1 == m->file->read(&ch, 1)) {
if (util::is_space(ch)) {
skipped_space = true;
} else {
m->file->unreadCh(ch);
done = true;
}
} else {
QTC::TC("qpdf", "QPDF eof skipping spaces before xref", skipped_space ? 0 : 1);
done = true;
}
}
m->file->read(buf, sizeof(buf) - 1);
// The PDF spec says xref must be followed by a line terminator, but files exist in the wild
// where it is terminated by arbitrary whitespace.
if ((strncmp(buf, "xref", 4) == 0) && util::is_space(buf[4])) {
if (skipped_space) {
QTC::TC("qpdf", "QPDF xref skipped space");
warn(damagedPDF("", -1, "extraneous whitespace seen before xref"));
}
QTC::TC(
"qpdf",
"QPDF xref space",
((buf[4] == '\n') ? 0
: (buf[4] == '\r') ? 1
: (buf[4] == ' ') ? 2
: 9999));
int skip = 4;
// buf is null-terminated, and util::is_space('\0') is false, so this won't overrun.
while (util::is_space(buf[skip])) {
++skip;
}
xref_offset = read_xrefTable(xref_offset + skip);
} else {
xref_offset = read_xrefStream(xref_offset);
}
if (visited.count(xref_offset) != 0) {
QTC::TC("qpdf", "QPDF xref loop");
throw damagedPDF("", -1, "loop detected following xref tables");
}
}
if (!m->trailer) {
throw damagedPDF("", -1, "unable to find trailer while reading xref");
}
int size = m->trailer.getKey("/Size").getIntValueAsInt();
int max_obj = 0;
if (!m->xref_table.empty()) {
max_obj = m->xref_table.rbegin()->first.getObj();
}
if (!m->deleted_objects.empty()) {
max_obj = std::max(max_obj, *(m->deleted_objects.rbegin()));
}
if ((size < 1) || (size - 1 != max_obj)) {
QTC::TC("qpdf", "QPDF xref size mismatch");
warn(damagedPDF(
"",
-1,
("reported number of objects (" + std::to_string(size) +
") is not one plus the highest object number (" + std::to_string(max_obj) + ")")));
}
// We no longer need the deleted_objects table, so go ahead and clear it out to make sure we
// never depend on its being set.
m->deleted_objects.clear();
// Make sure we keep only the highest generation for any object.
QPDFObjGen last_og{-1, 0};
for (auto const& item: m->xref_table) {
auto id = item.first.getObj();
if (id == last_og.getObj() && id > 0) {
removeObject(last_og);
}
last_og = item.first;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdi, %rbx
movq %rsi, 0x20(%rsp)
leaq 0x1a0(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x170(%rsp), %rdx
movl %ecx, (%rdx)
movq %rcx, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rcx, 0x20(%rdx)
testq %rsi, %rsi
je 0x17aec2
leaq 0xe8(%rsp), %r12
leaq 0x48(%rsp), %r15
leaq 0x168(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x69860
movq %r15, %r14
xorl %eax, %eax
movl %eax, 0x2b(%rsp)
movl %eax, 0x28(%rsp)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq 0x20(%rsp), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x28(%rax)
xorl %r15d, %r15d
xorl %r13d, %r13d
movl %r13d, %ebp
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movq %r12, %rsi
callq *0x38(%rax)
cmpq $0x1, %rax
jne 0x17ad21
movb 0xe8(%rsp), %al
movzbl %al, %ecx
movb $0x1, %r13b
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jb 0x17ad27
cmpl $0x20, %ecx
je 0x17ad27
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdi
movq (%rdi), %rcx
movb $0x1, %r15b
movsbl %al, %esi
callq *0x40(%rcx)
movl %ebp, %r13d
jmp 0x17ad27
movl %ebp, %r13d
movb $0x1, %r15b
testb $0x1, %r15b
je 0x17accb
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movl $0x6, %edx
leaq 0x28(%rsp), %rsi
callq *0x38(%rax)
cmpl $0x66657278, 0x28(%rsp) # imm = 0x66657278
je 0x17ad6e
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x17f148
movq %r14, %r15
leaq 0x170(%rsp), %r14
jmp 0x17ae5a
movzbl 0x2c(%rsp), %eax
leal -0x9(%rax), %ecx
cmpl $0x5, %ecx
jae 0x17aeb4
testb $0x1, %r13b
movq %r14, %r15
leaq 0x170(%rsp), %r14
je 0x17ae31
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
leaq 0x57e7f(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r15, %rdi
leaq 0x5b867(%rip), %rsi # 0x1d662a
leaq 0x5b886(%rip), %rdx # 0x1d6650
callq 0x68bb0
movq %r12, %rdi
movq %rbx, %rsi
movq %rsp, %rdx
movq $-0x1, %rcx
movq %r15, %r8
callq 0x91596
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6b880
movq %r12, %rdi
callq 0x6f2b8
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x17ae16
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17ae31
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movl $0x4, %esi
movzbl 0x28(%rsp,%rsi), %eax
leal -0x9(%rax), %ecx
cmpl $0x5, %ecx
jae 0x17ae48
incq %rsi
jmp 0x17ae36
cmpl $0x20, %eax
je 0x17ae43
addq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x17e3e8
movq %rax, 0x20(%rsp)
movq 0x178(%rsp), %rdx
movq %r14, %rcx
testq %rdx, %rdx
je 0x17ae8a
movq %r14, %rcx
xorl %esi, %esi
cmpq %rax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x17ae72
movq %r14, %rdx
cmpq %r14, %rcx
je 0x17ae9d
cmpq 0x20(%rcx), %rax
cmovlq %r14, %rcx
movq %rcx, %rdx
cmpq %r14, %rdx
jne 0x17b465
cmpq $0x0, 0x20(%rsp)
jne 0x17ac8f
jmp 0x17aec2
cmpl $0x20, %eax
jne 0x17ad51
jmp 0x17ad7f
movq (%rbx), %r14
cmpq $0x0, 0x208(%r14)
je 0x17b4f0
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3f053(%rip), %rsi # 0x1b9f39
leaq 0x3f051(%rip), %rdx # 0x1b9f3e
leaq 0xe8(%rsp), %rdi
callq 0x68bb0
addq $0x208, %r14 # imm = 0x208
movq %rsp, %rdi
leaq 0xe8(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
movq %rsp, %rdi
callq 0x6bdf0
movl %eax, %r14d
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17af2e
callq 0x69d60
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x17af4b
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rbx), %r15
cmpq $0x0, 0x160(%r15)
je 0x17af6a
leaq 0x140(%r15), %rdi
callq 0x6a770
movl 0x20(%rax), %r12d
jmp 0x17af6d
xorl %r12d, %r12d
cmpq $0x0, 0x1a0(%r15)
je 0x17af93
addq $0x180, %r15 # imm = 0x180
movq %r15, %rdi
callq 0x6e050
movl 0x20(%rax), %eax
cmpl %eax, %r12d
cmovgl %r12d, %eax
movl %eax, %r12d
testl %r14d, %r14d
jle 0x17afa5
leal -0x1(%r14), %eax
cmpl %r12d, %eax
je 0x17b3c7
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x57c71(%rip), %rdx # 0x1d2c26
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x68bb0
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x17b01d
movl $0x4, %r15d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x17b014
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x17b01a
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x17b01d
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x17afe1
addl $-0x3, %r15d
jmp 0x17b01d
addl $-0x2, %r15d
jmp 0x17b01d
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc8(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r14d, %edi
leaq 0xc8(%rsp), %r14
addq (%r14), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x6c7a0
leaq 0x5b63d(%rip), %rcx # 0x1d669f
movl $0x1c, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0xb8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17b0a4
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x17b0aa
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0xa8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x5b5ec(%rip), %rsi # 0x1d66bc
callq 0x6b8d0
leaq 0x98(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17b108
movq %rsi, %r15
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x17b111
movups (%rcx), %xmm0
movq %rsi, %r15
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x17b189
movl $0x4, %r14d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x17b180
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x17b186
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x17b189
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x17b14d
addl $-0x3, %r14d
jmp 0x17b189
addl $-0x2, %r14d
jmp 0x17b189
decl %r14d
shrl $0x1f, %r12d
leal (%r14,%r12), %esi
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x68(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
movl %r12d, %edi
addq 0x68(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6c7a0
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x17b1e6
movq 0x98(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x17b201
movl $0xf, %esi
cmpq %r13, 0x68(%rsp)
je 0x17b1fc
movq 0x78(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x17b215
movq 0x68(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x6bfe0
jmp 0x17b223
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x17b247
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x17b24d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x56f4c(%rip), %rsi # 0x1d21bd
leaq 0x28(%rsp), %rdi
callq 0x6b8d0
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17b2a2
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x17b2a9
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x17b313
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17b32e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x17b345
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
leaq 0x10(%rsp), %r14
leaq 0xd8(%rsp), %r15
je 0x17b36f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17b394
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x17b3b1
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x17b3c7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movl $0x178, %edi # imm = 0x178
addq (%rbx), %rdi
callq 0x6daa0
movq (%rbx), %r12
movq 0x150(%r12), %r14
addq $0x140, %r12 # imm = 0x140
cmpq %r12, %r14
je 0x17b439
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movl 0x20(%r14), %eax
cmpl %ebp, %eax
setne %cl
testl %eax, %eax
setle %al
orb %cl, %al
jne 0x17b41f
movl %ebp, %eax
orq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17f41e
movq 0x20(%r14), %rbp
movq %rbp, %r15
andq %r13, %r15
movq %r14, %rdi
callq 0x6d980
movq %rax, %r14
cmpq %r12, %rax
jne 0x17b3fd
leaq 0x168(%rsp), %rdi
callq 0x6e8e0
leaq 0x198(%rsp), %rdi
callq 0x6ceb0
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x577a1(%rip), %rdx # 0x1d2c26
leaq 0xe8(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5b1aa(%rip), %rsi # 0x1d6651
leaq 0x5b1c6(%rip), %rdx # 0x1d6674
callq 0x68bb0
movb $0x1, %bpl
leaq 0xe8(%rsp), %rdx
movq %rsp, %r8
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xcd80c(%rip), %rsi # 0x248ce8
movq 0xcd785(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17b578
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x57716(%rip), %rdx # 0x1d2c26
leaq 0xe8(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5b144(%rip), %rsi # 0x1d6675
leaq 0x5b166(%rip), %rdx # 0x1d669e
movq %rsp, %rdi
callq 0x68bb0
movb $0x1, %bpl
leaq 0xe8(%rsp), %rdx
movq %rsp, %r8
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xcd77f(%rip), %rsi # 0x248ce8
movq 0xcd6f8(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x17b717
jmp 0x17b72c
jmp 0x17b726
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
jmp 0x17b5a7
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x17b5c3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b5c3
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17b5e3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b5e3
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x17b5ff
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b5ff
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x17b621
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b621
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17b64b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b64b
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x17b6e7
movq 0xd8(%rsp), %rsi
jmp 0x17b6da
jmp 0x17b6e4
jmp 0x17b76a
jmp 0x17b74d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17b691
callq 0x69d60
jmp 0x17b691
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x17b76d
movq 0xf8(%rsp), %rsi
jmp 0x17b6fa
jmp 0x17b76a
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
jmp 0x17b6c6
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x17b6e7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b6e7
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17b76d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b76d
jmp 0x17b76a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17b72c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b72c
movq %rax, %rbx
movb $0x1, %bpl
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x17b753
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17b753
jmp 0x17b76a
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17b76d
movq %r14, %rdi
callq 0x6cf40
jmp 0x17b76d
jmp 0x17b76a
jmp 0x17b76a
jmp 0x17b76a
jmp 0x17b76a
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x6e8e0
leaq 0x198(%rsp), %rdi
callq 0x6ceb0
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::reconstruct_xref(QPDFExc&, bool) | void
QPDF::reconstruct_xref(QPDFExc& e, bool found_startxref)
{
if (m->reconstructed_xref) {
// Avoid xref reconstruction infinite loops. This is getting very hard to reproduce because
// qpdf is throwing many fewer exceptions while parsing. Most situations are warnings now.
throw e;
}
// If recovery generates more than 1000 warnings, the file is so severely damaged that there
// probably is no point trying to continue.
const auto max_warnings = m->warnings.size() + 1000U;
auto check_warnings = [this, max_warnings]() {
if (m->warnings.size() > max_warnings) {
throw damagedPDF("", -1, "too many errors while reconstructing cross-reference table");
}
};
m->reconstructed_xref = true;
// We may find more objects, which may contain dangling references.
m->fixed_dangling_refs = false;
warn(damagedPDF("", -1, "file is damaged"));
warn(e);
warn(damagedPDF("", -1, "Attempting to reconstruct cross-reference table"));
// Delete all references to type 1 (uncompressed) objects
std::vector<QPDFObjGen> to_delete;
for (auto const& iter: m->xref_table) {
if (iter.second.getType() == 1) {
to_delete.emplace_back(iter.first);
}
}
for (auto const& iter: to_delete) {
m->xref_table.erase(iter);
}
std::vector<std::tuple<int, int, qpdf_offset_t>> found_objects;
std::vector<qpdf_offset_t> trailers;
std::vector<qpdf_offset_t> startxrefs;
m->file->seek(0, SEEK_END);
qpdf_offset_t eof = m->file->tell();
m->file->seek(0, SEEK_SET);
// Don't allow very long tokens here during recovery. All the interesting tokens are covered.
static size_t const MAX_LEN = 10;
while (m->file->tell() < eof) {
QPDFTokenizer::Token t1 = readToken(*m->file, MAX_LEN);
qpdf_offset_t token_start = m->file->tell() - toO(t1.getValue().length());
if (t1.isInteger()) {
auto pos = m->file->tell();
auto t2 = readToken(*m->file, MAX_LEN);
if (t2.isInteger() && readToken(*m->file, MAX_LEN).isWord("obj")) {
int obj = QUtil::string_to_int(t1.getValue().c_str());
int gen = QUtil::string_to_int(t2.getValue().c_str());
if (obj <= m->xref_table_max_id) {
found_objects.emplace_back(obj, gen, token_start);
} else {
warn(damagedPDF(
"", -1, "ignoring object with impossibly large id " + std::to_string(obj)));
}
}
m->file->seek(pos, SEEK_SET);
} else if (!m->trailer && t1.isWord("trailer")) {
trailers.emplace_back(m->file->tell());
} else if (!found_startxref && t1.isWord("startxref")) {
startxrefs.emplace_back(m->file->tell());
}
check_warnings();
m->file->findAndSkipNextEOL();
}
if (!found_startxref && !startxrefs.empty() && !found_objects.empty() &&
startxrefs.back() > std::get<2>(found_objects.back())) {
try {
m->file->seek(startxrefs.back(), SEEK_SET);
if (auto offset = QUtil::string_to_ll(readToken(*m->file).getValue().data())) {
read_xref(offset);
if (getRoot().getKey("/Pages").isDictionary()) {
QTC::TC("qpdf", "QPDF startxref more than 1024 before end");
warn(damagedPDF(
"", -1, "startxref was more than 1024 bytes before end of file"));
initializeEncryption();
m->parsed = true;
m->reconstructed_xref = false;
return;
}
}
} catch (...) {
// ok, bad luck. Do recovery.
}
}
auto rend = found_objects.rend();
for (auto it = found_objects.rbegin(); it != rend; it++) {
auto [obj, gen, token_start] = *it;
insertXrefEntry(obj, 1, token_start, gen);
check_warnings();
}
m->deleted_objects.clear();
for (auto it = trailers.rbegin(); it != trailers.rend(); it++) {
m->file->seek(*it, SEEK_SET);
auto t = readTrailer();
if (!t.isDictionary()) {
// Oh well. It was worth a try.
} else {
if (t.hasKey("/Root")) {
m->trailer = t;
break;
}
warn(damagedPDF("trailer", *it, "recovered trailer has no /Root entry"));
}
check_warnings();
}
if (!m->trailer) {
qpdf_offset_t max_offset{0};
size_t max_size{0};
// If there are any xref streams, take the last one to appear.
for (auto const& iter: m->xref_table) {
auto entry = iter.second;
if (entry.getType() != 1) {
continue;
}
auto oh = getObject(iter.first);
try {
if (!oh.isStreamOfType("/XRef")) {
continue;
}
} catch (std::exception&) {
continue;
}
auto offset = entry.getOffset();
auto size = oh.getDict().getKey("/Size").getUIntValueAsUInt();
if (size > max_size || (size == max_size && offset > max_offset)) {
max_offset = offset;
setTrailer(oh.getDict());
}
check_warnings();
}
if (max_offset > 0) {
try {
read_xref(max_offset);
} catch (std::exception&) {
warn(damagedPDF(
"", -1, "error decoding candidate xref stream while recovering damaged file"));
}
QTC::TC("qpdf", "QPDF recover xref stream");
}
}
if (!m->trailer || (!m->parsed && !m->trailer.getKey("/Root").isDictionary())) {
// Try to find a Root dictionary. As a quick fix try the one with the highest object id.
QPDFObjectHandle root;
for (auto const& iter: m->obj_cache) {
try {
if (QPDFObjectHandle(iter.second.object).isDictionaryOfType("/Catalog")) {
root = iter.second.object;
}
} catch (std::exception&) {
continue;
}
}
if (root) {
if (!m->trailer) {
warn(damagedPDF(
"", -1, "unable to find trailer dictionary while recovering damaged file"));
m->trailer = QPDFObjectHandle::newDictionary();
}
m->trailer.replaceKey("/Root", root);
}
}
if (!m->trailer) {
// We could check the last encountered object to see if it was an xref stream. If so, we
// could try to get the trailer from there. This may make it possible to recover files with
// bad startxref pointers even when they have object streams.
throw damagedPDF("", -1, "unable to find trailer dictionary while recovering damaged file");
}
if (m->xref_table.empty()) {
// We cannot check for an empty xref table in parse because empty tables are valid when
// creating QPDF objects from JSON.
throw damagedPDF("", -1, "unable to find objects while recovering damaged file");
}
check_warnings();
if (!m->parsed) {
m->parsed = true;
getAllPages();
check_warnings();
if (m->all_pages.empty()) {
m->parsed = false;
throw damagedPDF("", -1, "unable to find any pages while recovering damaged file");
}
}
// We could iterate through the objects looking for streams and try to find objects inside of
// them, but it's probably not worth the trouble. Acrobat can't recover files with any errors
// in an xref stream, and this would be a real long shot anyway. If we wanted to do anything
// that involved looking at stream contents, we'd also have to call initializeEncryption() here.
// It's safe to call it more than once.
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp # imm = 0x348
movl %edx, 0x10(%rsp)
movq %rsi, %r14
movq (%rdi), %rax
cmpb $0x1, 0x2d0(%rax)
je 0x17c4e3
movq %rdi, %rbx
movq 0x278(%rax), %rcx
subq 0x270(%rax), %rcx
sarq $0x7, %rcx
addq $0x3e8, %rcx # imm = 0x3E8
movq %rdi, 0x208(%rsp)
movq %rcx, 0x210(%rsp)
movw $0x1, 0x2d0(%rax)
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x57426(%rip), %rdx # 0x1d2c26
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5ac56(%rip), %rsi # 0x1d6476
leaq 0x5ac5e(%rip), %rdx # 0x1d6485
leaq 0x40(%rsp), %rdi
callq 0x68bb0
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x110(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17b88e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17b8b3
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6b880
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5734e(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5ab92(%rip), %rsi # 0x1d6486
leaq 0x5abba(%rip), %rdx # 0x1d64b5
callq 0x68bb0
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x110(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17b95d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17b982
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
xorps %xmm0, %xmm0
movaps %xmm0, 0x240(%rsp)
movq $0x0, 0x250(%rsp)
movq (%rbx), %r12
movq 0x150(%r12), %r14
addq $0x140, %r12 # imm = 0x140
cmpq %r12, %r14
je 0x17b9e2
leaq 0x240(%rsp), %r15
leaq 0x28(%r14), %rdi
callq 0x6cb90
cmpl $0x1, %eax
jne 0x17b9d2
leaq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x1885f4
movq %r14, %rdi
callq 0x6d980
movq %rax, %r14
cmpq %r12, %rax
jne 0x17b9b8
movq 0x240(%rsp), %r14
movq 0x248(%rsp), %r12
cmpq %r12, %r14
je 0x17ba22
movl $0x138, %r13d # imm = 0x138
movq (%rbx), %r15
addq %r13, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x18b7f4
movq %r15, %rdi
movq %rax, %rsi
callq 0x18b8d0
addq $0x8, %r14
cmpq %r12, %r14
jne 0x17b9fd
xorps %xmm0, %xmm0
movaps %xmm0, 0x220(%rsp)
xorl %eax, %eax
movq %rax, 0x230(%rsp)
movq %rax, 0x1e0(%rsp)
movaps %xmm0, 0x1d0(%rsp)
movq %rax, 0x200(%rsp)
movaps %xmm0, 0x1f0(%rsp)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x2, %edx
callq *0x28(%rax)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r13
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
xorl %esi, %esi
xorl %edx, %edx
callq *0x28(%rax)
leaq 0x100(%rsp), %r14
movq %rbx, 0x8(%rsp)
movq %r13, 0x260(%rsp)
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpq %r13, %rax
jge 0x17c254
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
movl $0xa, %r9d
leaq 0xa8(%rsp), %rdi
movl $0x1, %r8d
callq 0x139b62
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r15
movq 0xb8(%rsp), %r12
testq %r12, %r12
jns 0x17bb19
movq %r12, %rdi
callq 0x73d3a
subq %r12, %r15
movq %r15, 0x2d8(%rsp)
cmpl $0x7, 0xa8(%rsp)
movq (%rbx), %rax
jne 0x17bc2d
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r13
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
movl $0xa, %r9d
leaq 0x40(%rsp), %rdi
movl $0x1, %r8d
callq 0x139b62
movl 0x40(%rsp), %ebp
cmpl $0x7, %ebp
jne 0x17bd1d
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
movl $0xa, %r9d
leaq 0x2e0(%rsp), %rdi
movl $0x1, %r8d
callq 0x139b62
leaq 0x2c8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
leaq 0x2b8(%rsp), %rdi
leaq 0x5b25e(%rip), %rsi # 0x1d6e32
leaq 0x5b25a(%rip), %rdx # 0x1d6e35
callq 0x68bb0
cmpl $0xd, 0x2e0(%rsp)
jne 0x17bd1d
movq 0x2f0(%rsp), %rdx
cmpq 0x2c0(%rsp), %rdx
jne 0x17bd1d
testq %rdx, %rdx
je 0x17bfd5
movq 0x2b8(%rsp), %rsi
movq 0x2e8(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %r15b
jmp 0x17bd20
movq 0x208(%rax), %r15
testq %r15, %r15
jne 0x17bca6
leaq 0x2a8(%rsp), %rax
movq %rax, 0x298(%rsp)
leaq 0x298(%rsp), %rdi
leaq 0x5b01e(%rip), %rsi # 0x1d6c76
leaq 0x5b01e(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
cmpl $0xd, 0xa8(%rsp)
jne 0x17bca6
movq 0xb8(%rsp), %rdx
cmpq 0x2a0(%rsp), %rdx
jne 0x17bca6
testq %rdx, %rdx
je 0x17bfdd
movq 0x298(%rsp), %rsi
movq 0xb0(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %bpl
jmp 0x17bca8
xorl %ebp, %ebp
testq %r15, %r15
jne 0x17bcd2
movq 0x298(%rsp), %rdi
leaq 0x2a8(%rsp), %rax
cmpq %rax, %rdi
je 0x17bcd2
movq 0x2a8(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17be91
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x110(%rsp)
movq 0x1d8(%rsp), %rsi
cmpq 0x1e0(%rsp), %rsi
je 0x17bfa1
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x1d8(%rsp)
jmp 0x17c1bf
xorl %r15d, %r15d
cmpl $0x7, %ebp
jne 0x17bdbd
movq 0x2b8(%rsp), %rdi
leaq 0x2c8(%rsp), %rax
cmpq %rax, %rdi
je 0x17bd4e
movq 0x2c8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x328(%rsp), %rdi
leaq 0x338(%rsp), %rax
cmpq %rax, %rdi
je 0x17bd73
movq 0x338(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x308(%rsp), %rdi
leaq 0x318(%rsp), %rax
cmpq %rax, %rdi
je 0x17bd98
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x2e8(%rsp), %rdi
leaq 0x2f8(%rsp), %rax
cmpq %rax, %rdi
je 0x17bdbd
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x68760
testb %r15b, %r15b
je 0x17c13b
movq 0xb0(%rsp), %rdi
callq 0x6e450
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
callq 0x6e450
movl %eax, 0x21c(%rsp)
movl 0x3c(%rsp), %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
cmpl 0x168(%rcx), %eax
jle 0x17bf7a
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x56e10(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
movl 0x3c(%rsp), %ebp
movl %ebp, %r15d
negl %r15d
cmovsl %ebp, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
leaq 0x1b0(%rsp), %rbx
jb 0x17bfee
movl $0x4, %r12d
movl %r15d, %eax
movl $0xd1b71759, %edx # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x17bfe5
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x17bfeb
cmpl $0x2710, %eax # imm = 0x2710
jb 0x17bfee
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x17be52
addl $-0x3, %r12d
jmp 0x17bfee
cmpb $0x0, 0x10(%rsp)
jne 0x17bf05
leaq 0x288(%rsp), %rax
movq %rax, 0x278(%rsp)
leaq 0x278(%rsp), %rdi
leaq 0x5a51a(%rip), %rsi # 0x1d63d1
leaq 0x5a51c(%rip), %rdx # 0x1d63da
callq 0x68bb0
cmpl $0xd, 0xa8(%rsp)
jne 0x17bf05
movq 0xb8(%rsp), %rdx
cmpq 0x280(%rsp), %rdx
jne 0x17bf05
testq %rdx, %rdx
je 0x17c24c
movq 0x278(%rsp), %rsi
movq 0xb0(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %bpl
jmp 0x17bf07
xorl %ebp, %ebp
cmpb $0x0, 0x10(%rsp)
jne 0x17bf33
movq 0x278(%rsp), %rdi
leaq 0x288(%rsp), %rax
cmpq %rax, %rdi
je 0x17bf33
movq 0x288(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17c1bf
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x110(%rsp)
movq 0x1f8(%rsp), %rsi
cmpq 0x200(%rsp), %rsi
je 0x17bfbb
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x1f8(%rsp)
jmp 0x17c1bf
leaq 0x220(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
leaq 0x21c(%rsp), %rdx
leaq 0x2d8(%rsp), %rcx
callq 0x6e290
jmp 0x17c13b
leaq 0x1d0(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0x6a290
jmp 0x17c1bf
leaq 0x1f0(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0x6a290
jmp 0x17c1bf
movb $0x1, %r15b
jmp 0x17bd20
movb $0x1, %bpl
jmp 0x17bca8
addl $-0x2, %r12d
jmp 0x17bfee
decl %r12d
shrl $0x1f, %ebp
leal (%r12,%rbp), %esi
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x6b1f0
addq 0x1b0(%rsp), %rbp
movq %rbp, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x6c7a0
movl $0x29, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x5a47a(%rip), %rcx # 0x1d64b6
callq 0x68b10
leaq 0x1a0(%rsp), %rsi
movq %rsi, 0x190(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x110(%rsp), %rbx
je 0x17c07d
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x17c083
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x198(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
leaq 0x18(%rsp), %rdx
movq $-0x1, %rcx
leaq 0x190(%rsp), %r8
callq 0x91596
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6b880
movq %rbx, %rdi
callq 0x6f2b8
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x17c0fa
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x17c11f
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x17c13b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq %r13, %rsi
xorl %edx, %edx
callq *0x28(%rax)
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
movq 0x260(%rsp), %r13
je 0x17c182
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
movq 0x8(%rsp), %rbx
je 0x17c1a3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x17c1bf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x208(%rsp), %rdi
callq 0x17d87c
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x17c1f9
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x17c21e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x17baaa
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17baaa
movb $0x1, %bpl
jmp 0x17bf07
cmpb $0x0, 0x10(%rsp)
jne 0x17c5ea
movq 0x1f8(%rsp), %rax
cmpq %rax, 0x1f0(%rsp)
je 0x17c5ea
movq 0x228(%rsp), %rcx
cmpq %rcx, 0x220(%rsp)
je 0x17c5ea
movq -0x8(%rax), %rsi
cmpq -0x10(%rcx), %rsi
jle 0x17c5ea
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x28(%rax)
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x110(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
movq 0x118(%rsp), %rdi
callq 0x6a510
movq %rax, %r14
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17c307
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17c328
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17c349
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x68760
testq %r14, %r14
je 0x17c5ea
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17ac2a
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x6ac80
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x42dbc(%rip), %rsi # 0x1bf139
leaq 0x42dbb(%rip), %rdx # 0x1bf13f
leaq 0x110(%rsp), %rdi
callq 0x68bb0
leaq 0xa8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x6ba70
leaq 0xa8(%rsp), %rdi
callq 0x6b6a0
movl %eax, %ebp
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17c3cc
callq 0x69d60
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x17c3e9
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x17c3f8
callq 0x69d60
testb %bpl, %bpl
je 0x17c5ea
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5680b(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5a0a9(%rip), %rsi # 0x1d64e0
leaq 0x5a0d7(%rip), %rdx # 0x1d6515
callq 0x68bb0
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x110(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17c4a0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17c4c5
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x15bce4
movq (%rbx), %rax
movb $0x1, 0x2d4(%rax)
movb $0x0, 0x2d0(%rax)
jmp 0x17cfde
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x6aaa0
movq 0xcc7e6(%rip), %rsi # 0x248ce8
movq 0xcc75f(%rip), %rdx # 0x248c68
movq %rbx, %rdi
callq 0x6b420
movq %rax, %r14
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17c526
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17c547
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17c547
movq %rax, %r14
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17c5d8
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17c5d8
jmp 0x17c5d5
movq %rax, %r14
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17c58a
callq 0x69d60
jmp 0x17c58a
movq %rax, %r14
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x17c5ac
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17c5ac
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x17c5d8
callq 0x69d60
jmp 0x17c5d8
jmp 0x17c5d5
jmp 0x17c5d5
movq %rax, %r14
leaq 0x110(%rsp), %rdi
callq 0x8cd50
jmp 0x17c5d8
jmp 0x17c5d5
movq %rax, %r14
movq %r14, %rdi
callq 0x683f0
callq 0x6c2d0
movq 0x8(%rsp), %rbx
movq 0x220(%rsp), %r15
movq 0x228(%rsp), %r12
leaq 0x208(%rsp), %r14
cmpq %r15, %r12
je 0x17c631
movq -0x10(%r12), %rcx
movl -0x8(%r12), %r8d
movl -0x4(%r12), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x17d988
addq $-0x10, %r12
movq %r14, %rdi
callq 0x17d87c
jmp 0x17c602
movl $0x178, %edi # imm = 0x178
addq (%rbx), %rdi
callq 0x6daa0
movq 0x1d8(%rsp), %r15
cmpq 0x1d0(%rsp), %r15
je 0x17c812
leaq 0x18(%rsp), %r14
leaq 0x110(%rsp), %r13
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq -0x8(%r15), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x28(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17dd9c
movq %r14, %rdi
callq 0x6b6a0
addq $-0x8, %r15
testb %al, %al
je 0x17c7b7
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
movq %r13, %rdi
leaq 0x3b3bb(%rip), %rsi # 0x1b7a6b
leaq 0x3b3b9(%rip), %rdx # 0x1b7a70
callq 0x68bb0
movq %r14, %rdi
movq %r13, %rsi
callq 0x69f70
movl %eax, %ebp
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17c6ee
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
jne 0x17c7e3
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x5a560(%rip), %rsi # 0x1d6c76
leaq 0x5a560(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
movq (%r15), %rbp
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
leaq 0x59dd8(%rip), %rsi # 0x1d6516
leaq 0x59df5(%rip), %rdx # 0x1d653a
callq 0x68bb0
movq %r13, %rdi
movq %rbx, %rsi
leaq 0xa8(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
callq 0x91596
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6b880
movq %r13, %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17c792
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17c7b7
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x208(%rsp), %rdi
callq 0x17d87c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17c7d3
callq 0x69d60
cmpq 0x1d0(%rsp), %r15
jne 0x17c661
jmp 0x17c812
movq (%rbx), %rdi
leaq 0x20(%rsp), %r14
movq -0x8(%r14), %rax
movq %rax, 0x208(%rdi)
addq $0x210, %rdi # imm = 0x210
movq %r14, %rsi
callq 0x6c300
movq (%r14), %rdi
testq %rdi, %rdi
je 0x17c812
callq 0x69d60
movq (%rbx), %r14
cmpq $0x0, 0x208(%r14)
jne 0x17cb2a
movq 0x150(%r14), %r15
addq $0x140, %r14 # imm = 0x140
cmpq %r14, %r15
je 0x17cb0f
movq $0x0, 0x10(%rsp)
leaq 0xa8(%rsp), %r12
movq 0x38(%r15), %rax
movq %rax, 0x50(%rsp)
movups 0x28(%r15), %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x6cb90
cmpl $0x1, %eax
jne 0x17ca75
movq 0x20(%r15), %rdx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x6eb20
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x563f4(%rip), %rsi # 0x1d2c95
leaq 0x563f2(%rip), %rdx # 0x1d2c9a
callq 0x68bb0
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq %r12, %rdi
leaq 0x5635f(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x18(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movq %r12, %rdx
callq 0x6c970
movl %eax, %ebp
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17c90b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17c930
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17ca66
leaq 0x40(%rsp), %rdi
callq 0x6c1d0
movq %rax, %r13
leaq 0x190(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6ae50
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %rbp
movq %rbp, %rdi
leaq 0x3d5bf(%rip), %rsi # 0x1b9f39
leaq 0x3d5bd(%rip), %rdx # 0x1b9f3e
callq 0x68bb0
movq %r12, %rdi
leaq 0x190(%rsp), %rsi
movq %rbp, %rdx
callq 0x6ba70
movq %r12, %rdi
callq 0x6bec0
movl %eax, %ebp
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17c9b5
callq 0x69d60
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17c9da
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x198(%rsp), %rdi
testq %rdi, %rdi
je 0x17c9ec
callq 0x69d60
testl %ebp, %ebp
setne %al
cmpq 0x10(%rsp), %r13
setg %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x17ca59
leaq 0x268(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6ae50
movq (%rbx), %rdi
cmpq $0x0, 0x208(%rdi)
jne 0x17ca42
movq 0x268(%rsp), %rax
movq %rax, 0x208(%rdi)
addq $0x210, %rdi # imm = 0x210
leaq 0x270(%rsp), %rsi
callq 0x6c300
movq 0x270(%rsp), %rdi
testq %rdi, %rdi
je 0x17ca54
callq 0x69d60
movq %r13, 0x10(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x17d87c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17ca75
callq 0x69d60
movq %r15, %rdi
callq 0x6d980
movq %rax, %r15
cmpq %r14, %rax
jne 0x17c84b
jmp 0x17cb18
movq %rdx, %r13
movq %rax, %rbp
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17cac1
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17cac1
movq %rdx, %r13
movq %rax, %rbp
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17caee
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17caee
movq %rdx, %r13
movq %rax, %rbp
cmpl $0x2, %r13d
jne 0x17d5c9
movq %rbp, %rdi
callq 0x683f0
callq 0x6c2d0
movq 0x8(%rsp), %rbx
jmp 0x17ca66
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
jle 0x17cb2a
movq %rbx, %rdi
callq 0x17ac2a
movq (%rbx), %r14
cmpq $0x0, 0x208(%r14)
je 0x17cb47
cmpb $0x0, 0x2d4(%r14)
je 0x17cb4e
xorl %eax, %eax
xorl %ebp, %ebp
jmp 0x17cba8
movb $0x1, %bpl
xorl %eax, %eax
jmp 0x17cba8
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x3af03(%rip), %rsi # 0x1b7a6b
leaq 0x3af01(%rip), %rdx # 0x1b7a70
callq 0x68bb0
addq $0x208, %r14 # imm = 0x208
leaq 0x190(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
leaq 0x190(%rsp), %rdi
callq 0x6b6a0
movl %eax, %ebp
xorb $0x1, %bpl
movb $0x1, %al
testb %al, %al
je 0x17cbe3
movq 0x198(%rsp), %rdi
testq %rdi, %rdi
je 0x17cbbe
callq 0x69d60
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17cbe3
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17cf73
xorps %xmm0, %xmm0
movaps %xmm0, 0x1b0(%rsp)
movq (%rbx), %r13
movq 0x1c0(%r13), %r14
addq $0x1b0, %r13 # imm = 0x1B0
cmpq %r13, %r14
je 0x17cddc
leaq 0x5600e(%rip), %rbp # 0x1d2c26
leaq 0x40(%rsp), %r15
movq 0x28(%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x17cc49
movq 0xcc1a5(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x17cc45
incl 0x8(%rax)
jmp 0x17cc49
lock
incl 0x8(%rax)
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x3ae2f(%rip), %rsi # 0x1b7a97
leaq 0x3ae30(%rip), %rdx # 0x1b7a9f
callq 0x68bb0
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %rbp, %rdx
callq 0x68bb0
leaq 0x18(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movq %r15, %rdx
callq 0x6bdb0
movl %eax, %r12d
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17ccc0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17cce5
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17ccf4
callq 0x69d60
testb %r12b, %r12b
je 0x17cd3d
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x17cd1b
movq 0xcc0d3(%rip), %rdx # 0x248de0
cmpb $0x0, (%rdx)
je 0x17cd17
incl 0x8(%rax)
jmp 0x17cd1b
lock
incl 0x8(%rax)
movq %rcx, 0x1b0(%rsp)
movq 0x1b8(%rsp), %rdi
movq %rax, 0x1b8(%rsp)
testq %rdi, %rdi
je 0x17cd3d
callq 0x69d60
movq %r14, %rdi
callq 0x6d980
movq %rax, %r14
cmpq %r13, %rax
jne 0x17cc1d
jmp 0x17cddc
movq %rdx, %rbx
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17cd80
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17cd80
movq %rdx, %rbx
movq %rax, %r12
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17cdad
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17cdad
movq %rdx, %rbx
movq %rax, %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17cdbc
callq 0x69d60
cmpl $0x2, %ebx
jne 0x17d464
movq %r12, %rdi
callq 0x683f0
callq 0x6c2d0
movq 0x8(%rsp), %rbx
jmp 0x17cd3d
cmpq $0x0, 0x1b0(%rsp)
je 0x17cf61
movq (%rbx), %rax
cmpq $0x0, 0x208(%rax)
jne 0x17cefb
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x55e16(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
leaq 0x59752(%rip), %rsi # 0x1d657e
leaq 0x5978a(%rip), %rdx # 0x1d65bd
callq 0x68bb0
leaq 0x110(%rsp), %rdi
leaq 0x40(%rsp), %rdx
leaq 0x18(%rsp), %r8
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x110(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x17ce92
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17ceae
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x110(%rsp), %rdi
callq 0x69300
movq (%rbx), %rax
movaps 0x110(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x110(%rsp)
movq 0x210(%rax), %rdi
movups %xmm0, 0x208(%rax)
testq %rdi, %rdi
je 0x17cee9
callq 0x69d60
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x17cefb
callq 0x69d60
movq (%rbx), %r14
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3ab5a(%rip), %rsi # 0x1b7a6b
leaq 0x3ab58(%rip), %rdx # 0x1b7a70
leaq 0x110(%rsp), %rdi
callq 0x68bb0
addq $0x208, %r14 # imm = 0x208
leaq 0x110(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
movq %r14, %rdi
callq 0x6c930
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x17cf61
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x1b8(%rsp), %rdi
testq %rdi, %rdi
je 0x17cf73
callq 0x69d60
movq (%rbx), %rax
cmpq $0x0, 0x208(%rax)
je 0x17d064
cmpq $0x0, 0x160(%rax)
je 0x17d0f5
leaq 0x208(%rsp), %rdi
callq 0x17d87c
movq (%rbx), %rax
cmpb $0x0, 0x2d4(%rax)
jne 0x17cfde
movb $0x1, 0x2d4(%rax)
movq %rbx, %rdi
callq 0x6cfc0
leaq 0x208(%rsp), %rdi
callq 0x17d87c
movq (%rbx), %rax
movq 0x218(%rax), %rcx
cmpq 0x220(%rax), %rcx
je 0x17d186
movq 0x1f0(%rsp), %rdi
testq %rdi, %rdi
je 0x17cffb
movq 0x200(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x17d018
movq 0x1e0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x220(%rsp), %rdi
testq %rdi, %rdi
je 0x17d035
movq 0x230(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x17d052
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
addq $0x348, %rsp # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x55ba2(%rip), %rdx # 0x1d2c26
leaq 0x110(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x594d6(%rip), %rsi # 0x1d657e
leaq 0x5950e(%rip), %rdx # 0x1d65bd
callq 0x68bb0
movb $0x1, %bpl
leaq 0x110(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xcbc07(%rip), %rsi # 0x248ce8
movq 0xcbb80(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17d219
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x55b11(%rip), %rdx # 0x1d2c26
leaq 0x110(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x59485(%rip), %rsi # 0x1d65be
leaq 0x594b2(%rip), %rdx # 0x1d65f2
callq 0x68bb0
movb $0x1, %bpl
leaq 0x110(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xcbb76(%rip), %rsi # 0x248ce8
movq 0xcbaef(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17d219
movb $0x0, 0x2d4(%rax)
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x55a79(%rip), %rdx # 0x1d2c26
leaq 0x110(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x59422(%rip), %rsi # 0x1d65f3
leaq 0x59451(%rip), %rdx # 0x1d6629
callq 0x68bb0
movb $0x1, %bpl
leaq 0x110(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq $-0x1, %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xcbade(%rip), %rsi # 0x248ce8
movq 0xcba57(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17d5c6
jmp 0x17d461
jmp 0x17d461
movq %rax, %r12
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17d23d
movq %rax, %r12
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x17d25e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d25e
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d464
movq 0x50(%rsp), %rsi
jmp 0x17d457
jmp 0x17d461
jmp 0x17d3f2
jmp 0x17d413
cmpl $0x2, %edx
jne 0x17d75e
movq %rax, %rdi
callq 0x683f0
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x55971(%rip), %rdx # 0x1d2c26
movq %rdx, %rsi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5926a(%rip), %rsi # 0x1d653b
leaq 0x592a5(%rip), %rdx # 0x1d657d
callq 0x68bb0
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq 0x8(%rsp), %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x110(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x6b880
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d33e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17d363
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
callq 0x6c2d0
movq 0x8(%rsp), %rbx
jmp 0x17cb2a
jmp 0x17d75e
movq %rax, %r12
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17d38c
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d3ad
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d3ad
movq %rax, %r12
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17d3d7
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d3d7
movq %rax, %r12
callq 0x6c2d0
jmp 0x17d773
movq %rax, %rdi
callq 0x7cc8d
jmp 0x17d4c0
jmp 0x17d3f2
jmp 0x17d413
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d419
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d419
movq %rax, %r12
movb $0x1, %bpl
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x17d4c6
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d4c6
movq %rax, %r12
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x17d464
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d464
movq %rax, %r12
movq 0x1b8(%rsp), %rdi
jmp 0x17d747
movq %rax, %r12
movq 0x198(%rsp), %rdi
testq %rdi, %rdi
je 0x17d48b
callq 0x69d60
jmp 0x17d48b
movq %rax, %r12
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17d773
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d773
jmp 0x17d75e
jmp 0x17d4c0
movq %rax, %r12
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17d773
movq %r14, %rdi
callq 0x6cf40
jmp 0x17d773
movq %rax, %r12
movq %rbx, %rdi
callq 0x6cf40
jmp 0x17d7e7
jmp 0x17d75e
jmp 0x17d4f9
jmp 0x17d50b
jmp 0x17d52c
jmp 0x17d558
movq %rax, %r12
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17d50e
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d52f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d52f
movq %rax, %r12
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17d7e7
movq 0xb8(%rsp), %rsi
incq %rsi
jmp 0x17d7e2
movq %rax, %r12
jmp 0x17d7e7
movq %rax, %rbp
jmp 0x17d5a8
jmp 0x17d5c6
jmp 0x17d5c6
movq %rax, %rbp
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17d583
callq 0x69d60
jmp 0x17d583
movq %rax, %rbp
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17d5a8
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x198(%rsp), %rdi
testq %rdi, %rdi
je 0x17d5c9
callq 0x69d60
jmp 0x17d5c9
jmp 0x17d75e
jmp 0x17d75e
movq %rax, %rbp
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17d5dd
callq 0x69d60
jmp 0x17d5dd
movq %rax, %rbp
movq %rbp, %r12
jmp 0x17d773
movq %rax, %r12
jmp 0x17d629
jmp 0x17d72c
movq %rax, %r12
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17d604
movq %rax, %r12
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x17d629
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x17d653
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d653
movq %rax, %r12
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x17d72f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d72f
jmp 0x17d763
jmp 0x17d763
jmp 0x17d763
movq %rax, %r12
leaq 0x110(%rsp), %rdi
callq 0x6f2b8
jmp 0x17d69c
movq %rax, %r12
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17d6bd
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d6bd
movq %rax, %r12
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x17d742
movq 0xb8(%rsp), %rsi
jmp 0x17d6fe
jmp 0x17d73f
movq %rax, %r12
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x17d742
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17d742
jmp 0x17d73f
jmp 0x17d75e
movq %rax, %r12
leaq 0x2e0(%rsp), %rdi
callq 0x8cd50
jmp 0x17d72f
jmp 0x17d72c
jmp 0x17d72c
jmp 0x17d763
jmp 0x17d763
jmp 0x17d72c
jmp 0x17d75e
jmp 0x17d75e
movq %rax, %r12
leaq 0x40(%rsp), %rdi
callq 0x8cd50
jmp 0x17d766
jmp 0x17d763
jmp 0x17d763
movq %rax, %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17d773
callq 0x69d60
jmp 0x17d773
jmp 0x17d759
jmp 0x17d75e
jmp 0x17d75e
movq %rax, %r12
jmp 0x17d7ca
movq %rax, %r12
jmp 0x17d773
movq %rax, %r12
leaq 0xa8(%rsp), %rdi
callq 0x8cd50
movq 0x1f0(%rsp), %rdi
testq %rdi, %rdi
je 0x17d790
movq 0x200(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x17d7ad
movq 0x1e0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x220(%rsp), %rdi
testq %rdi, %rdi
je 0x17d7ca
movq 0x230(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x17d7e7
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq %r12, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::insertXrefEntry(int, int, long long, int) | void
QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2)
{
// Populate the xref table in such a way that the first reference to an object that we see,
// which is the one in the latest xref table in which it appears, is the one that gets stored.
// This works because we are reading more recent appends before older ones.
// If there is already an entry for this object and generation in the table, it means that a
// later xref table has registered this object. Disregard this one.
int new_gen = f0 == 2 ? 0 : f2;
if (!(obj > 0 && obj <= m->xref_table_max_id && 0 <= f2 && new_gen < 65535)) {
// We are ignoring invalid objgens. Most will arrive here from xref reconstruction. There
// is probably no point having another warning but we could count invalid items in order to
// decide when to give up.
QTC::TC("qpdf", "QPDF xref overwrite invalid objgen");
// ignore impossibly large object ids or object ids > Size.
return;
}
if (m->deleted_objects.count(obj)) {
QTC::TC("qpdf", "QPDF xref deleted object");
return;
}
if (f0 == 2 && static_cast<int>(f1) == obj) {
warn(damagedPDF("xref stream", "self-referential object stream " + std::to_string(obj)));
return;
}
auto [iter, created] = m->xref_table.try_emplace(QPDFObjGen(obj, (f0 == 2 ? 0 : f2)));
if (!created) {
QTC::TC("qpdf", "QPDF xref reused object");
return;
}
switch (f0) {
case 1:
// f2 is generation
QTC::TC("qpdf", "QPDF xref gen > 0", ((f2 > 0) ? 1 : 0));
iter->second = QPDFXRefEntry(f1);
break;
case 2:
iter->second = QPDFXRefEntry(toI(f1), f2);
break;
default:
throw damagedPDF("xref stream", "unknown xref stream entry type " + std::to_string(f0));
break;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
xorl %eax, %eax
cmpl $0x2, %edx
cmovnel %r8d, %eax
testl %esi, %esi
jle 0x17da13
cmpl $0xfffe, %eax # imm = 0xFFFE
jg 0x17da13
movl %r8d, %r12d
testl %r8d, %r8d
js 0x17da13
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
cmpl %esi, 0x168(%rdi)
jl 0x17da13
movq %rcx, %r14
movl %edx, %r15d
movq 0x188(%rdi), %rsi
leaq 0x180(%rdi), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0x17d9fc
movq %rcx, %rdx
xorl %r8d, %r8d
cmpl %ebp, 0x20(%rsi)
setl %r8b
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0x17d9e4
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0x17da0e
cmpl %ebp, 0x20(%rdx)
cmovgq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
je 0x17da25
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %ecx
xorl $0x2, %ecx
movl %r14d, %edx
xorl %ebp, %edx
orl %ecx, %edx
jne 0x17dab1
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5523d(%rip), %rsi # 0x1d2c82
leaq 0x55241(%rip), %rdx # 0x1d2c8d
leaq 0x28(%rsp), %rdi
callq 0x68bb0
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x17db2d
movl $0x4, %r14d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x17db24
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x17db2a
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x17db2d
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x17da72
addl $-0x3, %r14d
jmp 0x17db2d
addq $0x138, %rdi # imm = 0x138
leaq 0x68(%rsp), %rsi
movl %ebp, (%rsi)
movl %eax, 0x4(%rsi)
callq 0x1886e8
testb $0x1, %dl
je 0x17da13
movq %rax, %r13
cmpl $0x2, %r15d
je 0x17dafc
cmpl $0x1, %r15d
jne 0x17dc34
movl $0x1, 0x28(%r13)
movq %r14, 0x30(%r13)
movl $0x0, 0x38(%r13)
jmp 0x17da13
movslq %r14d, %rax
cmpq %r14, %rax
je 0x17db0c
movq %r14, %rdi
callq 0xc4ccc
movslq %r14d, %rax
movl $0x2, 0x28(%r13)
movq %rax, 0x30(%r13)
movl %r12d, 0x38(%r13)
jmp 0x17da13
addl $-0x2, %r14d
jmp 0x17db2d
decl %r14d
movl %r14d, %esi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x6b1f0
leaq 0x48(%rsp), %r15
movq (%r15), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6c7a0
leaq 0x5902b(%rip), %rcx # 0x1d6b8c
movl $0x1f, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
je 0x17db9a
movq %rcx, 0x8(%rsp)
movq (%rdx), %rcx
movq %rcx, 0x18(%rsp)
jmp 0x17dba1
movups (%rdx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rbx, %rsi
callq 0x936dc
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x6b880
leaq 0x68(%rsp), %rdi
callq 0x6f2b8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17dbfd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x17dc14
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x17da13
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17da13
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x55030(%rip), %rsi # 0x1d2c82
leaq 0x55034(%rip), %rdx # 0x1d2c8d
leaq 0x68(%rsp), %rdi
callq 0x68bb0
leaq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0x6e160
leaq 0x58f35(%rip), %rsi # 0x1d6bac
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x69970
movb $0x1, %bpl
leaq 0x68(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xcb041(%rip), %rsi # 0x248ce8
movq 0xcafba(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17dcdc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dcdc
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17dcff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dcff
movq %rax, %rbx
movb $0x1, %bpl
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x17dd1e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dd1e
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17dd93
movq %r14, %rdi
callq 0x6cf40
jmp 0x17dd93
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x6f2b8
jmp 0x17dd3f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17dd5b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dd5b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x17dd77
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dd77
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x17dd93
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17dd93
movq %rax, %rbx
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readTrailer() | QPDFObjectHandle
QPDF::readTrailer()
{
qpdf_offset_t offset = m->file->tell();
auto [object, empty] = QPDFParser::parse(*m->file, "trailer", m->tokenizer, nullptr, *this);
if (empty) {
// Nothing in the PDF spec appears to allow empty objects, but they have been encountered in
// actual PDF files and Adobe Reader appears to ignore them.
warn(damagedPDF("trailer", "empty object treated as null"));
} else if (object.isDictionary() && readToken(*m->file).isWord("stream")) {
warn(damagedPDF("trailer", m->file->tell(), "stream keyword found in trailer"));
}
// Override last_offset so that it points to the beginning of the object we just read
m->file->setLastOffset(offset);
return object;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r15
movq (%r14), %rax
movq 0xb0(%rax), %r12
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x58e93(%rip), %rsi # 0x1d6c76
leaq 0x58e93(%rip), %rdx # 0x1d6c7d
leaq 0xe8(%rsp), %rdi
callq 0x68bb0
movq (%r14), %rcx
addq $0x18, %rcx
leaq 0x28(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
movq %r12, %rsi
xorl %r8d, %r8d
movq %r14, %r9
callq 0x133ca4
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17de36
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
cmpb $0x1, 0x38(%rsp)
jne 0x17def9
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x58e21(%rip), %rsi # 0x1d6c76
leaq 0x58e21(%rip), %rdx # 0x1d6c7d
leaq 0x80(%rsp), %rdi
callq 0x68bb0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x58dc8(%rip), %rsi # 0x1d6c41
leaq 0x58ddd(%rip), %rdx # 0x1d6c5d
leaq 0x8(%rsp), %rdi
callq 0x68bb0
leaq 0xe8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rsi
callq 0x936dc
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x6b880
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17dedb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x17e0e1
movq 0x90(%rsp), %rsi
jmp 0x17e0d9
leaq 0x28(%rsp), %rdi
callq 0x6b6a0
movl %eax, %ebp
testb %al, %al
je 0x17df95
movq (%r14), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x80(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x56e11(%rip), %rsi # 0x1d4d59
leaq 0x56e10(%rip), %rdx # 0x1d4d5f
leaq 0x8(%rsp), %rdi
callq 0x68bb0
cmpl $0xd, 0x80(%rsp)
jne 0x17df95
movq 0x90(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x17df95
testq %rdx, %rdx
je 0x17e142
movq 0x8(%rsp), %rsi
movq 0x88(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %r12b
jmp 0x17df98
xorl %r12d, %r12d
testb %bpl, %bpl
je 0x17e01b
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17dfb8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17dfd9
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17dffa
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17e01b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x68760
testb %r12b, %r12b
je 0x17e0e1
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x58c42(%rip), %rsi # 0x1d6c76
leaq 0x58c42(%rip), %rdx # 0x1d6c7d
leaq 0x60(%rsp), %rdi
callq 0x68bb0
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r12
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x58bf6(%rip), %rsi # 0x1d6c5e
leaq 0x58c0e(%rip), %rdx # 0x1d6c7d
leaq 0x40(%rsp), %rdi
callq 0x68bb0
leaq 0xe8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x40(%rsp), %r8
movq %r14, %rsi
movq %r12, %rcx
callq 0x91596
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x6b880
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x17e0ca
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e0e1
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq %r15, %rsi
callq 0x681c0
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17e11e
movq 0xcacd0(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x17e11a
incl 0x8(%rax)
jmp 0x17e11e
lock
incl 0x8(%rax)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x17e12d
callq 0x69d60
movq %rbx, %rax
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r12b
jmp 0x17df98
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
jmp 0x17e15f
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x17e17d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17e17d
jmp 0x17e17a
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e227
movq 0x70(%rsp), %rsi
jmp 0x17e1f1
jmp 0x17e224
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x8cd50
jmp 0x17e227
jmp 0x17e224
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x6f2b8
jmp 0x17e1c0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e1dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17e1dc
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x17e227
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17e227
jmp 0x17e224
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x17e236
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17e236
movq %rax, %rbx
jmp 0x17e236
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x17e236
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::read_xrefTable(long long) | qpdf_offset_t
QPDF::read_xrefTable(qpdf_offset_t xref_offset)
{
m->file->seek(xref_offset, SEEK_SET);
std::string line;
while (true) {
line.assign(50, '\0');
m->file->read(line.data(), line.size());
int obj = 0;
int num = 0;
int bytes = 0;
if (!parse_xrefFirst(line, obj, num, bytes)) {
QTC::TC("qpdf", "QPDF invalid xref");
throw damagedPDF("xref table", "xref syntax invalid");
}
m->file->seek(m->file->getLastOffset() + bytes, SEEK_SET);
for (qpdf_offset_t i = obj; i - num < obj; ++i) {
if (i == 0) {
// This is needed by checkLinearization()
m->first_xref_item_offset = m->file->tell();
}
// For xref_table, these will always be small enough to be ints
qpdf_offset_t f1 = 0;
int f2 = 0;
char type = '\0';
if (!read_xrefEntry(f1, f2, type)) {
QTC::TC("qpdf", "QPDF invalid xref entry");
throw damagedPDF(
"xref table", "invalid xref entry (obj=" + std::to_string(i) + ")");
}
if (type == 'f') {
insertFreeXrefEntry(QPDFObjGen(toI(i), f2));
} else {
insertXrefEntry(toI(i), 1, f1, f2);
}
}
qpdf_offset_t pos = m->file->tell();
if (readToken(*m->file).isWord("trailer")) {
break;
} else {
m->file->seek(pos, SEEK_SET);
}
}
// Set offset to previous xref table if any
QPDFObjectHandle cur_trailer = readTrailer();
if (!cur_trailer.isDictionary()) {
QTC::TC("qpdf", "QPDF missing trailer");
throw damagedPDF("", "expected trailer dictionary");
}
if (!m->trailer) {
setTrailer(cur_trailer);
if (!m->trailer.hasKey("/Size")) {
QTC::TC("qpdf", "QPDF trailer lacks size");
throw damagedPDF("trailer", "trailer dictionary lacks /Size key");
}
if (!m->trailer.getKey("/Size").isInteger()) {
QTC::TC("qpdf", "QPDF trailer size not integer");
throw damagedPDF("trailer", "/Size key in trailer dictionary is not an integer");
}
}
if (cur_trailer.hasKey("/XRefStm")) {
if (m->ignore_xref_streams) {
QTC::TC("qpdf", "QPDF ignoring XRefStm in trailer");
} else {
if (cur_trailer.getKey("/XRefStm").isInteger()) {
// Read the xref stream but disregard any return value -- we'll use our trailer's
// /Prev key instead of the xref stream's.
(void)read_xrefStream(cur_trailer.getKey("/XRefStm").getIntValue());
} else {
throw damagedPDF("xref stream", xref_offset, "invalid /XRefStm");
}
}
}
if (cur_trailer.hasKey("/Prev")) {
if (!cur_trailer.getKey("/Prev").isInteger()) {
QTC::TC("qpdf", "QPDF trailer prev not integer");
throw damagedPDF("trailer", "/Prev key in trailer dictionary is not an integer");
}
QTC::TC("qpdf", "QPDF prev key in trailer dictionary");
return cur_trailer.getKey("/Prev").getIntValue();
}
return 0;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %rbx
movq (%rdi), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq %rsi, 0xf0(%rsp)
xorl %edx, %edx
callq *0x28(%rax)
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xd0(%rsp), %r15
leaq 0xc8(%rsp), %r14
leaq 0x2c(%rsp), %r12
leaq 0x7(%rsp), %r13
movq 0xd8(%rsp), %rdx
movl $0x32, %ecx
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x6ae80
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq (%rdi), %rax
callq *0x38(%rax)
xorl %eax, %eax
movl %eax, 0xa4(%rsp)
movl %eax, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
movq %r15, %rsi
leaq 0xa4(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
leaq 0x9c(%rsp), %r8
callq 0x17f4a2
testb %al, %al
je 0x17ebd7
movq (%rbx), %rax
movq 0xb0(%rax), %rbp
movq %rbp, %rdi
callq 0x6cf20
movslq 0x9c(%rsp), %rcx
addq %rcx, %rax
movq (%rbp), %rcx
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq *0x28(%rcx)
movslq 0xa0(%rsp), %r15
testq %r15, %r15
jle 0x17e5d4
movslq 0xa4(%rsp), %rbp
addq %rbp, %r15
testq %rbp, %rbp
jne 0x17e527
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq (%rbx), %rcx
movq %rax, 0x308(%rcx)
movq $0x0, 0xc8(%rsp)
movl $0x0, 0x2c(%rsp)
movb $0x0, 0x7(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x17fa7e
testb %al, %al
je 0x17eb3c
leaq -0x80000000(%rbp), %rax
cmpb $0x66, 0x7(%rsp)
jne 0x17e595
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
cmpq %rcx, %rax
ja 0x17e57e
movq %rbp, %rdi
callq 0xc4ccc
movl 0x2c(%rsp), %eax
shlq $0x20, %rax
movl %ebp, %esi
orq %rax, %rsi
movq %rbx, %rdi
callq 0x17fc42
jmp 0x17e5c8
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
cmpq %rcx, %rax
ja 0x17e5ac
movq %rbp, %rdi
callq 0xc4ccc
movq 0xc8(%rsp), %rcx
movl 0x2c(%rsp), %r8d
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x17d988
incq %rbp
cmpq %r15, %rbp
jl 0x17e508
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %rbp
movq (%rbx), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x30(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x58651(%rip), %rsi # 0x1d6c76
leaq 0x58651(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
cmpl $0xd, 0x30(%rsp)
jne 0x17e664
movq 0x40(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x17e664
testq %rdx, %rdx
je 0x17e70a
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %r15b
jmp 0x17e667
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17e683
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x17e6a5
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x17e6c1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x17e6dd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
testb %r15b, %r15b
jne 0x17e712
movq (%rbx), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq %rbp, %rsi
xorl %edx, %edx
callq *0x28(%rax)
testb %r15b, %r15b
leaq 0xd0(%rsp), %r15
je 0x17e447
jmp 0x17e712
movb $0x1, %r15b
jmp 0x17e667
leaq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0x17dd9c
leaq 0xa8(%rsp), %rdi
callq 0x6b6a0
testb %al, %al
je 0x17ecb3
movq (%rbx), %rax
cmpq $0x0, 0x208(%rax)
jne 0x17e88c
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0xf8(%rsp)
movq %rax, 0x100(%rsp)
testq %rax, %rax
je 0x17e782
movq 0xca66c(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x17e77e
incl 0x8(%rax)
jmp 0x17e782
lock
incl 0x8(%rax)
movq (%rbx), %rdi
cmpq $0x0, 0x208(%rdi)
jne 0x17e7ae
leaq 0x100(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x208(%rdi)
addq $0x210, %rdi # imm = 0x210
callq 0x6c300
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x17e7c0
callq 0x69d60
movq (%rbx), %r14
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3b766(%rip), %rsi # 0x1b9f39
leaq 0x3b764(%rip), %rdx # 0x1b9f3e
leaq 0x30(%rsp), %rdi
callq 0x68bb0
addq $0x208, %r14 # imm = 0x208
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x69f70
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e811
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17edaf
movq (%rbx), %r14
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x3b70d(%rip), %rsi # 0x1b9f39
leaq 0x3b70b(%rip), %rdx # 0x1b9f3e
callq 0x68bb0
addq $0x208, %r14 # imm = 0x208
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r14, %rsi
callq 0x6ba70
leaq 0x8(%rsp), %rdi
callq 0x6c2a0
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17e86c
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e883
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17ee2c
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x57f22(%rip), %rsi # 0x1d67be
leaq 0x57f23(%rip), %rdx # 0x1d67c6
leaq 0x30(%rsp), %rdi
callq 0x68bb0
leaq 0xa8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x69f70
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e8d8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17e9cb
movq (%rbx), %rax
cmpb $0x0, 0xf1(%rax)
jne 0x17e9cb
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57ebe(%rip), %rsi # 0x1d67be
leaq 0x57ebf(%rip), %rdx # 0x1d67c6
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x6ba70
leaq 0x8(%rsp), %rdi
callq 0x6c2a0
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17e93e
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e955
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17eea9
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57e51(%rip), %rsi # 0x1d67be
leaq 0x57e52(%rip), %rdx # 0x1d67c6
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x6ba70
leaq 0x8(%rsp), %rdi
callq 0x6db80
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17f148
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17e9b4
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e9cb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x54221(%rip), %rsi # 0x1d2bfb
leaq 0x5421f(%rip), %rdx # 0x1d2c00
callq 0x68bb0
leaq 0xa8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x69f70
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17ea11
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17eaee
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x541d2(%rip), %rsi # 0x1d2bfb
leaq 0x541d0(%rip), %rdx # 0x1d2c00
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x6ba70
leaq 0x8(%rsp), %rdi
callq 0x6c2a0
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17ea67
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17ea7e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x17ed32
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x54165(%rip), %rsi # 0x1d2bfb
leaq 0x54163(%rip), %rdx # 0x1d2c00
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x6ba70
leaq 0x8(%rsp), %rdi
callq 0x6db80
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17ead5
callq 0x69d60
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17eaf0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17eaf0
xorl %ebx, %ebx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17eb02
callq 0x69d60
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x17eb27
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x57b91(%rip), %rsi # 0x1d66ea
leaq 0x57b94(%rip), %rdx # 0x1d66f4
leaq 0x30(%rsp), %rdi
callq 0x68bb0
leaq 0x108(%rsp), %rdi
movq %rbp, %rsi
callq 0x6bd40
leaq 0x57bab(%rip), %rsi # 0x1d672c
leaq 0xa8(%rsp), %rdi
leaq 0x108(%rsp), %rdx
callq 0x69970
leaq 0x53620(%rip), %rsi # 0x1d21bd
leaq 0xa8(%rsp), %rdi
callq 0x6b8d0
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x17ec5a
movups (%rdx), %xmm0
leaq 0x18(%rsp), %rcx
movups %xmm0, (%rcx)
jmp 0x17ec67
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x57af6(%rip), %rsi # 0x1d66ea
leaq 0x57af9(%rip), %rdx # 0x1d66f4
leaq 0x30(%rsp), %rdi
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57aff(%rip), %rsi # 0x1d6718
leaq 0x57b0b(%rip), %rdx # 0x1d672b
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xca0a2(%rip), %rsi # 0x248ce8
movq 0xca01b(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movq %rcx, 0x8(%rsp)
movq (%rdx), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xca049(%rip), %rsi # 0x248ce8
movq 0xc9fc2(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x53f56(%rip), %rdx # 0x1d2c26
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57a54(%rip), %rsi # 0x1d6745
leaq 0x57a68(%rip), %rdx # 0x1d6760
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xc9fca(%rip), %rsi # 0x248ce8
movq 0xc9f43(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57f28(%rip), %rsi # 0x1d6c76
leaq 0x57f28(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57a59(%rip), %rsi # 0x1d67c7
leaq 0x57a83(%rip), %rdx # 0x1d67f8
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xc9f4d(%rip), %rsi # 0x248ce8
movq 0xc9ec6(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57eab(%rip), %rsi # 0x1d6c76
leaq 0x57eab(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x57976(%rip), %rsi # 0x1d6761
leaq 0x57991(%rip), %rdx # 0x1d6783
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xc9ed0(%rip), %rsi # 0x248ce8
movq 0xc9e49(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x57e2e(%rip), %rsi # 0x1d6c76
leaq 0x57e2e(%rip), %rdx # 0x1d6c7d
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5791c(%rip), %rsi # 0x1d6784
leaq 0x57946(%rip), %rdx # 0x1d67b5
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x936dc
xorl %ebp, %ebp
movq 0xc9e53(%rip), %rsi # 0x248ce8
movq 0xc9dcc(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef29
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x30(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x53dbd(%rip), %rsi # 0x1d2c82
leaq 0x53dc1(%rip), %rdx # 0x1d2c8d
callq 0x68bb0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x578d1(%rip), %rsi # 0x1d67b6
leaq 0x578da(%rip), %rdx # 0x1d67c6
callq 0x68bb0
movb $0x1, %bpl
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq 0xf0(%rsp), %rcx
callq 0x91596
xorl %ebp, %ebp
movq 0xc9dce(%rip), %rsi # 0x248ce8
movq 0xc9d47(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x17ef63
jmp 0x17ef84
jmp 0x17ef63
jmp 0x17ef84
jmp 0x17ef63
jmp 0x17ef84
jmp 0x17ef63
jmp 0x17ef84
jmp 0x17efcd
jmp 0x17efcd
jmp 0x17efcd
jmp 0x17efcd
jmp 0x17efe6
jmp 0x17f004
jmp 0x17efb5
jmp 0x17efe6
jmp 0x17f004
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17ef8a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17ef8a
movq %rax, %rbx
movb $0x1, %bpl
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17efd3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17efd3
jmp 0x17efb5
jmp 0x17efe6
jmp 0x17f004
jmp 0x17efe6
jmp 0x17f004
jmp 0x17efb5
jmp 0x17efe6
jmp 0x17f004
jmp 0x17efb5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17efe9
callq 0x69d60
jmp 0x17efe9
jmp 0x17efe6
jmp 0x17f004
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17f007
movq %r14, %rdi
callq 0x6cf40
jmp 0x17f007
jmp 0x17efe6
jmp 0x17f004
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17f007
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17f007
jmp 0x17f004
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x17f11a
callq 0x69d60
jmp 0x17f11a
jmp 0x17f117
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17f0e7
movq 0x18(%rsp), %rsi
jmp 0x17f0d5
jmp 0x17f0e1
jmp 0x17f102
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8cd50
jmp 0x17f11a
jmp 0x17f117
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17f08f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17f08f
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17f0bc
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17f0bc
jmp 0x17f117
jmp 0x17f117
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17f0e7
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17f0e7
jmp 0x17f117
movq %rax, %rbx
movb $0x1, %bpl
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x17f108
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x17f108
jmp 0x17f117
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x17f11a
movq %r14, %rdi
callq 0x6cf40
jmp 0x17f11a
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x17f13f
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rbx, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::removeObject(QPDFObjGen) | void
QPDF::removeObject(QPDFObjGen og)
{
m->xref_table.erase(og);
if (auto cached = m->obj_cache.find(og); cached != m->obj_cache.end()) {
// Take care of any object handles that may be floating around.
cached->second.object->assign_null();
cached->second.object->setObjGen(nullptr, QPDFObjGen());
m->obj_cache.erase(cached);
}
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movl $0x138, %r14d # imm = 0x138
addq (%rdi), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x18b7f4
movq %r14, %rdi
movq %rax, %rsi
callq 0x18b8d0
movl $0x1a8, %r14d # imm = 0x1A8
movq (%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x18c210
movq %rax, %r15
movl $0x1b0, %eax # imm = 0x1B0
addq (%rbx), %rax
cmpq %rax, %r15
je 0x17f497
movq 0x28(%r15), %rdi
callq 0x188a84
movq 0x28(%r15), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rax)
addq (%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x18c424
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readObjectAtOffset(bool, long long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDFObjGen, QPDFObjGen&, bool) | QPDFObjectHandle
QPDF::readObjectAtOffset(
bool try_recovery,
qpdf_offset_t offset,
std::string const& description,
QPDFObjGen exp_og,
QPDFObjGen& og,
bool skip_cache_if_in_xref)
{
bool check_og = true;
if (exp_og.getObj() == 0) {
// This method uses an expect object ID of 0 to indicate that we don't know or don't care
// what the actual object ID is at this offset. This is true when we read the xref stream
// and linearization hint streams. In this case, we don't verify the expect object
// ID/generation against what was read from the file. There is also no reason to attempt
// xref recovery if we get a failure in this case since the read attempt was not triggered
// by an xref lookup.
check_og = false;
try_recovery = false;
}
setLastObjectDescription(description, exp_og);
if (!m->attempt_recovery) {
try_recovery = false;
}
// Special case: if offset is 0, just return null. Some PDF writers, in particular
// "Mac OS X 10.7.5 Quartz PDFContext", may store deleted objects in the xref table as
// "0000000000 00000 n", which is not correct, but it won't hurt anything for us to ignore
// these.
if (offset == 0) {
QTC::TC("qpdf", "QPDF bogus 0 offset", 0);
warn(damagedPDF(-1, "object has offset 0"));
return QPDFObjectHandle::newNull();
}
m->file->seek(offset, SEEK_SET);
try {
QPDFTokenizer::Token tobjid = readToken(*m->file);
bool objidok = tobjid.isInteger();
QTC::TC("qpdf", "QPDF check objid", objidok ? 1 : 0);
if (!objidok) {
QTC::TC("qpdf", "QPDF expected n n obj");
throw damagedPDF(offset, "expected n n obj");
}
QPDFTokenizer::Token tgen = readToken(*m->file);
bool genok = tgen.isInteger();
QTC::TC("qpdf", "QPDF check generation", genok ? 1 : 0);
if (!genok) {
throw damagedPDF(offset, "expected n n obj");
}
QPDFTokenizer::Token tobj = readToken(*m->file);
bool objok = tobj.isWord("obj");
QTC::TC("qpdf", "QPDF check obj", objok ? 1 : 0);
if (!objok) {
throw damagedPDF(offset, "expected n n obj");
}
int objid = QUtil::string_to_int(tobjid.getValue().c_str());
int generation = QUtil::string_to_int(tgen.getValue().c_str());
og = QPDFObjGen(objid, generation);
if (objid == 0) {
QTC::TC("qpdf", "QPDF object id 0");
throw damagedPDF(offset, "object with ID 0");
}
if (check_og && (exp_og != og)) {
QTC::TC("qpdf", "QPDF err wrong objid/generation");
QPDFExc e = damagedPDF(offset, "expected " + exp_og.unparse(' ') + " obj");
if (try_recovery) {
// Will be retried below
throw e;
} else {
// We can try reading the object anyway even if the ID doesn't match.
warn(e);
}
}
} catch (QPDFExc& e) {
if (try_recovery) {
// Try again after reconstructing xref table
reconstruct_xref(e);
if (m->xref_table.count(exp_og) && (m->xref_table[exp_og].getType() == 1)) {
qpdf_offset_t new_offset = m->xref_table[exp_og].getOffset();
QPDFObjectHandle result =
readObjectAtOffset(false, new_offset, description, exp_og, og, false);
QTC::TC("qpdf", "QPDF recovered in readObjectAtOffset");
return result;
} else {
QTC::TC("qpdf", "QPDF object gone after xref reconstruction");
warn(damagedPDF(
"",
-1,
("object " + exp_og.unparse(' ') +
" not found in file after regenerating cross reference "
"table")));
return QPDFObjectHandle::newNull();
}
} else {
throw;
}
}
QPDFObjectHandle oh = readObject(description, og);
if (isUnresolved(og)) {
// Store the object in the cache here so it gets cached whether we first know the offset or
// whether we first know the object ID and generation (in which we case we would get here
// through resolve).
// Determine the end offset of this object before and after white space. We use these
// numbers to validate linearization hint tables. Offsets and lengths of objects may imply
// the end of an object to be anywhere between these values.
qpdf_offset_t end_before_space = m->file->tell();
// skip over spaces
while (true) {
char ch;
if (m->file->read(&ch, 1)) {
if (!isspace(static_cast<unsigned char>(ch))) {
m->file->seek(-1, SEEK_CUR);
break;
}
} else {
throw damagedPDF(m->file->tell(), "EOF after endobj");
}
}
qpdf_offset_t end_after_space = m->file->tell();
if (skip_cache_if_in_xref && m->xref_table.count(og)) {
// Ordinarily, an object gets read here when resolved through xref table or stream. In
// the special case of the xref stream and linearization hint tables, the offset comes
// from another source. For the specific case of xref streams, the xref stream is read
// and loaded into the object cache very early in parsing. Ordinarily, when a file is
// updated by appending, items inserted into the xref table in later updates take
// precedence over earlier items. In the special case of reusing the object number
// previously used as the xref stream, we have the following order of events:
//
// * reused object gets loaded into the xref table
// * old object is read here while reading xref streams
// * original xref entry is ignored (since already in xref table)
//
// It is the second step that causes a problem. Even though the xref table is correct in
// this case, the old object is already in the cache and so effectively prevails over
// the reused object. To work around this issue, we have a special case for the xref
// stream (via the skip_cache_if_in_xref): if the object is already in the xref stream,
// don't cache what we read here.
//
// It is likely that the same bug may exist for linearization hint tables, but the
// existing code uses end_before_space and end_after_space from the cache, so fixing
// that would require more significant rework. The chances of a linearization hint
// stream being reused seems smaller because the xref stream is probably the highest
// object in the file and the linearization hint stream would be some random place in
// the middle, so I'm leaving that bug unfixed for now. If the bug were to be fixed, we
// could use !check_og in place of skip_cache_if_in_xref.
QTC::TC("qpdf", "QPDF skipping cache for known unchecked object");
} else {
updateCache(og, oh.getObj(), end_before_space, end_after_space);
}
}
return oh;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %r9, %rbp
movq %r8, %r12
movq %rcx, %r13
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
movq %r9, 0x10(%rsp)
testl %ebp, %ebp
setne %bl
movq %rsi, %rdi
movq %r8, %rsi
movq %r9, %rdx
callq 0x1835e6
testq %r13, %r13
je 0x17fef1
andb %r15b, %bl
movq (%r14), %rax
andb 0x100(%rax), %bl
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq %r13, %rsi
xorl %edx, %edx
callq *0x28(%rax)
movq (%r14), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0xe0(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
cmpl $0x7, 0xe0(%rsp)
jne 0x180376
movq (%r14), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x168(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
cmpl $0x7, 0x168(%rsp)
jne 0x1803d8
movq (%r14), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x1d0(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x139b62
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5708f(%rip), %rsi # 0x1d6e32
leaq 0x5708b(%rip), %rdx # 0x1d6e35
leaq 0x40(%rsp), %rdi
callq 0x68bb0
cmpl $0xd, 0x1d0(%rsp)
jne 0x17fdf0
movq 0x1e0(%rsp), %rdx
cmpq 0x48(%rsp), %rdx
jne 0x17fdf0
testq %rdx, %rdx
je 0x1802bb
movq 0x40(%rsp), %rsi
movq 0x1d8(%rsp), %rdi
callq 0x6bbe0
testl %eax, %eax
sete %r15b
jmp 0x17fdf3
xorl %r15d, %r15d
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x17fe0f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
testb %r15b, %r15b
je 0x18043a
movq 0xe8(%rsp), %rdi
callq 0x6e450
movl %eax, %r15d
movq 0x170(%rsp), %rdi
callq 0x6e450
shlq $0x20, %rax
movl %r15d, %ecx
orq %rax, %rcx
movq 0x270(%rsp), %rax
movq %rcx, (%rax)
testl %r15d, %r15d
je 0x18049b
testl %ebp, %ebp
movq 0x18(%rsp), %r15
je 0x18007f
movl 0x10(%rsp), %eax
movq 0x270(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x17fe85
movq 0x270(%rsp), %rax
movl 0x4(%rax), %eax
cmpl %eax, 0x14(%rsp)
je 0x18007f
leaq 0x148(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x20, %edx
callq 0x9401a
leaq 0x53a5f(%rip), %rcx # 0x1d3902
leaq 0x148(%rsp), %rdi
movl $0x9, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17ff7a
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x17ff81
leaq 0xf0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x56f0d(%rip), %rsi # 0x1d6e11
leaq 0x56f19(%rip), %rdx # 0x1d6e24
leaq 0xe0(%rsp), %rdi
callq 0x68bb0
leaq 0x40(%rsp), %rdi
leaq 0xe0(%rsp), %rcx
movq %r14, %rsi
movq $-0x1, %rdx
callq 0x9379a
movq 0x18(%rsp), %r15
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x6b880
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17ff6d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
movq %r15, %rdi
callq 0x6b240
jmp 0x1802ef
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xc0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x56e8a(%rip), %rsi # 0x1d6e31
callq 0x6b8d0
leaq 0x30(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
je 0x17ffd3
movq %rcx, 0x20(%rsp)
movq (%rdx), %rcx
movq %rcx, 0x30(%rsp)
jmp 0x17ffda
movups (%rdx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rsi
leaq 0x20(%rsp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9379a
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x18001d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
movq 0x18(%rsp), %r15
je 0x18003f
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180060
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bl, %bl
jne 0x1804fc
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x6b880
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1800a0
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x208(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1800c1
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1800e2
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180103
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180124
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180145
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180166
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180187
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1801a8
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x270(%rsp), %rbx
movq (%rbx), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x183752
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x182aac
testb %al, %al
je 0x1802ef
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r12
movb 0x278(%rsp), %bl
leaq 0xe0(%rsp), %r13
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movq %r13, %rsi
callq *0x38(%rax)
testq %rax, %rax
je 0x180304
movzbl 0xe0(%rsp), %edi
callq 0x6c1c0
testl %eax, %eax
jne 0x1801f6
movl %eax, %ebp
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq $-0x1, %rsi
movl $0x1, %edx
callq *0x28(%rax)
testl %ebp, %ebp
jne 0x1801f6
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq 0x18(%rsp), %r15
callq *0x20(%rax)
movq %rax, %r13
testb %bl, %bl
je 0x180289
movq (%r14), %rbx
leaq 0x138(%rbx), %rdi
movq 0x270(%rsp), %rsi
callq 0x179c8e
addq $0x140, %rbx # imm = 0x140
cmpq %rbx, %rax
jne 0x1802ef
movq 0x270(%rsp), %rax
movq (%rax), %rsi
movq (%r15), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x1802c7
movq 0xc8b2f(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1802c3
incl 0x8(%rax)
jmp 0x1802c7
movb $0x1, %r15b
jmp 0x17fdf3
lock
incl 0x8(%rax)
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rcx
movq %r13, %r8
movl $0x1, %r9d
callq 0x185414
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1802ef
callq 0x69d60
movq %r15, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r15
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r12
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x56b4b(%rip), %rsi # 0x1d6e83
leaq 0x56b54(%rip), %rdx # 0x1d6e93
callq 0x68bb0
movb $0x1, %bl
leaq 0x40(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9379a
xorl %ebx, %ebx
movq 0xc8986(%rip), %rsi # 0x248ce8
movq 0xc88ff(%rip), %rdx # 0x248c68
movq %r15, %rdi
callq 0x6b420
jmp 0x1809b5
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbp
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x56a92(%rip), %rsi # 0x1d6e25
leaq 0x56a9b(%rip), %rdx # 0x1d6e35
leaq 0x40(%rsp), %rdi
callq 0x68bb0
movb $0x1, %r15b
leaq 0x40(%rsp), %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9379a
xorl %r15d, %r15d
movq 0xc8924(%rip), %rsi # 0x248ce8
movq 0xc889d(%rip), %rdx # 0x248c68
movq %rbp, %rdi
callq 0x6b420
jmp 0x1809b5
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbp
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x56a30(%rip), %rsi # 0x1d6e25
leaq 0x56a39(%rip), %rdx # 0x1d6e35
leaq 0x40(%rsp), %rdi
callq 0x68bb0
movb $0x1, %r15b
leaq 0x40(%rsp), %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9379a
xorl %r15d, %r15d
movq 0xc88c2(%rip), %rsi # 0x248ce8
movq 0xc883b(%rip), %rdx # 0x248c68
movq %rbp, %rdi
callq 0x6b420
jmp 0x1809b5
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbp
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x569ca(%rip), %rsi # 0x1d6e25
leaq 0x569d3(%rip), %rdx # 0x1d6e35
callq 0x68bb0
movb $0x1, %r15b
leaq 0x40(%rsp), %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9379a
xorl %r15d, %r15d
movq 0xc8861(%rip), %rsi # 0x248ce8
movq 0xc87da(%rip), %rdx # 0x248c68
movq %rbp, %rdi
callq 0x6b420
jmp 0x1809b5
movl $0x80, %edi
callq 0x6a000
movq %rax, %rbp
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5697a(%rip), %rsi # 0x1d6e36
leaq 0x56983(%rip), %rdx # 0x1d6e46
callq 0x68bb0
movb $0x1, %r15b
leaq 0x40(%rsp), %rcx
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9379a
xorl %r15d, %r15d
movq 0xc8800(%rip), %rsi # 0x248ce8
movq 0xc8779(%rip), %rdx # 0x248c68
movq %rbp, %rdi
callq 0x6b420
jmp 0x1809b5
movl $0x80, %edi
callq 0x6a000
movq %rax, %r15
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x6aaa0
movq 0xc87cb(%rip), %rsi # 0x248ce8
movq 0xc8744(%rip), %rdx # 0x248c68
movq %r15, %rdi
callq 0x6b420
jmp 0x1809b5
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq %r15, %rdi
callq 0x6cf40
jmp 0x1805e8
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x18056f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18056f
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x180596
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180596
movq %rdx, 0x8(%rsp)
movq %rax, %r13
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18075c
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18075c
jmp 0x180754
movq %rax, %r13
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x180ac4
callq 0x69d60
jmp 0x180ac4
movq %rdx, 0x8(%rsp)
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
jmp 0x18075c
jmp 0x180ac1
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x18062d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18062d
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movb $0x1, %r15b
testb %r15b, %r15b
je 0x18075c
jmp 0x180672
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x180669
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180669
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movb $0x1, %r15b
testb %r15b, %r15b
je 0x18075c
movq %rbp, %rdi
callq 0x6cf40
jmp 0x18075c
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1806b0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1806b0
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movb $0x1, %r15b
testb %r15b, %r15b
je 0x180769
movq %rbp, %rdi
callq 0x6cf40
jmp 0x180769
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1806f7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1806f7
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movb $0x1, %r15b
testb %r15b, %r15b
je 0x180776
movq %rbp, %rdi
callq 0x6cf40
jmp 0x180776
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
jmp 0x180718
movq %rax, %r13
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x180ad7
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180ad7
movq %rax, %r13
jmp 0x180ad7
jmp 0x180ac1
jmp 0x180ac1
jmp 0x180754
jmp 0x180754
movq %rdx, 0x8(%rsp)
movq %rax, %r13
leaq 0x1d0(%rsp), %rdi
callq 0x8cd50
leaq 0x168(%rsp), %rdi
callq 0x8cd50
leaq 0xe0(%rsp), %rdi
callq 0x8cd50
cmpl $0x1, 0x8(%rsp)
jne 0x180ad7
movq %r13, %rdi
callq 0x683f0
testb %bl, %bl
je 0x1809b0
movq %r14, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x17b790
movq (%r14), %rbx
leaq 0x138(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x179c8e
addq $0x140, %rbx # imm = 0x140
cmpq %rbx, %rax
je 0x180836
movl $0x138, %edi # imm = 0x138
addq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x173038
movq %rax, %rdi
callq 0x6cb90
cmpl $0x1, %eax
jne 0x180836
movl $0x138, %edi # imm = 0x138
addq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x173038
movq 0x18(%rsp), %r15
movq %rax, %rdi
callq 0x6c1d0
movq 0x10(%rsp), %r9
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
movq %r12, %r8
pushq $0x0
pushq 0x278(%rsp)
callq 0x17fc92
addq $0x10, %rsp
jmp 0x1809a6
leaq 0xf0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x523dd(%rip), %rdx # 0x1d2c26
leaq 0xe0(%rsp), %rdi
movq %rdx, %rsi
callq 0x68bb0
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x20, %edx
callq 0x9401a
leaq 0x4fb36(%rip), %rsi # 0x1d03aa
leaq 0x1d0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x69970
leaq 0x565ba(%rip), %rsi # 0x1d6e47
leaq 0x1d0(%rsp), %rdi
callq 0x6b8d0
leaq 0x178(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1808ca
movq %rdx, 0x168(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x178(%rsp)
jmp 0x1808d1
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x168(%rsp), %r8
movq %rdx, 0x8(%r8)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x91596
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x6b880
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
movq 0x168(%rsp), %rdi
cmpq %r15, %rdi
je 0x180940
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180961
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18097c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x180999
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x6b240
callq 0x6c2d0
jmp 0x1802ef
callq 0x6c640
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x6f2b8
jmp 0x1809c7
movq %rax, %r13
movq 0x168(%rsp), %rdi
cmpq %r15, %rdi
je 0x1809e9
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1809e9
movq %rax, %r13
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180a0f
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180a0f
movq %rax, %r13
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180a2f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180a2f
movq %rax, %r13
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x180a55
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180a55
jmp 0x180a52
jmp 0x180a52
movq %rax, %r13
callq 0x6c2d0
jmp 0x180ad7
movq %rax, %rdi
callq 0x7cc8d
movq %rdx, 0x8(%rsp)
movq %rax, %r13
jmp 0x180769
movq %rdx, 0x8(%rsp)
movq %rax, %r13
jmp 0x180776
movq %rdx, 0x8(%rsp)
movq %rax, %r13
jmp 0x180783
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x180ab3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x180ab3
jmp 0x180aae
movq %rax, %r13
movb $0x1, %bl
testb %bl, %bl
je 0x180ac4
movq %r15, %rdi
callq 0x6cf40
jmp 0x180ac4
movq %rax, %r13
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x180ad7
callq 0x69d60
movq %r13, %rdi
callq 0x6b780
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::processXRefStream(long long, QPDFObjectHandle&) | qpdf_offset_t
QPDF::processXRefStream(qpdf_offset_t xref_offset, QPDFObjectHandle& xref_obj)
{
auto damaged = [this, xref_offset](std::string_view msg) -> QPDFExc {
return damagedPDF("xref stream", xref_offset, msg.data());
};
auto dict = xref_obj.getDict();
auto [entry_size, W] = processXRefW(dict, damaged);
int max_num_entries = processXRefSize(dict, entry_size, damaged);
auto [num_entries, indx] = processXRefIndex(dict, max_num_entries, damaged);
std::shared_ptr<Buffer> bp = xref_obj.getStreamData(qpdf_dl_specialized);
size_t actual_size = bp->getSize();
auto expected_size = toS(entry_size) * toS(num_entries);
if (expected_size != actual_size) {
QPDFExc x = damaged(
"Cross-reference stream data has the wrong size; expected = " +
std::to_string(expected_size) + "; actual = " + std::to_string(actual_size));
if (expected_size > actual_size) {
throw x;
} else {
warn(x);
}
}
bool saw_first_compressed_object = false;
// Actual size vs. expected size check above ensures that we will not overflow any buffers here.
// We know that entry_size * num_entries is less or equal to the size of the buffer.
auto p = bp->getBuffer();
for (auto [obj, sec_entries]: indx) {
// Process a subsection.
for (int i = 0; i < sec_entries; ++i) {
// Read this entry
std::array<qpdf_offset_t, 3> fields{};
if (W[0] == 0) {
QTC::TC("qpdf", "QPDF default for xref stream field 0");
fields[0] = 1;
}
for (size_t j = 0; j < 3; ++j) {
for (int k = 0; k < W[j]; ++k) {
fields[j] <<= 8;
fields[j] |= *p++;
}
}
// Get the generation number. The generation number is 0 unless this is an uncompressed
// object record, in which case the generation number appears as the third field.
if (saw_first_compressed_object) {
if (fields[0] != 2) {
m->uncompressed_after_compressed = true;
}
} else if (fields[0] == 2) {
saw_first_compressed_object = true;
}
if (obj == 0) {
// This is needed by checkLinearization()
m->first_xref_item_offset = xref_offset;
} else if (fields[0] == 0) {
// Ignore fields[2], which we don't care about in this case. This works around the
// issue of some PDF files that put invalid values, like -1, here for deleted
// objects.
insertFreeXrefEntry(QPDFObjGen(obj, 0));
} else {
insertXrefEntry(obj, toI(fields[0]), fields[1], toI(fields[2]));
}
++obj;
}
}
if (!m->trailer) {
setTrailer(dict);
}
if (dict.hasKey("/Prev")) {
if (!dict.getKey("/Prev").isInteger()) {
throw damagedPDF(
"xref stream", "/Prev key in xref stream dictionary is not an integer");
}
QTC::TC("qpdf", "QPDF prev key in xref stream dictionary");
return dict.getKey("/Prev").getIntValue();
} else {
return 0;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %rdx, %r15
movq %rdi, 0x8(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x170(%rsp)
movq %rsi, 0x98(%rsp)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x6ae50
xorps %xmm0, %xmm0
leaq 0x210(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movups 0x90(%rsp), %xmm0
movaps %xmm0, (%rdx)
leaq 0x7a76(%rip), %rbx # 0x1885b8
movq %rbx, 0x18(%rdx)
leaq 0x7a7d(%rip), %r13 # 0x1885ca
movq %r13, 0x10(%rdx)
movq %r14, %rsi
callq 0x1816fa
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movq 0x220(%rsp), %rax
testq %rax, %rax
je 0x180b88
leaq 0x210(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movl 0xb0(%rsp), %ebp
xorps %xmm0, %xmm0
leaq 0x1f0(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movups 0x90(%rsp), %xmm0
movaps %xmm0, (%rcx)
movq %rbx, 0x18(%rcx)
movq %r13, 0x10(%rcx)
leaq 0x38(%rsp), %rsi
movl %ebp, %edx
callq 0x181ac2
movl %eax, %r12d
movq 0x200(%rsp), %rax
testq %rax, %rax
je 0x180bdf
leaq 0x1f0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
leaq 0x1d0(%rsp), %r8
movaps %xmm0, 0x10(%r8)
movups 0x90(%rsp), %xmm0
movaps %xmm0, (%r8)
movq %rbx, 0x18(%r8)
movq %r13, 0x10(%r8)
leaq 0x140(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movl %r12d, %ecx
callq 0x181d20
movq 0x1e0(%rsp), %rax
testq %rax, %rax
je 0x180c37
leaq 0x1d0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x6a7b0
movq 0xa0(%rsp), %rdi
callq 0x68e70
movq %rax, %r15
testl %ebp, %ebp
jns 0x180c67
movl %ebp, %edi
callq 0x8808a
movl 0x140(%rsp), %edi
testl %edi, %edi
jns 0x180c77
callq 0x8808a
movslq %ebp, %rax
movslq 0x140(%rsp), %r12
imulq %rax, %r12
cmpq %r15, %r12
je 0x180fd4
movl $0x1, %esi
cmpq $0xa, %r12
jb 0x180ce9
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x180ce2
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x180ce7
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x180ce9
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x180cac
addl $-0x3, %esi
jmp 0x180ce9
addl $-0x2, %esi
jmp 0x180ce9
decl %esi
movl %esi, %esi
leaq 0x1c0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b0(%rsp), %rdi
xorl %edx, %edx
callq 0x6b1f0
leaq 0x1b0(%rsp), %r14
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq %r12, %rdx
callq 0x6bea0
leaq 0x55df6(%rip), %rcx # 0x1d6b1a
movl $0x3b, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x1a0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x180d66
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x180d6d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x190(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x54609(%rip), %rsi # 0x1d539c
callq 0x6b8d0
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x180dc5
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x180dcc
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %esi
cmpq $0xa, %r15
jb 0x180e3e
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r15, %rcx
cmpq $0x63, %rcx
jbe 0x180e37
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x180e3c
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x180e3e
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x180e01
addl $-0x3, %esi
jmp 0x180e3e
addl $-0x2, %esi
jmp 0x180e3e
decl %esi
movl %esi, %esi
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
callq 0x6b1f0
movq 0x50(%rsp), %rdi
movl 0x58(%rsp), %esi
movq %r15, %rdx
callq 0x6bea0
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x180e8b
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x180ea6
movl $0xf, %esi
cmpq %rbx, 0x50(%rsp)
je 0x180ea1
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x180eb7
movq 0x50(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x6bfe0
jmp 0x180ec5
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x68b10
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x180ee9
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x180eef
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x10(%rsp), %rdx
leaq 0xc0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x18274c
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x180f41
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x180f58
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x180f72
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x180f8f
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
movq 0x1b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x180fac
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x68760
cmpq %r15, %r12
ja 0x1813d6
leaq 0xc0(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x6b880
leaq 0xc0(%rsp), %rdi
callq 0x6f2b8
movq 0xa0(%rsp), %rdi
callq 0x6b660
movq %rax, %r15
movq 0x148(%rsp), %rax
movq 0x150(%rsp), %rcx
movq %rcx, 0x160(%rsp)
cmpq %rcx, %rax
je 0x1811b1
movl 0xb4(%rsp), %ecx
movl %ecx, 0x4c(%rsp)
movq $0x0, 0x30(%rsp)
movq %rax, 0x168(%rsp)
movq (%rax), %r12
movq %r12, %rax
shrq $0x20, %rax
movq %rax, 0x178(%rsp)
testl %eax, %eax
jle 0x181197
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
cmpl $0x0, 0x4c(%rsp)
jne 0x181067
movq $0x1, 0xc0(%rsp)
xorl %eax, %eax
movl 0xb4(%rsp,%rax,4), %ecx
testl %ecx, %ecx
jle 0x18109e
movq 0xc0(%rsp,%rax,8), %rdx
shlq $0x8, %rdx
movq %rdx, 0xc0(%rsp,%rax,8)
movzbl (%r15), %esi
incq %r15
orq %rsi, %rdx
movq %rdx, 0xc0(%rsp,%rax,8)
decl %ecx
jne 0x18107c
incq %rax
cmpq $0x3, %rax
jne 0x181069
movq 0xc0(%rsp), %rax
movq 0x30(%rsp), %rcx
testb $0x1, %cl
je 0x1810d5
cmpq $0x2, %rax
je 0x1810ce
movq 0x8(%rsp), %rax
movq (%rax), %rax
movb $0x1, 0x310(%rax)
movq 0x30(%rsp), %rcx
jmp 0x1810e4
cmpq $0x2, %rax
movzbl %cl, %ecx
movl $0x1, %eax
cmovel %eax, %ecx
testl %r12d, %r12d
movq %rcx, 0x30(%rsp)
je 0x18115f
movq 0xc0(%rsp), %r13
testq %r13, %r13
je 0x181178
leaq -0x80000000(%r13), %rax
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jae 0x181119
movq %r13, %rdi
callq 0xc4ccc
movq 0xc8(%rsp), %rbp
movq 0xd0(%rsp), %r14
leaq -0x80000000(%r14), %rax
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jae 0x181147
movq %r14, %rdi
callq 0xc4ccc
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
movq %rbp, %rcx
movl %r14d, %r8d
callq 0x17d988
jmp 0x181185
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x170(%rsp), %rcx
movq %rcx, 0x308(%rax)
jmp 0x181185
movl %r12d, %esi
movq 0x8(%rsp), %rdi
callq 0x17fc42
incl %r12d
incl %ebx
cmpl 0x178(%rsp), %ebx
jne 0x18103d
movq 0x168(%rsp), %rax
addq $0x8, %rax
cmpq 0x160(%rsp), %rax
jne 0x181019
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, 0x208(%rax)
jne 0x18123a
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x180(%rsp)
movq %rax, 0x188(%rsp)
testq %rax, %rax
je 0x1811f7
movq 0xc7bf7(%rip), %rcx # 0x248de0
cmpb $0x0, (%rcx)
je 0x1811f3
incl 0x8(%rax)
jmp 0x1811f7
lock
incl 0x8(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
cmpq $0x0, 0x208(%rdi)
jne 0x181228
leaq 0x188(%rsp), %rsi
movq -0x8(%rsi), %rax
movq %rax, 0x208(%rdi)
addq $0x210, %rdi # imm = 0x210
callq 0x6c300
movq 0x188(%rsp), %rdi
testq %rdi, %rdi
je 0x18123a
callq 0x69d60
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x519ae(%rip), %rsi # 0x1d2bfb
leaq 0x519ac(%rip), %rdx # 0x1d2c00
leaq 0xc0(%rsp), %rdi
callq 0x68bb0
leaq 0x38(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x69f70
movl %eax, %ebp
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x181292
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x181381
leaq 0xc0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x5194e(%rip), %rsi # 0x1d2bfb
leaq 0x5194c(%rip), %rdx # 0x1d2c00
callq 0x68bb0
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x6ba70
leaq 0x10(%rsp), %rdi
callq 0x6c2a0
movl %eax, %ebp
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1812eb
callq 0x69d60
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x181308
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
testb %bpl, %bpl
je 0x18140e
leaq 0xc0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x518d8(%rip), %rsi # 0x1d2bfb
leaq 0x518d6(%rip), %rdx # 0x1d2c00
callq 0x68bb0
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x6ba70
leaq 0x10(%rsp), %rdi
callq 0x6db80
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x181362
callq 0x69d60
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x181383
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x181383
xorl %ebx, %ebx
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x181395
callq 0x69d60
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x1813b2
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1813c1
callq 0x69d60
movq %rbx, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0xc0(%rsp), %rsi
movq %rax, %rdi
callq 0x6aaa0
movq 0xc78ee(%rip), %rsi # 0x248ce8
movq 0xc7867(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x18148e
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x51855(%rip), %rsi # 0x1d2c82
leaq 0x51859(%rip), %rdx # 0x1d2c8d
callq 0x68bb0
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5570d(%rip), %rsi # 0x1d6b56
leaq 0x5573b(%rip), %rdx # 0x1d6b8b
leaq 0x10(%rsp), %rdi
callq 0x68bb0
movb $0x1, %bl
leaq 0xc0(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x936dc
xorl %ebx, %ebx
movq 0xc7869(%rip), %rsi # 0x248ce8
movq 0xc77e2(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rax, %r12
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x1814af
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1814af
movq %rax, %r12
movb $0x1, %bl
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1814d3
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1814d3
movq %rax, %r12
movb $0x1, %bl
testb %bl, %bl
je 0x1816b4
movq %r14, %rdi
callq 0x6cf40
jmp 0x1816b4
movq %rax, %r12
movq %r14, %rdi
callq 0x6cf40
jmp 0x1815db
jmp 0x181504
jmp 0x1815f2
jmp 0x1816b1
movq %rax, %r12
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1815f5
callq 0x69d60
jmp 0x1815f5
jmp 0x1815f2
jmp 0x1816b1
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18154c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18154c
movq %rax, %r12
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x181568
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x181568
movq %rax, %r12
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x181587
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x181587
movq %rax, %r12
movq 0x190(%rsp), %rdi
cmpq %r14, %rdi
je 0x1815a9
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1815a9
movq %rax, %r12
movq 0x1b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x1816b4
movq 0x1c0(%rsp), %rsi
jmp 0x18160e
jmp 0x1816b1
jmp 0x1816a9
jmp 0x1816a9
jmp 0x1816a9
movq %rax, %r12
leaq 0xc0(%rsp), %rdi
callq 0x6f2b8
jmp 0x1816b4
jmp 0x1816b1
movq %rax, %r12
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1816b4
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1816b4
jmp 0x1816b1
jmp 0x1816b1
jmp 0x1816b1
movq %rax, %r12
jmp 0x1816c6
movq %rax, %r12
movq 0x1e0(%rsp), %rax
testq %rax, %rax
je 0x1816e3
leaq 0x1d0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1816e3
jmp 0x1816a9
movq %rax, %r12
movq 0x200(%rsp), %rax
testq %rax, %rax
je 0x1816e3
leaq 0x1f0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1816e3
jmp 0x1816a9
movq %rax, %r12
movq 0x220(%rsp), %rax
testq %rax, %rax
je 0x1816e3
leaq 0x210(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x1816e3
movq %rax, %rdi
callq 0x7cc8d
movq %rax, %r12
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x1816c6
callq 0x69d60
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x1816e3
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1816f2
callq 0x69d60
movq %r12, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::processXRefIndex(QPDFObjectHandle&, int, std::function<QPDFExc (std::basic_string_view<char, std::char_traits<char>>)>) | std::pair<int, std::vector<std::pair<int, int>>>
QPDF::processXRefIndex(
QPDFObjectHandle& dict, int max_num_entries, std::function<QPDFExc(std::string_view)> damaged)
{
auto size = dict.getKey("/Size").getIntValueAsInt();
auto Index_obj = dict.getKey("/Index");
if (Index_obj.isArray()) {
std::vector<std::pair<int, int>> indx;
int num_entries = 0;
auto index_vec = Index_obj.getArrayAsVector();
if ((index_vec.size() % 2) || index_vec.size() < 2) {
throw damaged("Cross-reference stream's /Index has an invalid number of values");
}
int i = 0;
long long first = 0;
for (auto& val: index_vec) {
if (val.isInteger()) {
if (i % 2) {
auto count = val.getIntValue();
if (count <= 0) {
throw damaged(
"Cross-reference stream section claims to contain " +
std::to_string(count) + " entries");
}
// We are guarding against the possibility of num_entries * entry_size
// overflowing. We are not checking that entries are in ascending order as
// required by the spec, which probably should generate a warning. We are also
// not checking that for each subsection first object number + number of entries
// <= /Size. The spec requires us to ignore object number > /Size.
if (first > (max_num_entries - count) ||
count > (max_num_entries - num_entries)) {
throw damaged(
"Cross-reference stream claims to contain too many entries: " +
std::to_string(first) + " " + std::to_string(max_num_entries) + " " +
std::to_string(num_entries));
}
indx.emplace_back(static_cast<int>(first), static_cast<int>(count));
num_entries += static_cast<int>(count);
} else {
first = val.getIntValue();
if (first < 0) {
throw damaged(
"Cross-reference stream's /Index contains a negative object id");
} else if (first > max_num_entries) {
throw damaged(
"Cross-reference stream's /Index contains an impossibly "
"large object id");
}
}
} else {
throw damaged(
"Cross-reference stream's /Index's item " + std::to_string(i) +
" is not an integer");
}
i++;
}
QTC::TC("qpdf", "QPDF xref /Index is array", index_vec.size() == 2 ? 0 : 1);
return {num_entries, indx};
} else if (Index_obj.isNull()) {
QTC::TC("qpdf", "QPDF xref /Index is null");
return {size, {{0, size}}};
} else {
throw damaged("Cross-reference stream does not have a proper /Index key");
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %r8, %r13
movl %ecx, 0x34(%rsp)
movq %rdx, %rbx
movq %rdi, 0x58(%rsp)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x381e9(%rip), %rsi # 0x1b9f39
leaq 0x381e7(%rip), %rdx # 0x1b9f3e
movq %rsp, %rdi
callq 0x68bb0
leaq 0x38(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x6ba70
leaq 0x38(%rsp), %rdi
callq 0x6bdf0
movl %eax, %r15d
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x181d8b
callq 0x69d60
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x181da1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x50e53(%rip), %rsi # 0x1d2c01
leaq 0x50e52(%rip), %rdx # 0x1d2c07
callq 0x68bb0
leaq 0xa0(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x6ba70
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x181de3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
leaq 0xa0(%rsp), %rdi
callq 0x6c8b0
testb %al, %al
je 0x181f09
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x696d0
movq 0xd0(%rsp), %r12
movq 0xd8(%rsp), %r14
movq %r14, %rax
subq %r12, %rax
cmpq $0x11, %rax
jb 0x182313
andl $0x10, %eax
jne 0x182313
cmpq %r14, %r12
je 0x181f66
movq %r13, 0x28(%rsp)
movslq 0x34(%rsp), %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
movl $0x0, 0x24(%rsp)
movq %r12, %rdi
callq 0x6c2a0
testb %al, %al
je 0x182054
testb $0x1, %r13b
jne 0x181ea1
movq %r12, %rdi
callq 0x6db80
movq %rax, %rbx
testq %rax, %rax
js 0x1820c7
cmpq %r15, %rbx
jle 0x181ef7
jmp 0x1820fd
movq %r12, %rdi
callq 0x6db80
movq %rax, %rbp
testq %rax, %rax
jle 0x182133
movq %r15, %rax
subq %rbp, %rax
cmpq %rax, %rbx
jg 0x181fdd
movl 0x34(%rsp), %eax
subl 0x24(%rsp), %eax
cltq
cmpq %rax, %rbp
jg 0x181fdd
movl %ebx, (%rsp)
movl %ebp, 0x38(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x38(%rsp), %rdx
callq 0x6e220
addl %ebp, 0x24(%rsp)
incl %r13d
addq $0x10, %r12
cmpq %r14, %r12
jne 0x181e6d
jmp 0x181f6e
leaq 0xa0(%rsp), %rdi
callq 0x6db30
testb %al, %al
je 0x1822e2
leaq 0x38(%rsp), %rsi
movl $0x0, (%rsi)
movl %r15d, 0x4(%rsi)
movq %rsp, %rdi
leaq 0x80(%rsp), %rcx
movl $0x1, %edx
callq 0x6bef0
movq 0x58(%rsp), %rax
movl %r15d, (%rax)
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0x6efe0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x181fb4
movq 0x10(%rsp), %rsi
jmp 0x181fac
movl $0x0, 0x24(%rsp)
movq 0x58(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x8(%rax), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x6efe0
leaq 0xd0(%rsp), %rdi
callq 0x94700
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x181fb4
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x181fc6
callq 0x69d60
movq 0x58(%rsp), %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x138(%rsp), %rdi
movq %rbx, %rsi
callq 0x6bd40
leaq 0x549f7(%rip), %rsi # 0x1d69f8
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0x69970
leaq 0x50aa7(%rip), %rsi # 0x1d2ac4
leaq 0x158(%rsp), %rdi
callq 0x6b8d0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1821da
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x1821e7
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x80(%rsp), %rdi
movl %r13d, %esi
callq 0x6e160
leaq 0x54a41(%rip), %rsi # 0x1d6ab9
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x69970
leaq 0x54ae8(%rip), %rsi # 0x1d6b79
leaq 0x38(%rsp), %rdi
callq 0x6b8d0
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x182267
movups (%rcx), %xmm0
leaq 0x10(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x182273
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
movq $0x3d, (%rsp)
leaq 0x54951(%rip), %rax # 0x1d6a34
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1821a6
callq 0x6e740
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
movq $0x46, (%rsp)
leaq 0x54959(%rip), %rax # 0x1d6a72
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1821b6
callq 0x6e740
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x6bd40
leaq 0x5486f(%rip), %rsi # 0x1d69c6
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x69970
leaq 0x541d5(%rip), %rsi # 0x1d6345
leaq 0x38(%rsp), %rdi
callq 0x6b8d0
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x182344
movups (%rcx), %xmm0
leaq 0x10(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x182350
movq %rsp, %rdx
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq *0x18(%rsi)
jmp 0x1821c4
movq %rsp, %rdx
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq *0x18(%rsi)
movq 0xc6b1d(%rip), %rsi # 0x248ce8
movq 0xc6a96(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x118(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x6e160
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x118(%rsp), %rdx
callq 0x68050
leaq 0x50893(%rip), %rsi # 0x1d2ac4
leaq 0x80(%rsp), %rdi
callq 0x6b8d0
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x18240d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x18241a
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1822b2
movb $0x1, %bpl
callq 0x6e740
movb $0x1, %bpl
leaq 0x60(%rsp), %rdx
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq *0x18(%rsi)
xorl %ebp, %ebp
movq 0xc6a1a(%rip), %rsi # 0x248ce8
movq 0xc6993(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x1824b3
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
movq $0x38, (%rsp)
leaq 0x547e3(%rip), %rax # 0x1d6ae1
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%r13)
jne 0x1823bf
callq 0x6e740
movl $0x80, %edi
callq 0x6a000
movq %rax, %r14
movq $0x3f, (%rsp)
leaq 0x54657(%rip), %rax # 0x1d6986
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%r13)
jne 0x1823e6
callq 0x6e740
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x18238f
movb $0x1, %bpl
callq 0x6e740
movb $0x1, %bpl
leaq 0x60(%rsp), %rdx
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq *0x18(%rsi)
xorl %ebp, %ebp
movq 0xc693d(%rip), %rsi # 0x248ce8
movq 0xc68b6(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x1824b3
movq %r13, %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq *0x18(%rsi)
movq 0xc6916(%rip), %rsi # 0x248ce8
movq 0xc688f(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x1824b3
movq %r13, %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq *0x18(%rsi)
movq 0xc68ef(%rip), %rsi # 0x248ce8
movq 0xc6868(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
jmp 0x1824b3
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xf8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x6e160
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
callq 0x68050
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0xe8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x182485
movb $0x1, %bpl
callq 0x6e740
movb $0x1, %bpl
leaq 0xe8(%rsp), %rdx
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq *0x18(%rsi)
xorl %ebp, %ebp
movq 0xc6844(%rip), %rsi # 0x248ce8
movq 0xc67bd(%rip), %rdx # 0x248c68
movq %r14, %rdi
callq 0x6b420
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1824d9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1824d9
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x182502
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x182502
movq %rax, %rbx
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x182526
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x182526
jmp 0x182705
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18254f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18254f
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1825b9
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1825b9
jmp 0x1826e5
movq %rax, %rbx
movq %r14, %rdi
callq 0x6cf40
jmp 0x182732
jmp 0x182705
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x182732
movq 0x10(%rsp), %rsi
jmp 0x18272a
jmp 0x18268d
movq %rax, %rbx
jmp 0x182715
movq %rax, %rbx
movb $0x1, %bpl
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x182668
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x182668
jmp 0x18261f
jmp 0x18263f
jmp 0x1825f5
jmp 0x182617
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1825f8
callq 0x69d60
jmp 0x1825f8
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x182744
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x182744
movq %rax, %rbx
jmp 0x182744
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x182645
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x182645
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18269b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x18269b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1826bc
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1826bc
jmp 0x182695
movq %rax, %rbx
jmp 0x182732
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1826f4
movq 0x90(%rsp), %rsi
jmp 0x1826d5
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1826f4
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x68760
jmp 0x1826f4
jmp 0x1826ee
jmp 0x182705
jmp 0x1826e5
movq %rax, %rbx
jmp 0x1826f9
jmp 0x1826ee
jmp 0x182705
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x182708
movq %r14, %rdi
callq 0x6cf40
jmp 0x182708
jmp 0x182705
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x94700
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x182732
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x68760
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x182744
callq 0x69d60
movq %rbx, %rdi
callq 0x6b780
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::resolveXRefTable() | void
QPDF::setTrailer(QPDFObjectHandle obj)
{
if (m->trailer) {
return;
}
m->trailer = obj;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rax
movq 0x150(%rax), %r14
leaq 0x140(%rax), %r15
cmpq %r15, %r14
sete %bpl
je 0x182a9d
movq %rdi, %rbx
movb 0x2d0(%rax), %r12b
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x182aac
testb %al, %al
je 0x182a89
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x182b0a
testb %r12b, %r12b
jne 0x182a89
movq (%rbx), %rax
cmpb $0x0, 0x2d0(%rax)
jne 0x182a9d
movq %r14, %rdi
callq 0x6d980
movq %rax, %r14
cmpq %r15, %rax
sete %bpl
jne 0x182a5c
andb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.