name string | code string | asm string | file string |
|---|---|---|---|
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, %r1... | /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, (%r... | /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", "QPDFObje... | 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 0x15... | /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(ite... | 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 0x182b... | /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])... | 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
jm... | /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 {... | 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 %... | /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
call... | /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)
j... | /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... | /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", "ig... | 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 0x... | /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
i... | /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
le... | /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 t... | 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 # 0x1d3... | /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 c... | 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 0x15... | /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 0x... | /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 0x... | /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_da... | 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 ... | /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;
b... | 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)
xor... | /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()-... | 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... | /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(),
... | 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,... | /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 %r1... | /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::str... | 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 # 0x1... | /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 %r... | /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(%r1... | /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_wa... | 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(%r... | /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;
... | 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
mov... | /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
mov... | /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 0x... | /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(
... | 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 $0... | /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,... | /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 0x1... | /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... | /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,... | /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:... | 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), %rd... | /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.
retur... | 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... | /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::__cxx1... | 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
... | /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) {
// Algorith... | 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 $0x... | /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 PDFDocEncodi... | 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, %rd... | /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 0x7939... | /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
... | /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. W... | 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... | /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.getR... | 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... | /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")... | 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... | /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
c... | /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_dat... | 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 ... | /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;... | 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... | /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;
... | 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(%... | /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... | 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 ca... | 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 ... | /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:... | 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::stri... | 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... | /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 0... | /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, %a... | /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... | /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... | /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... | /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... | /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 p... | 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
c... | /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) {
... | 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 0... | /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... | /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), %... | /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 (coun... | 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), %... | /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... | /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()) ... | 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... | /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()) ... | 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(%ra... | /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)
m... | /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 ... | 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
cal... | /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... | 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_er... | 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 ... | /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
mo... | /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 0x... | /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 st... | 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(%... | /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.getBi... | 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(... | /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(nite... | 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, %r1... | /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(nite... | 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,... | /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 A... | 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 ... | /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 c... | 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(... | /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... | 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
... | /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 get... | 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... | /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
in... | /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 << "... | 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 0... | /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.gro... | 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), ... | /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_obj... | 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
... | /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.ent... | 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... | /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).*... | 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 0x8... | /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; ... | 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(%rs... | /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).*... | 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 0x8... | /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);
calc... | 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... | /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);
}
thr... | 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), %rc... | /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 0x5c2... | /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... | 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 %r1... | /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 ... | 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 %... | /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;
}
... | 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... | /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 ... | 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... | /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 ... | 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)
le... | /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... | 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, (%r... | /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, QPDFO... | 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... | /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 i... | 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
t... | /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... | 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), %r... | /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::... | 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, ... | /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... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.