name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
cmValue cmTargetPropertyComputer::GetProperty<cmGeneratorTarget>(cmGeneratorTarget const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cmMakefile const&)
static cmValue GetProperty(Target const* tgt, const std::string& prop, cmMakefile const& mf) { if (cmValue loc = GetLocation(tgt, prop, mf)) { return loc; } if (cmSystemTools::GetFatalErrorOccurred()) { return nullptr; } if (prop == "SOURCES") { return GetSources(tgt, mf); } return nullptr; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x3caa4c testq %rax, %rax jne 0x3c250c leaq 0x4a128a(%rip), %rax # 0x863773 cmpb $0x0, (%rax) jne 0x3c250a callq 0x1e3b2e testb %al, %al jne 0x3c250a leaq 0x2c7c4b(%rip), %rsi # 0x68a149 movq %r14, %rdi callq 0x411b0 testl %eax, %eax je 0x3c2514 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x395fce nop
/JKorbelRA[P]CMake/Source/cmTargetPropertyComputer.h
TargetPropertyEntryFileSet::GetBacktrace() const
cmListFileBacktrace GetBacktrace() const override { return this->EntryCge->GetBacktrace(); }
movq %rdi, %rax movq 0x30(%rsi), %rcx movq (%rcx), %rdx movq %rdx, (%rdi) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rdi) testq %rcx, %rcx je 0x3c8cb8 movq 0x4952ad(%rip), %rdx # 0x85df58 cmpb $0x0, (%rdx) je 0x3c8cb4 incl 0x8(%rcx) retq lock incl 0x8(%rcx) retq nop
/JKorbelRA[P]CMake/Source/cmGeneratorTarget.cxx
cmGlobalUnixMakefileGenerator3::CountProgressMarksInAll(cmLocalGenerator const&)
size_t cmGlobalUnixMakefileGenerator3::CountProgressMarksInAll( const cmLocalGenerator& lg) { size_t count = 0; std::set<cmGeneratorTarget const*> emitted; for (cmGeneratorTarget const* target : this->DirectoryTargetsMap[lg.GetStateSnapshot()]) { count += this->CountProgressMarksInTarget(target, emitted); } return count; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx leaq 0x28(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) leaq 0x8(%rsp), %rdi callq 0x17966a leaq 0x7b0(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0x3d926c movq %rax, %r14 movq 0x18(%rax), %r12 addq $0x8, %r14 xorl %r15d, %r15d cmpq %r14, %r12 je 0x3d45ed leaq 0x20(%rsp), %r13 movq 0x20(%r12), %rsi movq %rbx, %rdi movq %r13, %rdx callq 0x3d8606 addq %rax, %r15 movq %r12, %rdi callq 0x411f0 movq %rax, %r12 cmpq %r14, %rax jne 0x3d45ca leaq 0x20(%rsp), %rdi callq 0x167f86 movq %r15, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x3d460a movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x167f86 movq %rbx, %rdi callq 0x40710 nop
/JKorbelRA[P]CMake/Source/cmGlobalUnixMakefileGenerator3.cxx
cmGlobalUnixMakefileGenerator3::AddCXXCompileCommand(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 cmGlobalUnixMakefileGenerator3::AddCXXCompileCommand( const std::string& sourceFile, const std::string& workingDirectory, const std::string& compileCommand, const std::string& objPath) { if (!this->CommandDatabase) { std::string commandDatabaseName = this->GetCMakeInstance()->GetHomeOutputDirectory() + "/compile_commands.json"; this->CommandDatabase = cm::make_unique<cmGeneratedFileStream>(commandDatabaseName); *this->CommandDatabase << "[\n"; } else { *this->CommandDatabase << ",\n"; } *this->CommandDatabase << "{\n" << R"( "directory": ")" << cmGlobalGenerator::EscapeJSON(workingDirectory) << "\",\n" << R"( "command": ")" << cmGlobalGenerator::EscapeJSON(compileCommand) << "\",\n" << R"( "file": ")" << cmGlobalGenerator::EscapeJSON(sourceFile) << "\",\n" << R"( "output": ")" << cmGlobalGenerator::EscapeJSON(objPath) << "\"\n}"; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r13 movq 0x7a8(%rdi), %rdi testq %rdi, %rdi je 0x3d533a leaq 0x2b5ee3(%rip), %rsi # 0x68b20e movl $0x2, %edx callq 0x41490 jmp 0x3d53e0 movq 0x78(%r13), %rdi callq 0x20e444 leaq 0x18(%rsp), %rcx movq %rcx, -0x10(%rcx) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x777d0 leaq 0x2aa93b(%rip), %rsi # 0x67fca5 movq %rbp, %rdi callq 0x40740 movl $0x268, %edi # imm = 0x268 callq 0x3f450 movq %rax, %rbp leaq 0x8(%rsp), %rsi movq %rax, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x154656 movq 0x7a8(%r13), %rdi movq %rbp, 0x7a8(%r13) testq %rdi, %rdi je 0x3d53b0 movq (%rdi), %rax callq *0x8(%rax) movq 0x7a8(%r13), %rbp leaq 0x2b5e66(%rip), %rsi # 0x68b21d movl $0x2, %edx movq %rbp, %rdi callq 0x41490 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3d53e0 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x7a8(%r13), %r13 leaq 0x2ba9c1(%rip), %rsi # 0x68fdaf movl $0x2, %edx movq %r13, %rdi callq 0x41490 leaq 0x2aa8ba(%rip), %rsi # 0x67fcbc movl $0x10, %edx movq %r13, %rdi callq 0x41490 leaq 0x8(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi callq 0x1666a4 movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq %r13, %rdi callq 0x41490 movq %rax, %r12 leaq 0x2b5dd4(%rip), %rsi # 0x68b20d movl $0x3, %edx movq %rax, %rdi callq 0x41490 leaq 0x2aa880(%rip), %rsi # 0x67fccd movl $0xe, %edx movq %r12, %rdi callq 0x41490 leaq 0x68(%rsp), %rdi movq %r15, %rsi callq 0x1666a4 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx movq %r12, %rdi callq 0x41490 movq %rax, %r15 leaq 0x2b5d8a(%rip), %rsi # 0x68b20d movl $0x3, %edx movq %rax, %rdi callq 0x41490 leaq 0x2aa845(%rip), %rsi # 0x67fcdc movl $0xb, %edx movq %r15, %rdi callq 0x41490 leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x1666a4 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx movq %r15, %rdi callq 0x41490 movq %rax, %r14 leaq 0x2b5d40(%rip), %rsi # 0x68b20d movl $0x3, %edx movq %rax, %rdi callq 0x41490 leaq 0x2aa807(%rip), %rsi # 0x67fce8 movl $0xd, %edx movq %r14, %rdi callq 0x41490 leaq 0x28(%rsp), %rdi movq %rbx, %rsi callq 0x1666a4 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq %r14, %rdi callq 0x41490 leaq 0x2b9e6b(%rip), %rsi # 0x68f37f movl $0x3, %edx movq %rax, %rdi callq 0x41490 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d553c movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d5557 movq 0x58(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d5572 movq 0x78(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d558d movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3d55b5 movq %rax, %rbx movl $0x268, %esi # imm = 0x268 movq %rbp, %rdi callq 0x3f310 jmp 0x3d55b8 jmp 0x3d55b5 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax jmp 0x3d5636 jmp 0x3d55ea jmp 0x3d560a jmp 0x3d562a movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d55ed movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3d55ed movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d560d movq 0x58(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3d560d movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d562d movq 0x78(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3d562d movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3d5648 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmGlobalUnixMakefileGenerator3.cxx
cmGlobalUnixMakefileGenerator3::WriteMainCMakefileLanguageRules(cmGeneratedFileStream&, std::vector<std::unique_ptr<cmLocalGenerator, std::default_delete<cmLocalGenerator>>, std::allocator<std::unique_ptr<cmLocalGenerator, std::default_delete<cmLocalGenerator>>>>&)
void cmGlobalUnixMakefileGenerator3::WriteMainCMakefileLanguageRules( cmGeneratedFileStream& cmakefileStream, std::vector<std::unique_ptr<cmLocalGenerator>>& lGenerators) { // now list all the target info files cmakefileStream << "# Dependency information for all targets:\n"; cmakefileStream << "set(CMAKE_DEPEND_INFO_FILES\n"; for (const auto& lGenerator : lGenerators) { const auto& lg = cm::static_reference_cast<cmLocalUnixMakefileGenerator3>(lGenerator); // for all of out targets for (const auto& tgt : lg.GetGeneratorTargets()) { if (tgt->IsInBuildSystem() && tgt->GetType() != cmStateEnums::GLOBAL_TARGET) { std::string tname = cmStrCat(lg.GetRelativeTargetDirectory(tgt.get()), "/DependInfo.cmake"); cmSystemTools::ConvertToUnixSlashes(tname); cmakefileStream << " \"" << tname << "\"\n"; } } } cmakefileStream << " )\n"; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %rbx leaq 0x2b8788(%rip), %rsi # 0x68f57b movl $0x2a, %edx movq %rbx, %rdi callq 0x41490 leaq 0x2b879f(%rip), %rsi # 0x68f5a6 movl $0x1c, %edx movq %rbx, %rdi callq 0x41490 movq (%r14), %r12 movq 0x8(%r14), %rax movq %rax, 0x40(%rsp) cmpq %rax, %r12 je 0x3d6f46 leaq 0x20(%rsp), %r15 movq (%r12), %r14 movq 0x148(%r14), %r13 movq 0x150(%r14), %rbp cmpq %rbp, %r13 je 0x3d6f37 movq (%r13), %rdi callq 0x39b91c testb %al, %al je 0x3d6f2e movq (%r13), %rdi callq 0x3972b4 cmpl $0x6, %eax je 0x3d6f2e movq (%r13), %rdx movq %rsp, %rdi movq %r14, %rsi callq 0x3f62c0 movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, 0x48(%rsp) movq %rax, 0x50(%rsp) movq $0x11, 0x58(%rsp) leaq 0x2b8725(%rip), %rax # 0x68f5c3 movq %rax, 0x60(%rsp) movl $0x2, %edx movq %r15, %rdi leaq 0x48(%rsp), %rsi callq 0x1e311c movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3d6ed0 movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 movq %r15, %rdi callq 0x486ff8 movl $0x3, %edx movq %rbx, %rdi leaq 0x2c2d41(%rip), %rsi # 0x699c28 callq 0x41490 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x41490 movl $0x2, %edx movq %rax, %rdi leaq 0x2b463c(%rip), %rsi # 0x68b549 callq 0x41490 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x3d6f2e movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 addq $0x8, %r13 jmp 0x3d6e40 addq $0x8, %r12 cmpq 0x40(%rsp), %r12 jne 0x3d6e2e leaq 0x2a9436(%rip), %rsi # 0x680383 movl $0x4, %edx movq %rbx, %rdi callq 0x41490 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3d6fa0 movq 0x10(%rsp), %rsi jmp 0x3d6f98 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x3d6fa0 movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmGlobalUnixMakefileGenerator3.cxx
cmGlobalUnixMakefileGenerator3::GetName[abi:cxx11]() const
std::string GetName() const override { return cmGlobalUnixMakefileGenerator3::GetActualName(); }
movq %rdi, %rax leaq 0x10(%rdi), %rcx movq %rcx, (%rdi) movabsq $0x6b614d2078696e55, %rcx # imm = 0x6B614D2078696E55 movq %rcx, 0x10(%rdi) movabsq $0x73656c6966656b61, %rcx # imm = 0x73656C6966656B61 movq %rcx, 0x16(%rdi) movq $0xe, 0x8(%rdi) movb $0x0, 0x1e(%rdi) retq nop
/JKorbelRA[P]CMake/Source/cmGlobalUnixMakefileGenerator3.h
cmGraphVizWriter::FindAllConnections(std::map<cmLinkItem, std::vector<cmGraphVizWriter::Connection, std::allocator<cmGraphVizWriter::Connection>>, std::less<cmLinkItem>, std::allocator<std::pair<cmLinkItem const, std::vector<cmGraphVizWriter::Connection, std::allocator<cmGraphVizWriter::Connection>>>>> const&, cmLinkItem const&, std::vector<cmGraphVizWriter::Connection, std::allocator<cmGraphVizWriter::Connection>>&, std::set<cmLinkItem, std::less<cmLinkItem>, std::allocator<cmLinkItem>>&)
void cmGraphVizWriter::FindAllConnections(const ConnectionsMap& connectionMap, const cmLinkItem& rootItem, Connections& extendedCons, std::set<cmLinkItem>& visitedItems) { // some "targets" are not in map, e.g. linker flags as -lm or // targets without dependency. // in both cases we are finished with traversing the graph if (connectionMap.find(rootItem) == connectionMap.cend()) { return; } const Connections& origCons = connectionMap.at(rootItem); for (const Connection& con : origCons) { extendedCons.emplace_back(con); const cmLinkItem& dstItem = con.dst; bool const visited = visitedItems.find(dstItem) != visitedItems.cend(); if (!visited) { visitedItems.insert(dstItem); this->FindAllConnections(connectionMap, dstItem, extendedCons, visitedItems); } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r13 movq %rsi, %r15 movq %rdi, 0x10(%rsp) movq %rsi, %rdi movq %rdx, %rsi callq 0x3deefc movq %r15, 0x8(%rsp) leaq 0x8(%r15), %rcx cmpq %rcx, %rax je 0x3dd89f movq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x3dde52 movq (%rax), %r13 movq 0x8(%rax), %r12 cmpq %r12, %r13 je 0x3dd89f leaq 0x8(%rbx), %r15 movq %r14, %rdi movq %r13, %rsi callq 0x3ddec4 leaq 0x40(%r13), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x3ca928 cmpq %r15, %rax jne 0x3dd893 movq %rbx, %rdi movq %rbp, %rsi callq 0x344314 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi movq %rbp, %rdx movq %r14, %rcx movq %rbx, %r8 callq 0x3dd7fc addq $0xa0, %r13 cmpq %r12, %r13 jne 0x3dd851 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Source/cmGraphVizWriter.cxx
cmInstallGenerator::cmInstallGenerator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<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>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, cmInstallGenerator::MessageLevel, bool, bool, cmListFileBacktrace)
cmInstallGenerator::cmInstallGenerator( std::string destination, std::vector<std::string> const& configurations, std::string component, MessageLevel message, bool exclude_from_all, bool all_components, cmListFileBacktrace backtrace) : cmScriptGenerator("CMAKE_INSTALL_CONFIG_NAME", configurations) , Destination(std::move(destination)) , Component(std::move(component)) , Message(message) , ExcludeFromAll(exclude_from_all) , AllComponents(all_components) , Backtrace(std::move(backtrace)) { }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, 0xc(%rsp) movl %r8d, %r14d movq %rcx, %r15 movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx leaq 0x20(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x2b0ce0(%rip), %rsi # 0x69019a leaq 0x2b0cf2(%rip), %rdx # 0x6901b3 leaq 0x10(%rsp), %rdi callq 0x5c768 leaq 0x30(%rsp), %rdi movq %r13, %rsi callq 0x9c4c8 leaq 0x10(%rsp), %rsi leaq 0x30(%rsp), %rdx movq %rbx, %rdi callq 0x1cd6ac leaq 0x30(%rsp), %rdi callq 0x5c554 movq 0x10(%rsp), %rdi cmpq %rbp, %rdi je 0x3df50b movq 0x20(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x4739c6(%rip), %rax # 0x852ed8 movq %rax, (%rbx) leaq 0x80(%rbx), %rax movq %rax, 0x70(%rbx) movq (%r12), %rcx leaq 0x10(%r12), %rdx cmpq %rdx, %rcx je 0x3df53e movq %rcx, 0x70(%rbx) movq (%rdx), %rax movq %rax, 0x80(%rbx) jmp 0x3df544 movups (%rdx), %xmm0 movups %xmm0, (%rax) movq 0x88(%rsp), %rax movb 0x80(%rsp), %cl movq 0x8(%r12), %rsi movq %rsi, 0x78(%rbx) movq %rdx, (%r12) movq $0x0, 0x8(%r12) movb $0x0, 0x10(%r12) leaq 0xa0(%rbx), %rsi movq %rsi, 0x90(%rbx) movq (%r15), %rdi leaq 0x10(%r15), %rdx cmpq %rdx, %rdi je 0x3df59c movq %rdi, 0x90(%rbx) movq (%rdx), %rsi movq %rsi, 0xa0(%rbx) jmp 0x3df5a2 movups (%rdx), %xmm0 movups %xmm0, (%rsi) movq 0x8(%r15), %rsi movq %rsi, 0x98(%rbx) movq %rdx, (%r15) xorl %edx, %edx movq %rdx, 0x8(%r15) movb $0x0, 0x10(%r15) movl %r14d, 0xb0(%rbx) movl 0xc(%rsp), %esi movb %sil, 0xb4(%rbx) movb %cl, 0xb5(%rbx) movq %rdx, 0xc0(%rbx) movups (%rax), %xmm0 movq %rdx, 0x8(%rax) movups %xmm0, 0xb8(%rbx) movq %rdx, (%rax) addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x5c554 jmp 0x3df60c movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %rbp, %rdi je 0x3df623 movq 0x20(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710 nop
/JKorbelRA[P]CMake/Source/cmInstallGenerator.cxx
cmInstallExportGenerator::GetTempDir[abi:cxx11]() const
std::string cmInstallExportGenerator::GetTempDir() const { if (this->TempDir.empty()) { return this->TempDirCalculate(); } return this->TempDir; }
pushq %rbx movq %rdi, %rbx movq 0x168(%rsi), %rdx testq %rdx, %rdx je 0x3e256b leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq 0x160(%rsi), %rsi addq %rsi, %rdx movq %rbx, %rdi callq 0x777d0 jmp 0x3e2573 movq %rbx, %rdi callq 0x3e2404 movq %rbx, %rax popq %rbx retq
/JKorbelRA[P]CMake/Source/cmInstallExportGenerator.cxx
cmInstalledFile::GetProperty(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
bool cmInstalledFile::GetProperty(const std::string& prop, std::string& value) const { auto i = this->Properties.find(prop); if (i == this->Properties.end()) { return false; } Property const& property = i->second; std::string output; std::string separator; for (const auto& ve : property.ValueExpressions) { output += separator; output += ve->GetInput(); separator = ";"; } value = output; return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rdi, %rbx addq $0x28, %rdi callq 0x3e4c08 movq %rax, %r14 addq $0x30, %rbx cmpq %rbx, %rax je 0x3e445b movq %r15, 0x50(%rsp) leaq 0x38(%rsp), %rcx movq %rcx, -0x10(%rcx) xorl %eax, %eax movq %rax, -0x8(%rcx) movb %al, (%rcx) leaq 0x18(%rsp), %rcx movq %rcx, -0x10(%rcx) movq %rax, -0x8(%rcx) movb %al, (%rcx) movq 0x40(%r14), %r15 movq %r14, 0x48(%rsp) movq 0x48(%r14), %r14 cmpq %r14, %r15 je 0x3e440f leaq 0x28(%rsp), %r12 leaq 0x261b5c(%rip), %r13 # 0x645f20 leaq 0x8(%rsp), %rbp movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r12, %rdi callq 0x40aa0 movq (%r15), %rax movq 0x28(%rax), %rsi movq 0x30(%rax), %rdx movq %r12, %rdi callq 0x40aa0 movq 0x10(%rsp), %rdx movl $0x1, %r8d movq %rbp, %rdi xorl %esi, %esi movq %r13, %rcx callq 0x40110 addq $0x8, %r15 cmpq %r14, %r15 jne 0x3e43c9 leaq 0x28(%rsp), %rsi movq 0x50(%rsp), %rdi callq 0x41a90 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi movq 0x48(%rsp), %r14 je 0x3e443f movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3e445b movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 cmpq %rbx, %r14 setne %al addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3e4472 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3e4491 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3e44ad movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710 nop
/JKorbelRA[P]CMake/Source/cmInstalledFile.cxx
cmInstallFilesGenerator::cmInstallFilesGenerator(std::vector<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>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<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>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cmInstallGenerator::MessageLevel, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, cmListFileBacktrace)
cmInstallFilesGenerator::cmInstallFilesGenerator( std::vector<std::string> const& files, std::string const& dest, bool programs, std::string file_permissions, std::vector<std::string> const& configurations, std::string const& component, MessageLevel message, bool exclude_from_all, std::string rename, bool optional, cmListFileBacktrace backtrace) : cmInstallGenerator(dest, configurations, component, message, exclude_from_all, false, std::move(backtrace)) , Files(files) , FilePermissions(std::move(file_permissions)) , Rename(std::move(rename)) , Programs(programs) , Optional(optional) { // We need per-config actions if the destination and rename have generator // expressions. if (cmGeneratorExpression::Find(this->Destination) != std::string::npos) { this->ActionsPerConfig = true; } if (cmGeneratorExpression::Find(this->Rename) != std::string::npos) { this->ActionsPerConfig = true; } // We need per-config actions if any directories have generator expressions. if (!this->ActionsPerConfig) { for (std::string const& file : files) { if (cmGeneratorExpression::Find(file) != std::string::npos) { this->ActionsPerConfig = true; break; } } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %r15 movq %r8, %r12 movl %ecx, 0x4(%rsp) movq %rsi, %r14 movq %rdi, %rbx movq 0xa0(%rsp), %r13 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x777d0 leaq 0x40(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x30(%rsp), %rdi callq 0x777d0 movq 0xc8(%rsp), %rax movb 0xb0(%rsp), %cl movl 0xa8(%rsp), %r8d movups (%rax), %xmm0 xorl %edx, %edx movq %rdx, 0x8(%rax) leaq 0x50(%rsp), %r10 movaps %xmm0, (%r10) movq %rdx, (%rax) movzbl %cl, %r9d leaq 0x8(%rsp), %rsi leaq 0x30(%rsp), %rcx movq %rbx, %rdi movq %r15, %rdx pushq %r10 pushq $0x0 callq 0x3df488 addq $0x10, %rsp movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x3e5505 callq 0x75c64 movq 0x30(%rsp), %rdi cmpq %rbp, %rdi je 0x3e551c movq 0x40(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3e5538 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x46db99(%rip), %rax # 0x8530d8 movq %rax, (%rbx) movq $0x0, 0xc8(%rbx) leaq 0xd0(%rbx), %r13 movq %r13, %rdi movq %r14, %rsi callq 0x9c4c8 movq 0xb8(%rsp), %rax leaq 0xf8(%rbx), %r15 movq %r15, 0xe8(%rbx) movq (%r12), %rcx leaq 0x10(%r12), %rdx cmpq %rdx, %rcx je 0x3e5596 movq %rcx, 0xe8(%rbx) movq (%rdx), %rcx movq %rcx, 0xf8(%rbx) jmp 0x3e559d movups (%rdx), %xmm0 movups %xmm0, (%r15) movb 0xc0(%rsp), %cl movq 0x8(%r12), %rsi movq %rsi, 0xf0(%rbx) movq %rdx, (%r12) movq $0x0, 0x8(%r12) movb $0x0, 0x10(%r12) leaq 0x108(%rbx), %r12 leaq 0x118(%rbx), %rbp movq %rbp, 0x108(%rbx) movq (%rax), %rsi leaq 0x10(%rax), %rdx cmpq %rdx, %rsi je 0x3e55f1 movq %rsi, (%r12) movq (%rdx), %rsi movq %rsi, (%rbp) jmp 0x3e55f8 movups (%rdx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rsi movq %rsi, 0x110(%rbx) movq %rdx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movl 0x4(%rsp), %eax movb %al, 0x128(%rbx) movb %cl, 0x129(%rbx) leaq 0x70(%rbx), %rdi movq %r13, 0x28(%rsp) callq 0x393df6 cmpq $-0x1, %rax je 0x3e563a movb $0x1, 0x68(%rbx) movq %r12, %rdi callq 0x393df6 cmpq $-0x1, %rax je 0x3e564e movb $0x1, 0x68(%rbx) jmp 0x3e5654 testb $0x1, 0x68(%rbx) je 0x3e5663 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r14), %r13 movq 0x8(%r14), %r14 cmpq %r14, %r13 je 0x3e5654 movq %r13, %rdi callq 0x393df6 cmpq $-0x1, %rax jne 0x3e5648 addq $0x20, %r13 jmp 0x3e566a movq %rax, %r14 jmp 0x3e5712 movq %rax, %r14 movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x3e569d callq 0x75c64 movq 0x30(%rsp), %rdi cmpq %rbp, %rdi je 0x3e56b9 movq 0x40(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3e56b9 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3e571a movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3e571a jmp 0x3e56d9 movq %rax, %r14 movq (%r12), %rdi cmpq %rbp, %rdi je 0x3e56f1 movq (%rbp), %rsi incq %rsi callq 0x3f310 movq 0xe8(%rbx), %rdi cmpq %r15, %rdi je 0x3e5708 movq (%r15), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi callq 0x5c554 movq %rbx, %rdi callq 0x3df62c movq %r14, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmInstallFilesGenerator.cxx
cmInstallImportedRuntimeArtifactsGenerator::cmInstallImportedRuntimeArtifactsGenerator(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<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>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cmInstallGenerator::MessageLevel, bool, bool, cmListFileBacktrace)
cmInstallImportedRuntimeArtifactsGenerator:: cmInstallImportedRuntimeArtifactsGenerator( std::string targetName, std::string const& dest, std::string file_permissions, std::vector<std::string> const& configurations, std::string const& component, MessageLevel message, bool exclude_from_all, bool optional, cmListFileBacktrace backtrace) : cmInstallGenerator(dest, configurations, component, message, exclude_from_all, false, std::move(backtrace)) , TargetName(std::move(targetName)) , FilePermissions(std::move(file_permissions)) , Optional(optional) { this->ActionsPerConfig = true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %r13 movq %r8, %r12 movq %rcx, %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx movq %rsp, %rdi callq 0x777d0 leaq 0x30(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x20(%rsp), %rdi callq 0x777d0 movq 0xa8(%rsp), %rax movb 0x98(%rsp), %cl movl 0x90(%rsp), %r8d movups (%rax), %xmm0 xorl %edx, %edx movq %rdx, 0x8(%rax) leaq 0x40(%rsp), %r10 movaps %xmm0, (%r10) movq %rdx, (%rax) movzbl %cl, %r9d movq %rsp, %rsi leaq 0x20(%rsp), %rcx movq %r14, %rdi movq %r12, %rdx pushq %r10 pushq $0x0 callq 0x3df488 addq $0x10, %rsp movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x3e5e0c callq 0x75c64 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x3e5e23 movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3e5e3e movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x46d313(%rip), %rax # 0x853158 movq %rax, (%r14) leaq 0xd8(%r14), %rax movq %rax, 0xc8(%r14) movq (%r15), %rdx leaq 0x10(%r15), %rcx cmpq %rcx, %rdx je 0x3e5e75 movq %rdx, 0xc8(%r14) movq (%rcx), %rax movq %rax, 0xd8(%r14) jmp 0x3e5e7b movups (%rcx), %xmm0 movups %xmm0, (%rax) movb 0xa0(%rsp), %al movq 0x8(%r15), %rdx movq %rdx, 0xd0(%r14) movq %rcx, (%r15) movq $0x0, 0x8(%r15) movb $0x0, 0x10(%r15) leaq 0x100(%r14), %rdx movq %rdx, 0xf0(%r14) movq (%rbx), %rsi leaq 0x10(%rbx), %rcx cmpq %rcx, %rsi je 0x3e5eca movq %rsi, 0xf0(%r14) movq (%rcx), %rdx movq %rdx, 0x100(%r14) jmp 0x3e5ed0 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rbx), %rdx movq %rdx, 0xf8(%r14) movq %rcx, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movb %al, 0x110(%r14) movb $0x1, 0x68(%r14) addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x3e5f17 callq 0x75c64 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x3e5f33 movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3e5f33 movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3e5f4e movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx
cmInstallImportedRuntimeArtifactsGenerator::GetDestination(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string cmInstallImportedRuntimeArtifactsGenerator::GetDestination( std::string const& config) const { return cmGeneratorExpression::Evaluate( this->Destination, this->Target->GetLocalGenerator(), config); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x70(%rsi), %rsi movq 0x78(%r15), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x777d0 movq 0xe8(%r15), %rdi callq 0x3972ae leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) xorl %r10d, %r10d movq %r10, -0x8(%r15) movb $0x0, (%r15) leaq 0x28(%rsp), %r11 leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movq %r14, %rcx xorl %r8d, %r8d xorl %r9d, %r9d pushq %r11 pushq %r10 callq 0x393c44 addq $0x10, %rsp movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x3e603a movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3e6051 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x3e607f movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3e607f movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3e6096 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx
cmInstallImportedRuntimeArtifactsGenerator::~cmInstallImportedRuntimeArtifactsGenerator()
~cmInstallImportedRuntimeArtifactsGenerator() override = default;
pushq %rbx movq %rdi, %rbx leaq 0x46c46d(%rip), %rax # 0x853158 movq %rax, (%rdi) movq 0xf0(%rdi), %rdi leaq 0x100(%rbx), %rax cmpq %rax, %rdi je 0x3e6d0c movq (%rax), %rsi incq %rsi callq 0x3f310 movq 0xc8(%rbx), %rdi leaq 0xd8(%rbx), %rax cmpq %rax, %rdi je 0x3e6d2a movq (%rax), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi popq %rbx jmp 0x3df62c nop
/JKorbelRA[P]CMake/Source/cmInstallImportedRuntimeArtifactsGenerator.h
cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator(cmMakefile*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, cmListFileBacktrace)
cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator( cmMakefile* makefile, std::string binaryDirectory, cmListFileBacktrace backtrace) : cmInstallGenerator("", std::vector<std::string>(), "", MessageDefault, false, false, std::move(backtrace)) , Makefile(makefile) , BinaryDirectory(std::move(binaryDirectory)) { }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x2d520b(%rip), %r13 # 0x6bf049 movq %rsp, %rdi movq %r13, %rsi movq %r13, %rdx callq 0x5c768 leaq 0x30(%rsp), %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rbp, -0x10(%rbp) leaq 0x20(%rsp), %rdi movq %r13, %rsi movq %r13, %rdx callq 0x5c768 movups (%r12), %xmm0 xorl %eax, %eax movq %rax, 0x8(%r12) leaq 0x60(%rsp), %r10 movaps %xmm0, (%r10) movq %rax, (%r12) movq %rsp, %rsi leaq 0x40(%rsp), %rdx leaq 0x20(%rsp), %rcx movq %r14, %rdi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r10 pushq $0x0 callq 0x3df488 addq $0x10, %rsp movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x3e9ec1 callq 0x75c64 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x3e9ed8 movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x40(%rsp), %rdi callq 0x5c554 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3e9efd movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x4693d4(%rip), %rax # 0x8532d8 movq %rax, (%r14) movq %r15, 0xc8(%r14) leaq 0xe0(%r14), %rcx movq %rcx, 0xd0(%r14) movq (%rbx), %rdx leaq 0x10(%rbx), %rax cmpq %rax, %rdx je 0x3e9f3b movq %rdx, 0xd0(%r14) movq (%rax), %rcx movq %rcx, 0xe0(%r14) jmp 0x3e9f41 movups (%rax), %xmm0 movups %xmm0, (%rcx) movq 0x8(%rbx), %rcx movq %rcx, 0xd8(%r14) movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x3e9f7c callq 0x75c64 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x3e9f98 movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3e9f98 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x5c554 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x3e9fbd movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710 nop
/JKorbelRA[P]CMake/Source/cmInstallSubdirectoryGenerator.cxx
cmInstallTargetGenerator::GetDestination(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string cmInstallTargetGenerator::GetDestination( std::string const& config) const { return cmGeneratorExpression::Evaluate( this->Destination, this->Target->GetLocalGenerator(), config); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x70(%rsi), %rsi movq 0x78(%r15), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x777d0 movq 0xe8(%r15), %rdi callq 0x3972ae leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) xorl %r10d, %r10d movq %r10, -0x8(%r15) movb $0x0, (%r15) leaq 0x28(%rsp), %r11 leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movq %r14, %rcx xorl %r8d, %r8d xorl %r9d, %r9d pushq %r11 pushq %r10 callq 0x393c44 addq $0x10, %rsp movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x3ec040 movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3ec057 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x3ec085 movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3ec085 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3ec09c movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmInstallTargetGenerator.cxx
cmLocalUnixMakefileGenerator3::GetIndividualFileTargets(std::vector<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 cmLocalUnixMakefileGenerator3::GetIndividualFileTargets( std::vector<std::string>& targets) { std::map<std::string, LocalObjectInfo> localObjectFiles; this->GetLocalObjectFiles(localObjectFiles); for (auto const& localObjectFile : localObjectFiles) { targets.push_back(localObjectFile.first); std::string::size_type dot_pos = localObjectFile.first.rfind("."); std::string base = localObjectFile.first.substr(0, dot_pos); if (localObjectFile.second.HasPreprocessRule) { targets.push_back(base + ".i"); } if (localObjectFile.second.HasAssembleRule) { targets.push_back(base + ".s"); } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx leaq 0x50(%rsp), %r15 movl $0x0, (%r15) xorl %eax, %eax movq %rax, 0x8(%r15) movq %r15, 0x10(%r15) movq %r15, 0x18(%r15) movq %rax, 0x20(%r15) leaq 0x48(%rsp), %rsi callq 0x3f2850 movq 0x60(%rsp), %r14 cmpq %r15, %r14 je 0x3f2daf leaq 0x18(%rsp), %r12 leaq 0x8(%rsp), %r13 leaq 0x20(%r14), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x7488c movl $0x1, %ecx movq %rbp, %rdi leaq 0x262c57(%rip), %rsi # 0x655914 movq $-0x1, %rdx callq 0x3f570 leaq 0x28(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x41560 cmpb $0x1, 0x59(%r14) jne 0x3f2d2d movq %r12, 0x8(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx addq %rsi, %rdx movq %r13, %rdi callq 0x777d0 movq %r13, %rdi leaq 0x28f2fa(%rip), %rsi # 0x682000 callq 0x40740 movq %rbx, %rdi movq %r13, %rsi callq 0x78758 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3f2d2d movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 cmpb $0x1, 0x5a(%r14) jne 0x3f2d7f movq %r12, 0x8(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx addq %rsi, %rdx movq %r13, %rdi callq 0x777d0 movq %r13, %rdi leaq 0x29e996(%rip), %rsi # 0x6916ee callq 0x40740 movq %rbx, %rdi movq %r13, %rsi callq 0x78758 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3f2d7f movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3f2d9b movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 movq %r14, %rdi callq 0x41440 movq %rax, %r14 cmpq %r15, %rax jne 0x3f2c9f leaq 0x48(%rsp), %rdi callq 0x3fe782 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3f2e11 jmp 0x3f2dd2 jmp 0x3f2dd7 jmp 0x3f2dd7 jmp 0x3f2dd7 movq %rax, %rbx jmp 0x3f2df1 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3f2df1 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3f2e14 movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3f2e14 jmp 0x3f2e11 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x3fe782 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmLocalUnixMakefileGenerator3.cxx
cmLocalUnixMakefileGenerator3::AppendCustomDepends(std::vector<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>>>>&, std::vector<cmCustomCommand, std::allocator<cmCustomCommand>> const&)
void cmLocalUnixMakefileGenerator3::AppendCustomDepends( std::vector<std::string>& depends, const std::vector<cmCustomCommand>& ccs) { for (cmCustomCommand const& cc : ccs) { cmCustomCommandGenerator ccg(cc, this->GetConfigName(), this); this->AppendCustomDepend(depends, ccg); } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rsi, 0x38(%rsp) movq (%rdx), %r15 movq 0x8(%rdx), %rbx cmpq %rbx, %r15 je 0x3f79bb movq %rdi, %r14 leaq 0x40(%rsp), %r12 leaq 0x60(%rsp), %r13 leaq 0x88(%rsp), %rbp movq %r12, %rdi movq %r14, %rsi callq 0x3f1b6c movb $0x0, 0x30(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x70(%rsp) movq %r13, (%rsp) movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx movl $0x1, %r8d leaq 0x10(%rsp), %r9 callq 0x346518 movq 0x70(%rsp), %rax testq %rax, %rax je 0x3f794f movq %r13, %rdi movq %r13, %rsi movl $0x3, %edx callq *%rax cmpb $0x1, 0x30(%rsp) jne 0x3f7977 movb $0x0, 0x30(%rsp) movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x3f7977 movq 0x20(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x3f7993 movq 0x50(%rsp), %rsi incq %rsi callq 0x3f310 movq %r14, %rdi movq 0x38(%rsp), %rsi movq %rbp, %rdx callq 0x3f7a52 movq %rbp, %rdi callq 0x195094 addq $0x138, %r15 # imm = 0x138 cmpq %rbx, %r15 jne 0x3f78fb addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3f7a49 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x195094 jmp 0x3f7a41 movq %rax, %rbx movq 0x70(%rsp), %rax testq %rax, %rax je 0x3f79fd leaq 0x60(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax cmpb $0x1, 0x30(%rsp) jne 0x3f7a25 movb $0x0, 0x30(%rsp) movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x3f7a25 movq 0x20(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x3f7a41 movq 0x50(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710 movq %rax, %rdi callq 0x5c5e1 nop
/JKorbelRA[P]CMake/Source/cmLocalUnixMakefileGenerator3.cxx
cmLocalUnixMakefileGenerator3::AppendCleanCommand(std::vector<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>>>>&, 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>>>> const&, cmGeneratorTarget*, char const*)
void cmLocalUnixMakefileGenerator3::AppendCleanCommand( std::vector<std::string>& commands, const std::set<std::string>& files, cmGeneratorTarget* target, const char* filename) { std::string currentBinDir = this->GetCurrentBinaryDirectory(); std::string cleanfile = cmStrCat( currentBinDir, '/', this->GetTargetDirectory(target), "/cmake_clean"); if (filename) { cleanfile += "_"; cleanfile += filename; } cleanfile += ".cmake"; cmsys::ofstream fout(cleanfile.c_str()); if (!fout) { cmSystemTools::Error("Could not create " + cleanfile); } if (!files.empty()) { fout << "file(REMOVE_RECURSE\n"; for (std::string const& file : files) { std::string fc = this->MaybeRelativeToCurBinDir(file); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } { std::string remove = cmStrCat( "$(CMAKE_COMMAND) -P ", this->ConvertToOutputFormat(this->MaybeRelativeToCurBinDir(cleanfile), cmOutputConverter::SHELL)); commands.push_back(std::move(remove)); } // For the main clean rule add per-language cleaning. if (!filename) { // Get the set of source languages in the target. std::set<std::string> languages; target->GetLanguages( languages, this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); /* clang-format off */ fout << "\n" << "# Per-language clean rules from dependency scanning.\n" << "foreach(lang " << cmJoin(languages, " ") << ")\n" << " include(" << this->GetTargetDirectory(target) << "/cmake_clean_${lang}.cmake OPTIONAL)\n" << "endforeach()\n"; /* clang-format on */ } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2f8, %rsp # imm = 0x2F8 movq %r8, 0x58(%rsp) movq %rcx, %r12 movq %rdx, %r13 movq %rsi, 0xb0(%rsp) movq %rdi, %rbp callq 0x183b4e leaq 0xc8(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0xb8(%rsp), %rbx movq %rbx, %rdi callq 0x777d0 movq (%rbx), %r14 movq 0x8(%rbx), %rbx leaq 0x38(%rsp), %rax movq $0x1, -0x10(%rax) movq %rax, -0x8(%rax) movb $0x2f, (%rax) movq (%rbp), %rax leaq 0x8(%rsp), %rdi movq %rbp, %rsi movq %r12, %rdx callq *0x70(%rax) leaq 0xf8(%rsp), %rsi movq %rbx, (%rsi) movq %r14, 0x8(%rsi) movups 0x28(%rsp), %xmm0 movups %xmm0, 0x10(%rsi) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x20(%rsi) movq %rax, 0x28(%rsi) movq $0xc, 0x30(%rsi) leaq 0x298f43(%rip), %rax # 0x691e8d movq %rax, 0x38(%rsi) leaq 0x88(%rsp), %rdi movl $0x4, %edx callq 0x1e311c leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f8f7b movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 cmpq $0x0, 0x58(%rsp) je 0x3f8fa9 leaq 0x2c610d(%rip), %rsi # 0x6bf097 leaq 0x88(%rsp), %rdi callq 0x40740 leaq 0x88(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x40740 leaq 0x272abb(%rip), %rsi # 0x66ba6b leaq 0x88(%rsp), %rdi callq 0x40740 movq 0x88(%rsp), %rsi leaq 0xf8(%rsp), %rdi movl $0x10, %edx callq 0x3fac0 movq 0xf8(%rsp), %rax movq -0x18(%rax), %rax testb $0x5, 0x118(%rsp,%rax) je 0x3f902c leaq 0x298ea6(%rip), %rsi # 0x691e9a leaq 0x28(%rsp), %rdi leaq 0x88(%rsp), %rdx callq 0x740fe leaq 0x28(%rsp), %rdi callq 0x1e3a78 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3f902c movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 cmpq $0x0, 0x28(%r13) je 0x3f9169 leaq 0x287330(%rip), %rsi # 0x68036e leaq 0xf8(%rsp), %rdi movl $0x14, %edx callq 0x41490 movq %rbp, 0x80(%rsp) movq %r12, 0xa8(%rsp) movq 0x18(%r13), %rbp addq $0x8, %r13 cmpq %r13, %rbp je 0x3f9138 movq 0x80(%rsp), %rax leaq 0x8(%rax), %rbx leaq 0xf8(%rsp), %r14 leaq 0x8(%rsp), %r12 leaq 0x28f984(%rip), %r15 # 0x688a15 leaq 0x20(%rbp), %rdx leaq 0x28(%rsp), %rdi movq %rbx, %rsi callq 0x1b3d42 movl $0x2, %edx movq %r14, %rdi leaq 0x24fb0e(%rip), %rsi # 0x648bbf callq 0x41490 movq 0x28(%rsp), %rdx movq 0x30(%rsp), %rsi movq %r12, %rdi xorl %ecx, %ecx callq 0x1b4532 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rdi callq 0x41490 movl $0x1, %edx movq %rax, %rdi movq %r15, %rsi callq 0x41490 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f9108 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3f9124 movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbp, %rdi callq 0x411f0 movq %rax, %rbp cmpq %r13, %rax jne 0x3f9091 leaq 0x287246(%rip), %rsi # 0x680385 leaq 0xf8(%rsp), %rdi movl $0x2, %edx leaq 0xc8(%rsp), %r15 callq 0x41490 movq 0xa8(%rsp), %r12 movq 0x80(%rsp), %rbp leaq 0x8(%rbp), %rbx leaq 0xd8(%rsp), %rdi leaq 0x88(%rsp), %rdx movq %rbx, %rsi callq 0x1b3d42 movq 0xd8(%rsp), %rcx movq 0xe0(%rsp), %rdx leaq 0x60(%rsp), %rdi movq %rbx, %rsi xorl %r8d, %r8d callq 0x1b3da2 movq 0x60(%rsp), %rax movq 0x68(%rsp), %rcx leaq 0x28(%rsp), %rsi movq $0x14, (%rsi) leaq 0x298b7c(%rip), %rdx # 0x691d3e movq %rdx, 0x8(%rsi) movq %rcx, 0x10(%rsi) movq %rax, 0x18(%rsi) leaq 0x8(%rsp), %rdi movl $0x2, %edx callq 0x1e311c leaq 0x70(%rsp), %r14 movq -0x10(%r14), %rdi cmpq %r14, %rdi je 0x3f91f8 movq 0x70(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f9219 movq 0xe8(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x8(%rsp), %rsi movq 0xb0(%rsp), %rdi callq 0x78758 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f9247 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 cmpq $0x0, 0x58(%rsp) jne 0x3f9401 leaq 0x30(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movq 0x70(%rbp), %rbx leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax movq %rax, (%rdi) leaq 0x25b63f(%rip), %rsi # 0x6548c7 leaq 0x25b648(%rip), %rdx # 0x6548d7 callq 0x5c768 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1980ea leaq 0x28(%rsp), %rsi movq %r12, %rdi movq %rax, %rdx callq 0x3be700 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f92cd movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x28f741(%rip), %rsi # 0x688a15 leaq 0xf8(%rsp), %rdi movl $0x1, %edx callq 0x41490 leaq 0x298bbf(%rip), %rsi # 0x691eac leaq 0xf8(%rsp), %rdi movl $0x35, %edx callq 0x41490 leaq 0x298bdc(%rip), %rsi # 0x691ee2 leaq 0xf8(%rsp), %rdi movl $0xd, %edx callq 0x41490 leaq 0x28660f(%rip), %rcx # 0x67f92e leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi movl $0x1, %edx callq 0x16d101 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0xf8(%rsp), %rdi callq 0x41490 movq %rax, %rbx leaq 0x287031(%rip), %rsi # 0x680385 movl $0x2, %edx movq %rax, %rdi callq 0x41490 leaq 0x298b88(%rip), %rsi # 0x691ef0 movl $0xa, %edx movq %rbx, %rdi callq 0x41490 movq (%rbp), %rax leaq 0x60(%rsp), %rdi movq %rbp, %rsi movq %r12, %rdx callq *0x70(%rax) movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq %rbx, %rdi callq 0x41490 movq %rax, %rbx leaq 0x298b58(%rip), %rsi # 0x691efb movl $0x25, %edx movq %rax, %rdi callq 0x41490 leaq 0x25efd7(%rip), %rsi # 0x65838e movl $0xd, %edx movq %rbx, %rdi callq 0x41490 movq 0x60(%rsp), %rdi cmpq %r14, %rdi je 0x3f93db movq 0x70(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f93f7 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x28(%rsp), %rdi callq 0x7594e movq 0x464ac0(%rip), %rax # 0x85dec8 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x100(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0xf8(%rsp,%rcx) callq 0x40630 leaq 0x1f0(%rsp), %rdi callq 0x40950 leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f945a movq 0x98(%rsp), %rsi incq %rsi callq 0x3f310 movq 0xb8(%rsp), %rdi cmpq %r15, %rdi je 0x3f9477 movq 0xc8(%rsp), %rsi incq %rsi callq 0x3f310 addq $0x2f8, %rsp # imm = 0x2F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3f9553 jmp 0x3f9574 jmp 0x3f9574 jmp 0x3f9591 jmp 0x3f958a jmp 0x3f9553 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f95d1 movq 0x18(%rsp), %rsi jmp 0x3f95c9 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f94ea movq 0x70(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3f94ea movq %rax, %rbx leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f95d1 movq 0xe8(%rsp), %rsi jmp 0x3f95c9 jmp 0x3f958a jmp 0x3f9585 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f95ff movq 0x18(%rsp), %rsi jmp 0x3f95f7 movq %rax, %rbx jmp 0x3f95ff movq %rax, %rbx movq 0x60(%rsp), %rdi cmpq %r14, %rdi je 0x3f9556 movq 0x70(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3f9556 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f9577 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x3f9577 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x7594e jmp 0x3f95d1 jmp 0x3f958a movq %rax, %rbx jmp 0x3f95de movq %rax, %rbx jmp 0x3f95d1 jmp 0x3f9591 movq %rax, %rbx jmp 0x3f95b5 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3f95b5 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x3f95d1 movq 0x38(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0xf8(%rsp), %rdi callq 0x40c80 leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f95ff movq 0x98(%rsp), %rsi incq %rsi callq 0x3f310 movq 0xb8(%rsp), %rdi leaq 0xc8(%rsp), %rax cmpq %rax, %rdi je 0x3f9624 movq 0xc8(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmLocalUnixMakefileGenerator3.cxx
cmMakefileTargetGenerator::GetTargetLinkFlags(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&)
void cmMakefileTargetGenerator::GetTargetLinkFlags( std::string& flags, const std::string& linkLanguage) { this->LocalGenerator->AppendFlags( flags, this->GeneratorTarget->GetSafeProperty("LINK_FLAGS")); std::string linkFlagsConfig = cmStrCat("LINK_FLAGS_", cmSystemTools::UpperCase(this->GetConfigName())); this->LocalGenerator->AppendFlags( flags, this->GeneratorTarget->GetSafeProperty(linkFlagsConfig)); std::vector<std::string> opts; this->GeneratorTarget->GetLinkOptions(opts, this->GetConfigName(), linkLanguage); // LINK_OPTIONS are escaped. this->LocalGenerator->AppendCompileOptions(flags, opts); this->LocalGenerator->AppendPositionIndependentLinkerFlags( flags, this->GeneratorTarget, this->GetConfigName(), linkLanguage); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %r13 movq 0x78(%rdi), %r12 leaq 0x10(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x281bba(%rip), %rsi # 0x6823d6 leaq 0x281bbd(%rip), %rdx # 0x6823e0 movq %rsp, %rdi callq 0x5c768 movq %rsp, %rsi movq %r13, %rdi callq 0x397514 movq (%r12), %rcx movq %r12, %rdi movq %r14, %rsi movq %rax, %rdx callq *0x30(%rcx) movq (%rsp), %rdi cmpq %rbp, %rdi je 0x40085c movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x68(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x400692 leaq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x48806a movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq %rsp, %rsi movq $0xb, (%rsi) leaq 0x256f89(%rip), %rdx # 0x65781d movq %rdx, 0x8(%rsi) movq %rcx, 0x10(%rsi) movq %rax, 0x18(%rsi) leaq 0x48(%rsp), %rdi movl $0x2, %edx callq 0x1e311c leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4008ca movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4008e5 movq 0x78(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x8(%r15), %rdi movq 0x78(%r15), %r12 leaq 0x48(%rsp), %rsi callq 0x397514 movq (%r12), %rcx movq %r12, %rdi movq %r14, %rsi movq %rax, %rdx callq *0x30(%rcx) xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) movq 0x8(%r15), %r12 movq %rsp, %rdi movq %r15, %rsi callq 0x400692 leaq 0x20(%rsp), %rsi movq %rsp, %rdx movq %r12, %rdi movq %rbx, %rcx callq 0x3aedf0 movq (%rsp), %rdi cmpq %rbp, %rdi je 0x400950 movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 movq 0x78(%r15), %rdi leaq 0x20(%rsp), %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x17add2 movq 0x8(%r15), %r12 movq 0x78(%r15), %r13 movq %rsp, %rdi movq %r15, %rsi callq 0x400692 movq %rsp, %rcx movq %r13, %rdi movq %r14, %rsi movq %r12, %rdx movq %rbx, %r8 callq 0x17ea10 movq (%rsp), %rdi cmpq %rbp, %rdi je 0x4009a0 movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 leaq 0x20(%rsp), %rdi callq 0x5c554 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4009c5 movq 0x58(%rsp), %rsi incq %rsi callq 0x3f310 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4009dd jmp 0x4009f8 jmp 0x4009f8 movq %rax, %rbx movq (%rsp), %rdi cmpq %rbp, %rdi je 0x4009fb movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x4009fb movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x5c554 jmp 0x400a47 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x400a2a movq 0x30(%rsp), %rsi incq %rsi callq 0x3f310 jmp 0x400a2a movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x400a75 movq 0x78(%rsp), %rsi jmp 0x400a6d movq %rax, %rbx jmp 0x400a75 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x400a75 movq 0x58(%rsp), %rsi jmp 0x400a6d movq %rax, %rbx movq (%rsp), %rdi cmpq %rbp, %rdi je 0x400a75 movq 0x10(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710 nop
/JKorbelRA[P]CMake/Source/cmMakefileTargetGenerator.cxx
cmMakefileTargetGenerator::WriteObjectDependRules(cmSourceFile const&, std::vector<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 cmMakefileTargetGenerator::WriteObjectDependRules( cmSourceFile const& source, std::vector<std::string>& depends) { // Create the list of dependencies known at cmake time. These are // shared between the object file and dependency scanning rule. depends.push_back(source.GetFullPath()); if (cmValue objectDeps = source.GetProperty("OBJECT_DEPENDS")) { cmExpandList(*objectDeps, depends); } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rsi, %rdi callq 0x1ceb6a movq %rbx, %rdi movq %rax, %rsi callq 0x7488c leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x27063e(%rip), %rsi # 0x67c0a1 leaq 0x270645(%rip), %rdx # 0x67c0af leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x5c768 movq %r14, %rdi movq %r15, %rsi callq 0x1ce24a movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x40ba9c movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 testq %r14, %r14 je 0x40bab2 movq (%r14), %rsi movq 0x8(%r14), %rdi movq %rbx, %rdx xorl %ecx, %ecx callq 0x1e2ce4 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x40bad8 movq 0x18(%rsp), %rsi incq %rsi callq 0x3f310 movq %rbx, %rdi callq 0x40710
/JKorbelRA[P]CMake/Source/cmMakefileTargetGenerator.cxx
curl_easy_upkeep
CURLcode curl_easy_upkeep(struct Curl_easy *data) { /* Verify that we got an easy handle we can work with. */ if(!GOOD_EASY_HANDLE(data)) return CURLE_BAD_FUNCTION_ARGUMENT; if(data->multi_easy) { /* Use the common function to keep connections alive. */ return upkeep(&data->multi_easy->conn_cache, data); } else { /* No connections, so just return success */ return CURLE_OK; } }
pushq %rbx movl $0x2b, %ebx testq %rdi, %rdi je 0x495671 cmpl $0xc0dedbad, (%rdi) # imm = 0xC0DEDBAD jne 0x495671 movq 0xc0(%rdi), %rsi xorl %ebx, %ebx testq %rsi, %rsi je 0x495671 addq $0xe8, %rsi leaq 0xc(%rip), %rcx # 0x495675 movq %rdi, %rdx callq 0x4b4794 movl %ebx, %eax popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/easy.c
h2_session_send
static int h2_session_send(struct Curl_easy *data, nghttp2_session *h2) { struct HTTP *stream = data->req.p.http; struct http_conn *httpc = &data->conn->proto.httpc; set_transfer(httpc, data); if((data->set.stream_weight != data->state.stream_weight) || (data->set.stream_depends_e != data->state.stream_depends_e) || (data->set.stream_depends_on != data->state.stream_depends_on) ) { /* send new weight and/or dependency */ nghttp2_priority_spec pri_spec; int rv; h2_pri_spec(data, &pri_spec); H2BUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)", stream->stream_id, data)); DEBUGASSERT(stream->stream_id != -1); rv = nghttp2_submit_priority(h2, NGHTTP2_FLAG_NONE, stream->stream_id, &pri_spec); if(rv) return rv; } return nghttp2_session_send(h2); }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq 0x18(%rdi), %rax movq 0x198(%rdi), %r15 movq %rdi, 0x4a0(%rax) movl 0xa40(%rdi), %eax cmpl 0x1190(%rdi), %eax jne 0x496932 movq 0xa92(%rdi), %rax shrq $0x2d, %rax movl 0x1300(%rdi), %ecx shrl $0xc, %ecx xorl %eax, %ecx testb $0x1, %cl jne 0x496932 movq 0xa38(%rdi), %rax cmpq 0x1188(%rdi), %rax je 0x496957 leaq 0x4(%rsp), %r14 movq %r14, %rsi callq 0x49795c movl 0x228(%r15), %edx movq %rbx, %rdi xorl %esi, %esi movq %r14, %rcx callq 0x4deefb testl %eax, %eax jne 0x49695f movq %rbx, %rdi callq 0x4d8533 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http2.c
curl_mime_type
CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype) { if(!part) return CURLE_BAD_FUNCTION_ARGUMENT; Curl_safefree(part->mimetype); part->mimetype = NULL; if(mimetype) { part->mimetype = strdup(mimetype); if(!part->mimetype) return CURLE_OUT_OF_MEMORY; } return CURLE_OK; }
testq %rdi, %rdi je 0x49936c pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x3c7350(%rip), %rax # 0x860690 movq 0x60(%rdi), %rdi callq *(%rax) movq $0x0, 0x60(%rbx) testq %r14, %r14 je 0x499368 leaq 0x3c7346(%rip), %rax # 0x8606a0 movq %r14, %rdi callq *(%rax) movq %rax, 0x60(%rbx) testq %rax, %rax je 0x499372 xorl %eax, %eax jmp 0x499377 movl $0x2b, %eax retq movl $0x1b, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mime.c
readback_part
static size_t readback_part(curl_mimepart *part, char *buffer, size_t bufsize, bool *hasread) { size_t cursize = 0; /* Readback from part. */ while(bufsize) { size_t sz = 0; struct curl_slist *hdr = (struct curl_slist *) part->state.ptr; switch(part->state.state) { case MIMESTATE_BEGIN: mimesetstate(&part->state, (part->flags & MIME_BODY_ONLY)? MIMESTATE_BODY: MIMESTATE_CURLHEADERS, part->curlheaders); break; case MIMESTATE_USERHEADERS: if(!hdr) { mimesetstate(&part->state, MIMESTATE_EOH, NULL); break; } if(match_header(hdr, "Content-Type", 12)) { mimesetstate(&part->state, MIMESTATE_USERHEADERS, hdr->next); break; } /* FALLTHROUGH */ case MIMESTATE_CURLHEADERS: if(!hdr) mimesetstate(&part->state, MIMESTATE_USERHEADERS, part->userheaders); else { sz = readback_bytes(&part->state, buffer, bufsize, hdr->data, strlen(hdr->data), STRCONST("\r\n")); if(!sz) mimesetstate(&part->state, part->state.state, hdr->next); } break; case MIMESTATE_EOH: sz = readback_bytes(&part->state, buffer, bufsize, STRCONST("\r\n"), STRCONST("")); if(!sz) mimesetstate(&part->state, MIMESTATE_BODY, NULL); break; case MIMESTATE_BODY: cleanup_encoder_state(&part->encstate); mimesetstate(&part->state, MIMESTATE_CONTENT, NULL); break; case MIMESTATE_CONTENT: if(part->encoder) sz = read_encoded_part_content(part, buffer, bufsize, hasread); else sz = read_part_content(part, buffer, bufsize, hasread); switch(sz) { case 0: mimesetstate(&part->state, MIMESTATE_END, NULL); /* Try sparing open file descriptors. */ if(part->kind == MIMEKIND_FILE && part->fp) { fclose(part->fp); part->fp = NULL; } /* FALLTHROUGH */ case CURL_READFUNC_ABORT: case CURL_READFUNC_PAUSE: case READ_ERROR: case STOP_FILLING: return cursize? cursize: sz; } break; case MIMESTATE_END: return cursize; default: break; /* Other values not in part state. */ } /* Bump buffer and counters according to read size. */ cursize += sz; buffer += sz; bufsize -= sz; } return cursize; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, 0x20(%rsp) testq %rdx, %rdx je 0x499bd7 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %r14 leaq 0x88(%rdi), %rax movq %rax, 0x8(%rsp) leaq 0xb8(%rdi), %rax movq %rax, 0x28(%rsp) leaq 0xa0(%rdi), %rax movq %rax, 0x30(%rsp) xorl %ebx, %ebx movl 0x80(%r14), %eax xorl %r12d, %r12d cmpq $0x8, %rax ja 0x499b4c movq 0x88(%r14), %rbp leaq 0x20845d(%rip), %rcx # 0x6a1cd4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x1c(%r14), %eax andl $0x2, %eax shrl %eax leal (%rax,%rax,2), %eax incl %eax movq 0x50(%r14), %rcx movl %eax, 0x80(%r14) movq %rcx, 0x88(%r14) jmp 0x499b3e testq %rbp, %rbp je 0x499b10 movl $0xc, %edx movq %rbp, %rdi leaq 0x208591(%rip), %rsi # 0x6a1e4e callq 0x49a9bd testq %rax, %rax je 0x49994f movq 0x8(%rbp), %rax jmp 0x499b2c movq 0x30(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movl $0x7, 0x80(%r14) movq 0x8(%rsp), %rax jmp 0x499b23 movq 0x90(%r14), %rdi callq 0x4b1080 cmpq $0x1, %rax ja 0x499ab1 movl $0x2, %r12d subq %rax, %r12 leaq 0x1f4c5c(%rip), %rcx # 0x68e57e addq %rcx, %rax cmpq %r15, %r12 cmovaeq %r15, %r12 movq %r13, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x3f250 addq %r12, 0x90(%r14) jmp 0x499b4c testq %rbp, %rbp je 0x499b28 movq (%rbp), %rdi movq %rdi, (%rsp) callq 0x3fd60 movq %rax, %r12 movq 0x90(%r14), %rdi callq 0x4b1080 movq %rax, %rcx subq %r12, %rcx jae 0x499aca movq %r12, %rdx subq %rax, %rdx movq (%rsp), %rsi addq %rax, %rsi jmp 0x499ae3 cmpq $0x0, 0x98(%r14) je 0x499b5d xorl %r12d, %r12d movq %r13, 0x18(%rsp) movq %r15, 0x10(%rsp) movq $0x0, (%rsp) movq 0xa8(%r14), %rsi cmpq 0xb0(%r14), %rsi setae %bpl setb %al orb (%rsp), %al testb $0x1, %al je 0x499a04 orb (%rsp), %bpl movq 0x98(%r14), %rax movzbl %bpl, %edx andl $0x1, %edx movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movq %r14, %rcx callq *0x8(%rax) testq %rax, %rax jne 0x499a8a testb $0x1, %bpl jne 0x499b7a movq 0xa8(%r14), %rsi movq 0xb0(%r14), %rbp testq %rsi, %rsi je 0x499a37 subq %rsi, %rbp je 0x499a25 movq 0x28(%rsp), %rdi addq %rdi, %rsi movq %rbp, %rdx callq 0x3f470 movq $0x0, 0xa8(%r14) movq %rbp, 0xb0(%r14) cmpq $0x100, %rbp # imm = 0x100 jae 0x499b75 movq 0x28(%rsp), %rax leaq (%rax,%rbp), %rsi movl $0x100, %edx # imm = 0x100 subq %rbp, %rdx movq %r14, %rdi movq 0x20(%rsp), %rcx callq 0x49a9f8 leaq 0x2(%rax), %rcx cmpq $0x2, %rcx jb 0x499abe leaq -0x10000000(%rax), %rcx cmpq $0x2, %rcx jb 0x499abe testq %rax, %rax je 0x499aa6 addq %rax, 0xb0(%r14) jmp 0x4999ac leaq 0x2(%rax), %rcx cmpq $0x2, %rcx jb 0x499abe addq %rax, %r12 addq %rax, 0x18(%rsp) subq %rax, 0x10(%rsp) jmp 0x4999ac movb $0x1, %al movq %rax, (%rsp) jmp 0x4999ac movl $0x4, 0x80(%r14) jmp 0x499b1b testq %r12, %r12 cmoveq %rax, %r12 jmp 0x499b7a cmpq $0x1, %rcx ja 0x499b0a leaq 0x1f4aa7(%rip), %rax # 0x68e57e leaq (%rax,%rcx), %rsi movl $0x2, %edx subq %rcx, %rdx movq %rdx, (%rsp) cmpq %r15, %rdx movq %r15, %r12 cmovbq %rdx, %r12 movq %r13, %rdi movq %r12, %rdx callq 0x3f250 addq %r12, 0x90(%r14) cmpq $0x0, (%rsp) jne 0x499b4c movq 0x8(%rbp), %rax jmp 0x499b37 movl $0x3, 0x80(%r14) movq 0x8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) jmp 0x499b49 movq 0x58(%r14), %rax movl $0x2, 0x80(%r14) movq %rax, 0x88(%r14) movq $0x0, 0x90(%r14) xorl %r12d, %r12d addq %r12, %rbx addq %r12, %r13 subq %r12, %r15 jne 0x499855 jmp 0x499bd9 movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx movq 0x20(%rsp), %rcx callq 0x49a9f8 movq %rax, %r12 jmp 0x499b7a testq %r12, %r12 je 0x499beb leaq 0x2(%r12), %rax cmpq $0x2, %rax jb 0x499bce leaq -0x10000000(%r12), %rax cmpq $0x2, %rax jb 0x499bce testq %r12, %r12 jne 0x499b4c movl $0x8, 0x80(%r14) xorps %xmm0, %xmm0 movq 0x8(%rsp), %rax movups %xmm0, (%rax) cmpl $0x2, 0x18(%r14) jne 0x499bcb movq 0x48(%r14), %rdi testq %rdi, %rdi je 0x499bcb callq 0x3fe60 movq $0x0, 0x48(%r14) xorl %r12d, %r12d testq %rbx, %rbx cmoveq %r12, %rbx jmp 0x499bd9 xorl %ebx, %ebx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $-0x1, %r12 jmp 0x499bce
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mime.c
Curl_mime_add_header
CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...) { struct curl_slist *hdr = NULL; char *s = NULL; va_list ap; va_start(ap, fmt); s = curl_mvaprintf(fmt, ap); va_end(ap); if(s) { hdr = Curl_slist_append_nodup(*slp, s); if(hdr) *slp = hdr; else free(s); } return hdr? CURLE_OK: CURLE_OUT_OF_MEMORY; }
pushq %rbp pushq %r14 pushq %rbx subq $0xd0, %rsp movq %rsi, %r10 movq %rdi, %rbx leaq 0x20(%rsp), %rdi movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x499deb movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rsi movq %rdi, 0x10(%rsi) leaq 0xf0(%rsp), %rax movq %rax, 0x8(%rsi) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsi) movq %r10, %rdi callq 0x49c0ab movl $0x1b, %ebp testq %rax, %rax je 0x499e43 movq %rax, %r14 movq (%rbx), %rdi movq %rax, %rsi callq 0x4a67b0 testq %rax, %rax je 0x499e37 movq %rax, (%rbx) xorl %ebp, %ebp jmp 0x499e43 leaq 0x3c6852(%rip), %rax # 0x860690 movq %r14, %rdi callq *(%rax) movl %ebp, %eax addq $0xd0, %rsp popq %rbx popq %r14 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mime.c
curl_msnprintf
int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...) { int retcode; va_list ap_save; /* argument pointer */ va_start(ap_save, format); retcode = curl_mvsnprintf(buffer, maxlength, format, ap_save); va_end(ap_save); return retcode; }
subq $0xd8, %rsp leaq 0x20(%rsp), %r10 movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0x49c007 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %r10, 0x10(%rcx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000018, %rax # imm = 0x3000000018 movq %rax, (%rcx) callq 0x49acd4 addq $0xd8, %rsp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mprintf.c
Curl_dyn_vprintf
int Curl_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list ap_save) { struct asprintf info; info.b = dyn; info.fail = 0; (void)dprintf_formatf(&info, alloc_addbyter, format, ap_save); if(info.fail) { Curl_dyn_free(info.b); return 1; } return 0; }
pushq %rbx subq $0x10, %rsp movq %rdx, %rcx movq %rsi, %rdx movq %rsp, %rbx movq %rdi, (%rbx) movb $0x0, 0x8(%rbx) leaq 0x24(%rip), %rsi # 0x49c074 movq %rbx, %rdi callq 0x49ad22 xorl %eax, %eax cmpb $0x1, 0x8(%rbx) jne 0x49c06e movq (%rsp), %rdi callq 0x4b92db movl $0x1, %eax addq $0x10, %rsp popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mprintf.c
alloc_addbyter
static int alloc_addbyter(int output, FILE *data) { struct asprintf *infop = (struct asprintf *)data; unsigned char outc = (unsigned char)output; if(Curl_dyn_addn(infop->b, &outc, 1)) { infop->fail = 1; return -1; /* fail */ } return outc; /* fputc() returns like this on success */ }
pushq %rbx subq $0x10, %rsp movq %rsi, %rbx leaq 0xf(%rsp), %rsi movb %dil, (%rsi) movq (%rbx), %rdi movl $0x1, %edx callq 0x4b9370 testl %eax, %eax je 0x49c0a0 movb $0x1, 0x8(%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x49c0a5 movzbl 0xf(%rsp), %eax addq $0x10, %rsp popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/mprintf.c
Curl_expire
void Curl_expire(struct Curl_easy *data, timediff_t milli, expire_id id) { struct Curl_multi *multi = data->multi; struct curltime *nowp = &data->state.expiretime; struct curltime set; /* this is only interesting while there is still an associated multi struct remaining! */ if(!multi) return; DEBUGASSERT(id < EXPIRE_LAST); set = Curl_now(); set.tv_sec += (time_t)(milli/1000); /* might be a 64 to 32 bit conversion */ set.tv_usec += (unsigned int)(milli%1000)*1000; if(set.tv_usec >= 1000000) { set.tv_sec++; set.tv_usec -= 1000000; } /* Remove any timer with the same id just in case. */ multi_deltimeout(data, id); /* Add it to the timer list. It must stay in the list until it has expired in case we need to recompute the minimum timer later. */ multi_addtimeout(data, &set, id); if(nowp->tv_sec || nowp->tv_usec) { /* This means that the struct is added as a node in the splay tree. Compare if the new time is earlier, and only remove-old/add-new if it is. */ timediff_t diff = Curl_timediff(set, *nowp); int rc; if(diff > 0) { /* The current splay tree entry is sooner than this new expiry time. We don't need to update our splay tree entry. */ return; } /* Since this is an updated time, we must remove the previous entry from the splay tree first and then re-add the new value */ rc = Curl_splayremove(multi->timetree, &data->state.timenode, &multi->timetree); if(rc) infof(data, "Internal error removing splay node = %d", rc); } /* Indicate that we are in the splay tree and insert the new timer expiry value since it is our local minimum. */ *nowp = set; data->state.timenode.payload = data; multi->timetree = Curl_splayinsert(*nowp, multi->timetree, &data->state.timenode); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq 0xb8(%rdi), %rbp testq %rbp, %rbp je 0x49c9d1 movl %edx, %r13d movq %rsi, %r14 movq %rdi, %rbx callq 0x4a8120 movq %rax, %rcx movl %edx, %esi movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF movq %r14, %rax imulq %rdx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx addq %rdx, %rcx imull $0x3e8, %edx, %eax # imm = 0x3E8 subl %eax, %r14d imull $0x3e8, %r14d, %eax # imm = 0x3E8 leal (%rsi,%rax), %edx xorl %r14d, %r14d cmpl $0xf4240, %edx # imm = 0xF4240 setge %r14b leal -0xf4240(%rsi,%rax), %r15d cmovll %edx, %r15d addq %rcx, %r14 movq %rbx, %rdi movl %r13d, %esi callq 0x49fcd9 leaq 0xe80(%rbx), %rcx movl %r13d, %eax leaq (%rax,%rax,2), %rax shlq $0x4, %rax leaq (%rbx,%rax), %r12 addq $0xea0, %r12 # imm = 0xEA0 movq %r14, 0x18(%r12) movl %r15d, 0xc(%rsp) movl %r15d, 0x20(%r12) movq %rcx, %r15 movl %r13d, 0x28(%r12) movq %rcx, %rdi callq 0x4c9058 testq %rax, %rax movq %rbp, 0x10(%rsp) je 0x49c91c movq (%r15), %r13 testq %r13, %r13 je 0x49c91c movq (%r13), %rax movq 0x18(%rax), %rdi movl 0x20(%rax), %esi movq 0x18(%r12), %rdx movl 0x20(%r12), %ecx callq 0x4a8174 testq %rax, %rax jle 0x49c9b1 xorl %ebp, %ebp movq %r15, %rdi movq %rbp, %rsi movq %r12, %rdx movq %r12, %rcx callq 0x4c8f63 movq 0xe38(%rbx), %rdx testq %rdx, %rdx sete %al movl 0xe40(%rbx), %ecx testl %ecx, %ecx sete %sil testb %sil, %al movq 0x10(%rsp), %r15 movl 0xc(%rsp), %ebp je 0x49c9c2 movq %r14, 0xe38(%rbx) movl %ebp, 0xe40(%rbx) movq %rbx, 0xe78(%rbx) addq $0xe48, %rbx # imm = 0xE48 movq 0xb0(%r15), %rdx movq %r14, %rdi movl %ebp, %esi movq %rbx, %rcx callq 0x4a7bb3 movq %rax, 0xb0(%r15) jmp 0x49c9d1 movq (%r13), %rax movq 0x18(%rax), %rdi movl 0x20(%rax), %esi movq 0x18(%r12), %rdx movl 0x20(%r12), %ecx callq 0x4a8174 testq %rax, %rax jg 0x49c91e movq %r13, %rbp movq 0x10(%r13), %r13 testq %r13, %r13 jne 0x49c98e jmp 0x49c91e movq %r14, %rdi movl %ebp, %esi callq 0x4a8174 testq %rax, %rax jle 0x49c9e0 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xb0(%r15), %rdx movq 0xb0(%r15), %rdi leaq 0xe48(%rbx), %rsi callq 0x4a7cd5 testl %eax, %eax je 0x49c956 leaq 0x20586b(%rip), %rsi # 0x6a2274 movq %rbx, %rdi movl %eax, %edx xorl %eax, %eax callq 0x4a1537 jmp 0x49c956
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/multi.c
Curl_pgrsLimitWaitTime
timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize, curl_off_t startsize, curl_off_t limit, struct curltime start, struct curltime now) { curl_off_t size = cursize - startsize; timediff_t minimum; timediff_t actual; if(!limit || !size) return 0; /* * 'minimum' is the number of milliseconds 'size' should take to download to * stay below 'limit'. */ if(size < CURL_OFF_T_MAX/1000) minimum = (timediff_t) (CURL_OFF_T_C(1000) * size / limit); else { minimum = (timediff_t) (size / limit); if(minimum < TIMEDIFF_T_MAX/1000) minimum *= 1000; else minimum = TIMEDIFF_T_MAX; } /* * 'actual' is the time in milliseconds it took to actually download the * last 'size' bytes. */ actual = Curl_timediff(now, start); if(actual < minimum) { /* if it downloaded the data faster than the limit, make it wait the difference */ return (minimum - actual); } return 0; }
movq %rdx, %r9 testq %rdx, %rdx sete %al subq %rsi, %rdi sete %dl orb %al, %dl jne 0x4a0f40 pushq %rbx leaq 0x10(%rsp), %rsi movabsq $0x20c49ba5e353f7, %r10 # imm = 0x20C49BA5E353F7 cmpq %r10, %rdi jge 0x4a0f43 imulq $0x3e8, %rdi, %rax # imm = 0x3E8 cqto idivq %r9 movq %rax, %rbx jmp 0x4a0f63 xorl %eax, %eax retq movq %rdi, %rax cqto idivq %r9 imulq $0x3e8, %rax, %rdx # imm = 0x3E8 cmpq %r10, %rax movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF cmovlq %rdx, %rbx movq (%rsi), %rdi movl 0x8(%rsi), %esi movq %rcx, %rdx movl %r8d, %ecx callq 0x4a8174 movq %rax, %rcx xorl %eax, %eax subq %rcx, %rbx cmovgq %rbx, %rax popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/progress.c
Curl_slist_duplicate
struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist) { struct curl_slist *outlist = NULL; struct curl_slist *tmp; while(inlist) { tmp = curl_slist_append(outlist, inlist->data); if(!tmp) { curl_slist_free_all(outlist); return NULL; } outlist = tmp; inlist = inlist->next; } return outlist; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x4a68d8 movq %rdi, %r15 xorl %r14d, %r14d movq (%r15), %rsi movq %r14, %rdi callq 0x4a6804 testq %rax, %rax je 0x4a68a9 movq %rax, %rbx movq 0x8(%r15), %r15 movq %rax, %r14 testq %r15, %r15 jne 0x4a6888 jmp 0x4a68da testq %r14, %r14 je 0x4a68d8 leaq 0x3b9ddb(%rip), %r15 # 0x860690 xorl %ebx, %ebx movq (%r14), %rdi movq 0x8(%r14), %r12 callq *(%r15) movq $0x0, (%r14) movq %r14, %rdi callq *(%r15) movq %r12, %r14 testq %r12, %r12 jne 0x4a68b7 jmp 0x4a68da xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/slist.c
Curl_strcasecompare
int Curl_strcasecompare(const char *first, const char *second) { while(*first && *second) { if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) /* get out of the loop as soon as they don't match */ return 0; first++; second++; } /* If we're here either the strings are the same or the length is different. We can just test if the "current" character is non-zero for one and zero for the other. Note that the characters may not be exactly the same even if they match, we only want to compare zero-ness. */ return !*first == !*second; }
movb (%rdi), %dl testb %dl, %dl je 0x4a7e00 incq %rdi leaq 0x1fc036(%rip), %rcx # 0x6a3e10 movzbl (%rsi), %r8d testq %r8, %r8 setne %al je 0x4a7e02 movzbl %dl, %edx movb (%rdx,%rcx), %dl cmpb (%r8,%rcx), %dl jne 0x4a7e0e incq %rsi movb (%rdi), %dl incq %rdi testb %dl, %dl jne 0x4a7dda jmp 0x4a7e02 movb $0x1, %al cmpb $0x0, (%rsi) setne %cl xorb %al, %cl movzbl %cl, %eax retq xorl %eax, %eax retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/strcase.c
trailers_read
static size_t trailers_read(char *buffer, size_t size, size_t nitems, void *raw) { struct Curl_easy *data = (struct Curl_easy *)raw; struct dynbuf *trailers_buf = &data->state.trailers_buf; size_t bytes_left = Curl_dyn_len(trailers_buf) - data->state.trailers_bytes_sent; size_t to_copy = (size*nitems < bytes_left) ? size*nitems : bytes_left; if(to_copy) { memcpy(buffer, Curl_dyn_ptr(trailers_buf) + data->state.trailers_bytes_sent, to_copy); data->state.trailers_bytes_sent += to_copy; } return to_copy; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r14 movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r15 leaq 0x1210(%rcx), %r12 movq %r12, %rdi callq 0x4b94fe subq 0x1208(%r14), %rax imulq %r13, %rbx cmpq %rax, %rbx cmovaeq %rax, %rbx testq %rbx, %rbx je 0x4a86d0 movq %r12, %rdi callq 0x4b94f6 addq 0x1208(%r14), %rax movq %r15, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x3f250 addq %rbx, 0x1208(%r14) movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/transfer.c
Curl_meets_timecondition
bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc) { if((timeofdoc == 0) || (data->set.timevalue == 0)) return TRUE; switch(data->set.timecondition) { case CURL_TIMECOND_IFMODSINCE: default: if(timeofdoc <= data->set.timevalue) { infof(data, "The requested document is not new enough"); data->info.timecond = TRUE; return FALSE; } break; case CURL_TIMECOND_IFUNMODSINCE: if(timeofdoc >= data->set.timevalue) { infof(data, "The requested document is not old enough"); data->info.timecond = TRUE; return FALSE; } break; } return TRUE; }
pushq %rbp pushq %rbx pushq %rax movb $0x1, %bpl testq %rsi, %rsi je 0x4a88ac movq %rdi, %rbx movq 0x530(%rdi), %rax testq %rax, %rax je 0x4a88ac cmpb $0x2, 0x538(%rbx) jne 0x4a888d cmpq %rsi, %rax jg 0x4a88ac leaq 0x1fcc42(%rip), %rsi # 0x6a54cd jmp 0x4a8899 cmpq %rsi, %rax jl 0x4a88ac leaq 0x1fcc0b(%rip), %rsi # 0x6a54a4 xorl %ebp, %ebp movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 orb $0x1, 0x1444(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/transfer.c
Curl_single_getsock
int Curl_single_getsock(struct Curl_easy *data, struct connectdata *conn, curl_socket_t *sock) { int bitmap = GETSOCK_BLANK; unsigned sockindex = 0; if(conn->handler->perform_getsock) return conn->handler->perform_getsock(data, conn, sock); /* don't include HOLD and PAUSE connections */ if((data->req.keepon & KEEP_RECVBITS) == KEEP_RECV) { DEBUGASSERT(conn->sockfd != CURL_SOCKET_BAD); bitmap |= GETSOCK_READSOCK(sockindex); sock[sockindex] = conn->sockfd; } /* don't include HOLD and PAUSE connections */ if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) { if((conn->sockfd != conn->writesockfd) || bitmap == GETSOCK_BLANK) { /* only if they are not the same socket and we have a readable one, we increase index */ if(bitmap != GETSOCK_BLANK) sockindex++; /* increase index if we need two entries */ DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD); sock[sockindex] = conn->writesockfd; } bitmap |= GETSOCK_WRITESOCK(sockindex); } return bitmap; }
movq 0x398(%rsi), %rax movq 0x58(%rax), %rax testq %rax, %rax je 0x4a975f jmpq *%rax movl 0x144(%rdi), %r8d movl %r8d, %ecx andl $0x15, %ecx xorl %eax, %eax cmpl $0x1, %ecx jne 0x4a9787 movl 0x3b8(%rsi), %eax movl %eax, (%rdx) movl 0x144(%rdi), %r8d movl $0x1, %eax andl $0x2a, %r8d cmpl $0x2, %r8d jne 0x4a97be movl 0x3bc(%rsi), %r8d cmpl $0x1, %ecx jne 0x4a97ab movl $0x10, %edi cmpl %r8d, 0x3b8(%rsi) je 0x4a97bb xorl %edi, %edi cmpl $0x1, %ecx sete %dil movl %r8d, (%rdx,%rdi,4) orl $0x10, %edi btsl %edi, %eax retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/transfer.c
Curl_builtin_scheme
const struct Curl_handler *Curl_builtin_scheme(const char *scheme, size_t schemelen) { const struct Curl_handler * const *pp; const struct Curl_handler *p; /* Scan protocol handler table and match against 'scheme'. The handler may be changed later when the protocol specific setup function is called. */ if(schemelen == CURL_ZERO_TERMINATED) schemelen = strlen(scheme); for(pp = protocols; (p = *pp) != NULL; pp++) if(strncasecompare(p->scheme, scheme, schemelen) && !p->scheme[schemelen]) /* Protocol found in table. */ return p; return NULL; /* not found */ }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpq $-0x1, %rsi jne 0x4aaec1 movq %rbx, %rdi callq 0x3fd60 movq %rax, %r14 leaq 0x3ad278(%rip), %r15 # 0x858140 leaq 0x3acd49(%rip), %r12 # 0x857c18 movq (%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x4a7e2e testl %eax, %eax je 0x4aaeeb movq (%r15), %rax cmpb $0x0, (%rax,%r14) je 0x4aaefb movq (%r12), %r15 addq $0x8, %r12 testq %r15, %r15 jne 0x4aaecf xorl %r15d, %r15d movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/url.c
reuse_conn
static void reuse_conn(struct Curl_easy *data, struct connectdata *old_conn, struct connectdata *conn) { /* 'local_ip' and 'local_port' get filled with local's numerical ip address and port number whenever an outgoing connection is **established** from the primary socket to a remote address. */ char local_ip[MAX_IPADR_LEN] = ""; int local_port = -1; /* get the user+password information from the old_conn struct since it may * be new for this request even when we re-use an existing connection */ if(old_conn->user) { /* use the new user name and password though */ Curl_safefree(conn->user); Curl_safefree(conn->passwd); conn->user = old_conn->user; conn->passwd = old_conn->passwd; old_conn->user = NULL; old_conn->passwd = NULL; } #ifndef CURL_DISABLE_PROXY conn->bits.proxy_user_passwd = old_conn->bits.proxy_user_passwd; if(conn->bits.proxy_user_passwd) { /* use the new proxy user name and proxy password though */ Curl_safefree(conn->http_proxy.user); Curl_safefree(conn->socks_proxy.user); Curl_safefree(conn->http_proxy.passwd); Curl_safefree(conn->socks_proxy.passwd); conn->http_proxy.user = old_conn->http_proxy.user; conn->socks_proxy.user = old_conn->socks_proxy.user; conn->http_proxy.passwd = old_conn->http_proxy.passwd; conn->socks_proxy.passwd = old_conn->socks_proxy.passwd; old_conn->http_proxy.user = NULL; old_conn->socks_proxy.user = NULL; old_conn->http_proxy.passwd = NULL; old_conn->socks_proxy.passwd = NULL; } #endif Curl_free_idnconverted_hostname(&conn->host); Curl_free_idnconverted_hostname(&conn->conn_to_host); Curl_safefree(conn->host.rawalloc); Curl_safefree(conn->conn_to_host.rawalloc); conn->host = old_conn->host; old_conn->host.rawalloc = NULL; old_conn->host.encalloc = NULL; conn->conn_to_host = old_conn->conn_to_host; old_conn->conn_to_host.rawalloc = NULL; conn->conn_to_port = old_conn->conn_to_port; conn->remote_port = old_conn->remote_port; Curl_safefree(conn->hostname_resolve); conn->hostname_resolve = old_conn->hostname_resolve; old_conn->hostname_resolve = NULL; /* persist connection info in session handle */ if(conn->transport == TRNSPRT_TCP) { Curl_conninfo_local(data, conn->sock[FIRSTSOCKET], local_ip, &local_port); } Curl_persistconninfo(data, conn, local_ip, local_port); conn_reset_all_postponed_data(old_conn); /* free buffers */ /* re-use init */ conn->bits.reuse = TRUE; /* yes, we're re-using here */ conn_free(old_conn); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x2e(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movl $0xffffffff, 0xc(%rsp) # imm = 0xFFFFFFFF cmpq $0x0, 0x188(%rsi) je 0x4adf35 leaq 0x188(%rbx), %r12 leaq 0x3b2796(%rip), %r13 # 0x860690 movq 0x188(%r14), %rdi callq *(%r13) xorl %ebp, %ebp movq %rbp, 0x188(%r14) movq 0x190(%r14), %rdi callq *(%r13) movq %rbp, 0x190(%r14) movups (%r12), %xmm0 movups %xmm0, 0x188(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%r12) movl 0x374(%rbx), %eax andl $0x4, %eax movl 0x374(%r14), %ecx andl $-0x5, %ecx orl %eax, %ecx movl %ecx, 0x374(%r14) testl %eax, %eax je 0x4adfda leaq 0x3b2730(%rip), %r12 # 0x860690 movq 0x148(%r14), %rdi callq *(%r12) xorl %r13d, %r13d movq %r13, 0x148(%r14) movq 0x108(%r14), %rdi callq *(%r12) movq %r13, 0x108(%r14) movq 0x150(%r14), %rdi callq *(%r12) movq %r13, 0x150(%r14) movq 0x110(%r14), %rdi callq *(%r12) movq %r13, 0x110(%r14) movups 0x148(%rbx), %xmm0 movups %xmm0, 0x148(%r14) movups 0x108(%rbx), %xmm0 movups %xmm0, 0x108(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x108(%rbx) movups %xmm0, 0x148(%rbx) leaq 0x3b26af(%rip), %r12 # 0x860690 movq 0x88(%r14), %rdi callq *(%r12) xorl %r13d, %r13d movq %r13, 0x88(%r14) movq 0xb8(%r14), %rdi callq *(%r12) movq %r13, 0xb8(%r14) movups 0x88(%rbx), %xmm0 movups 0x98(%rbx), %xmm1 movups %xmm1, 0x98(%r14) movups %xmm0, 0x88(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x88(%rbx) movups 0xb8(%rbx), %xmm0 movups 0xc8(%rbx), %xmm1 movups %xmm1, 0xc8(%r14) movups %xmm0, 0xb8(%r14) movq %r13, 0xb8(%rbx) movq 0x56c(%rbx), %rax movq %rax, 0x56c(%r14) movq 0xa8(%r14), %rdi callq *(%r12) movq %r13, 0xa8(%r14) movq 0xa8(%rbx), %rax movq %rax, 0xa8(%r14) movq %r13, 0xa8(%rbx) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpb $0x3, 0x57d(%r14) jne 0x4ae0b9 movl 0x1e0(%r14), %esi leaq 0x10(%rsp), %rdx leaq 0xc(%rsp), %r12 movq %r15, %rdi movq %r12, %rcx callq 0x4b4f9a movl (%r12), %ecx leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r14, %rsi callq 0x4b4da7 orb $-0x80, 0x374(%r14) movq %rbx, %rdi callq 0x4aac7f addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/url.c
free_urlhandle
static void free_urlhandle(struct Curl_URL *u) { free(u->scheme); free(u->user); free(u->password); free(u->options); free(u->host); free(u->zoneid); free(u->port); free(u->path); free(u->query); free(u->fragment); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x3b1c1a(%rip), %r14 # 0x860690 movq (%rdi), %rdi callq *(%r14) movq 0x8(%rbx), %rdi callq *(%r14) movq 0x10(%rbx), %rdi callq *(%r14) movq 0x18(%rbx), %rdi callq *(%r14) movq 0x20(%rbx), %rdi callq *(%r14) movq 0x28(%rbx), %rdi callq *(%r14) movq 0x30(%rbx), %rdi callq *(%r14) movq 0x38(%rbx), %rdi callq *(%r14) movq 0x40(%rbx), %rdi callq *(%r14) movq 0x48(%rbx), %rdi movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 jmpq *(%rax)
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/urlapi.c
Curl_auth_digest_get_pair
bool Curl_auth_digest_get_pair(const char *str, char *value, char *content, const char **endptr) { int c; bool starts_with_quote = FALSE; bool escape = FALSE; for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--);) *value++ = *str++; *value = 0; if('=' != *str++) /* eek, no match */ return FALSE; if('\"' == *str) { /* This starts with a quote so it must end with one as well! */ str++; starts_with_quote = TRUE; } for(c = DIGEST_MAX_CONTENT_LENGTH - 1; *str && c--; str++) { if(!escape) { switch(*str) { case '\\': if(starts_with_quote) { /* the start of an escaped quote */ escape = TRUE; continue; } break; case ',': if(!starts_with_quote) { /* This signals the end of the content if we didn't get a starting quote and then we do "sloppy" parsing */ c = 0; /* the end */ continue; } break; case '\r': case '\n': /* end of string */ if(starts_with_quote) return FALSE; /* No closing quote */ c = 0; continue; case '\"': if(starts_with_quote) { /* end of string */ c = 0; continue; } else return FALSE; break; } } escape = FALSE; *content++ = *str; } if(escape) return FALSE; /* No character after backslash */ *content = 0; *endptr = str; return TRUE; }
xorl %r8d, %r8d xorl %eax, %eax movzbl (%rdi,%r8), %r9d testl %r9d, %r9d je 0x4b1142 cmpl $0x3d, %r9d je 0x4b1142 cmpl $0xff, %r8d je 0x4b1142 movb %r9b, (%rsi,%r8) decq %rax incq %r8 jmp 0x4b111d movb $0x0, (%rsi,%r8) cmpb $0x3d, (%rdi,%r8) jne 0x4b11f7 leaq 0x1(%rdi), %r9 movb 0x1(%rdi,%r8), %sil addq $0x2, %rdi cmpb $0x22, %sil cmovneq %r9, %rdi subq %rax, %rdi movb (%rdi), %r9b testb %r9b, %r9b je 0x4b11fa movl $0x3ff, %eax # imm = 0x3FF xorl %r8d, %r8d subl $0x1, %eax jb 0x4b11f1 testb $0x1, %r8b je 0x4b11a0 movb %r9b, (%rdx) incq %rdx xorl %r8d, %r8d movb 0x1(%rdi), %r9b incq %rdi testb %r9b, %r9b jne 0x4b117e jmp 0x4b11f1 movzbl %r9b, %r10d cmpl $0x21, %r10d jle 0x4b11c7 cmpl $0x22, %r10d je 0x4b11dd cmpl $0x2c, %r10d je 0x4b11e7 cmpl $0x5c, %r10d jne 0x4b1189 movb $0x1, %r8b cmpb $0x22, %sil jne 0x4b1189 jmp 0x4b1192 cmpl $0xa, %r10d je 0x4b11d3 cmpl $0xd, %r10d jne 0x4b1189 xorl %eax, %eax cmpb $0x22, %sil jne 0x4b1192 jmp 0x4b11f9 xorl %eax, %eax cmpb $0x22, %sil je 0x4b1192 jmp 0x4b11f9 cmpb $0x22, %sil je 0x4b1189 xorl %eax, %eax jmp 0x4b1192 testb $0x1, %r8b je 0x4b11fa xorl %eax, %eax retq movb $0x0, (%rdx) movq %rdi, (%rcx) movb $0x1, %al retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/vauth/digest.c
Curl_auth_decode_digest_http_message
CURLcode Curl_auth_decode_digest_http_message(const char *chlg, struct digestdata *digest) { bool before = FALSE; /* got a nonce before */ bool foundAuth = FALSE; bool foundAuthInt = FALSE; char *token = NULL; char *tmp = NULL; /* If we already have received a nonce, keep that in mind */ if(digest->nonce) before = TRUE; /* Clean up any former leftovers and initialise to defaults */ Curl_auth_digest_cleanup(digest); for(;;) { char value[DIGEST_MAX_VALUE_LENGTH]; char content[DIGEST_MAX_CONTENT_LENGTH]; /* Pass all additional spaces here */ while(*chlg && ISBLANK(*chlg)) chlg++; /* Extract a value=content pair */ if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) { if(strcasecompare(value, "nonce")) { free(digest->nonce); digest->nonce = strdup(content); if(!digest->nonce) return CURLE_OUT_OF_MEMORY; } else if(strcasecompare(value, "stale")) { if(strcasecompare(content, "true")) { digest->stale = TRUE; digest->nc = 1; /* we make a new nonce now */ } } else if(strcasecompare(value, "realm")) { free(digest->realm); digest->realm = strdup(content); if(!digest->realm) return CURLE_OUT_OF_MEMORY; } else if(strcasecompare(value, "opaque")) { free(digest->opaque); digest->opaque = strdup(content); if(!digest->opaque) return CURLE_OUT_OF_MEMORY; } else if(strcasecompare(value, "qop")) { char *tok_buf = NULL; /* Tokenize the list and choose auth if possible, use a temporary clone of the buffer since strtok_r() ruins it */ tmp = strdup(content); if(!tmp) return CURLE_OUT_OF_MEMORY; token = strtok_r(tmp, ",", &tok_buf); while(token) { /* Pass additional spaces here */ while(*token && ISBLANK(*token)) token++; if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH)) { foundAuth = TRUE; } else if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH_INT)) { foundAuthInt = TRUE; } token = strtok_r(NULL, ",", &tok_buf); } free(tmp); /* Select only auth or auth-int. Otherwise, ignore */ if(foundAuth) { free(digest->qop); digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH); if(!digest->qop) return CURLE_OUT_OF_MEMORY; } else if(foundAuthInt) { free(digest->qop); digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT); if(!digest->qop) return CURLE_OUT_OF_MEMORY; } } else if(strcasecompare(value, "algorithm")) { free(digest->algorithm); digest->algorithm = strdup(content); if(!digest->algorithm) return CURLE_OUT_OF_MEMORY; if(strcasecompare(content, "MD5-sess")) digest->algo = ALGO_MD5SESS; else if(strcasecompare(content, "MD5")) digest->algo = ALGO_MD5; else if(strcasecompare(content, "SHA-256")) digest->algo = ALGO_SHA256; else if(strcasecompare(content, "SHA-256-SESS")) digest->algo = ALGO_SHA256SESS; else if(strcasecompare(content, "SHA-512-256")) digest->algo = ALGO_SHA512_256; else if(strcasecompare(content, "SHA-512-256-SESS")) digest->algo = ALGO_SHA512_256SESS; else return CURLE_BAD_CONTENT_ENCODING; } else if(strcasecompare(value, "userhash")) { if(strcasecompare(content, "true")) { digest->userhash = TRUE; } } else { /* Unknown specifier, ignore it! */ } } else break; /* We're done here */ /* Pass all additional spaces here */ while(*chlg && ISBLANK(*chlg)) chlg++; /* Allow the list to be comma-separated */ if(',' == *chlg) chlg++; } /* We had a nonce since before, and we got another one now without 'stale=true'. This means we provided bad credentials in the previous request */ if(before && !digest->stale) return CURLE_BAD_CONTENT_ENCODING; /* We got this header without a nonce, that's a bad Digest line! */ if(!digest->nonce) return CURLE_BAD_CONTENT_ENCODING; /* "<algo>-sess" protocol versions require "auth" or "auth-int" qop */ if(!digest->qop && (digest->algo & SESSION_ALGO)) return CURLE_BAD_CONTENT_ENCODING; return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x538, %rsp # imm = 0x538 movq %rsi, %rbx movq %rdi, %rbp leaq 0x8(%rsp), %r14 movq %rdi, (%r14) movq (%rsi), %rax movq %rax, 0x28(%rsp) movq %rsi, %rdi callq 0x4b1ca0 movq $0x0, 0x10(%rsp) leaq 0x30(%rsp), %r15 leaq 0x130(%rsp), %r12 leaq 0x3aed83(%rip), %r13 # 0x860690 movq $0x0, (%rsp) movzbl (%rbp), %eax cmpl $0x20, %eax je 0x4b1923 cmpl $0x9, %eax jne 0x4b1928 incq %rbp jmp 0x4b1915 movq %rbp, 0x8(%rsp) movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx callq 0x4b1118 testb %al, %al je 0x4b1c53 movq %r15, %rdi leaq 0x1f49d7(%rip), %rsi # 0x6a6327 callq 0x4a7dca testl %eax, %eax je 0x4b19a2 movq (%rbx), %rdi callq *(%r13) movq %r12, %rdi leaq 0x3aed36(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, (%rbx) testq %rax, %rax je 0x4b1c82 movq 0x8(%rsp), %rbp movzbl (%rbp), %eax cmpl $0x9, %eax je 0x4b198b cmpl $0x20, %eax jne 0x4b1990 incq %rbp jmp 0x4b197d cmpl $0x2c, %eax jne 0x4b1998 incq %rbp movq %rbp, 0x8(%rsp) jmp 0x4b1915 movq %r15, %rdi leaq 0x1f4981(%rip), %rsi # 0x6a632d callq 0x4a7dca testl %eax, %eax je 0x4b19d5 movq %r12, %rdi leaq 0x1f4ae5(%rip), %rsi # 0x6a64a4 callq 0x4a7dca testl %eax, %eax je 0x4b1978 orb $0x1, 0x35(%rbx) movl $0x1, 0x30(%rbx) jmp 0x4b1978 movq %r13, %rbp movq %r15, %rdi leaq 0x1f4951(%rip), %rsi # 0x6a6333 callq 0x4a7dca testl %eax, %eax je 0x4b1a07 movq 0x10(%rbx), %rdi callq *(%rbp) movq %r12, %rdi leaq 0x3aeca4(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, 0x10(%rbx) jmp 0x4b196f movq %r15, %rdi leaq 0x1f4928(%rip), %rsi # 0x6a6339 callq 0x4a7dca testl %eax, %eax je 0x4b1a36 movq 0x18(%rbx), %rdi callq *(%rbp) movq %r12, %rdi leaq 0x3aec75(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, 0x18(%rbx) jmp 0x4b196f movq %r15, %rdi leaq 0x1f4900(%rip), %rsi # 0x6a6340 callq 0x4a7dca testl %eax, %eax je 0x4b1b17 movq $0x0, 0x18(%rsp) movq %r12, %rdi leaq 0x3aec40(%rip), %rax # 0x8606a0 callq *(%rax) testq %rax, %rax je 0x4b1c82 movq %rax, 0x20(%rsp) movq %rax, %rdi leaq 0x1f480c(%rip), %rsi # 0x6a6286 leaq 0x18(%rsp), %rdx callq 0x3fa10 testq %rax, %rax je 0x4b1af4 movq %rax, %rbp movzbl (%rbp), %eax cmpl $0x20, %eax je 0x4b1a9a cmpl $0x9, %eax jne 0x4b1a9f incq %rbp jmp 0x4b1a8c movq %rbp, %rdi leaq 0x1f209b(%rip), %rsi # 0x6a3b44 callq 0x4a7dca testl %eax, %eax je 0x4b1abb movb $0x1, %al movq %rax, 0x10(%rsp) jmp 0x4b1ad9 movq %rbp, %rdi leaq 0x1f487f(%rip), %rsi # 0x6a6344 callq 0x4a7dca testl %eax, %eax setne %al movq (%rsp), %rcx orb %al, %cl movq %rcx, (%rsp) xorl %edi, %edi leaq 0x1f47a4(%rip), %rsi # 0x6a6286 leaq 0x18(%rsp), %rdx callq 0x3fa10 movq %rax, %rbp testq %rax, %rax jne 0x4b1a8c movq 0x20(%rsp), %rdi movq %r13, %rbp callq *(%r13) testb $0x1, 0x10(%rsp) je 0x4b1b66 movq 0x20(%rbx), %rdi callq *(%rbp) leaq 0x1f202f(%rip), %rdi # 0x6a3b44 jmp 0x4b1b7e movq %r15, %rdi leaq 0x1f482c(%rip), %rsi # 0x6a634d callq 0x4a7dca testl %eax, %eax je 0x4b1b90 movq 0x28(%rbx), %rdi callq *(%rbp) movq %r12, %rdi leaq 0x3aeb65(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, 0x28(%rbx) testq %rax, %rax je 0x4b1c82 movq %r12, %rdi leaq 0x1f4803(%rip), %rsi # 0x6a6357 callq 0x4a7dca testl %eax, %eax je 0x4b1bc7 movb $0x1, 0x34(%rbx) jmp 0x4b1978 testb $0x1, (%rsp) je 0x4b1978 movq 0x20(%rbx), %rdi callq *(%rbp) leaq 0x1f47c6(%rip), %rdi # 0x6a6344 leaq 0x3aeb1b(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, 0x20(%rbx) jmp 0x4b196f movq %r15, %rdi leaq 0x1f47f8(%rip), %rsi # 0x6a6392 callq 0x4a7dca testl %eax, %eax je 0x4b1978 movq %r12, %rdi leaq 0x1f48f3(%rip), %rsi # 0x6a64a4 callq 0x4a7dca testl %eax, %eax je 0x4b1978 orb $0x2, 0x35(%rbx) jmp 0x4b1978 movq %r12, %rdi leaq 0x1bfe7f(%rip), %rsi # 0x671a50 callq 0x4a7dca testl %eax, %eax je 0x4b1be3 movb $0x0, 0x34(%rbx) jmp 0x4b1978 movq %r12, %rdi leaq 0x1f4773(%rip), %rsi # 0x6a6360 callq 0x4a7dca testl %eax, %eax je 0x4b1bff movb $0x2, 0x34(%rbx) jmp 0x4b1978 movq %r12, %rdi leaq 0x1f475f(%rip), %rsi # 0x6a6368 callq 0x4a7dca testl %eax, %eax je 0x4b1c1b movb $0x3, 0x34(%rbx) jmp 0x4b1978 movq %r12, %rdi leaq 0x1f4750(%rip), %rsi # 0x6a6375 callq 0x4a7dca testl %eax, %eax je 0x4b1c37 movb $0x4, 0x34(%rbx) jmp 0x4b1978 movq %r12, %rdi leaq 0x1f4740(%rip), %rsi # 0x6a6381 callq 0x4a7dca testl %eax, %eax je 0x4b1c99 movb $0x5, 0x34(%rbx) jmp 0x4b1978 cmpq $0x0, 0x28(%rsp) je 0x4b1c66 movl $0x3d, %eax testb $0x1, 0x35(%rbx) je 0x4b1c87 movl $0x3d, %eax cmpq $0x0, (%rbx) je 0x4b1c87 cmpq $0x0, 0x20(%rbx) jne 0x4b1c7e testb $0x1, 0x34(%rbx) jne 0x4b1c87 xorl %eax, %eax jmp 0x4b1c87 movl $0x1b, %eax addq $0x538, %rsp # imm = 0x538 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x3d, %eax jmp 0x4b1c87
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/vauth/digest.c
trynextip
static CURLcode trynextip(struct Curl_easy *data, struct connectdata *conn, int sockindex, int tempindex) { CURLcode result = CURLE_COULDNT_CONNECT; /* First clean up after the failed socket. Don't close it yet to ensure that the next IP's socket gets a different file descriptor, which can prevent bugs when the curl_multi_socket_action interface is used with certain select() replacements such as kqueue. */ curl_socket_t fd_to_close = conn->tempsock[tempindex]; conn->tempsock[tempindex] = CURL_SOCKET_BAD; if(sockindex == FIRSTSOCKET) { struct Curl_addrinfo *ai = conn->tempaddr[tempindex]; while(ai) { result = singleipconnect(data, conn, ai, tempindex); if(result == CURLE_COULDNT_CONNECT) { ai = ainext(conn, tempindex, TRUE); continue; } break; } } if(fd_to_close != CURL_SOCKET_BAD) Curl_closesocket(data, conn, fd_to_close); return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl %ecx, %eax movl 0x1e8(%rsi,%rax,4), %ebp movl $0xffffffff, 0x1e8(%rsi,%rax,4) # imm = 0xFFFFFFFF movl $0x7, %r12d testl %edx, %edx je 0x4b57bb cmpl $-0x1, %ebp je 0x4b57a9 movq %r14, %rdi movq %rbx, %rsi movl %ebp, %edx callq 0x4b5897 movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x78(%rbx,%rax,8), %rdx testq %rdx, %rdx je 0x4b5797 movl %ecx, %r15d movq %r14, %rdi movq %rbx, %rsi callq 0x4b5abc movl %eax, %r12d cmpl $0x7, %eax jne 0x4b5797 movslq %r15d, %r13 movq 0x78(%rbx,%r13,8), %rax testq %rax, %rax je 0x4b5829 movq 0x28(%rax), %rdx testq %rdx, %rdx je 0x4b5829 movl 0x1f0(%rbx,%r13,4), %eax cmpl %eax, 0x4(%rdx) je 0x4b5809 movq 0x28(%rdx), %rdx testq %rdx, %rdx jne 0x4b57f9 jmp 0x4b5829 movq %rdx, 0x78(%rbx,%r13,8) movq %r14, %rdi movq %rbx, %rsi movl %r15d, %ecx callq 0x4b5abc movl %eax, %r12d cmpl $0x7, %eax je 0x4b57de jmp 0x4b5797 movq $0x0, 0x78(%rbx,%r13,8) movl $0x7, %r12d jmp 0x4b5797
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/connect.c
Curl_closesocket
int Curl_closesocket(struct Curl_easy *data, struct connectdata *conn, curl_socket_t sock) { if(conn && conn->fclosesocket) { if((sock == conn->sock[SECONDARYSOCKET]) && conn->bits.sock_accepted) /* if this socket matches the second socket, and that was created with accept, then we MUST NOT call the callback but clear the accepted status */ conn->bits.sock_accepted = FALSE; else { int rc; Curl_multi_closed(data, sock); Curl_set_in_callback(data, true); rc = conn->fclosesocket(conn->closesocket_client, sock); Curl_set_in_callback(data, false); return rc; } } if(conn) /* tell the multi-socket code about this */ Curl_multi_closed(data, sock); sclose(sock); return 0; }
pushq %r15 pushq %r14 pushq %rbx movl %edx, %ebx testq %rsi, %rsi je 0x4b590d movq %rsi, %r15 movq %rdi, %r14 cmpq $0x0, 0x50(%rsi) je 0x4b5903 cmpl %ebx, 0x1e4(%r15) jne 0x4b58c6 movl 0x374(%r15), %eax btl $0x1d, %eax jb 0x4b58f7 movq %r14, %rdi movl %ebx, %esi callq 0x49f4b1 movq %r14, %rdi movl $0x1, %esi callq 0x49fd81 movq 0x58(%r15), %rdi movl %ebx, %esi callq *0x50(%r15) movl %eax, %ebx movq %r14, %rdi xorl %esi, %esi callq 0x49fd81 movl %ebx, %eax jmp 0x4b5916 andl $0xdfffffff, %eax # imm = 0xDFFFFFFF movl %eax, 0x374(%r15) movq %r14, %rdi movl %ebx, %esi callq 0x49f4b1 movl %ebx, %edi callq 0x3f770 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/connect.c
process_zlib_error
static CURLcode process_zlib_error(struct Curl_easy *data, z_stream *z) { if(z->msg) failf(data, "Error while processing content unencoding: %s", z->msg); else failf(data, "Error while processing content unencoding: " "Unknown failure within decompression software."); return CURLE_BAD_CONTENT_ENCODING; }
testq %rsi, %rsi je 0x4b6c8f movq %rsi, %rdx leaq 0x1efdf5(%rip), %rsi # 0x6a6a7d xorl %eax, %eax jmp 0x4a16c7 leaq 0x1efe15(%rip), %rsi # 0x6a6aab xorl %eax, %eax jmp 0x4a16c7
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/content_encoding.c
ftp_disconnect
static CURLcode ftp_disconnect(struct Curl_easy *data, struct connectdata *conn, bool dead_connection) { struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; /* We cannot send quit unconditionally. If this connection is stale or bad in any way, sending quit and waiting around here will make the disconnect wait in vain and cause more problems than we need to. ftp_quit() will check the state of ftp->ctl_valid. If it's ok it will try to send the QUIT command, otherwise it will just return. */ if(dead_connection) ftpc->ctl_valid = FALSE; /* The FTP session may or may not have been allocated/setup at this point! */ (void)ftp_quit(data, conn); /* ignore errors on the QUIT */ if(ftpc->entrypath) { if(data->state.most_recent_ftp_entrypath == ftpc->entrypath) { data->state.most_recent_ftp_entrypath = NULL; } Curl_safefree(ftpc->entrypath); } freedirs(ftpc); Curl_safefree(ftpc->prevpath); Curl_safefree(ftpc->server_os); Curl_pp_disconnect(pp); Curl_sec_end(conn); return CURLE_OK; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 testl %edx, %edx je 0x4bb08d movb $0x0, 0x4ed(%rbx) jmp 0x4bb12f testb $0x1, 0x4ed(%rbx) je 0x4bb12f leaq 0x448(%rbx), %r15 leaq 0x1ebd5a(%rip), %rdx # 0x6a6e02 leaq 0x18eafa(%rip), %rcx # 0x649ba9 movq %r14, %rdi movq %r15, %rsi xorl %eax, %eax callq 0x4c9f19 testl %eax, %eax je 0x4bb0ff movl %eax, %edi callq 0x4a7fe4 leaq 0x1ecc60(%rip), %rsi # 0x6a7d2e movq %r14, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x4a16c7 movb $0x0, 0x4ed(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x4b6786 movq 0x18(%r14), %rax movl $0x0, 0x518(%rax) jmp 0x4bb12f movq 0x18(%r14), %rax movl $0x22, 0x518(%rax) cmpl $0x0, 0x518(%rbx) je 0x4bb12f movq %r14, %rdi movq %r15, %rsi movl $0x1, %edx movl $0x1, %ecx callq 0x4c9c43 testl %eax, %eax je 0x4bb10d movq 0x4d0(%rbx), %rdi testq %rdi, %rdi je 0x4bb163 cmpq %rdi, 0x1140(%r14) jne 0x4bb14f movq $0x0, 0x1140(%r14) leaq 0x3a553a(%rip), %rax # 0x860690 callq *(%rax) movq $0x0, 0x4d0(%rbx) leaq 0x448(%rbx), %r14 movq %r14, %rdi callq 0x4be51f leaq 0x3a5517(%rip), %r15 # 0x860690 movq 0x500(%rbx), %rdi callq *(%r15) xorl %r12d, %r12d movq %r12, 0x500(%rbx) movq 0x528(%rbx), %rdi callq *(%r15) movq %r12, 0x528(%rbx) movq %r14, %rdi callq 0x4ca313 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
Curl_GetFTPResponse
CURLcode Curl_GetFTPResponse(struct Curl_easy *data, ssize_t *nreadp, /* return number of bytes read */ int *ftpcode) /* return the ftp-code */ { /* * We cannot read just one byte per read() and then go back to select() as * the OpenSSL read() doesn't grok that properly. * * Alas, read as much as possible, split up into lines, use the ending * line in a response or continue reading. */ struct connectdata *conn = data->conn; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; CURLcode result = CURLE_OK; struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; size_t nread; int cache_skip = 0; int value_to_be_ignored = 0; if(ftpcode) *ftpcode = 0; /* 0 for errors */ else /* make the pointer point to something for the rest of this function */ ftpcode = &value_to_be_ignored; *nreadp = 0; while(!*ftpcode && !result) { /* check and reset timeout value every lap */ timediff_t timeout = Curl_pp_state_timeout(data, pp, FALSE); timediff_t interval_ms; if(timeout <= 0) { failf(data, "FTP response timeout"); return CURLE_OPERATION_TIMEDOUT; /* already too little time */ } interval_ms = 1000; /* use 1 second timeout intervals */ if(timeout < interval_ms) interval_ms = timeout; /* * Since this function is blocking, we need to wait here for input on the * connection and only then we call the response reading function. We do * timeout at least every second to make the timeout check run. * * A caution here is that the ftp_readresp() function has a cache that may * contain pieces of a response from the previous invoke and we need to * make sure we don't just wait for input while there is unhandled data in * that cache. But also, if the cache is there, we call ftp_readresp() and * the cache wasn't good enough to continue we must not just busy-loop * around this function. * */ if(pp->cache && (cache_skip < 2)) { /* * There's a cache left since before. We then skipping the wait for * socket action, unless this is the same cache like the previous round * as then the cache was deemed not enough to act on and we then need to * wait for more data anyway. */ } else if(!Curl_conn_data_pending(conn, FIRSTSOCKET)) { switch(SOCKET_READABLE(sockfd, interval_ms)) { case -1: /* select() error, stop reading */ failf(data, "FTP response aborted due to select/poll error: %d", SOCKERRNO); return CURLE_RECV_ERROR; case 0: /* timeout */ if(Curl_pgrsUpdate(data)) return CURLE_ABORTED_BY_CALLBACK; continue; /* just continue in our loop for the timeout duration */ default: /* for clarity */ break; } } result = ftp_readresp(data, sockfd, pp, ftpcode, &nread); if(result) break; if(!nread && pp->cache) /* bump cache skip counter as on repeated skips we must wait for more data */ cache_skip++; else /* when we got data or there is no cache left, we reset the cache skip counter */ cache_skip = 0; *nreadp += nread; } /* while there's buffer left and loop is requested */ pp->pending_resp = FALSE; return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdi, %rbx movq 0x18(%rdi), %rax movq %rax, 0x8(%rsp) movl 0x1e0(%rax), %ebp movl $0x0, 0x14(%rsp) testq %rdx, %rdx je 0x4bb1f1 movq %rdx, %r12 movl $0x0, (%rdx) jmp 0x4bb1f6 leaq 0x14(%rsp), %r12 movq 0x8(%rsp), %rax leaq 0x448(%rax), %r13 movq 0x18(%rsp), %rax movq $0x0, (%rax) xorl %r15d, %r15d movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x4c9bb4 testq %rax, %rax jle 0x4bb2d8 movq %rax, %r14 movl $0x3e8, %eax # imm = 0x3E8 cmpq %rax, %r14 cmovaeq %rax, %r14 cmpq $0x0, (%r13) je 0x4bb243 cmpl $0x2, %r15d jl 0x4bb274 movq 0x8(%rsp), %rdi xorl %esi, %esi callq 0x4b67d2 testb %al, %al jne 0x4bb274 movl %ebp, %edi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl $0xffffffff, %edx # imm = 0xFFFFFFFF movq %r14, %rcx callq 0x4a138d testl %eax, %eax je 0x4bb2c5 cmpl $-0x1, %eax je 0x4bb30d movq %rbx, %rdi movl %ebp, %esi movq %r13, %rdx movq %r12, %rcx leaq 0x20(%rsp), %r8 callq 0x4bb32c testl %eax, %eax jne 0x4bb2f2 movq 0x20(%rsp), %rax xorl %ecx, %ecx testq %rax, %rax jne 0x4bb2ad incl %r15d cmpq $0x0, (%r13) movl $0x0, %ecx cmovel %ecx, %r15d movl %r15d, %ecx movq 0x18(%rsp), %rdx addq %rax, (%rdx) movl %ecx, %r15d cmpl $0x0, (%r12) je 0x4bb211 jmp 0x4bb2f0 movq %rbx, %rdi callq 0x4a068a testl %eax, %eax je 0x4bb2b8 movl $0x2a, %eax jmp 0x4bb2fe leaq 0x1ebdfa(%rip), %rsi # 0x6a70d9 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x1c, %eax jmp 0x4bb2fe xorl %eax, %eax movq 0x8(%rsp), %rcx movb $0x0, 0x468(%rcx) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x415e0 movl (%rax), %edx leaq 0x1ebdd3(%rip), %rsi # 0x6a70ee movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x38, %eax jmp 0x4bb2fe
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_readresp
static CURLcode ftp_readresp(struct Curl_easy *data, curl_socket_t sockfd, struct pingpong *pp, int *ftpcode, /* return the ftp-code if done */ size_t *size) /* size of the response */ { int code; CURLcode result = Curl_pp_readresp(data, sockfd, pp, &code, size); #ifdef HAVE_GSSAPI { struct connectdata *conn = data->conn; char * const buf = data->state.buffer; /* handle the security-oriented responses 6xx ***/ switch(code) { case 631: code = Curl_sec_read_msg(data, conn, buf, PROT_SAFE); break; case 632: code = Curl_sec_read_msg(data, conn, buf, PROT_PRIVATE); break; case 633: code = Curl_sec_read_msg(data, conn, buf, PROT_CONFIDENTIAL); break; default: /* normal ftp stuff we pass through! */ break; } } #endif /* store the latest code for later retrieval */ data->info.httpcode = code; if(ftpcode) *ftpcode = code; if(421 == code) { /* 421 means "Service not available, closing control connection." and FTP * servers use it to signal that idle session timeout has been exceeded. * If we ignored the response, it could end up hanging in some cases. * * This response code can come at any point so having it treated * generically is a good idea. */ infof(data, "We got a 421 - timeout"); state(data, FTP_STOP); return CURLE_OPERATION_TIMEDOUT; } return result; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdi, %rbx leaq 0xc(%rsp), %r15 movq %r15, %rcx callq 0x4c9f99 movl (%r15), %ecx movl %ecx, 0x1358(%rbx) testq %r14, %r14 je 0x4bb359 movl %ecx, (%r14) cmpl $0x1a5, %ecx # imm = 0x1A5 jne 0x4bb385 leaq 0x1ebdb8(%rip), %rsi # 0x6a7120 movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq 0x18(%rbx), %rax movl $0x0, 0x518(%rax) movl $0x1c, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_state_size
static CURLcode ftp_state_size(struct Curl_easy *data, struct connectdata *conn) { CURLcode result = CURLE_OK; struct FTP *ftp = data->req.p.ftp; struct ftp_conn *ftpc = &conn->proto.ftpc; if((ftp->transfer == PPTRANSFER_INFO) && ftpc->file) { /* if a "head"-like request is being made (on a file) */ /* we know ftpc->file is a valid pointer to a file name */ result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file); if(!result) state(data, FTP_SIZE); } else result = ftp_state_rest(data, conn); return result; }
pushq %rbx movq %rdi, %rbx movq 0x198(%rdi), %rax cmpl $0x1, 0x10(%rax) jne 0x4bd6d9 movq 0x4d8(%rsi), %rcx testq %rcx, %rcx je 0x4bd6d9 addq $0x448, %rsi # imm = 0x448 leaq 0x1e9c74(%rip), %rdx # 0x6a732d movq %rbx, %rdi xorl %eax, %eax callq 0x4c9f19 testl %eax, %eax jne 0x4bd6d7 movq 0x18(%rbx), %rax movl $0x17, 0x518(%rax) xorl %eax, %eax popq %rbx retq movq %rbx, %rdi popq %rbx jmp 0x4bd6df
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_state_prepare_transfer
static CURLcode ftp_state_prepare_transfer(struct Curl_easy *data) { CURLcode result = CURLE_OK; struct FTP *ftp = data->req.p.ftp; struct connectdata *conn = data->conn; if(ftp->transfer != PPTRANSFER_BODY) { /* doesn't transfer any data */ /* still possibly do PRE QUOTE jobs */ state(data, FTP_RETR_PREQUOTE); result = ftp_state_quote(data, TRUE, FTP_RETR_PREQUOTE); } else if(data->set.ftp_use_port) { /* We have chosen to use the PORT (or similar) command */ result = ftp_state_use_port(data, EPRT); } else { /* We have chosen (this is default) to use the PASV (or similar) command */ if(data->set.ftp_use_pret) { /* The user has requested that we send a PRET command to prepare the server for the upcoming PASV */ struct ftp_conn *ftpc = &conn->proto.ftpc; if(!conn->proto.ftpc.file) result = Curl_pp_sendf(data, &ftpc->pp, "PRET %s", data->set.str[STRING_CUSTOMREQUEST]? data->set.str[STRING_CUSTOMREQUEST]: (data->state.list_only?"NLST":"LIST")); else if(data->set.upload) result = Curl_pp_sendf(data, &ftpc->pp, "PRET STOR %s", conn->proto.ftpc.file); else result = Curl_pp_sendf(data, &ftpc->pp, "PRET RETR %s", conn->proto.ftpc.file); if(!result) state(data, FTP_PRET); } else result = ftp_state_use_pasv(data, conn); } return result; }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rsi movq 0x198(%rdi), %rax cmpl $0x0, 0x10(%rax) je 0x4bd762 movl $0xd, 0x518(%rsi) movq %rbx, %rdi movl $0x1, %esi movl $0xd, %edx popq %rbx jmp 0x4bbe89 movq 0xa92(%rbx), %rax btl $0xa, %eax jb 0x4bd77e btl $0xd, %eax jb 0x4bd786 movq %rbx, %rdi popq %rbx jmp 0x4bc7ce movq %rbx, %rdi xorl %esi, %esi popq %rbx jmp 0x4bd7fd movq 0x4d8(%rsi), %rcx addq $0x448, %rsi # imm = 0x448 testq %rcx, %rcx je 0x4bd7a8 btl $0x1a, %eax jb 0x4bd7d6 leaq 0x1e9cb3(%rip), %rdx # 0x6a7459 jmp 0x4bd7dd movq 0x760(%rbx), %rcx testq %rcx, %rcx jne 0x4bd7cd testb $0x1, 0x1302(%rbx) leaq 0x1bb78b(%rip), %rax # 0x678f4d leaq 0x1e9c7e(%rip), %rcx # 0x6a7447 cmoveq %rax, %rcx leaq 0x1e9c6b(%rip), %rdx # 0x6a743f jmp 0x4bd7dd leaq 0x1e9c6f(%rip), %rdx # 0x6a744c movq %rbx, %rdi xorl %eax, %eax callq 0x4c9f19 testl %eax, %eax jne 0x4bd7fb movq 0x18(%rbx), %rax movl $0x1d, 0x518(%rax) xorl %eax, %eax popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_epsv_disable
static CURLcode ftp_epsv_disable(struct Curl_easy *data, struct connectdata *conn) { CURLcode result = CURLE_OK; if(conn->bits.ipv6 #ifndef CURL_DISABLE_PROXY && !(conn->bits.tunnel_proxy || conn->bits.socksproxy) #endif ) { /* We can't disable EPSV when doing IPv6, so this is instead a fail */ failf(data, "Failed EPSV attempt, exiting"); return CURLE_WEIRD_SERVER_REPLY; } infof(data, "Failed EPSV attempt. Disabling EPSV"); /* disable it for next transfer */ conn->bits.ftp_use_epsv = FALSE; data->state.errorbuf = FALSE; /* allow error message to get rewritten */ result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "PASV"); if(!result) { conn->proto.ftpc.count1++; /* remain in/go to the FTP_PASV state */ state(data, FTP_PASV); } return result; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x100a, %eax # imm = 0x100A andl 0x374(%rsi), %eax cmpl $0x1000, %eax # imm = 0x1000 jne 0x4bdfc2 leaq 0x1e9868(%rip), %rsi # 0x6a7819 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x8, %eax jmp 0x4be01f movq %rsi, %r14 leaq 0x1e986a(%rip), %rsi # 0x6a7836 movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 andb $-0x5, 0x376(%r14) andb $-0x9, 0x1300(%rbx) leaq 0x448(%r14), %rsi leaq 0x1e8e0f(%rip), %rdx # 0x6a6e02 leaq 0x1e9860(%rip), %rcx # 0x6a785a movq %rbx, %rdi xorl %eax, %eax callq 0x4c9f19 testl %eax, %eax jne 0x4be01f incl 0x50c(%r14) movq 0x18(%rbx), %rax movl $0x1e, 0x518(%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_dophase_done
static CURLcode ftp_dophase_done(struct Curl_easy *data, bool connected) { struct connectdata *conn = data->conn; struct FTP *ftp = data->req.p.ftp; struct ftp_conn *ftpc = &conn->proto.ftpc; if(connected) { int completed; CURLcode result = ftp_do_more(data, &completed); if(result) { close_secondarysocket(data, conn); return result; } } if(ftp->transfer != PPTRANSFER_BODY) /* no data to transfer */ Curl_setup_transfer(data, -1, -1, FALSE, -1); else if(!connected) /* since we didn't connect now, we want do_more to get called */ conn->bits.do_more = TRUE; ftpc->ctl_valid = TRUE; /* seems good */ return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x18(%rdi), %rbx movq 0x198(%rdi), %r15 testl %esi, %esi je 0x4be083 leaq 0x4(%rsp), %rsi movq %r14, %rdi callq 0x4bab9c testl %eax, %eax je 0x4be093 movl %eax, %ebp movl 0x1e4(%rbx), %edx cmpl $-0x1, %edx je 0x4be073 movq %r14, %rdi movq %rbx, %rsi callq 0x4b5897 movl $0xffffffff, 0x1e4(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax movb %al, 0x371(%rbx) movb %al, 0x373(%rbx) jmp 0x4be0bf cmpl $0x0, 0x10(%r15) jne 0x4be09a orb $0x20, 0x375(%rbx) jmp 0x4be0b6 cmpl $0x0, 0x10(%r15) je 0x4be0b6 movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq $-0x1, %rdx xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x4aa233 movb $0x1, 0x4ed(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftp.c
ftp_pl_get_permission
static int ftp_pl_get_permission(const char *str) { int permissions = 0; /* USER */ if(str[0] == 'r') permissions |= 1 << 8; else if(str[0] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[1] == 'w') permissions |= 1 << 7; else if(str[1] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[2] == 'x') permissions |= 1 << 6; else if(str[2] == 's') { permissions |= 1 << 6; permissions |= 1 << 11; } else if(str[2] == 'S') permissions |= 1 << 11; else if(str[2] != '-') permissions |= FTP_LP_MALFORMATED_PERM; /* GROUP */ if(str[3] == 'r') permissions |= 1 << 5; else if(str[3] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[4] == 'w') permissions |= 1 << 4; else if(str[4] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[5] == 'x') permissions |= 1 << 3; else if(str[5] == 's') { permissions |= 1 << 3; permissions |= 1 << 10; } else if(str[5] == 'S') permissions |= 1 << 10; else if(str[5] != '-') permissions |= FTP_LP_MALFORMATED_PERM; /* others */ if(str[6] == 'r') permissions |= 1 << 2; else if(str[6] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[7] == 'w') permissions |= 1 << 1; else if(str[7] != '-') permissions |= FTP_LP_MALFORMATED_PERM; if(str[8] == 'x') permissions |= 1; else if(str[8] == 't') { permissions |= 1; permissions |= 1 << 9; } else if(str[8] == 'T') permissions |= 1 << 9; else if(str[8] != '-') permissions |= FTP_LP_MALFORMATED_PERM; return permissions; }
movb (%rdi), %al xorl %ecx, %ecx cmpb $0x2d, %al setne %cl shll $0x18, %ecx cmpb $0x72, %al movl $0x100, %eax # imm = 0x100 cmovnel %ecx, %eax movzbl 0x1(%rdi), %ecx cmpl $0x2d, %ecx je 0x4bf632 cmpl $0x77, %ecx jne 0x4bf62d orl $0x80, %eax jmp 0x4bf632 orl $0x1000000, %eax # imm = 0x1000000 movzbl 0x2(%rdi), %ecx cmpl $0x72, %ecx jg 0x4bf64c cmpl $0x2d, %ecx je 0x4bf667 cmpl $0x53, %ecx jne 0x4bf65b orl $0x800, %eax # imm = 0x800 jmp 0x4bf667 cmpl $0x73, %ecx je 0x4bf662 cmpl $0x78, %ecx jne 0x4bf65b orl $0x40, %eax jmp 0x4bf667 orl $0x1000000, %eax # imm = 0x1000000 jmp 0x4bf667 orl $0x840, %eax # imm = 0x840 movzbl 0x3(%rdi), %ecx cmpl $0x2d, %ecx je 0x4bf67f cmpl $0x72, %ecx jne 0x4bf67a orl $0x20, %eax jmp 0x4bf67f orl $0x1000000, %eax # imm = 0x1000000 movzbl 0x4(%rdi), %ecx cmpl $0x2d, %ecx je 0x4bf697 cmpl $0x77, %ecx jne 0x4bf692 orl $0x10, %eax jmp 0x4bf697 orl $0x1000000, %eax # imm = 0x1000000 movzbl 0x5(%rdi), %ecx cmpl $0x72, %ecx jg 0x4bf6b1 cmpl $0x2d, %ecx je 0x4bf6cc cmpl $0x53, %ecx jne 0x4bf6c0 orl $0x400, %eax # imm = 0x400 jmp 0x4bf6cc cmpl $0x73, %ecx je 0x4bf6c7 cmpl $0x78, %ecx jne 0x4bf6c0 orl $0x8, %eax jmp 0x4bf6cc orl $0x1000000, %eax # imm = 0x1000000 jmp 0x4bf6cc orl $0x408, %eax # imm = 0x408 movzbl 0x6(%rdi), %ecx cmpl $0x2d, %ecx je 0x4bf6e4 cmpl $0x72, %ecx jne 0x4bf6df orl $0x4, %eax jmp 0x4bf6e4 orl $0x1000000, %eax # imm = 0x1000000 movzbl 0x7(%rdi), %ecx cmpl $0x2d, %ecx je 0x4bf6fc cmpl $0x77, %ecx jne 0x4bf6f7 orl $0x2, %eax jmp 0x4bf6fc orl $0x1000000, %eax # imm = 0x1000000 movzbl 0x8(%rdi), %ecx cmpl $0x73, %ecx jg 0x4bf715 cmpl $0x2d, %ecx je 0x4bf728 cmpl $0x54, %ecx jne 0x4bf723 orl $0x200, %eax # imm = 0x200 retq cmpl $0x74, %ecx je 0x4bf729 cmpl $0x78, %ecx jne 0x4bf723 orl $0x1, %eax retq orl $0x1000000, %eax # imm = 0x1000000 retq orl $0x201, %eax # imm = 0x201 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/ftplistparser.c
Curl_hash_pick
void * Curl_hash_pick(struct Curl_hash *h, void *key, size_t key_len) { struct Curl_llist_element *le; struct Curl_llist *l; DEBUGASSERT(h); if(h->table) { DEBUGASSERT(h->slots); l = FETCH_LIST(h, key, key_len); for(le = l->head; le; le = le->next) { struct Curl_hash_element *he = le->ptr; if(h->comp_func(he->key, he->key_len, key, key_len)) { return he->ptr; } } } return NULL; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq (%rdi), %r12 testq %r12, %r12 je 0x4c00b0 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movslq 0x20(%rdi), %rdx movq %rsi, %rdi movq %rbx, %rsi callq *0x8(%r15) shlq $0x5, %rax movq (%r12,%rax), %r13 testq %r13, %r13 je 0x4c00b0 xorl %r12d, %r12d movq (%r13), %rbp leaq 0x28(%rbp), %rdi movq 0x20(%rbp), %rsi movq %r14, %rdx movq %rbx, %rcx callq *0x10(%r15) testq %rax, %rax jne 0x4c00b5 movq 0x10(%r13), %r13 testq %r13, %r13 jne 0x4c008a jmp 0x4c00b9 xorl %r12d, %r12d jmp 0x4c00b9 movq 0x18(%rbp), %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hash.c
Curl_hash_destroy
void Curl_hash_destroy(struct Curl_hash *h) { if(h->table) { int i; for(i = 0; i < h->slots; ++i) { Curl_llist_destroy(&h->table[i], (void *) h); } Curl_safefree(h->table); } h->size = 0; h->slots = 0; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x4c0118 cmpl $0x0, 0x20(%rbx) jle 0x4c0108 xorl %r14d, %r14d xorl %r15d, %r15d movq (%rbx), %rdi addq %r14, %rdi movq %rbx, %rsi callq 0x4c9024 incq %r15 movslq 0x20(%rbx), %rax addq $0x20, %r14 cmpq %rax, %r15 jl 0x4c00e7 movq (%rbx), %rdi leaq 0x3a0581(%rip), %rax # 0x860690 callq *(%rax) movq $0x0, (%rbx) movq $0x0, 0x28(%rbx) movl $0x0, 0x20(%rbx) popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hash.c
curl_easy_nextheader
struct curl_header *curl_easy_nextheader(CURL *easy, unsigned int type, int request, struct curl_header *prev) { struct Curl_easy *data = easy; struct Curl_llist_element *pick; struct Curl_llist_element *e; struct Curl_header_store *hs; struct curl_header *hout; size_t amount = 0; size_t index = 0; if(request > data->state.requests) return NULL; if(request == -1) request = data->state.requests; if(prev) { pick = prev->anchor; if(!pick) /* something is wrong */ return NULL; pick = pick->next; } else pick = data->state.httphdrs.head; if(pick) { /* make sure it is the next header of the desired type */ do { hs = pick->ptr; if((hs->type & type) && (hs->request == request)) break; pick = pick->next; } while(pick); } if(!pick) /* no more headers available */ return NULL; hs = pick->ptr; /* count number of occurrences of this name within the mask and figure out the index for the currently selected entry */ for(e = data->state.httphdrs.head; e; e = e->next) { struct Curl_header_store *check = e->ptr; if(strcasecompare(hs->name, check->name) && (check->request == request) && (check->type & type)) amount++; if(e == pick) index = amount - 1; } copy_header_external(data, hs, index, amount, pick, &hout); return hout; }
movl 0xd40(%rdi), %r8d cmpl %edx, %r8d jge 0x4c04a5 xorl %eax, %eax retq cmpl $-0x1, %edx cmovnel %edx, %r8d testq %rcx, %rcx je 0x4c04c0 movq 0x28(%rcx), %rax testq %rax, %rax je 0x4c04a2 addq $0x10, %rax jmp 0x4c04c7 leaq 0x1230(%rdi), %rax pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq (%rax), %r14 xorl %eax, %eax testq %r14, %r14 je 0x4c05a6 movq (%r14), %r12 movzbl 0x2c(%r12), %ecx testl %esi, %ecx je 0x4c04f7 cmpl %r8d, 0x28(%r12) je 0x4c04fd movq 0x10(%r14), %r14 jmp 0x4c04da movq %rdi, 0x10(%rsp) movq 0x1230(%rdi), %rbx testq %rbx, %rbx je 0x4c0566 movl %r8d, 0xc(%rsp) movl %esi, 0x8(%rsp) xorl %r13d, %r13d xorl %r15d, %r15d movq (%rbx), %rbp movq 0x18(%r12), %rdi movq 0x18(%rbp), %rsi callq 0x4a7dca testl %eax, %eax je 0x4c054a movl 0xc(%rsp), %eax cmpl %eax, 0x28(%rbp) jne 0x4c054a movzbl 0x2c(%rbp), %eax andl 0x8(%rsp), %eax cmpl $0x1, %eax sbbq $-0x1, %r15 leaq -0x1(%r15), %rax cmpq %r14, %rbx cmoveq %rax, %r13 movq 0x10(%rbx), %rbx testq %rbx, %rbx jne 0x4c051d movzbl 0x2c(%r12), %ecx jmp 0x4c056c xorl %r15d, %r15d xorl %r13d, %r13d movq 0x10(%rsp), %rdx leaq 0x1250(%rdx), %rax movups 0x18(%r12), %xmm0 movups %xmm0, 0x1250(%rdx) movq %r15, 0x1260(%rdx) movq %r13, 0x1268(%rdx) orl $0x8000000, %ecx # imm = 0x8000000 movl %ecx, 0x1270(%rdx) movq %r14, 0x1278(%rdx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/headers.c
Curl_headers_push
CURLcode Curl_headers_push(struct Curl_easy *data, const char *header, unsigned char type) { char *value = NULL; char *name = NULL; char *end; size_t hlen; /* length of the incoming header */ struct Curl_header_store *hs; CURLcode result = CURLE_OUT_OF_MEMORY; if((header[0] == '\r') || (header[0] == '\n')) /* ignore the body separator */ return CURLE_OK; end = strchr(header, '\r'); if(!end) { end = strchr(header, '\n'); if(!end) return CURLE_BAD_FUNCTION_ARGUMENT; } hlen = end - header + 1; if((header[0] == ' ') || (header[0] == '\t')) { if(data->state.prevhead) /* line folding, append value to the previous header's value */ return unfold_value(data, header, hlen); else /* can't unfold without a previous header */ return CURLE_BAD_FUNCTION_ARGUMENT; } hs = calloc(1, sizeof(*hs) + hlen); if(!hs) return CURLE_OUT_OF_MEMORY; memcpy(hs->buffer, header, hlen); hs->buffer[hlen] = 0; /* nul terminate */ result = namevalue(hs->buffer, hlen, type, &name, &value); if(result) goto fail; hs->name = name; hs->value = value; hs->type = type; hs->request = data->state.requests; /* insert this node into the list of headers */ Curl_llist_insert_next(&data->state.httphdrs, data->state.httphdrs.tail, hs, &hs->node); data->state.prevhead = hs; return CURLE_OK; fail: free(hs); return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movzbl (%rsi), %r13d xorl %r14d, %r14d cmpl $0xa, %r13d je 0x4c07c5 cmpl $0xd, %r13d je 0x4c07c5 movq %rsi, %r15 movq %rdi, %rbx movl %edx, 0x10(%rsp) movq %rsi, %rdi movl $0xd, %esi callq 0x40250 testq %rax, %rax jne 0x4c0610 movq %r15, %rdi movl $0xa, %esi callq 0x40250 testq %rax, %rax je 0x4c07bf movq %rax, %rbp movq %rbx, (%rsp) movq %rax, %r12 subq %r15, %r12 leaq 0x1(%r12), %rbx cmpl $0x20, %r13d je 0x4c0632 cmpl $0x9, %r13d jne 0x4c0739 movq (%rsp), %rax movq 0x1280(%rax), %r14 testq %r14, %r14 je 0x4c07bf movq %rbx, 0x8(%rsp) movq 0x20(%r14), %rbx movq %rbx, %rdi callq 0x3fd60 movq %r14, %rdx subq %r14, %rbx addq $-0x2d, %rbx cmpq $0x0, 0x8(%rsp) movq %rbx, 0x10(%rsp) je 0x4c069a notq %rbp addq %r15, %rbp addq %r15, %r12 movzbl (%r12), %ecx cmpl $0x9, %ecx je 0x4c0692 cmpl $0x20, %ecx je 0x4c0692 addb $-0xa, %cl cmpb $0x3, %cl ja 0x4c083a decq %r12 incq %rbp jne 0x4c0677 movq %rax, %rbx xorl %ebp, %ebp movq (%rsp), %rax leaq 0x1230(%rax), %rdi xorl %r14d, %r14d movq %rdi, 0x8(%rsp) movq %rdx, %r13 movq %rdx, %rsi xorl %edx, %edx callq 0x4c8fbf movq 0x10(%rsp), %r12 leaq (%rbx,%r12), %rax leaq (%rax,%rbp), %rsi addq $0x32, %rsi movq %r13, %rdi callq 0x4a7fa8 testq %rax, %rax je 0x4c07ab movq %rax, %r13 addq $0x2d, %rax movq %rax, 0x18(%r13) leaq (%r12,%r13), %rdi addq $0x2d, %rdi movq %rdi, 0x20(%r13) addq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x3f250 movq 0x20(%r13), %rax addq %rbx, %rax movb $0x0, (%rbp,%rax) movq (%rsp), %rbx movq 0x1238(%rbx), %rsi movq 0x8(%rsp), %rdi movq %r13, %rdx movq %r13, %rcx callq 0x4c8f63 movq %r13, 0x1280(%rbx) jmp 0x4c07c5 leaq 0x39ff68(%rip), %rax # 0x8606a8 leaq 0x31(%r12), %rsi movl $0x1, %edi callq *(%rax) testq %rax, %rax je 0x4c07ab movq %rax, %rbp leaq 0x2d(%rax), %r13 movq %r13, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x3f250 movb $0x0, 0x2d(%rbp,%rbx) movq %r13, %rax movl 0x10(%rsp), %edx cmpb $0x10, %dl jne 0x4c0785 cmpb $0x3a, (%r13) jne 0x4c07b3 movq %rbp, %rax addq $0x2e, %rax incq %rax movzbl -0x1(%rax), %ecx testl %ecx, %ecx je 0x4c07b3 cmpl $0x3a, %ecx jne 0x4c0785 movb $0x0, -0x1(%rax) movzbl (%rax), %ecx cmpl $0x20, %ecx je 0x4c07a6 cmpl $0x9, %ecx jne 0x4c07d7 incq %rax jmp 0x4c0799 movl $0x1b, %r14d jmp 0x4c07c5 leaq 0x39fed6(%rip), %rax # 0x860690 movq %rbp, %rdi callq *(%rax) movl $0x2b, %r14d movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %r13, %r12 cmpq %rax, %r12 jbe 0x4c0800 movzbl (%r12), %ecx cmpl $0x9, %ecx je 0x4c07f6 cmpl $0x20, %ecx je 0x4c07f6 addb $-0xa, %cl cmpb $0x3, %cl ja 0x4c0800 movb $0x0, (%r12) decq %r12 jmp 0x4c07da movq %r13, 0x18(%rbp) movq %rax, 0x20(%rbp) movb %dl, 0x2c(%rbp) movq (%rsp), %rbx movl 0xd40(%rbx), %eax movl %eax, 0x28(%rbp) leaq 0x1230(%rbx), %rdi movq 0x1238(%rbx), %rsi movq %rbp, %rdx movq %rbp, %rcx callq 0x4c8f63 movq %rbp, 0x1280(%rbx) jmp 0x4c07c5 negq %rbp cmpq $0x2, %rbp jb 0x4c087f cmpb $0x20, %r13b je 0x4c0852 movzbl %r13b, %ecx cmpl $0x9, %ecx jne 0x4c088c movzbl 0x1(%r15), %r13d cmpl $0x20, %r13d je 0x4c0863 cmpl $0x9, %r13d jne 0x4c088c incq %r15 decq %rbp cmpq $0x1, %rbp ja 0x4c0843 movq %rax, %rbx movl $0x1, %ebp movq %r12, %r15 jmp 0x4c069f movq %rax, %rbx movl $0x1, %ebp jmp 0x4c069f movq %rax, %rbx jmp 0x4c069f
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/headers.c
Curl_printable_address
void Curl_printable_address(const struct Curl_addrinfo *ai, char *buf, size_t bufsize) { DEBUGASSERT(bufsize); buf[0] = 0; switch(ai->ai_family) { case AF_INET: { const struct sockaddr_in *sa4 = (const void *)ai->ai_addr; const struct in_addr *ipaddr4 = &sa4->sin_addr; (void)Curl_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize); break; } #ifdef ENABLE_IPV6 case AF_INET6: { const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr; const struct in6_addr *ipaddr6 = &sa6->sin6_addr; (void)Curl_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize); break; } #endif default: break; } }
movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rax movb $0x0, (%rsi) movl 0x4(%rdi), %edi cmpl $0x2, %edi je 0x4c0908 cmpl $0xa, %edi jne 0x4c0916 movl $0x8, %esi jmp 0x4c090d movl $0x4, %esi addq 0x20(%rax), %rsi jmp 0x3f6f0 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hostip.c
Curl_hostcache_prune
void Curl_hostcache_prune(struct Curl_easy *data) { time_t now; if((data->set.dns_cache_timeout == -1) || !data->dns.hostcache) /* cache forever means never prune, and NULL hostcache means we can't do it */ return; if(data->share) Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); time(&now); /* Remove outdated and unused entries from the hostcache */ hostcache_prune(data->dns.hostcache, data->set.dns_cache_timeout, now); if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); }
cmpl $-0x1, 0x6c8(%rdi) je 0x4c09a6 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpq $0x0, 0xa8(%rdi) je 0x4c099f cmpq $0x0, 0xc8(%rbx) je 0x4c0954 movq %rbx, %rdi movl $0x3, %esi movl $0x2, %edx callq 0x4a674d movq %rsp, %r14 movq %r14, %rdi callq 0x40a80 movq 0xa8(%rbx), %rdi movslq 0x6c8(%rbx), %rax movq (%r14), %rcx leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movq %rcx, 0x8(%rsi) leaq 0x11e2(%rip), %rdx # 0x4c1b65 callq 0x4c0136 cmpq $0x0, 0xc8(%rbx) je 0x4c099f movq %rbx, %rdi movl $0x3, %esi callq 0x4a677f addq $0x18, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hostip.c
fetch_addr
static struct Curl_dns_entry *fetch_addr(struct Curl_easy *data, const char *hostname, int port) { struct Curl_dns_entry *dns = NULL; size_t entry_len; char entry_id[MAX_HOSTCACHE_LEN]; /* Create an entry id, based upon the hostname and port */ create_hostcache_id(hostname, port, entry_id, sizeof(entry_id)); entry_len = strlen(entry_id); /* See if its already in our dns cache */ dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1); /* No entry found in cache, check if we might have a wildcard entry */ if(!dns && data->state.wildcard_resolve) { create_hostcache_id("*", port, entry_id, sizeof(entry_id)); entry_len = strlen(entry_id); /* See if it's already in our dns cache */ dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1); } if(dns && (data->set.dns_cache_timeout != -1)) { /* See whether the returned entry is stale. Done before we release lock */ struct hostcache_prune_data user; time(&user.now); user.cache_timeout = data->set.dns_cache_timeout; if(hostcache_timestamp_remove(&user, dns)) { infof(data, "Hostname in DNS cache was stale, zapped"); dns = NULL; /* the memory deallocation is being handled by the hash */ Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1); } } /* See if the returned entry matches the required resolve mode */ if(dns && data->conn->ip_version != CURL_IPRESOLVE_WHATEVER) { int pf = PF_INET; bool found = false; struct Curl_addrinfo *addr = dns->addr; #ifdef PF_INET6 if(data->conn->ip_version == CURL_IPRESOLVE_V6) pf = PF_INET6; #endif while(addr) { if(addr->ai_family == pf) { found = true; break; } addr = addr->ai_next; } if(!found) { infof(data, "Hostname in DNS cache doesn't have needed family, zapped"); dns = NULL; /* the memory deallocation is being handled by the hash */ Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1); } } return dns; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 movl %edx, %ebp movq %rdi, %rbx leaq 0x10(%rsp), %r14 movq %rsi, %rdi movl %edx, %esi movq %r14, %rdx callq 0x4c0d7b movq %r14, %rdi callq 0x3fd60 movq %rax, %r15 movq 0xa8(%rbx), %rdi leaq 0x1(%rax), %rdx movq %r14, %rsi callq 0x4c0050 testq %rax, %rax je 0x4c0ad8 movq %rax, %r14 cmpl $-0x1, 0x6c8(%rbx) je 0x4c0a93 leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x40a80 movslq 0x6c8(%rbx), %rax movq %rax, -0x8(%r12) movq 0x8(%r14), %rcx testq %rcx, %rcx je 0x4c0a93 movq 0x8(%rsp), %rdx subq %rcx, %rdx cmpq %rax, %rdx jge 0x4c0b23 movq 0x18(%rbx), %rax movb 0x57e(%rax), %al testb %al, %al je 0x4c0b4e xorl %ecx, %ecx cmpb $0x2, %al sete %dl movq (%r14), %rax testq %rax, %rax je 0x4c0acf movb %dl, %cl leal 0x2(,%rcx,8), %ecx cmpl %ecx, 0x4(%rax) je 0x4c0b4e movq 0x28(%rax), %rax testq %rax, %rax jne 0x4c0abd leaq 0x1e7632(%rip), %rsi # 0x6a8108 jmp 0x4c0b2a testb $0x8, 0x1302(%rbx) je 0x4c0b1e leaq 0x1c5524(%rip), %rdi # 0x68600c leaq 0x10(%rsp), %r14 movl %ebp, %esi movq %r14, %rdx callq 0x4c0d7b movq %r14, %rdi callq 0x3fd60 movq %rax, %r15 movq 0xa8(%rbx), %rdi leaq 0x1(%rax), %rdx movq %r14, %rsi callq 0x4c0050 testq %rax, %rax jne 0x4c0a54 xorl %r14d, %r14d jmp 0x4c0b4e leaq 0x1e75b6(%rip), %rsi # 0x6a80e0 xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq 0xa8(%rbx), %rdi incq %r15 leaq 0x10(%rsp), %rsi movq %r15, %rdx callq 0x4bffc6 movq %r14, %rax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hostip.c
create_hostcache_id
static void create_hostcache_id(const char *name, int port, char *ptr, size_t buflen) { size_t len = strlen(name); if(len > (buflen - 7)) len = buflen - 7; /* store and lower case the name */ while(len--) *ptr++ = Curl_raw_tolower(*name++); msnprintf(ptr, 7, ":%u", port); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movl %esi, %ebx movq %rdi, %r15 callq 0x3fd60 testq %rax, %rax je 0x4c0dbf movl $0xff, %r12d cmpq %r12, %rax cmovbq %rax, %r12 xorl %r13d, %r13d movsbl (%r15,%r13), %edi callq 0x4a7dbb movb %al, (%r14,%r13) incq %r13 cmpq %r13, %r12 jne 0x4c0da6 addq %r13, %r14 leaq 0x1e7392(%rip), %rdx # 0x6a8158 movl $0x7, %esi movq %r14, %rdi movl %ebx, %ecx xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x49bfb4
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hostip.c
Curl_resolv_check
CURLcode Curl_resolv_check(struct Curl_easy *data, struct Curl_dns_entry **dns) { #if defined(CURL_DISABLE_DOH) && !defined(CURLRES_ASYNCH) (void)data; (void)dns; #endif #ifndef CURL_DISABLE_DOH if(data->conn->bits.doh) return Curl_doh_is_resolved(data, dns); #endif return Curl_resolver_is_resolved(data, dns); }
movq 0x18(%rdi), %rax testb $0x8, 0x377(%rax) jne 0x4d268e movl $0x6, %eax retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/hostip.c
http_setup_conn
static CURLcode http_setup_conn(struct Curl_easy *data, struct connectdata *conn) { /* allocate the HTTP-specific struct for the Curl_easy, only to survive during this request */ struct HTTP *http; DEBUGASSERT(data->req.p.http == NULL); http = calloc(1, sizeof(struct HTTP)); if(!http) return CURLE_OUT_OF_MEMORY; Curl_mime_initpart(&http->form, data); data->req.p.http = http; if(data->state.httpwant == CURL_HTTP_VERSION_3) { if(conn->handler->flags & PROTOPT_SSL) /* Only go HTTP/3 directly on HTTPS URLs. It needs a UDP socket and does the QUIC dance. */ conn->transport = TRNSPRT_QUIC; else { failf(data, "HTTP/3 requested for non-HTTPS URL"); return CURLE_URL_MALFORMAT; } } else { if(!CONN_INUSE(conn)) /* if not already multi-using, setup connection details */ Curl_http2_setup_conn(conn); Curl_http2_setup_req(data); } return CURLE_OK; }
pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx leaq 0x39e9f2(%rip), %rax # 0x8606a8 movl $0x1, %edi movl $0x2e8, %esi # imm = 0x2E8 callq *(%rax) testq %rax, %rax je 0x4c1d11 movq %rax, %r15 movq %rax, %rdi addq $0x20, %rdi movq %rbx, %rsi callq 0x498c6f movq %r15, 0x198(%rbx) cmpb $0x1e, 0x1148(%rbx) jne 0x4c1d18 movq 0x398(%r14), %rax testb $0x1, 0x8c(%rax) jne 0x4c1d34 leaq 0x1e6e4e(%rip), %rsi # 0x6a8b4e movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x3, %eax jmp 0x4c1d3e movl $0x1b, %eax jmp 0x4c1d3e cmpq $0x0, 0x3d8(%r14) jne 0x4c1d2a movq %r14, %rdi callq 0x49632e movq %rbx, %rdi callq 0x4962e2 jmp 0x4c1d3c movb $0x5, 0x57d(%r14) xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http
CURLcode Curl_http(struct Curl_easy *data, bool *done) { struct connectdata *conn = data->conn; CURLcode result = CURLE_OK; struct HTTP *http; Curl_HttpReq httpreq; const char *te = ""; /* transfer-encoding */ const char *request; const char *httpstring; struct dynbuf req; char *altused = NULL; const char *p_accept; /* Accept: string */ /* Always consider the DO phase done after this function call, even if there may be parts of the request that are not yet sent, since we can deal with the rest of the request in the PERFORM phase. */ *done = TRUE; if(conn->transport != TRNSPRT_QUIC) { if(conn->httpversion < 20) { /* unless the connection is re-used and already http2 */ switch(conn->alpn) { case CURL_HTTP_VERSION_2: conn->httpversion = 20; /* we know we're on HTTP/2 now */ result = Curl_http2_switched(data, NULL, 0); if(result) return result; break; case CURL_HTTP_VERSION_1_1: /* continue with HTTP/1.1 when explicitly requested */ break; default: /* Check if user wants to use HTTP/2 with clear TCP*/ #ifdef USE_NGHTTP2 if(data->state.httpwant == CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) { #ifndef CURL_DISABLE_PROXY if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) { /* We don't support HTTP/2 proxies yet. Also it's debatable whether or not this setting should apply to HTTP/2 proxies. */ infof(data, "Ignoring HTTP/2 prior knowledge due to proxy"); break; } #endif DEBUGF(infof(data, "HTTP/2 over clean TCP")); conn->httpversion = 20; result = Curl_http2_switched(data, NULL, 0); if(result) return result; } #endif break; } } else { /* prepare for a http2 request */ result = Curl_http2_setup(data, conn); if(result) return result; } } http = data->req.p.http; DEBUGASSERT(http); result = Curl_http_host(data, conn); if(result) return result; result = Curl_http_useragent(data); if(result) return result; Curl_http_method(data, conn, &request, &httpreq); /* setup the authentication headers */ { char *pq = NULL; if(data->state.up.query) { pq = aprintf("%s?%s", data->state.up.path, data->state.up.query); if(!pq) return CURLE_OUT_OF_MEMORY; } result = Curl_http_output_auth(data, conn, request, httpreq, (pq ? pq : data->state.up.path), FALSE); free(pq); if(result) return result; } Curl_safefree(data->state.aptr.ref); if(data->state.referer && !Curl_checkheaders(data, STRCONST("Referer"))) { data->state.aptr.ref = aprintf("Referer: %s\r\n", data->state.referer); if(!data->state.aptr.ref) return CURLE_OUT_OF_MEMORY; } if(!Curl_checkheaders(data, STRCONST("Accept-Encoding")) && data->set.str[STRING_ENCODING]) { Curl_safefree(data->state.aptr.accept_encoding); data->state.aptr.accept_encoding = aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]); if(!data->state.aptr.accept_encoding) return CURLE_OUT_OF_MEMORY; } else Curl_safefree(data->state.aptr.accept_encoding); #ifdef HAVE_LIBZ /* we only consider transfer-encoding magic if libz support is built-in */ result = Curl_transferencode(data); if(result) return result; #endif result = Curl_http_body(data, conn, httpreq, &te); if(result) return result; p_accept = Curl_checkheaders(data, STRCONST("Accept"))?NULL:"Accept: */*\r\n"; result = Curl_http_resume(data, conn, httpreq); if(result) return result; result = Curl_http_range(data, httpreq); if(result) return result; httpstring = get_http_string(data, conn); /* initialize a dynamic send-buffer */ Curl_dyn_init(&req, DYN_HTTP_REQUEST); /* make sure the header buffer is reset - if there are leftovers from a previous transfer */ Curl_dyn_reset(&data->state.headerb); /* add the main request stuff */ /* GET/HEAD/POST/PUT */ result = Curl_dyn_addf(&req, "%s ", request); if(!result) result = Curl_http_target(data, conn, &req); if(result) { Curl_dyn_free(&req); return result; } #ifndef CURL_DISABLE_ALTSVC if(conn->bits.altused && !Curl_checkheaders(data, STRCONST("Alt-Used"))) { altused = aprintf("Alt-Used: %s:%d\r\n", conn->conn_to_host.name, conn->conn_to_port); if(!altused) { Curl_dyn_free(&req); return CURLE_OUT_OF_MEMORY; } } #endif result = Curl_dyn_addf(&req, " HTTP/%s\r\n" /* HTTP version */ "%s" /* host */ "%s" /* proxyuserpwd */ "%s" /* userpwd */ "%s" /* range */ "%s" /* user agent */ "%s" /* accept */ "%s" /* TE: */ "%s" /* accept-encoding */ "%s" /* referer */ "%s" /* Proxy-Connection */ "%s" /* transfer-encoding */ "%s",/* Alt-Used */ httpstring, (data->state.aptr.host?data->state.aptr.host:""), data->state.aptr.proxyuserpwd? data->state.aptr.proxyuserpwd:"", data->state.aptr.userpwd?data->state.aptr.userpwd:"", (data->state.use_range && data->state.aptr.rangeline)? data->state.aptr.rangeline:"", (data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT] && data->state.aptr.uagent)? data->state.aptr.uagent:"", p_accept?p_accept:"", data->state.aptr.te?data->state.aptr.te:"", (data->set.str[STRING_ENCODING] && *data->set.str[STRING_ENCODING] && data->state.aptr.accept_encoding)? data->state.aptr.accept_encoding:"", (data->state.referer && data->state.aptr.ref)? data->state.aptr.ref:"" /* Referer: <data> */, #ifndef CURL_DISABLE_PROXY (conn->bits.httpproxy && !conn->bits.tunnel_proxy && !Curl_checkheaders(data, STRCONST("Proxy-Connection")) && !Curl_checkProxyheaders(data, conn, STRCONST("Proxy-Connection")))? "Proxy-Connection: Keep-Alive\r\n":"", #else "", #endif te, altused ? altused : "" ); /* clear userpwd and proxyuserpwd to avoid re-using old credentials * from re-used connections */ Curl_safefree(data->state.aptr.userpwd); Curl_safefree(data->state.aptr.proxyuserpwd); free(altused); if(result) { Curl_dyn_free(&req); return result; } if(!(conn->handler->flags&PROTOPT_SSL) && conn->httpversion != 20 && (data->state.httpwant == CURL_HTTP_VERSION_2)) { /* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done over SSL */ result = Curl_http2_request_upgrade(&req, data); if(result) { Curl_dyn_free(&req); return result; } } result = Curl_http_cookies(data, conn, &req); if(!result && conn->handler->protocol&(CURLPROTO_WS|CURLPROTO_WSS)) result = Curl_ws_request(data, &req); if(!result) result = Curl_add_timecondition(data, &req); if(!result) result = Curl_add_custom_headers(data, FALSE, &req); if(!result) { http->postdata = NULL; /* nothing to post at this point */ if((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) Curl_pgrsSetUploadSize(data, 0); /* nothing */ /* bodysend takes ownership of the 'req' memory on success */ result = Curl_http_bodysend(data, conn, &req, httpreq); } if(result) { Curl_dyn_free(&req); return result; } if((http->postsize > -1) && (http->postsize <= data->req.writebytecount) && (http->sending != HTTPSEND_REQUEST)) data->req.upload_done = TRUE; if(data->req.writebytecount) { /* if a request-body has been sent off, we make sure this progress is noted properly */ Curl_pgrsSetUploadCounter(data, data->req.writebytecount); if(Curl_pgrsUpdate(data)) result = CURLE_ABORTED_BY_CALLBACK; if(!http->postsize) { /* already sent the entire request body, mark the "upload" as complete */ infof(data, "upload completely sent off: %" CURL_FORMAT_CURL_OFF_T " out of %" CURL_FORMAT_CURL_OFF_T " bytes", data->req.writebytecount, http->postsize); data->req.upload_done = TRUE; data->req.keepon &= ~KEEP_SEND; /* we're done writing */ data->req.exp100 = EXP100_SEND_DATA; /* already sent */ Curl_expire_done(data, EXPIRE_100_TIMEOUT); } } if((conn->httpversion == 20) && data->req.upload_chunky) /* upload_chunky was set above to set up the request in a chunky fashion, but is disabled here again to avoid that the chunked encoded version is actually used when sending the request body over h2 */ data->req.upload_chunky = FALSE; return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdi, %rbx movq 0x18(%rdi), %r14 leaq 0x1fd2e6(%rip), %rax # 0x6bf049 movq %rax, 0x48(%rsp) movb $0x1, (%rsi) cmpb $0x5, 0x57d(%r14) je 0x4c1de1 cmpb $0x13, 0x57f(%r14) ja 0x4c1da7 movzbl 0x57c(%r14), %eax cmpl $0x2, %eax je 0x4c1de1 cmpl $0x3, %eax jne 0x4c1db8 movb $0x14, 0x57f(%r14) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x496b9c jmp 0x4c1db2 movq %rbx, %rdi movq %r14, %rsi callq 0x496969 testl %eax, %eax jne 0x4c1df7 jmp 0x4c1de1 cmpb $0x5, 0x1148(%rbx) jne 0x4c1de1 movl 0x374(%r14), %eax andl $0x9, %eax cmpl $0x1, %eax jne 0x4c1d91 leaq 0x1e68c4(%rip), %rsi # 0x6a869b movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq 0x198(%rbx), %r12 movq %rbx, %rdi movq %r14, %rsi callq 0x4c3ddf testl %eax, %eax je 0x4c1e0f movl %eax, %r15d movl %r15d, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1e6554(%rip), %rsi # 0x6a836a movl $0xa, %edx movq %rbx, %rdi callq 0x4a820c testq %rax, %rax je 0x4c1e43 leaq 0x39e861(%rip), %rax # 0x860690 movq 0x1298(%rbx), %rdi callq *(%rax) movq $0x0, 0x1298(%rbx) leaq 0x80(%rsp), %rdx leaq 0x24(%rsp), %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x4c3d33 movq 0x11d0(%rbx), %r8 movq 0x11d8(%rbx), %rdx testq %rdx, %rdx je 0x4c1e95 leaq 0x1e6853(%rip), %rdi # 0x6a86c8 movq %r8, %rsi xorl %eax, %eax callq 0x49c12b movq %rax, %r13 movq %rax, %r8 testq %rax, %rax jne 0x4c1e98 movl $0x1b, %r15d jmp 0x4c1dfa xorl %r13d, %r13d movq %r12, 0x10(%rsp) movq 0x80(%rsp), %r12 movl 0x24(%rsp), %ebp movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movl %ebp, %ecx xorl %r9d, %r9d callq 0x4c2d0c movl %eax, %r15d leaq 0x39e7ca(%rip), %rax # 0x860690 movq %r13, %rdi movq %rax, %r13 callq *(%rax) testl %r15d, %r15d jne 0x4c1dfa movl %ebp, 0xc(%rsp) movq 0x12b8(%rbx), %rdi callq *(%r13) movq $0x0, 0x12b8(%rbx) cmpq $0x0, 0x11f0(%rbx) je 0x4c1f39 leaq 0x1e67cc(%rip), %rsi # 0x6a86ce movl $0x7, %edx movq %rbx, %rdi callq 0x4a820c testq %rax, %rax jne 0x4c1f39 movq 0x11f0(%rbx), %rsi leaq 0x1e67b4(%rip), %rdi # 0x6a86d6 xorl %eax, %eax callq 0x49c12b movq %rax, 0x12b8(%rbx) testq %rax, %rax je 0x4c1e8a leaq 0x1e67a4(%rip), %rsi # 0x6a86e4 movl $0xf, %edx movq %rbx, %rdi callq 0x4a820c testq %rax, %rax je 0x4c1ffe movq 0x12a0(%rbx), %rdi callq *(%r13) movq $0x0, 0x12a0(%rbx) movl 0xc(%rsp), %r13d movq %rbx, %rdi callq 0x4c5397 testl %eax, %eax jne 0x4c1df7 leaq 0x48(%rsp), %rcx movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x4c4257 testl %eax, %eax jne 0x4c1df7 leaq 0x1e6767(%rip), %rsi # 0x6a870a movl $0x6, %edx movq %rbx, %rdi callq 0x4a820c movq %rax, %rbp movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x4c5119 testl %eax, %eax jne 0x4c1df7 movq %rbx, %rdi movl %r13d, %esi callq 0x4c4fdd testl %eax, %eax jne 0x4c1df7 movq %rbp, 0x18(%rsp) cmpq $0x0, 0x4a8(%r14) je 0x4c2051 leaq 0x210215(%rip), %rbp # 0x6d2207 leaq 0x1fd050(%rip), %r13 # 0x6bf049 jmp 0x4c208b cmpq $0x0, 0x778(%rbx) je 0x4c1f56 movq 0x12a0(%rbx), %rdi callq *(%r13) movq $0x0, 0x12a0(%rbx) movq 0x778(%rbx), %rsi leaq 0x1e66c4(%rip), %rdi # 0x6a86f4 xorl %eax, %eax callq 0x49c12b movq %rax, 0x12a0(%rbx) testq %rax, %rax movl 0xc(%rsp), %r13d jne 0x4c1f71 jmp 0x4c1e8a leaq 0x1e637d(%rip), %rbp # 0x6a83d5 cmpb $0xa, 0x1149(%rbx) leaq 0x1fcfe3(%rip), %r13 # 0x6bf049 je 0x4c208b cmpb $0xa, 0x57f(%r14) je 0x4c208b cmpb $0x1, 0x1148(%rbx) leaq 0x1e6355(%rip), %rax # 0x6a83d5 leaq 0x1e02ec(%rip), %rbp # 0x6a2373 cmoveq %rax, %rbp leaq 0x28(%rsp), %r15 movl $0x100000, %esi # imm = 0x100000 movq %r15, %rdi callq 0x4b92c8 leaq 0xc50(%rbx), %rdi callq 0x4b92fb leaq 0x206338(%rip), %rsi # 0x6c83e8 movq %r15, %rdi movq %r12, %rdx xorl %eax, %eax callq 0x4b9468 testl %eax, %eax jne 0x4c20d5 leaq 0x28(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x4c403b testl %eax, %eax je 0x4c20e7 movl %eax, %r15d leaq 0x28(%rsp), %rdi callq 0x4b92db jmp 0x4c1dfa movq 0x12c0(%rbx), %rax testq %rax, %rax cmoveq %r13, %rax movq %rax, 0x70(%rsp) movq 0x1290(%rbx), %rax testq %rax, %rax cmoveq %r13, %rax movq %rax, 0x68(%rsp) movq 0x12a8(%rbx), %rax testq %rax, %rax cmoveq %r13, %rax movq %rax, 0x60(%rsp) testb $0x2, 0x1301(%rbx) movq %r13, %rcx je 0x4c2141 movq 0x12b0(%rbx), %rax testq %rax, %rax leaq 0x1fcf0c(%rip), %rcx # 0x6bf049 cmovneq %rax, %rcx movq 0x850(%rbx), %rax movq %r13, %rdx testq %rax, %rax je 0x4c216d cmpb $0x0, (%rax) movq %r13, %rdx je 0x4c216d movq 0x1298(%rbx), %rax testq %rax, %rax leaq 0x1fcee0(%rip), %rdx # 0x6bf049 cmovneq %rax, %rdx cmpq $0x0, 0x18(%rsp) leaq 0x1e6597(%rip), %rax # 0x6a8711 cmovneq %r13, %rax movq %rax, 0x50(%rsp) movq %r13, %r15 movq 0x12d8(%rbx), %r13 testq %r13, %r13 cmoveq %r15, %r13 movq 0x778(%rbx), %rax movq %r15, %r12 testq %rax, %rax je 0x4c21c0 cmpb $0x0, (%rax) movq %r15, %r12 je 0x4c21c0 movq 0x12a0(%rbx), %rax testq %rax, %rax leaq 0x1fce8d(%rip), %r12 # 0x6bf049 cmovneq %rax, %r12 movq %rbp, 0x18(%rsp) cmpq $0x0, 0x11f0(%rbx) je 0x4c21e4 movq 0x12b8(%rbx), %rax testq %rax, %rax leaq 0x1fce69(%rip), %r15 # 0x6bf049 cmovneq %rax, %r15 movq %rdx, 0x58(%rsp) movq %rcx, 0x78(%rsp) movl 0x374(%r14), %eax andl $0x9, %eax leaq 0x1fce4a(%rip), %rbp # 0x6bf049 movq %rbp, %r10 cmpl $0x1, %eax jne 0x4c224f leaq 0x1e6534(%rip), %rsi # 0x6a8742 movl $0x10, %edx movq %rbx, %rdi callq 0x4a820c movq %rbp, %r10 testq %rax, %rax jne 0x4c224f leaq 0x1e6518(%rip), %rdx # 0x6a8742 movl $0x10, %ecx movq %rbx, %rdi movq %r14, %rsi callq 0x4c2710 testq %rax, %rax leaq 0x1e650f(%rip), %rax # 0x6a8753 leaq 0x1fcdfe(%rip), %r10 # 0x6bf049 cmoveq %rax, %r10 subq $0x8, %rsp leaq 0x1e64c5(%rip), %rsi # 0x6a871f leaq 0x30(%rsp), %rdi movq 0x20(%rsp), %rdx movq 0x78(%rsp), %rcx movq 0x70(%rsp), %r8 movq 0x68(%rsp), %r9 xorl %eax, %eax pushq %rbp pushq 0x58(%rsp) pushq %r10 pushq %r15 pushq %r12 pushq %r13 pushq 0x88(%rsp) pushq 0x98(%rsp) pushq 0xc0(%rsp) callq 0x4b9468 addq $0x50, %rsp movl %eax, %r15d movq 0x12a8(%rbx), %rdi leaq 0x39e3df(%rip), %r12 # 0x860690 callq *(%r12) xorl %eax, %eax movq %rax, 0x12a8(%rbx) xorl %r13d, %r13d movq 0x1290(%rbx), %rdi callq *(%r12) movq %r13, 0x1290(%rbx) xorl %edi, %edi callq *(%r12) testl %r15d, %r15d jne 0x4c20d8 movq 0x398(%r14), %rax testb $0x1, 0x8c(%rax) jne 0x4c231a cmpb $0x14, 0x57f(%r14) je 0x4c231a cmpb $0x3, 0x1148(%rbx) jne 0x4c231a leaq 0x28(%rsp), %rdi movq %rbx, %rsi callq 0x4965dc testl %eax, %eax jne 0x4c20d5 leaq 0x28(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x4c4ced testl %eax, %eax jne 0x4c20d5 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x4c3bfc testl %eax, %eax jne 0x4c20d5 leaq 0x28(%rsp), %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x4c38f7 testl %eax, %eax jne 0x4c20d5 movq 0x10(%rsp), %rax movq $0x0, 0x10(%rax) cmpl $0x5, 0xc(%rsp) je 0x4c2379 cmpl $0x0, 0xc(%rsp) jne 0x4c2383 movq %rbx, %rdi xorl %esi, %esi callq 0x4a0cc9 leaq 0x28(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi movl 0xc(%rsp), %ecx callq 0x4c448c testl %eax, %eax jne 0x4c20d5 movq 0x10(%rsp), %rax movq 0x8(%rax), %rax testq %rax, %rax sets %cl movq 0xe8(%rbx), %rsi cmpq %rsi, %rax setg %al orb %cl, %al jne 0x4c23d4 movq 0x10(%rsp), %rax cmpl $0x1, 0x200(%rax) je 0x4c23d4 orb $0x4, 0x1a9(%rbx) testq %rsi, %rsi je 0x4c243f movq %rbx, %rdi callq 0x4a0f8a movq %rbx, %rdi callq 0x4a068a testl %eax, %eax movl $0x2a, %r15d cmovel %eax, %r15d movq 0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x4c2442 movq 0xe8(%rbx), %rdx leaq 0x1e6363(%rip), %rsi # 0x6a8772 movq %rbx, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0x4a1537 orb $0x4, 0x1a9(%rbx) andb $-0x3, 0x144(%rbx) movl $0x0, 0x158(%rbx) movq %rbx, %rdi xorl %esi, %esi callq 0x49fd07 jmp 0x4c2442 xorl %r15d, %r15d cmpb $0x14, 0x57f(%r14) jne 0x4c1dfa movzwl 0x1a9(%rbx), %eax testb %al, %al jns 0x4c1dfa andl $0xff7f, %eax # imm = 0xFF7F movw %ax, 0x1a9(%rbx) jmp 0x4c1dfa
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http_done
CURLcode Curl_http_done(struct Curl_easy *data, CURLcode status, bool premature) { struct connectdata *conn = data->conn; struct HTTP *http = data->req.p.http; /* Clear multipass flag. If authentication isn't done yet, then it will get * a chance to be set back to true when we output the next auth header */ data->state.authhost.multipass = FALSE; data->state.authproxy.multipass = FALSE; Curl_unencode_cleanup(data); /* set the proper values (possibly modified on POST) */ conn->seek_func = data->set.seek_func; /* restore */ conn->seek_client = data->set.seek_client; /* restore */ if(!http) return CURLE_OK; Curl_dyn_free(&http->send_buffer); Curl_http2_done(data, premature); Curl_quic_done(data, premature); Curl_mime_cleanpart(&http->form); Curl_dyn_reset(&data->state.headerb); Curl_hyper_done(data); Curl_ws_done(data); if(status) return status; if(!premature && /* this check is pointless when DONE is called before the entire operation is complete */ !conn->bits.retry && !data->set.connect_only && (data->req.bytecount + data->req.headerbytecount - data->req.deductheadercount) <= 0) { /* If this connection isn't simply closed to be retried, AND nothing was read from the HTTP server (that counts), this can't be right so we return an error here */ failf(data, "Empty reply from server"); /* Mark it as closed to avoid the "left intact" message */ streamclose(conn, "Empty reply from server"); return CURLE_GOT_NOTHING; } return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r12d movq %rdi, %r14 movq 0x18(%rdi), %rbx movq 0x198(%rdi), %r15 andb $-0x3, 0xdd8(%rdi) movl %esi, %ebp andb $-0x3, 0xdf8(%rdi) callq 0x4b691c movq 0x218(%r14), %rax movq %rax, 0x3e0(%rbx) movq 0x2b0(%r14), %rax movq %rax, 0x3e8(%rbx) testq %r15, %r15 je 0x4c250f leaq 0x208(%r15), %rdi callq 0x4b92db movzbl %r12b, %r12d movq %r14, %rdi movl %r12d, %esi callq 0x496464 addq $0x20, %r15 movq %r15, %rdi callq 0x498ba0 leaq 0xc50(%r14), %rdi callq 0x4b92fb testl %ebp, %ebp setne %al orb %al, %r12b jne 0x4c2511 testb $-0x80, 0x375(%rbx) jne 0x4c250f cmpb $0x0, 0xa91(%r14) je 0x4c251c xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0xf0(%r14), %rax addq 0xe0(%r14), %rax movl $0x0, %ebp cmpq 0xf8(%r14), %rax jg 0x4c2511 leaq 0x1e5d2f(%rip), %rsi # 0x6a826e movq %r14, %rdi xorl %eax, %eax callq 0x4a16c7 movq %rbx, %rdi movl $0x2, %esi callq 0x4b6786 movl $0x34, %ebp jmp 0x4c2511
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
readmoredata
static size_t readmoredata(char *buffer, size_t size, size_t nitems, void *userp) { struct Curl_easy *data = (struct Curl_easy *)userp; struct HTTP *http = data->req.p.http; size_t fullsize = size * nitems; if(!http->postsize) /* nothing to return */ return 0; /* make sure that a HTTP request is never sent away chunked! */ data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE; if(data->set.max_send_speed && (data->set.max_send_speed < (curl_off_t)fullsize) && (data->set.max_send_speed < http->postsize)) /* speed limit */ fullsize = (size_t)data->set.max_send_speed; else if(http->postsize <= (curl_off_t)fullsize) { memcpy(buffer, http->postdata, (size_t)http->postsize); fullsize = (size_t)http->postsize; if(http->backup.postsize) { /* move backup data into focus and continue on that */ http->postdata = http->backup.postdata; http->postsize = http->backup.postsize; data->state.fread_func = http->backup.fread_func; data->state.in = http->backup.fread_in; http->sending++; /* move one step up */ http->backup.postsize = 0; } else http->postsize = 0; return fullsize; } memcpy(buffer, http->postdata, fullsize); http->postdata += fullsize; http->postsize -= fullsize; return fullsize; }
pushq %r15 pushq %r14 pushq %rbx movq 0x198(%rcx), %r15 cmpq $0x0, 0x8(%r15) je 0x4c36f6 movq %rcx, %rbx imulq %rsi, %rdx xorl %eax, %eax cmpl $0x1, 0x200(%r15) sete %al movzwl 0x1a9(%rcx), %ecx shll $0x9, %eax andl $0xfffffdff, %ecx # imm = 0xFFFFFDFF orl %eax, %ecx movw %cx, 0x1a9(%rbx) movq 0x300(%rbx), %r14 testq %r14, %r14 setne %cl cmpq %rdx, %r14 setl %sil movq 0x8(%r15), %rax cmpq %rax, %r14 setl %r8b andb %sil, %r8b testb %cl, %r8b jne 0x4c36e0 movq %rdx, %r14 cmpq %rdx, %rax jle 0x4c36fb movq 0x10(%r15), %rsi movq %r14, %rdx callq 0x3f250 addq %r14, 0x10(%r15) subq %r14, 0x8(%r15) jmp 0x4c3751 xorl %r14d, %r14d jmp 0x4c3751 movq 0x10(%r15), %rsi movq %rax, %rdx callq 0x3f250 movq 0x8(%r15), %r14 movq 0x1f8(%r15), %rax testq %rax, %rax je 0x4c3749 movq 0x1f0(%r15), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x8(%r15) movups 0x1e0(%r15), %xmm0 movups %xmm0, 0x1178(%rbx) incl 0x200(%r15) movq $0x0, 0x1f8(%r15) jmp 0x4c3751 movq $0x0, 0x8(%r15) movq %r14, %rax popq %rbx popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http_firstwrite
CURLcode Curl_http_firstwrite(struct Curl_easy *data, struct connectdata *conn, bool *done) { struct SingleRequest *k = &data->req; if(data->req.newurl) { if(conn->bits.close) { /* Abort after the headers if "follow Location" is set and we're set to close anyway. */ k->keepon &= ~KEEP_RECV; *done = TRUE; return CURLE_OK; } /* We have a new url to load, but since we want to be able to re-use this connection properly, we read the full response in "ignore more" */ k->ignorebody = TRUE; infof(data, "Ignoring the response-body"); } if(data->state.resume_from && !k->content_range && (data->state.httpreq == HTTPREQ_GET) && !k->ignorebody) { if(k->size == data->state.resume_from) { /* The resume point is at the end of file, consider this fine even if it doesn't allow resume from here. */ infof(data, "The entire document is already downloaded"); streamclose(conn, "already downloaded"); /* Abort download */ k->keepon &= ~KEEP_RECV; *done = TRUE; return CURLE_OK; } /* we wanted to resume a download, although the server doesn't seem to * support this and we did this with a GET (if it wasn't a GET we did a * POST or PUT resume) */ failf(data, "HTTP server doesn't seem to support " "byte ranges. Cannot resume."); return CURLE_RANGE_ERROR; } if(data->set.timecondition && !data->state.range) { /* A time condition has been set AND no ranges have been requested. This seems to be what chapter 13.3.4 of RFC 2616 defines to be the correct action for a HTTP/1.1 client */ if(!Curl_meets_timecondition(data, k->timeofdoc)) { *done = TRUE; /* We're simulating a http 304 from server so we return what should have been returned from the server */ data->info.httpcode = 304; infof(data, "Simulate a HTTP 304 response"); /* we abort the transfer before it is completed == we ruin the re-use ability. Close the connection */ streamclose(conn, "Simulated 304 handling"); return CURLE_OK; } } /* we have a time condition */ return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x180(%rdi) je 0x4c52ad testb $0x40, 0x374(%r14) jne 0x4c5365 orb $0x8, 0x1a9(%rbx) leaq 0x1e3337(%rip), %rsi # 0x6a85da movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq 0x1160(%rbx), %rax testq %rax, %rax je 0x4c530d movzwl 0x1a9(%rbx), %ecx testb $0x2, %cl jne 0x4c530d testb $0x8, %cl jne 0x4c530d cmpb $0x0, 0x11e0(%rbx) jne 0x4c530d cmpq %rax, 0xd0(%rbx) jne 0x4c537f leaq 0x1e330e(%rip), %rsi # 0x6a85f5 xorl %ebp, %ebp movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq %r14, %rdi movl $0x2, %esi callq 0x4b6786 andb $-0x2, 0x144(%rbx) movb $0x1, (%r15) jmp 0x4c5372 xorl %ebp, %ebp cmpb $0x0, 0x538(%rbx) je 0x4c5372 cmpq $0x0, 0x1158(%rbx) jne 0x4c5372 movq 0x168(%rbx), %rsi movq %rbx, %rdi callq 0x4a885c testb %al, %al jne 0x4c5372 movb $0x1, (%r15) movl $0x130, 0x1358(%rbx) # imm = 0x130 leaq 0x1e3315(%rip), %rsi # 0x6a865f xorl %ebp, %ebp movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq %r14, %rdi movl $0x2, %esi callq 0x4b6786 jmp 0x4c5372 andb $-0x2, 0x144(%rbx) movb $0x1, (%r15) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x1e3299(%rip), %rsi # 0x6a861f movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x21, %ebp jmp 0x4c5372
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_transferencode
CURLcode Curl_transferencode(struct Curl_easy *data) { if(!Curl_checkheaders(data, STRCONST("TE")) && data->set.http_transfer_encoding) { /* When we are to insert a TE: header in the request, we must also insert TE in a Connection: header, so we need to merge the custom provided Connection: header and prevent the original to get sent. Note that if the user has inserted his/her own TE: header we don't do this magic but then assume that the user will handle it all! */ char *cptr = Curl_checkheaders(data, STRCONST("Connection")); #define TE_HEADER "TE: gzip\r\n" Curl_safefree(data->state.aptr.te); if(cptr) { cptr = Curl_copy_header_value(cptr); if(!cptr) return CURLE_OUT_OF_MEMORY; } /* Create the (updated) Connection: header */ data->state.aptr.te = aprintf("Connection: %s%sTE\r\n" TE_HEADER, cptr ? cptr : "", (cptr && *cptr) ? ", ":""); free(cptr); if(!data->state.aptr.te) return CURLE_OUT_OF_MEMORY; } return CURLE_OK; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x1e0f1a(%rip), %rsi # 0x6a62c0 movl $0x2, %edx callq 0x4a820c testq %rax, %rax jne 0x4c545a testb $0x10, 0xa94(%rbx) je 0x4c545a leaq 0x1e337b(%rip), %rsi # 0x6a8748 movl $0xa, %edx movq %rbx, %rdi callq 0x4a820c movq %rax, %r14 leaq 0x39b2ac(%rip), %r15 # 0x860690 movq 0x12d8(%rbx), %rdi callq *(%r15) movq $0x0, 0x12d8(%rbx) testq %r14, %r14 je 0x4c5428 movq %r14, %rdi callq 0x4c276e testq %rax, %rax je 0x4c5462 movq %rax, %rsi cmpb $0x0, (%rax) leaq 0x1f9c31(%rip), %rax # 0x6bf049 leaq 0x1af59e(%rip), %rdx # 0x6749bd cmoveq %rax, %rdx movq %rsi, %r14 jmp 0x4c5435 leaq 0x1f9c1a(%rip), %rsi # 0x6bf049 xorl %r14d, %r14d movq %rsi, %rdx leaq 0x1e3240(%rip), %rdi # 0x6a867c xorl %eax, %eax callq 0x49c12b movq %rax, 0x12d8(%rbx) movq %r14, %rdi callq *(%r15) cmpq $0x0, 0x12d8(%rbx) je 0x4c5462 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq movl $0x1b, %eax jmp 0x4c545c
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http_statusline
CURLcode Curl_http_statusline(struct Curl_easy *data, struct connectdata *conn) { struct SingleRequest *k = &data->req; data->info.httpcode = k->httpcode; data->info.httpversion = conn->httpversion; if(!data->state.httpversion || data->state.httpversion > conn->httpversion) /* store the lowest server version we encounter */ data->state.httpversion = conn->httpversion; /* * This code executes as part of processing the header. As a * result, it's not totally clear how to interpret the * response code yet as that depends on what other headers may * be present. 401 and 407 may be errors, but may be OK * depending on how authentication is working. Other codes * are definitely errors, so give up here. */ if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET && k->httpcode == 416) { /* "Requested Range Not Satisfiable", just proceed and pretend this is no error */ k->ignorebody = TRUE; /* Avoid appending error msg to good data. */ } if(conn->httpversion == 10) { /* Default action for HTTP/1.0 must be to close, unless we get one of those fancy headers that tell us the server keeps it open for us! */ infof(data, "HTTP 1.0, assume close after body"); connclose(conn, "HTTP/1.0 close after body"); } else if(conn->httpversion == 20 || (k->upgr101 == UPGR101_H2 && k->httpcode == 101)) { DEBUGF(infof(data, "HTTP/2 found, allow multiplexing")); /* HTTP/2 cannot avoid multiplexing since it is a core functionality of the protocol */ conn->bundle->multiuse = BUNDLE_MULTIPLEX; } else if(conn->httpversion >= 11 && !conn->bits.close) { /* If HTTP version is >= 1.1 and connection is persistent */ DEBUGF(infof(data, "HTTP 1.1 or later with persistent connection")); } k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200; switch(k->httpcode) { case 304: /* (quote from RFC2616, section 10.3.5): The 304 response * MUST NOT contain a message-body, and thus is always * terminated by the first empty line after the header * fields. */ if(data->set.timecondition) data->info.timecond = TRUE; /* FALLTHROUGH */ case 204: /* (quote from RFC2616, section 10.2.5): The server has * fulfilled the request but does not need to return an * entity-body ... The 204 response MUST NOT include a * message-body, and thus is always terminated by the first * empty line after the header fields. */ k->size = 0; k->maxdownload = 0; k->http_bodyless = TRUE; break; default: break; } return CURLE_OK; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x140(%rdi), %eax movl %eax, 0x1358(%rdi) movb 0x57f(%rsi), %cl movzbl %cl, %edx movl %edx, 0x1360(%rdi) movb 0x1149(%rdi), %sil decb %sil cmpb %dl, %sil jb 0x4c5b60 movb %cl, 0x1149(%rbx) cmpq $0x0, 0x1160(%rbx) je 0x4c5b94 cmpb $0x0, 0x11e0(%rbx) sete %dl cmpl $0x1a0, %eax # imm = 0x1A0 sete %sil andb %dl, %sil cmpb $0x1, %sil jne 0x4c5b94 orb $0x8, 0x1a9(%rbx) movb 0x57f(%r14), %cl cmpb $0x14, %cl je 0x4c5bd9 movzbl %cl, %ecx cmpl $0xa, %ecx jne 0x4c5bc7 leaq 0x1e2d2d(%rip), %rsi # 0x6a88d5 movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq %r14, %rdi movl $0x1, %esi callq 0x4b6786 movl 0x140(%rbx), %eax jmp 0x4c5be6 movl 0x15c(%rbx), %ecx xorl $0x2, %ecx movl %eax, %edx xorl $0x65, %edx orl %ecx, %edx jne 0x4c5be6 movq 0x548(%r14), %rcx movl $0x2, (%rcx) leal -0x64(%rax), %ecx xorl %edx, %edx cmpl $0x64, %ecx setb %dl shll $0x4, %edx movzwl 0x1a9(%rbx), %ecx movl %ecx, %esi andl $-0x11, %esi orl %edx, %esi movw %si, 0x1a9(%rbx) cmpl $0xcc, %eax je 0x4c5c27 cmpl $0x130, %eax # imm = 0x130 jne 0x4c5c3e cmpb $0x0, 0x538(%rbx) je 0x4c5c27 orb $0x1, 0x1444(%rbx) leaq 0xd0(%rbx), %rax orl $0x10, %ecx xorps %xmm0, %xmm0 movups %xmm0, (%rax) movw %cx, 0x1a9(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http_size
CURLcode Curl_http_size(struct Curl_easy *data) { struct SingleRequest *k = &data->req; if(data->req.ignore_cl || k->chunk) { k->size = k->maxdownload = -1; } else if(k->size != -1) { if(data->set.max_filesize && k->size > data->set.max_filesize) { failf(data, "Maximum file size exceeded"); return CURLE_FILESIZE_EXCEEDED; } Curl_pgrsSetDownloadSize(data, k->size); k->maxdownload = k->size; } return CURLE_OK; }
pushq %r14 pushq %rbx pushq %rax leaq 0xd0(%rdi), %rax testb $0x60, 0x1a9(%rdi) je 0x4c5c70 pcmpeqd %xmm0, %xmm0 movdqu %xmm0, (%rax) xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movq (%rax), %rsi xorl %ebx, %ebx cmpq $-0x1, %rsi je 0x4c5c66 movq %rdi, %r14 movq 0x6f0(%rdi), %rax testq %rax, %rax sete %cl cmpq %rax, %rsi setle %al orb %cl, %al jne 0x4c5cad leaq 0x1deb31(%rip), %rsi # 0x6a47cd movq %r14, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x3f, %ebx jmp 0x4c5c66 movq %r14, %rdi callq 0x4a0c97 movq 0xd0(%r14), %rax movq %rax, 0xd8(%r14) jmp 0x4c5c66
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_http_readwrite_headers
CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, struct connectdata *conn, ssize_t *nread, bool *stop_reading) { CURLcode result; struct SingleRequest *k = &data->req; ssize_t onread = *nread; char *ostr = k->str; char *headp; char *str_start; char *end_ptr; /* header line within buffer loop */ do { size_t rest_length; size_t full_length; int writetype; /* str_start is start of line within buf */ str_start = k->str; /* data is in network encoding so use 0x0a instead of '\n' */ end_ptr = memchr(str_start, 0x0a, *nread); if(!end_ptr) { /* Not a complete header line within buffer, append the data to the end of the headerbuff. */ result = Curl_dyn_addn(&data->state.headerb, str_start, *nread); if(result) return result; if(!k->headerline) { /* check if this looks like a protocol header */ statusline st = checkprotoprefix(data, conn, Curl_dyn_ptr(&data->state.headerb), Curl_dyn_len(&data->state.headerb)); if(st == STATUS_BAD) { /* this is not the beginning of a protocol first header line */ k->header = FALSE; k->badheader = HEADER_ALLBAD; streamclose(conn, "bad HTTP: No end-of-message indicator"); if(!data->set.http09_allowed) { failf(data, "Received HTTP/0.9 when not allowed"); return CURLE_UNSUPPORTED_PROTOCOL; } break; } } break; /* read more and try again */ } /* decrease the size of the remaining (supposed) header line */ rest_length = (end_ptr - k->str) + 1; *nread -= (ssize_t)rest_length; k->str = end_ptr + 1; /* move past new line */ full_length = k->str - str_start; result = Curl_dyn_addn(&data->state.headerb, str_start, full_length); if(result) return result; /**** * We now have a FULL header line in 'headerb'. *****/ if(!k->headerline) { /* the first read header */ statusline st = checkprotoprefix(data, conn, Curl_dyn_ptr(&data->state.headerb), Curl_dyn_len(&data->state.headerb)); if(st == STATUS_BAD) { streamclose(conn, "bad HTTP: No end-of-message indicator"); /* this is not the beginning of a protocol first header line */ if(!data->set.http09_allowed) { failf(data, "Received HTTP/0.9 when not allowed"); return CURLE_UNSUPPORTED_PROTOCOL; } k->header = FALSE; if(*nread) /* since there's more, this is a partial bad header */ k->badheader = HEADER_PARTHEADER; else { /* this was all we read so it's all a bad header */ k->badheader = HEADER_ALLBAD; *nread = onread; k->str = ostr; return CURLE_OK; } break; } } /* headers are in network encoding so use 0x0a and 0x0d instead of '\n' and '\r' */ headp = Curl_dyn_ptr(&data->state.headerb); if((0x0a == *headp) || (0x0d == *headp)) { size_t headerlen; /* Zero-length header line means end of headers! */ if('\r' == *headp) headp++; /* pass the \r byte */ if('\n' == *headp) headp++; /* pass the \n byte */ if(100 <= k->httpcode && 199 >= k->httpcode) { /* "A user agent MAY ignore unexpected 1xx status responses." */ switch(k->httpcode) { case 100: /* * We have made a HTTP PUT or POST and this is 1.1-lingo * that tells us that the server is OK with this and ready * to receive the data. * However, we'll get more headers now so we must get * back into the header-parsing state! */ k->header = TRUE; k->headerline = 0; /* restart the header line counter */ /* if we did wait for this do enable write now! */ if(k->exp100 > EXP100_SEND_DATA) { k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; Curl_expire_done(data, EXPIRE_100_TIMEOUT); } break; case 101: /* Switching Protocols */ if(k->upgr101 == UPGR101_H2) { /* Switching to HTTP/2 */ infof(data, "Received 101, Switching to HTTP/2"); k->upgr101 = UPGR101_RECEIVED; /* we'll get more headers (HTTP/2 response) */ k->header = TRUE; k->headerline = 0; /* restart the header line counter */ /* switch to http2 now. The bytes after response headers are also processed here, otherwise they are lost. */ result = Curl_http2_switched(data, k->str, *nread); if(result) return result; *nread = 0; } #ifdef USE_WEBSOCKETS else if(k->upgr101 == UPGR101_WS) { /* verify the response */ result = Curl_ws_accept(data); if(result) return result; k->header = FALSE; /* no more header to parse! */ if(data->set.connect_only) { k->keepon &= ~KEEP_RECV; /* read no more content */ *nread = 0; } } #endif else { /* Not switching to another protocol */ k->header = FALSE; /* no more header to parse! */ } break; default: /* the status code 1xx indicates a provisional response, so we'll get another set of headers */ k->header = TRUE; k->headerline = 0; /* restart the header line counter */ break; } } else { k->header = FALSE; /* no more header to parse! */ if((k->size == -1) && !k->chunk && !conn->bits.close && (conn->httpversion == 11) && !(conn->handler->protocol & CURLPROTO_RTSP) && data->state.httpreq != HTTPREQ_HEAD) { /* On HTTP 1.1, when connection is not to get closed, but no Content-Length nor Transfer-Encoding chunked have been received, according to RFC2616 section 4.4 point 5, we assume that the server will close the connection to signal the end of the document. */ infof(data, "no chunk, no close, no size. Assume close to " "signal end"); streamclose(conn, "HTTP: No end-of-message indicator"); } } if(!k->header) { result = Curl_http_size(data); if(result) return result; } /* At this point we have some idea about the fate of the connection. If we are closing the connection it may result auth failure. */ #if defined(USE_NTLM) if(conn->bits.close && (((data->req.httpcode == 401) && (conn->http_ntlm_state == NTLMSTATE_TYPE2)) || ((data->req.httpcode == 407) && (conn->proxy_ntlm_state == NTLMSTATE_TYPE2)))) { infof(data, "Connection closure while negotiating auth (HTTP 1.0?)"); data->state.authproblem = TRUE; } #endif #if defined(USE_SPNEGO) if(conn->bits.close && (((data->req.httpcode == 401) && (conn->http_negotiate_state == GSS_AUTHRECV)) || ((data->req.httpcode == 407) && (conn->proxy_negotiate_state == GSS_AUTHRECV)))) { infof(data, "Connection closure while negotiating auth (HTTP 1.0?)"); data->state.authproblem = TRUE; } if((conn->http_negotiate_state == GSS_AUTHDONE) && (data->req.httpcode != 401)) { conn->http_negotiate_state = GSS_AUTHSUCC; } if((conn->proxy_negotiate_state == GSS_AUTHDONE) && (data->req.httpcode != 407)) { conn->proxy_negotiate_state = GSS_AUTHSUCC; } #endif /* now, only output this if the header AND body are requested: */ writetype = CLIENTWRITE_HEADER | (data->set.include_header ? CLIENTWRITE_BODY : 0) | ((k->httpcode/100 == 1) ? CLIENTWRITE_1XX : 0); headerlen = Curl_dyn_len(&data->state.headerb); result = Curl_client_write(data, writetype, Curl_dyn_ptr(&data->state.headerb), headerlen); if(result) return result; data->info.header_size += (long)headerlen; data->req.headerbytecount += (long)headerlen; /* * When all the headers have been parsed, see if we should give * up and return an error. */ if(http_should_fail(data)) { failf(data, "The requested URL returned error: %d", k->httpcode); return CURLE_HTTP_RETURNED_ERROR; } #ifdef USE_WEBSOCKETS /* All non-101 HTTP status codes are bad when wanting to upgrade to websockets */ if(data->req.upgr101 == UPGR101_WS) { failf(data, "Refused WebSockets upgrade: %d", k->httpcode); return CURLE_HTTP_RETURNED_ERROR; } #endif data->req.deductheadercount = (100 <= k->httpcode && 199 >= k->httpcode)?data->req.headerbytecount:0; /* Curl_http_auth_act() checks what authentication methods * that are available and decides which one (if any) to * use. It will set 'newurl' if an auth method was picked. */ result = Curl_http_auth_act(data); if(result) return result; if(k->httpcode >= 300) { if((!conn->bits.authneg) && !conn->bits.close && !conn->bits.rewindaftersend) { /* * General treatment of errors when about to send data. Including : * "417 Expectation Failed", while waiting for 100-continue. * * The check for close above is done simply because of something * else has already deemed the connection to get closed then * something else should've considered the big picture and we * avoid this check. * * rewindaftersend indicates that something has told libcurl to * continue sending even if it gets discarded */ switch(data->state.httpreq) { case HTTPREQ_PUT: case HTTPREQ_POST: case HTTPREQ_POST_FORM: case HTTPREQ_POST_MIME: /* We got an error response. If this happened before the whole * request body has been sent we stop sending and mark the * connection for closure after we've read the entire response. */ Curl_expire_done(data, EXPIRE_100_TIMEOUT); if(!k->upload_done) { if((k->httpcode == 417) && data->state.expect100header) { /* 417 Expectation Failed - try again without the Expect header */ infof(data, "Got 417 while waiting for a 100"); data->state.disableexpect = TRUE; DEBUGASSERT(!data->req.newurl); data->req.newurl = strdup(data->state.url); Curl_done_sending(data, k); } else if(data->set.http_keep_sending_on_error) { infof(data, "HTTP error before end of send, keep sending"); if(k->exp100 > EXP100_SEND_DATA) { k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; } } else { infof(data, "HTTP error before end of send, stop sending"); streamclose(conn, "Stop sending data before everything sent"); result = Curl_done_sending(data, k); if(result) return result; k->upload_done = TRUE; if(data->state.expect100header) k->exp100 = EXP100_FAILED; } } break; default: /* default label present to avoid compiler warnings */ break; } } if(conn->bits.rewindaftersend) { /* We rewind after a complete send, so thus we continue sending now */ infof(data, "Keep sending data to get tossed away"); k->keepon |= KEEP_SEND; } } if(!k->header) { /* * really end-of-headers. * * If we requested a "no body", this is a good time to get * out and return home. */ if(data->set.opt_no_body) *stop_reading = TRUE; #ifndef CURL_DISABLE_RTSP else if((conn->handler->protocol & CURLPROTO_RTSP) && (data->set.rtspreq == RTSPREQ_DESCRIBE) && (k->size <= -1)) /* Respect section 4.4 of rfc2326: If the Content-Length header is absent, a length 0 must be assumed. It will prevent libcurl from hanging on DESCRIBE request that got refused for whatever reason */ *stop_reading = TRUE; #endif /* If max download size is *zero* (nothing) we already have nothing and can safely return ok now! But for HTTP/2, we'd like to call http2_handle_stream_close to properly close a stream. In order to do this, we keep reading until we close the stream. */ if(0 == k->maxdownload #if defined(USE_NGHTTP2) && !((conn->handler->protocol & PROTO_FAMILY_HTTP) && conn->httpversion == 20) #endif ) *stop_reading = TRUE; if(*stop_reading) { /* we make sure that this socket isn't read more now */ k->keepon &= ~KEEP_RECV; } Curl_debug(data, CURLINFO_HEADER_IN, str_start, headerlen); break; /* exit header line loop */ } /* We continue reading headers, reset the line-based header */ Curl_dyn_reset(&data->state.headerb); continue; } /* * Checks for special headers coming up. */ writetype = CLIENTWRITE_HEADER; if(!k->headerline++) { /* This is the first header, it MUST be the error code line or else we consider this to be the body right away! */ int httpversion_major; int rtspversion_major; int nc = 0; #define HEADER1 headp /* no conversion needed, just use headp */ if(conn->handler->protocol & PROTO_FAMILY_HTTP) { /* * https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 * * The response code is always a three-digit number in HTTP as the spec * says. We allow any three-digit number here, but we cannot make * guarantees on future behaviors since it isn't within the protocol. */ char separator; char twoorthree[2]; int httpversion = 0; char digit4 = 0; nc = sscanf(HEADER1, " HTTP/%1d.%1d%c%3d%c", &httpversion_major, &httpversion, &separator, &k->httpcode, &digit4); if(nc == 1 && httpversion_major >= 2 && 2 == sscanf(HEADER1, " HTTP/%1[23] %d", twoorthree, &k->httpcode)) { conn->httpversion = 0; nc = 4; separator = ' '; } /* There can only be a 4th response code digit stored in 'digit4' if all the other fields were parsed and stored first, so nc is 5 when digit4 a digit. The sscanf() line above will also allow zero-prefixed and negative numbers, so we check for that too here. */ else if(ISDIGIT(digit4) || (nc >= 4 && k->httpcode < 100)) { failf(data, "Unsupported response code in HTTP response"); return CURLE_UNSUPPORTED_PROTOCOL; } if((nc >= 4) && (' ' == separator)) { httpversion += 10 * httpversion_major; switch(httpversion) { case 10: case 11: #ifdef USE_HTTP2 case 20: #endif #ifdef ENABLE_QUIC case 30: #endif conn->httpversion = (unsigned char)httpversion; break; default: failf(data, "Unsupported HTTP version (%u.%d) in response", httpversion/10, httpversion%10); return CURLE_UNSUPPORTED_PROTOCOL; } if(k->upgr101 == UPGR101_RECEIVED) { /* supposedly upgraded to http2 now */ if(conn->httpversion != 20) infof(data, "Lying server, not serving HTTP/2"); } if(conn->httpversion < 20) { conn->bundle->multiuse = BUNDLE_NO_MULTIUSE; infof(data, "Mark bundle as not supporting multiuse"); } } else if(!nc) { /* this is the real world, not a Nirvana NCSA 1.5.x returns this crap when asked for HTTP/1.1 */ nc = sscanf(HEADER1, " HTTP %3d", &k->httpcode); conn->httpversion = 10; /* If user has set option HTTP200ALIASES, compare header line against list of aliases */ if(!nc) { statusline check = checkhttpprefix(data, Curl_dyn_ptr(&data->state.headerb), Curl_dyn_len(&data->state.headerb)); if(check == STATUS_DONE) { nc = 1; k->httpcode = 200; conn->httpversion = 10; } } } else { failf(data, "Unsupported HTTP version in response"); return CURLE_UNSUPPORTED_PROTOCOL; } } else if(conn->handler->protocol & CURLPROTO_RTSP) { char separator; int rtspversion; nc = sscanf(HEADER1, " RTSP/%1d.%1d%c%3d", &rtspversion_major, &rtspversion, &separator, &k->httpcode); if((nc == 4) && (' ' == separator)) { conn->httpversion = 11; /* For us, RTSP acts like HTTP 1.1 */ } else { nc = 0; } } if(nc) { result = Curl_http_statusline(data, conn); if(result) return result; writetype |= CLIENTWRITE_STATUS; } else { k->header = FALSE; /* this is not a header line */ break; } } result = verify_header(data); if(result) return result; result = Curl_http_header(data, conn, headp); if(result) return result; /* * End of header-checks. Write them to the client. */ if(data->set.include_header) writetype |= CLIENTWRITE_BODY; if(k->httpcode/100 == 1) writetype |= CLIENTWRITE_1XX; Curl_debug(data, CURLINFO_HEADER_IN, headp, Curl_dyn_len(&data->state.headerb)); result = Curl_client_write(data, writetype, headp, Curl_dyn_len(&data->state.headerb)); if(result) return result; data->info.header_size += Curl_dyn_len(&data->state.headerb); data->req.headerbytecount += Curl_dyn_len(&data->state.headerb); Curl_dyn_reset(&data->state.headerb); } while(*k->str); /* header line within buffer */ /* We might have reached the end of the header part here, but there might be a non-header part left in the end of the read buffer. */ return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, 0x48(%rsp) movq %rdx, %rbp movq %rsi, %r12 movq %rdi, %rbx leaq 0xd0(%rdi), %rax movq %rax, 0x28(%rsp) movq (%rdx), %rax movq %rax, 0x40(%rsp) movq 0x130(%rdi), %r15 leaq 0xc50(%rdi), %r13 leaq 0x140(%rdi), %rax movq %rax, 0x10(%rsp) movq %r15, 0x38(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x30(%rsp) movq (%rbp), %r14 movq %r15, %rdi movl $0xa, %esi movq %r14, %rdx callq 0x3fe70 testq %rax, %rax je 0x4c6534 movq %rax, %rcx notq %rcx addq %r15, %r14 addq %rcx, %r14 movq %r14, (%rbp) incq %rax movq %rax, 0x130(%rbx) subq %r15, %rax movq %r13, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x4b9370 testl %eax, %eax jne 0x4c654a cmpl $0x0, 0x12c(%rbx) jne 0x4c5da1 movq %r13, %rdi callq 0x4b94f6 movq %rax, %r14 movq %r13, %rdi callq 0x4b94fe movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x4c672b cmpl $0x2, %eax je 0x4c6632 movq %r13, %rdi callq 0x4b94f6 movq %rax, %rbp movzbl (%rax), %eax cmpl $0xd, %eax je 0x4c5dbd cmpl $0xa, %eax jne 0x4c5eb6 movq 0x10(%rsp), %rax movl (%rax), %eax leal -0x64(%rax), %ecx cmpl $0x63, %ecx movq 0x30(%rsp), %rbp ja 0x4c5e23 cmpb $0x65, %al je 0x4c5f7d movzbl %al, %eax cmpl $0x64, %eax jne 0x4c5fd7 orb $0x1, 0x1a9(%rbx) movl $0x0, 0x12c(%rbx) cmpl $0x0, 0x158(%rbx) je 0x4c5ff1 movl $0x0, 0x158(%rbx) orb $0x2, 0x144(%rbx) movq %rbx, %rdi xorl %esi, %esi callq 0x49fd07 jmp 0x4c5ff1 movzwl 0x1a9(%rbx), %eax movl %eax, %ecx andl $0xfffe, %ecx # imm = 0xFFFE movw %cx, 0x1a9(%rbx) cmpq $-0x1, 0xd0(%rbx) sete %cl testb $0x20, %al sete %al andb %cl, %al cmpb $0x1, %al jne 0x4c5ff1 testb $0x40, 0x374(%r12) jne 0x4c5ff1 cmpb $0xb, 0x57f(%r12) jne 0x4c5ff1 movq 0x398(%r12), %rax testb $0x4, 0x86(%rax) jne 0x4c5ff1 cmpb $0x5, 0x11e0(%rbx) je 0x4c5ff1 movq %rbx, %rdi leaq 0x1e2a9f(%rip), %rsi # 0x6a893c xorl %eax, %eax callq 0x4a1537 movq %r12, %rdi movl $0x2, %esi callq 0x4b6786 jmp 0x4c5ff1 movl 0x12c(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x12c(%rbx) movl $0x2, %r12d testl %eax, %eax jne 0x4c6376 movq 0x20(%rsp), %r12 movq 0x398(%r12), %rax movl 0x84(%rax), %eax testb $0x3, %al je 0x4c61de movl $0x0, 0x18(%rsp) movb $0x0, 0xc(%rsp) leaq 0xc(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0x1e2b39(%rip), %rsi # 0x6a8a47 leaq 0x1c(%rsp), %rdx leaq 0x18(%rsp), %rcx leaq 0xd(%rsp), %r8 movq 0x10(%rsp), %r9 xorl %eax, %eax callq 0x3f280 movl %eax, %r15d cmpl $0x1, %eax jne 0x4c6238 cmpl $0x2, 0x1c(%rsp) jl 0x4c6238 movq %rbp, %rdi leaq 0x1e2b12(%rip), %rsi # 0x6a8a5c leaq 0xe(%rsp), %rdx movq 0x10(%rsp), %rcx xorl %eax, %eax callq 0x3f280 cmpl $0x2, %eax jne 0x4c66cd movb $0x0, 0x57f(%r12) movb $0x20, 0xd(%rsp) movl $0x4, %r15d jmp 0x4c6269 cmpl $0x2, 0x15c(%rbx) jne 0x4c5fea movq %rbx, %rdi leaq 0x1e298a(%rip), %rsi # 0x6a891a xorl %eax, %eax callq 0x4a1537 movl $0x3, 0x15c(%rbx) orb $0x1, 0x1a9(%rbx) movl $0x0, 0x12c(%rbx) movq 0x130(%rbx), %rsi movq (%rbp), %rdx movq %rbx, %rdi callq 0x496b9c testl %eax, %eax jne 0x4c654a movq $0x0, (%rbp) jmp 0x4c5ff1 orb $0x1, 0x1a9(%rbx) movl $0x0, 0x12c(%rbx) jmp 0x4c5ff1 andb $-0x2, 0x1a9(%rbx) testb $0x1, 0x1a9(%rbx) jne 0x4c600a movq %rbx, %rdi callq 0x4c5c48 testl %eax, %eax jne 0x4c654a testb $0x40, 0x374(%r12) movq 0x10(%rsp), %rax movl (%rax), %eax je 0x4c605c cmpl $0x197, %eax # imm = 0x197 je 0x4c61c5 cmpl $0x191, %eax # imm = 0x191 jne 0x4c605c movl $0x191, %eax # imm = 0x191 cmpl $0x2, 0x3f0(%r12) jne 0x4c605c movq %rbx, %rdi leaq 0x1e292c(%rip), %rsi # 0x6a8974 xorl %eax, %eax callq 0x4a1537 orb $0x20, 0x1300(%rbx) movl 0x140(%rbx), %eax movl 0xa92(%rbx), %ecx shrl $0x16, %ecx andl $0x1, %ecx addl $-0x64, %eax xorl %edx, %edx cmpl $0x64, %eax setb %dl shll $0x4, %edx leal (%rcx,%rdx), %r14d addl $0x2, %r14d movq %r13, %rdi callq 0x4b94fe movq %rax, %rbp movq %r13, %rdi callq 0x4b94f6 movq %rbx, %rdi movl %r14d, %esi movq %rax, %rdx movq %rbp, %rcx callq 0x4a1998 testl %eax, %eax jne 0x4c654a addq %rbp, 0x1370(%rbx) movq 0xf0(%rbx), %r14 addq %rbp, %r14 movq %r14, 0xf0(%rbx) movq %rbx, %rdi callq 0x4c2c94 movl 0x140(%rbx), %edx testb %al, %al jne 0x4c6552 addl $-0x64, %edx cmpl $0x64, %edx movl $0x0, %eax cmovaeq %rax, %r14 movq %r14, 0xf8(%rbx) movq %rbx, %rdi callq 0x4c286d testl %eax, %eax jne 0x4c654a movq 0x10(%rsp), %rax cmpl $0x12c, (%rax) # imm = 0x12C jl 0x4c6508 testl $0x30040, 0x374(%r12) # imm = 0x30040 jne 0x4c64e5 movb 0x11e0(%rbx), %al decb %al cmpb $0x3, %al ja 0x4c64e5 movq %rbx, %rdi xorl %esi, %esi callq 0x49fd07 testb $0x4, 0x1a9(%rbx) jne 0x4c64e5 movq 0x10(%rsp), %rax cmpl $0x1a1, (%rax) # imm = 0x1A1 jne 0x4c6162 testb $-0x80, 0x1300(%rbx) jne 0x4c64a9 testb $0x4, 0xa94(%rbx) jne 0x4c647c movq %rbx, %rdi leaq 0x1e287d(%rip), %rsi # 0x6a89f6 xorl %eax, %eax callq 0x4a1537 movq %r12, %rdi movl $0x2, %esi callq 0x4b6786 movq %rbx, %rdi movq 0x28(%rsp), %rsi callq 0x4a88b5 testl %eax, %eax jne 0x4c654a orb $0x4, 0x1a9(%rbx) testb $-0x80, 0x1300(%rbx) je 0x4c64e5 movl $0x3, 0x158(%rbx) jmp 0x4c64e5 movl $0x197, %eax # imm = 0x197 cmpl $0x2, 0x3f4(%r12) je 0x4c603e jmp 0x4c605c btl $0x12, %eax jae 0x4c6677 xorl %r15d, %r15d movq %rbp, %rdi leaq 0x1e2946(%rip), %rsi # 0x6a8b3b leaq 0x54(%rsp), %rdx leaq 0x18(%rsp), %rcx leaq 0xe(%rsp), %r8 movq 0x10(%rsp), %r9 xorl %eax, %eax callq 0x3f280 cmpl $0x4, %eax jne 0x4c635c cmpb $0x20, 0xe(%rsp) jne 0x4c635c movb $0xb, 0x57f(%r12) movl $0x4, %r15d jmp 0x4c635c movb 0xc(%rsp), %al addb $-0x30, %al cmpb $0xa, %al jb 0x4c66d7 cmpl $0x4, %r15d jl 0x4c62ea movq 0x10(%rsp), %rax cmpl $0x63, (%rax) jle 0x4c66d7 cmpb $0x20, 0xd(%rsp) jne 0x4c66e0 movl 0x1c(%rsp), %eax leal (%rax,%rax,4), %ecx addl %ecx, %ecx addl 0x18(%rsp), %ecx movl %ecx, 0x18(%rsp) cmpl $0x14, %ecx ja 0x4c66f9 movl $0x100c00, %eax # imm = 0x100C00 btl %ecx, %eax jae 0x4c66f9 movb %cl, 0x57f(%r12) cmpl $0x14, %ecx je 0x4c62c0 cmpl $0x3, 0x15c(%rbx) jne 0x4c62c0 movq %rbx, %rdi leaq 0x1e2813(%rip), %rsi # 0x6a8ac4 xorl %eax, %eax callq 0x4a1537 movb 0x57f(%r12), %cl cmpb $0x13, %cl ja 0x4c635c movq 0x548(%r12), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq %rbx, %rdi leaq 0x1e2804(%rip), %rsi # 0x6a8ae5 xorl %eax, %eax callq 0x4a1537 jmp 0x4c635c testl %r15d, %r15d jne 0x4c66e0 movq %rbp, %rdi leaq 0x1e280f(%rip), %rsi # 0x6a8b0c movq 0x10(%rsp), %rdx xorl %eax, %eax callq 0x3f280 movl %eax, %r15d movb $0xa, 0x57f(%r12) testl %eax, %eax jne 0x4c635c movq %r13, %rdi callq 0x4b94f6 movq %rax, %r14 movq %r13, %rdi callq 0x4b94fe movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x4c672b xorl %r15d, %r15d cmpl $0x1, %eax jne 0x4c635c movq 0x10(%rsp), %rax movl $0xc8, (%rax) movb $0xa, 0x57f(%r12) movl $0x1, %r15d testl %r15d, %r15d je 0x4c6677 movq %rbx, %rdi movq %r12, %rsi callq 0x4c5b26 movl $0x6, %r12d movq %r13, %rdi callq 0x4b94f6 movq %rax, %r14 movq %r13, %rdi callq 0x4b94fe movq %rax, %r15 movq %r14, %rdi xorl %esi, %esi movq %rax, %rdx callq 0x3fe70 testq %rax, %rax jne 0x4c6654 movl 0x12c(%rbx), %eax cmpl $0x2, %eax jl 0x4c63d9 movzbl (%r14), %ecx cmpl $0x20, %ecx je 0x4c63bb cmpl $0x9, %ecx jne 0x4c63c0 cmpl $0x2, %eax jne 0x4c63d9 movq %r14, %rdi movl $0x3a, %esi movq %r15, %rdx callq 0x3fe70 testq %rax, %rax je 0x4c6680 movq %rbx, %rdi movq 0x20(%rsp), %rsi movq %rbp, %rdx callq 0x4c5469 testl %eax, %eax jne 0x4c654a movl 0xa92(%rbx), %eax shrl $0x16, %eax andl $0x1, %eax leal (%rax,%r12), %r14d addl $0x10, %r14d orl %r12d, %eax movl 0x140(%rbx), %ecx addl $-0x64, %ecx cmpl $0x64, %ecx cmovael %eax, %r14d movq %r13, %rdi callq 0x4b94fe movq %rbx, %rdi movl $0x1, %esi movq %rbp, %rdx movq %rax, %rcx callq 0x4a1609 movq %r13, %rdi callq 0x4b94fe movq %rbx, %rdi movl %r14d, %esi movq %rbp, %rdx movq %rax, %rcx callq 0x4a1998 testl %eax, %eax jne 0x4c654a movq %r13, %rdi callq 0x4b94fe addq %rax, 0x1370(%rbx) movq %r13, %rdi callq 0x4b94fe addq %rax, 0xf0(%rbx) movq 0x20(%rsp), %r12 jmp 0x4c6511 movq %rbx, %rdi leaq 0x1e2544(%rip), %rsi # 0x6a89ca xorl %eax, %eax callq 0x4a1537 cmpl $0x0, 0x158(%rbx) je 0x4c64e5 movl $0x0, 0x158(%rbx) orb $0x2, 0x144(%rbx) jmp 0x4c64e5 movq %rbx, %rdi leaq 0x1e24f7(%rip), %rsi # 0x6a89aa xorl %eax, %eax callq 0x4a1537 orb $0x1, 0x1301(%rbx) movq 0x11e8(%rbx), %rdi leaq 0x39a1d1(%rip), %rax # 0x8606a0 callq *(%rax) movq %rax, 0x180(%rbx) movq %rbx, %rdi movq 0x28(%rsp), %rsi callq 0x4a88b5 testb $0x2, 0x376(%r12) je 0x4c6508 movq %rbx, %rdi leaq 0x1e2528(%rip), %rsi # 0x6a8a22 xorl %eax, %eax callq 0x4a1537 orb $0x2, 0x144(%rbx) testb $0x1, 0x1a9(%rbx) je 0x4c656e movq %r13, %rdi callq 0x4b92fb movq 0x130(%rbx), %r15 cmpb $0x0, (%r15) movq 0x30(%rsp), %rbp jne 0x4c5d1e jmp 0x4c66b8 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x4b9370 testl %eax, %eax je 0x4c65cc movl %eax, %r14d jmp 0x4c66bb leaq 0x1e1c95(%rip), %rsi # 0x6a81ee movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x16, %r14d jmp 0x4c66bb testb $0x2, 0xa95(%rbx) movq 0x48(%rsp), %rcx je 0x4c657f movb $0x1, (%rcx) cmpq $0x0, 0xd8(%rbx) jne 0x4c65a8 movq 0x398(%r12), %rax testb $0x3, 0x84(%rax) je 0x4c65a5 cmpb $0x14, 0x57f(%r12) je 0x4c65a8 movb $0x1, (%rcx) cmpb $0x1, (%rcx) jne 0x4c65b4 andb $-0x2, 0x144(%rbx) movq %rbx, %rdi movl $0x1, %esi movq %r15, %rdx movq %rbp, %rcx callq 0x4a1609 jmp 0x4c66b8 xorl %r14d, %r14d cmpl $0x0, 0x12c(%rbx) jne 0x4c66bb movq %r13, %rdi callq 0x4b94f6 movq %rax, %r15 movq %r13, %rdi callq 0x4b94fe movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x4c672b cmpl $0x2, %eax jne 0x4c66bb andb $-0x2, 0x1a9(%rbx) movl $0x2, 0x128(%rbx) movq %r12, %rdi movl $0x2, %esi callq 0x4b6786 testb $0x20, 0xa98(%rbx) je 0x4c6648 jmp 0x4c66bb movq %r12, %rdi movl $0x2, %esi callq 0x4b6786 testb $0x20, 0xa98(%rbx) jne 0x4c665d leaq 0x1e22a8(%rip), %rsi # 0x6a88f7 jmp 0x4c66e7 leaq 0x1e262b(%rip), %rsi # 0x6a8c86 jmp 0x4c6687 andb $-0x2, 0x1a9(%rbx) cmpq $0x0, (%rbp) je 0x4c6699 movl $0x1, 0x128(%rbx) jmp 0x4c66b8 andb $-0x2, 0x1a9(%rbx) jmp 0x4c66b8 leaq 0x1e2612(%rip), %rsi # 0x6a8c99 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x8, %r14d jmp 0x4c66bb movl $0x2, 0x128(%rbx) movq 0x40(%rsp), %rax movq %rax, (%rbp) movq 0x38(%rsp), %rax movq %rax, 0x130(%rbx) xorl %r14d, %r14d movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb 0xc(%rsp), %al addb $-0x30, %al cmpb $0xa, %al jae 0x4c66e0 leaq 0x1e238e(%rip), %rsi # 0x6a8a6c jmp 0x4c66e7 leaq 0x1e242f(%rip), %rsi # 0x6a8b16 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x1, %r14d jmp 0x4c66bb movslq %ecx, %rax imulq $0x66666667, %rax, %rdx # imm = 0x66666667 movq %rdx, %rax shrq $0x3f, %rax sarq $0x22, %rdx addl %eax, %edx leal (%rdx,%rdx), %eax leal (%rax,%rax,4), %eax subl %eax, %ecx leaq 0x1e2378(%rip), %rsi # 0x6a8a97 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 jmp 0x4c66f1
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
checkhttpprefix
static statusline checkhttpprefix(struct Curl_easy *data, const char *s, size_t len) { struct curl_slist *head = data->set.http200aliases; statusline rc = STATUS_BAD; statusline onmatch = len >= 5? STATUS_DONE : STATUS_UNKNOWN; while(head) { if(checkprefixmax(head->data, s, len)) { rc = onmatch; break; } head = head->next; } if((rc != STATUS_DONE) && (checkprefixmax("HTTP/", s, len))) rc = onmatch; return rc; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx xorl %ebp, %ebp cmpq $0x5, %rdx setae %cl movq 0x6e0(%rdi), %r13 movl $0x2, %r12d testq %r13, %r13 je 0x4c67a1 movb %cl, 0x7(%rsp) movq (%r13), %r15 movq %r15, %rdi callq 0x3fd60 cmpq %r14, %rax cmovaeq %r14, %rax movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x4a7f68 testl %eax, %eax jne 0x4c678f movq 0x8(%r13), %r13 testq %r13, %r13 jne 0x4c675b movb 0x7(%rsp), %cl jmp 0x4c67a1 xorl %r12d, %r12d movl $0x1, %eax cmpq $0x4, %r14 movb 0x7(%rsp), %cl ja 0x4c67c8 movb %cl, %bpl cmpq $0x5, %r14 movl $0x5, %edx cmovbq %r14, %rdx leaq 0x1e24c8(%rip), %rdi # 0x6a8c80 movq %rbx, %rsi callq 0x4a7f68 testl %eax, %eax cmovel %r12d, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http.c
Curl_httpchunk_read
CHUNKcode Curl_httpchunk_read(struct Curl_easy *data, char *datap, ssize_t datalen, ssize_t *wrote, CURLcode *extrap) { CURLcode result = CURLE_OK; struct connectdata *conn = data->conn; struct Curl_chunker *ch = &conn->chunk; struct SingleRequest *k = &data->req; size_t piece; curl_off_t length = (curl_off_t)datalen; *wrote = 0; /* nothing's written yet */ /* the original data is written to the client, but we go on with the chunk read process, to properly calculate the content length*/ if(data->set.http_te_skip && !k->ignorebody) { result = Curl_client_write(data, CLIENTWRITE_BODY, datap, datalen); if(result) { *extrap = result; return CHUNKE_PASSTHRU_ERROR; } } while(length) { switch(ch->state) { case CHUNK_HEX: if(ISXDIGIT(*datap)) { if(ch->hexindex < CHUNK_MAXNUM_LEN) { ch->hexbuffer[ch->hexindex] = *datap; datap++; length--; ch->hexindex++; } else { return CHUNKE_TOO_LONG_HEX; /* longer hex than we support */ } } else { char *endptr; if(0 == ch->hexindex) /* This is illegal data, we received junk where we expected a hexadecimal digit. */ return CHUNKE_ILLEGAL_HEX; /* length and datap are unmodified */ ch->hexbuffer[ch->hexindex] = 0; if(curlx_strtoofft(ch->hexbuffer, &endptr, 16, &ch->datasize)) return CHUNKE_ILLEGAL_HEX; ch->state = CHUNK_LF; /* now wait for the CRLF */ } break; case CHUNK_LF: /* waiting for the LF after a chunk size */ if(*datap == 0x0a) { /* we're now expecting data to come, unless size was zero! */ if(0 == ch->datasize) { ch->state = CHUNK_TRAILER; /* now check for trailers */ } else ch->state = CHUNK_DATA; } datap++; length--; break; case CHUNK_DATA: /* We expect 'datasize' of data. We have 'length' right now, it can be more or less than 'datasize'. Get the smallest piece. */ piece = curlx_sotouz((ch->datasize >= length)?length:ch->datasize); /* Write the data portion available */ if(!data->set.http_te_skip && !k->ignorebody) { if(!data->set.http_ce_skip && k->writer_stack) result = Curl_unencode_write(data, k->writer_stack, datap, piece); else result = Curl_client_write(data, CLIENTWRITE_BODY, datap, piece); if(result) { *extrap = result; return CHUNKE_PASSTHRU_ERROR; } } *wrote += piece; ch->datasize -= piece; /* decrease amount left to expect */ datap += piece; /* move read pointer forward */ length -= piece; /* decrease space left in this round */ if(0 == ch->datasize) /* end of data this round, we now expect a trailing CRLF */ ch->state = CHUNK_POSTLF; break; case CHUNK_POSTLF: if(*datap == 0x0a) { /* The last one before we go back to hex state and start all over. */ Curl_httpchunk_init(data); /* sets state back to CHUNK_HEX */ } else if(*datap != 0x0d) return CHUNKE_BAD_CHUNK; datap++; length--; break; case CHUNK_TRAILER: if((*datap == 0x0d) || (*datap == 0x0a)) { char *tr = Curl_dyn_ptr(&conn->trailer); /* this is the end of a trailer, but if the trailer was zero bytes there was no trailer and we move on */ if(tr) { size_t trlen; result = Curl_dyn_addn(&conn->trailer, (char *)STRCONST("\x0d\x0a")); if(result) return CHUNKE_OUT_OF_MEMORY; tr = Curl_dyn_ptr(&conn->trailer); trlen = Curl_dyn_len(&conn->trailer); if(!data->set.http_te_skip) { result = Curl_client_write(data, CLIENTWRITE_HEADER|CLIENTWRITE_TRAILER, tr, trlen); if(result) { *extrap = result; return CHUNKE_PASSTHRU_ERROR; } } Curl_dyn_reset(&conn->trailer); ch->state = CHUNK_TRAILER_CR; if(*datap == 0x0a) /* already on the LF */ break; } else { /* no trailer, we're on the final CRLF pair */ ch->state = CHUNK_TRAILER_POSTCR; break; /* don't advance the pointer */ } } else { result = Curl_dyn_addn(&conn->trailer, datap, 1); if(result) return CHUNKE_OUT_OF_MEMORY; } datap++; length--; break; case CHUNK_TRAILER_CR: if(*datap == 0x0a) { ch->state = CHUNK_TRAILER_POSTCR; datap++; length--; } else return CHUNKE_BAD_CHUNK; break; case CHUNK_TRAILER_POSTCR: /* We enter this state when a CR should arrive so we expect to have to first pass a CR before we wait for LF */ if((*datap != 0x0d) && (*datap != 0x0a)) { /* not a CR then it must be another header in the trailer */ ch->state = CHUNK_TRAILER; break; } if(*datap == 0x0d) { /* skip if CR */ datap++; length--; } /* now wait for the final LF */ ch->state = CHUNK_STOP; break; case CHUNK_STOP: if(*datap == 0x0a) { length--; /* Record the length of any data left in the end of the buffer even if there's no more chunks to read */ ch->datasize = curlx_sotouz(length); return CHUNKE_STOP; /* return stop */ } else return CHUNKE_BAD_CHUNK; } } return CHUNKE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbp movq 0x18(%rdi), %r15 movq %rcx, 0x28(%rsp) movq $0x0, (%rcx) testb $0x4, 0xa96(%rdi) je 0x4c6857 testb $0x8, 0x1a9(%rbp) jne 0x4c6857 movq %rbp, %rdi movl $0x1, %esi movq %r12, %rdx movq %r14, %rcx callq 0x4a1998 testl %eax, %eax je 0x4c6857 movl %eax, (%rbx) movl $0x6, %eax jmp 0x4c6b55 xorl %eax, %eax testq %r14, %r14 je 0x4c6b55 movq %rbx, 0x18(%rsp) leaq 0x30(%r15), %rax movq %rax, 0x8(%rsp) leaq 0x428(%r15), %r13 leaq 0x3d(%r15), %rax movq %rax, 0x20(%rsp) leaq 0x1e2429(%rip), %rbx # 0x6a8cb0 movq %r13, 0x10(%rsp) movl 0x38(%r15), %eax cmpq $0x7, %rax ja 0x4c6b0f movslq (%rbx,%rax,4), %rax addq %rbx, %rax jmpq *%rax movb (%r12), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0x4c68d2 movzbl %al, %ecx addl $-0x41, %ecx cmpl $0x25, %ecx ja 0x4c6b1a movabsq $0x3f0000003f, %rdx # imm = 0x3F0000003F btq %rcx, %rdx jae 0x4c6b1a movzbl 0x3c(%r15), %ecx cmpq $0xf, %rcx ja 0x4c6b91 movb %al, 0x3d(%r15,%rcx) incq %r12 decq %r14 leal 0x1(%rcx), %eax movb %al, 0x3c(%r15) jmp 0x4c6b0f movzbl (%r12), %eax cmpl $0xd, %eax je 0x4c690b cmpl $0xa, %eax jne 0x4c6a9b movq %r13, %rdi callq 0x4b94f6 testq %rax, %rax je 0x4c6ac5 movl $0x2, %edx movq %r13, %rdi leaq 0x1c7c53(%rip), %rsi # 0x68e57e callq 0x4b9370 testl %eax, %eax jne 0x4c6b98 movq %r13, %rdi callq 0x4b94f6 movq %r13, %rdi movq %rax, %r13 callq 0x4b94fe movabsq $0x400000000, %rcx # imm = 0x400000000 testq %rcx, 0xa92(%rbp) jne 0x4c6979 movq %rbp, %rdi movl $0x22, %esi movq %r13, %rdx movq %rax, %rcx callq 0x4a1998 testl %eax, %eax jne 0x4c6b9f movq 0x10(%rsp), %r13 movq %r13, %rdi callq 0x4b92fb movl $0x6, 0x38(%r15) cmpb $0xa, (%r12) jne 0x4c6ab3 jmp 0x4c6b0f movq 0x8(%rsp), %rax movq (%rax), %rdi cmpq %r14, %rdi cmovgeq %r14, %rdi callq 0x4b1080 movq %rax, %r13 movq 0xa92(%rbp), %rax movabsq $0x400000000, %rcx # imm = 0x400000000 testq %rcx, %rax jne 0x4c6aea testb $0x8, 0x1a9(%rbp) jne 0x4c6aea btq $0x23, %rax jb 0x4c6acf movq 0x160(%rbp), %rsi testq %rsi, %rsi je 0x4c6acf movq %rbp, %rdi movq %r12, %rdx movq %r13, %rcx callq 0x4b690b jmp 0x4c6ae2 movzbl (%r12), %eax cmpl $0xd, %eax je 0x4c6ab3 cmpl $0xa, %eax jne 0x4c6b64 movq 0x18(%rbp), %rdi movb $0x0, 0x3c(%rdi) movl $0x0, 0x38(%rdi) addq $0x428, %rdi # imm = 0x428 movl $0x1000, %esi # imm = 0x1000 callq 0x4b92c8 jmp 0x4c6ab3 cmpb $0xa, (%r12) jne 0x4c6ab3 xorl %eax, %eax cmpq $0x0, 0x30(%r15) sete %al leal (%rax,%rax,2), %eax addl $0x2, %eax movl %eax, 0x38(%r15) jmp 0x4c6ab3 cmpb $0xa, (%r12) jne 0x4c6b64 movl $0x7, 0x38(%r15) jmp 0x4c6ab3 movzbl (%r12), %eax cmpl $0xa, %eax je 0x4c6a84 cmpl $0xd, %eax jne 0x4c6abb xorl %ecx, %ecx cmpb $0xd, %al sete %cl addq %rcx, %r12 subq %rcx, %r14 movl $0x4, 0x38(%r15) jmp 0x4c6b0f movl $0x1, %edx movq %r13, %rdi movq %r12, %rsi callq 0x4b9370 testl %eax, %eax jne 0x4c6b98 incq %r12 decq %r14 jmp 0x4c6b0f movl $0x5, 0x38(%r15) jmp 0x4c6b0f movl $0x7, 0x38(%r15) jmp 0x4c6b0f movq %rbp, %rdi movl $0x1, %esi movq %r12, %rdx movq %r13, %rcx callq 0x4a1998 testl %eax, %eax jne 0x4c6b9f movq 0x28(%rsp), %rax addq %r13, (%rax) addq %r13, %r12 subq %r13, %r14 movq 0x8(%rsp), %rax subq %r13, (%rax) jne 0x4c6b0a movl $0x3, 0x38(%r15) movq 0x10(%rsp), %r13 testq %r14, %r14 jne 0x4c688c jmp 0x4c6b53 movzbl 0x3c(%r15), %eax testq %rax, %rax je 0x4c6bab movq 0x20(%rsp), %rdi movb $0x0, (%rdi,%rax) leaq 0x30(%rsp), %rsi movl $0x10, %edx movq 0x8(%rsp), %rcx callq 0x4cb450 testl %eax, %eax jne 0x4c6bab movl $0x1, 0x38(%r15) jmp 0x4c6b0f xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x3, %eax jmp 0x4c6b55 movl $0x3, %eax cmpb $0xa, (%r12) jne 0x4c6b55 decq %r14 movq %r14, %rdi callq 0x4b1080 movq 0x8(%rsp), %rcx movq %rax, (%rcx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x4c6b55 movl $0x1, %eax jmp 0x4c6b55 movl $0x5, %eax jmp 0x4c6b55 movq 0x18(%rsp), %rcx movl %eax, (%rcx) jmp 0x4c684d movl $0x2, %eax jmp 0x4c6b55
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_chunks.c
Curl_chunked_strerror
const char *Curl_chunked_strerror(CHUNKcode code) { switch(code) { default: return "OK"; case CHUNKE_TOO_LONG_HEX: return "Too long hexadecimal number"; case CHUNKE_ILLEGAL_HEX: return "Illegal or missing hexadecimal sequence"; case CHUNKE_BAD_CHUNK: return "Malformed encoding found"; case CHUNKE_PASSTHRU_ERROR: DEBUGASSERT(0); /* never used */ return ""; case CHUNKE_BAD_ENCODING: return "Bad content-encoding found"; case CHUNKE_OUT_OF_MEMORY: return "Out of memory"; } }
decl %edi cmpl $0x5, %edi ja 0x4c6bca movl %edi, %eax leaq 0x1e210e(%rip), %rcx # 0x6a8cd0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x1ddb8f(%rip), %rax # 0x6a4760 retq nop
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_chunks.c
Curl_input_ntlm
CURLcode Curl_input_ntlm(struct Curl_easy *data, bool proxy, /* if proxy or not */ const char *header) /* rest of the www-authenticate: header */ { /* point to the correct struct with this */ struct ntlmdata *ntlm; curlntlm *state; CURLcode result = CURLE_OK; struct connectdata *conn = data->conn; ntlm = proxy ? &conn->proxyntlm : &conn->ntlm; state = proxy ? &conn->proxy_ntlm_state : &conn->http_ntlm_state; if(checkprefix("NTLM", header)) { header += strlen("NTLM"); while(*header && ISSPACE(*header)) header++; if(*header) { unsigned char *hdr; size_t hdrlen; result = Curl_base64_decode(header, &hdr, &hdrlen); if(!result) { struct bufref hdrbuf; Curl_bufref_init(&hdrbuf); Curl_bufref_set(&hdrbuf, hdr, hdrlen, curl_free); result = Curl_auth_decode_ntlm_type2_message(data, &hdrbuf, ntlm); Curl_bufref_free(&hdrbuf); } if(result) return result; *state = NTLMSTATE_TYPE2; /* We got a type-2 message */ } else { if(*state == NTLMSTATE_LAST) { infof(data, "NTLM auth restarted"); Curl_http_auth_cleanup_ntlm(conn); } else if(*state == NTLMSTATE_TYPE3) { infof(data, "NTLM handshake rejected"); Curl_http_auth_cleanup_ntlm(conn); *state = NTLMSTATE_NONE; return CURLE_REMOTE_ACCESS_DENIED; } else if(*state >= NTLMSTATE_TYPE1) { infof(data, "NTLM handshake failure (internal error)"); return CURLE_REMOTE_ACCESS_DENIED; } *state = NTLMSTATE_TYPE1; /* We should send away a type-1 */ } } return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %rbp movl %esi, %ebx movq %rdi, 0x8(%rsp) movq 0x18(%rdi), %r14 leaq 0x3f8(%r14), %r12 leaq 0x410(%r14), %r15 testl %esi, %esi movq %r12, %r13 cmovneq %r15, %r13 leaq 0x1e15db(%rip), %rsi # 0x6a81e9 movl $0x4, %edx movq %rbp, %rdi callq 0x4a7f68 xorl %edx, %edx testl %eax, %eax je 0x4c6cfd movl %ebx, %eax leaq 0x3f0(,%rax,4), %rbx addq $0x4, %rbp movzbl (%rbp), %eax cmpl $0x9, %eax je 0x4c6c4d cmpl $0x20, %eax je 0x4c6c4d testl %eax, %eax je 0x4c6c77 leal -0xa(%rax), %ecx cmpb $0x3, %cl ja 0x4c6c52 incq %rbp jmp 0x4c6c33 testb %al, %al je 0x4c6c77 leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbp, %rdi callq 0x4b3f00 testl %eax, %eax je 0x4c6d0e movl %eax, %edx jmp 0x4c6cfd movl (%r14,%rbx), %eax testl %eax, %eax je 0x4c6cae cmpl $0x3, %eax je 0x4c6cb8 cmpl $0x4, %eax jne 0x4c6ce5 leaq 0x1e20d0(%rip), %rsi # 0x6a8d60 movq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x4a1537 movq %r12, %rdi callq 0x4cb70a movq %r15, %rdi callq 0x4cb70a xorl %edx, %edx movl $0x1, (%r14,%rbx) jmp 0x4c6cfd leaq 0x1e20b5(%rip), %rsi # 0x6a8d74 movq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x4a1537 movq %r12, %rdi callq 0x4cb70a movq %r15, %rdi callq 0x4cb70a movl $0x0, (%r14,%rbx) jmp 0x4c6cf8 leaq 0x1e20a0(%rip), %rsi # 0x6a8d8c movq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x4a1537 movl $0x9, %edx movl %edx, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x4b4284 movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx leaq -0x31363(%rip), %rcx # 0x4959c9 movq %r15, %rdi callq 0x4b42ba movq 0x8(%rsp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x4cb4f7 movl %eax, %ebp movq %r15, %rdi callq 0x4b4293 testl %ebp, %ebp je 0x4c6d56 movl %ebp, %edx jmp 0x4c6cfd movl $0x2, (%r14,%rbx) xorl %edx, %edx jmp 0x4c6cfd
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_ntlm.c
Curl_proxy_connect
CURLcode Curl_proxy_connect(struct Curl_easy *data, int sockindex) { struct connectdata *conn = data->conn; if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) { const CURLcode result = https_proxy_connect(data, sockindex); if(result) return result; if(!conn->bits.proxy_ssl_connected[sockindex]) return result; /* wait for HTTPS proxy SSL initialization to complete */ } if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { #ifndef CURL_DISABLE_PROXY /* for [protocol] tunneled through HTTP proxy */ const char *hostname; int remote_port; CURLcode result; /* We want "seamless" operations through HTTP proxy tunnel */ /* for the secondary socket (FTP), use the "connect to host" * but ignore the "connect to port" (use the secondary port) */ if(conn->bits.conn_to_host) hostname = conn->conn_to_host.name; else if(sockindex == SECONDARYSOCKET) hostname = conn->secondaryhostname; else hostname = conn->host.name; if(sockindex == SECONDARYSOCKET) remote_port = conn->secondary_port; else if(conn->bits.conn_to_port) remote_port = conn->conn_to_port; else remote_port = conn->remote_port; result = Curl_proxyCONNECT(data, sockindex, hostname, remote_port); if(CURLE_OK != result) return result; Curl_safefree(data->state.aptr.proxyuserpwd); #else return CURLE_NOT_BUILT_IN; #endif } /* no HTTP tunnel proxy, just return */ return CURLE_OK; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %esi, %ebp movq %rdi, %rbx movq 0x18(%rdi), %r14 cmpb $0x2, 0x140(%r14) jne 0x4c7099 movslq %ebp, %rcx cmpb $0x0, 0x372(%r14,%rcx) je 0x4c70c4 movl 0x374(%r14), %eax movl %eax, %ecx notl %ecx xorl %r15d, %r15d testb $0x9, %cl jne 0x4c716a btl $0x9, %eax jb 0x4c70f8 cmpl $0x1, %ebp jne 0x4c710e movq 0xb0(%r14), %rdx jmp 0x4c7104 leaq (%r14,%rcx), %r12 addq $0x372, %r12 # imm = 0x372 movq %rbx, %rdi movq %r14, %rsi movl $0x1, %edx movq %r12, %r8 callq 0x4b2c3c testl %eax, %eax je 0x4c715c movl %eax, %r15d movq %r14, %rdi movl $0x1, %esi callq 0x4b6786 jmp 0x4c716a movq 0xc8(%r14), %rdx cmpl $0x1, %ebp jne 0x4c7115 movzwl 0x57a(%r14), %ecx jmp 0x4c712b movq 0x98(%r14), %rdx btl $0xa, %eax jb 0x4c7124 movl 0x56c(%r14), %ecx jmp 0x4c712b movl 0x570(%r14), %ecx movq %rbx, %rdi movl %ebp, %esi callq 0x4c7176 movl %eax, %r15d testl %eax, %eax jne 0x4c716a leaq 0x39954d(%rip), %rax # 0x860690 movq 0x1290(%rbx), %rdi callq *(%rax) movq $0x0, 0x1290(%rbx) xorl %r15d, %r15d jmp 0x4c716a xorl %r15d, %r15d testb $0x1, (%r12) jne 0x4c7099 movl %r15d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_proxy.c
Curl_proxyCONNECT
CURLcode Curl_proxyCONNECT(struct Curl_easy *data, int sockindex, const char *hostname, int remote_port) { CURLcode result; struct connectdata *conn = data->conn; if(!conn->connect_state) { result = connect_init(data, FALSE); if(result) return result; } result = CONNECT(data, sockindex, hostname, remote_port); if(result || Curl_connect_complete(conn)) Curl_connect_done(data); return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %ecx, 0x4c(%rsp) movl %esi, %r12d movq %rdi, %rbx movq 0x18(%rdi), %r14 movq 0x540(%r14), %rbp testq %rbp, %rbp movq %rdx, 0x78(%rsp) je 0x4c71f6 movl $0x0, 0x54(%rsp) movl %r12d, 0x14(%rsp) movslq %r12d, %rax leaq (%r14,%rax,4), %rax addq $0x1e0, %rax # imm = 0x1E0 movq %rax, 0x58(%rsp) movq %r14, %r12 cmpl $0x1, 0x350(%rbp) jbe 0x4c723f movq 0x540(%r14), %rax xorl %r13d, %r13d testq %rax, %rax je 0x4c7e52 cmpl $0x2, 0x350(%rax) jae 0x4c7e52 jmp 0x4c7e5a movq %rbx, %rdi xorl %esi, %esi callq 0x4c7f69 movl %eax, %r13d testl %eax, %eax jne 0x4c7e5a movl %r12d, 0x14(%rsp) movq 0x18(%rbx), %r12 movq 0x540(%r12), %rbp movl $0x0, 0x54(%rsp) testq %rbp, %rbp je 0x4c71d1 movslq 0x14(%rsp), %rax leaq (%r12,%rax,4), %rax addq $0x1e0, %rax # imm = 0x1E0 movq %rax, 0x58(%rsp) jmp 0x4c71c8 movq 0x58(%rsp), %rax movl (%rax), %eax movl %eax, 0x50(%rsp) movq 0x198(%rbx), %rax movq %rax, 0x60(%rsp) andl $-0x11, 0x374(%r12) leaq 0x310(%rbp), %rcx leaq 0x1378(%rbx), %rax movq %rax, 0x70(%rsp) leaq 0x2f0(%rbp), %rax movq %rax, 0x40(%rsp) leaq 0x140(%rbx), %rax movq %rax, 0x30(%rsp) leaq 0x348(%rbp), %rax movq %rax, 0x38(%rsp) movq %r12, 0x8(%rsp) movq %rcx, 0x28(%rsp) movl 0x350(%rbp), %eax testl %eax, %eax jne 0x4c7574 movq %rbx, %rdi leaq 0x1e1b66(%rip), %rsi # 0x6a8e1e movq 0x78(%rsp), %r15 movq %r15, %rdx movl 0x4c(%rsp), %ecx xorl %eax, %eax callq 0x4a1537 movq 0x180(%rbx), %rdi leaq 0x3993b7(%rip), %rax # 0x860690 callq *(%rax) movq $0x0, 0x180(%rbx) movl $0x100000, %esi # imm = 0x100000 movq 0x28(%rsp), %rdi callq 0x4b92c8 cmpq %r15, 0x98(%r12) je 0x4c7314 movq %r15, %rdi movl $0x3a, %esi callq 0x40250 testq %rax, %rax setne %al jmp 0x4c7321 movb 0x375(%r12), %al andb $0x8, %al shrb $0x3, %al testb %al, %al leaq 0x1f7d1f(%rip), %rcx # 0x6bf049 movq %rcx, %rsi leaq 0x1797ad(%rip), %rax # 0x640ae1 cmovneq %rax, %rsi leaq 0x1c40ae(%rip), %rax # 0x68b3ed cmovneq %rax, %rcx leaq 0x1e1cf1(%rip), %rdi # 0x6a903b movq %r15, %rdx movl 0x4c(%rsp), %r8d xorl %eax, %eax callq 0x49c12b movl $0x1b, %r13d testq %rax, %rax je 0x4c7e52 movq %rax, %r12 movl $0x4, %ecx movq %rbx, %rdi movq 0x8(%rsp), %rsi leaq 0x1e0ff6(%rip), %rdx # 0x6a8375 callq 0x4c2710 testq %rax, %rax je 0x4c738e xorl %r15d, %r15d jmp 0x4c73ab leaq 0x1e1cb0(%rip), %rdi # 0x6a9045 movq %r12, %rsi xorl %eax, %eax callq 0x49c12b movq %rax, %r15 testq %rax, %rax je 0x4c7e2b movq %rbx, %rdi movq 0x8(%rsp), %rsi leaq 0x1e1c55(%rip), %rdx # 0x6a900f xorl %ecx, %ecx movq %r12, %r8 movl $0x1, %r9d callq 0x4c2d0c movl %eax, %r13d testl %eax, %eax jne 0x4c7549 movq %r14, 0x18(%rsp) movq 0x8(%rsp), %r14 cmpb $0x1, 0x140(%r14) leaq 0x1daf85(%rip), %rcx # 0x6a2373 leaq 0x1e0fe0(%rip), %rax # 0x6a83d5 cmoveq %rax, %rcx testq %r15, %r15 movq %r15, %r8 leaq 0x1f7c43(%rip), %rax # 0x6bf049 cmoveq %rax, %r8 movq 0x1290(%rbx), %r9 testq %r9, %r9 cmoveq %rax, %r9 movq 0x28(%rsp), %rdi leaq 0x1e1a1f(%rip), %rsi # 0x6a8e43 movq %r12, %rdx xorl %eax, %eax callq 0x4b9468 testl %eax, %eax je 0x4c743f movl %eax, %r13d movq 0x18(%rsp), %r14 jmp 0x4c7538 movl $0xa, %ecx movq %rbx, %rdi movq %r14, %rsi leaq 0x1e0f19(%rip), %rdx # 0x6a836a callq 0x4c2710 testq %rax, %rax je 0x4c74e7 movl $0x10, %ecx movq %rbx, %rdi movq 0x8(%rsp), %rsi leaq 0x1e12cf(%rip), %rdx # 0x6a8742 callq 0x4c2710 testq %rax, %rax movq 0x18(%rsp), %r14 je 0x4c7517 movq %rbx, %rdi movl $0x1, %esi movq 0x28(%rsp), %rdx callq 0x4c38f7 testl %eax, %eax jne 0x4c7535 movl $0x2, %edx movq 0x28(%rsp), %rdi leaq 0x1c70cd(%rip), %rsi # 0x68e57e callq 0x4b9370 testl %eax, %eax jne 0x4c7535 xorl %r13d, %r13d movq 0x28(%rsp), %rdi movq %rbx, %rsi movq 0x70(%rsp), %rdx xorl %ecx, %ecx movl 0x14(%rsp), %r8d callq 0x4c33f1 movq $0x0, 0x338(%rbp) testl %eax, %eax jne 0x4c7535 jmp 0x4c7549 movq 0x850(%rbx), %rdx testq %rdx, %rdx je 0x4c745f movq 0x28(%rsp), %rdi leaq 0x1de09d(%rip), %rsi # 0x6a55a0 xorl %eax, %eax callq 0x4b9468 testl %eax, %eax jne 0x4c7432 jmp 0x4c745f movl $0x1e, %edx movq 0x28(%rsp), %rdi leaq 0x1e122b(%rip), %rsi # 0x6a8753 callq 0x4b9370 testl %eax, %eax je 0x4c7486 movl %eax, %r13d movq %rbx, %rdi leaq 0x1e191a(%rip), %rsi # 0x6a8e5c xorl %eax, %eax callq 0x4a16c7 movq %r15, %rdi leaq 0x39913d(%rip), %r15 # 0x860690 callq *(%r15) movq %r12, %rdi callq *(%r15) testl %r13d, %r13d jne 0x4c7e52 movl $0x1, 0x350(%rbp) movq 0x8(%rsp), %r12 movq %rbx, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x4b4ccc testq %rax, %rax jle 0x4c7c59 movq %r12, %rdi movl 0x14(%rsp), %esi callq 0x4b67d2 movq 0x60(%rsp), %rcx movl 0x200(%rcx), %ecx testl %ecx, %ecx setne %dl orb %al, %dl cmpb $0x1, %dl jne 0x4c71d1 cmpl $0x1, %ecx jne 0x4c7615 movq 0x330(%rbp), %rcx testq %rcx, %rcx jne 0x4c7c75 movq 0xc78(%rbx), %rax movq %rax, 0x190(%rbx) movl 0x6d0(%rbx), %esi movq %rbx, %rdi leaq 0x20(%rsp), %rdx callq 0x4a8287 testl %eax, %eax jne 0x4c7cc9 movq 0x20(%rsp), %rcx movq %rcx, 0x330(%rbp) testq %rcx, %rcx jne 0x4c7c75 movq 0x60(%rsp), %rax movl $0x0, 0x200(%rax) xorl %r13d, %r13d cmpl $0x0, 0x340(%rbp) je 0x4c7b8f movl $0x1, %ecx movq %rbx, %rdi movl 0x50(%rsp), %esi leaq 0x7(%rsp), %rdx leaq 0x20(%rsp), %r8 callq 0x4a1d1c cmpl $0x51, %eax je 0x4c7e49 movl %eax, %r15d movq %rbx, %rdi callq 0x4a068a testl %eax, %eax jne 0x4c7c32 testl %r15d, %r15d jne 0x4c7b0f cmpq $0x0, 0x20(%rsp) jle 0x4c7b1b cmpl $0x2, 0x340(%rbp) jne 0x4c76a1 movq 0x38(%rsp), %rdx movq (%rdx), %rax testq %rax, %rax je 0x4c77af leaq -0x1(%rax), %rcx movq %rcx, (%rdx) cmpq $0x1, %rax jg 0x4c796a jmp 0x4c7b78 movl $0x1, %edx movq 0x40(%rsp), %rdi leaq 0x7(%rsp), %rsi callq 0x4b9370 testl %eax, %eax jne 0x4c7c3d cmpb $0xa, 0x7(%rsp) jne 0x4c796a incq 0x338(%rbp) movq 0x40(%rsp), %r15 movq %r15, %rdi callq 0x4b94f6 movq %rax, %r12 movq %r15, %rdi callq 0x4b94fe movq %rax, %r15 movq %rbx, %rdi movl $0x1, %esi movq %r12, %rdx movq %rax, %rcx callq 0x4a1609 movq 0xa92(%rbx), %rax btq $0x2b, %rax jb 0x4c7738 shrl $0x16, %eax andl $0x1, %eax xorl %ecx, %ecx cmpq $0x1, 0x338(%rbp) sete %cl leal 0xa(%rax,%rcx,4), %esi movq %rbx, %rdi movq %r12, %rdx movq %r15, %rcx callq 0x4a1998 testl %eax, %eax jne 0x4c7dbf addq %r15, 0x1370(%rbx) movzbl (%r12), %eax cmpl $0xd, %eax je 0x4c7752 cmpl $0xa, %eax jne 0x4c7800 movq 0x30(%rsp), %rax cmpl $0x197, (%rax) # imm = 0x197 movq 0x38(%rsp), %rax jne 0x4c78eb testb $0x20, 0x1300(%rbx) jne 0x4c78eb movl $0x2, 0x340(%rbp) movq 0x348(%rbp), %rdx testq %rdx, %rdx je 0x4c78de movq %rbx, %rdi leaq 0x1e176c(%rip), %rsi # 0x6a8f05 xorl %eax, %eax callq 0x4a1537 movq 0x38(%rsp), %rax movq 0x8(%rsp), %r12 jmp 0x4c7a18 movq $0x0, 0x68(%rsp) movl $0x1, %edx movq %rbx, %rdi leaq 0x7(%rsp), %rsi leaq 0x68(%rsp), %rcx leaq 0x84(%rsp), %r8 callq 0x4c67f8 cmpl $-0x1, %eax jne 0x4c796a movq %rbx, %rdi leaq 0x1e16ed(%rip), %rsi # 0x6a8ed7 xorl %eax, %eax callq 0x4a1537 movl $0x0, 0x340(%rbp) jmp 0x4c7900 movq %r14, 0x18(%rsp) movl $0x11, %edx movq %r12, %rdi leaq 0x1e1091(%rip), %rsi # 0x6a88a5 callq 0x4a7f68 testl %eax, %eax je 0x4c782f movq 0x30(%rsp), %rax cmpl $0x191, (%rax) # imm = 0x191 jne 0x4c782f xorl %r14d, %r14d jmp 0x4c7857 movl $0x13, %edx movq %r12, %rdi leaq 0x1e1079(%rip), %rsi # 0x6a88b7 callq 0x4a7f68 testl %eax, %eax je 0x4c789c movb $0x1, %r14b movq 0x30(%rsp), %rax cmpl $0x197, (%rax) # imm = 0x197 jne 0x4c789c movq %r12, %rdi callq 0x4c276e testq %rax, %rax je 0x4c7e39 movq %rax, %r15 movzbl %r14b, %esi movq %rbx, %rdi movq %rax, %rdx callq 0x4c3180 movl %eax, %r12d movq %r15, %rdi leaq 0x398e09(%rip), %rax # 0x860690 callq *(%rax) testl %r12d, %r12d movq 0x18(%rsp), %r14 je 0x4c795b jmp 0x4c7e46 movl $0xf, %edx movq %r12, %rdi leaq 0x1e0a1e(%rip), %rsi # 0x6a82c9 callq 0x4a7f68 testl %eax, %eax je 0x4c790c movq 0x30(%rsp), %rax movl (%rax), %edx leal -0xc8(%rdx), %eax cmpl $0x63, %eax movq 0x18(%rsp), %r14 ja 0x4c7943 movq %rbx, %rdi leaq 0x1e166f(%rip), %rsi # 0x6a8f44 xorl %eax, %eax callq 0x4a1537 jmp 0x4c795b testb $0x1, 0x354(%rbp) jne 0x4c79a3 movl $0x0, 0x340(%rbp) movq 0x8(%rsp), %r12 cmpq $0x0, (%rax) jne 0x4c796a movl $0x2, 0x350(%rbp) jmp 0x4c796a movl $0xb, %edx movl $0x5, %r8d movq %r12, %rdi leaq 0x1e0ec5(%rip), %rsi # 0x6a87e6 leaq 0x1e0f14(%rip), %rcx # 0x6a883c callq 0x4c375a testb %al, %al movq 0x18(%rsp), %r14 je 0x4c7a2a orb $0x2, 0x354(%rbp) jmp 0x4c795b addq $0xf, %r12 movq %r12, %rdi xorl %esi, %esi movl $0xa, %edx movq 0x38(%rsp), %rcx callq 0x4cb450 movq 0x40(%rsp), %rdi callq 0x4b92fb movq 0x8(%rsp), %r12 cmpl $0x0, 0x340(%rbp) je 0x4c7b8c movl $0x1, %ecx movq %rbx, %rdi movl 0x50(%rsp), %esi leaq 0x7(%rsp), %rdx leaq 0x20(%rsp), %r8 callq 0x4a1d1c movl %eax, %r15d cmpl $0x51, %eax jne 0x4c764c jmp 0x4c7e49 movq %rbx, %rdi leaq 0x1e157a(%rip), %rsi # 0x6a8f27 xorl %eax, %eax callq 0x4a1537 orb $0x8, 0x1a9(%rbx) cmpb $0xa, 0x1(%r12) leaq 0x1(%r12), %rsi cmovneq %r12, %rsi incq %rsi movl $0x1, %edx movq %rbx, %rdi leaq 0x20(%rsp), %rcx leaq 0x68(%rsp), %r8 callq 0x4c67f8 cmpl $-0x1, %eax jne 0x4c7a0e movq %rbx, %rdi leaq 0x1e14e4(%rip), %rsi # 0x6a8ed7 xorl %eax, %eax callq 0x4a1537 movl $0x0, 0x340(%rbp) movl $0x2, 0x350(%rbp) movq 0x8(%rsp), %r12 movq 0x38(%rsp), %rax cmpl $0x0, 0x340(%rbp) jne 0x4c7977 jmp 0x4c78fa movl $0x12, %edx movq %r12, %rdi leaq 0x1e08a0(%rip), %rsi # 0x6a82d9 callq 0x4a7f68 testl %eax, %eax je 0x4c7a63 movq 0x30(%rsp), %rax movl (%rax), %edx leal -0xc8(%rdx), %eax cmpl $0x63, %eax ja 0x4c7ac1 movq %rbx, %rdi leaq 0x1e1517(%rip), %rsi # 0x6a8f75 jmp 0x4c78d5 movl $0x11, %edx movl $0x5, %r8d movq %r12, %rdi leaq 0x1e0d68(%rip), %rsi # 0x6a87e0 leaq 0x1e0dbd(%rip), %rcx # 0x6a883c callq 0x4c375a testb %al, %al jne 0x4c793a movq %r12, %rdi leaq 0x1e152d(%rip), %rsi # 0x6a8fc3 leaq 0x54(%rsp), %rdx movq 0x30(%rsp), %rcx xorl %eax, %eax callq 0x3f280 cmpl $0x2, %eax jne 0x4c795b movl 0x140(%rbx), %eax movl %eax, 0x135c(%rbx) jmp 0x4c795b movl $0x12, %edx movl $0x7, %r8d movq %r12, %rdi leaq 0x1e0803(%rip), %rsi # 0x6a82d9 leaq 0x1e14de(%rip), %rcx # 0x6a8fbb callq 0x4c375a testb %al, %al je 0x4c795b movq %rbx, %rdi leaq 0x1e14b5(%rip), %rsi # 0x6a8fa9 xorl %eax, %eax callq 0x4a1537 orb $0x1, 0x354(%rbp) movq %rbx, %rdi callq 0x4c67d8 jmp 0x4c795b movl $0x0, 0x340(%rbp) jmp 0x4c7b8c cmpq $0x0, 0x1f8(%rbx) je 0x4c7b58 cmpq $0x0, 0xdf0(%rbx) je 0x4c7b58 cmpq $0x0, 0x1290(%rbx) je 0x4c7b58 orb $0x10, 0x374(%r12) xorl %r13d, %r13d movq %rbx, %rdi leaq 0x1e1352(%rip), %rsi # 0x6a8ea1 xorl %eax, %eax callq 0x4a1537 jmp 0x4c7b6c movq %rbx, %rdi leaq 0x1e135f(%rip), %rsi # 0x6a8ec1 xorl %eax, %eax callq 0x4a16c7 movb $0x1, %r13b movl $0x0, 0x340(%rbp) jmp 0x4c7b8f movl $0x0, 0x340(%rbp) movl $0x2, 0x350(%rbp) xorl %r13d, %r13d movq %rbx, %rdi callq 0x4a068a testb %r13b, %r13b jne 0x4c7cd1 testl %eax, %eax jne 0x4c7cd1 movl 0x135c(%rbx), %eax movl $0xffffff38, %ecx # imm = 0xFFFFFF38 addl %ecx, %eax cmpl $0x63, %eax ja 0x4c7bc2 movb 0x354(%rbp), %al jmp 0x4c7beb movq %rbx, %rdi callq 0x4c286d testl %eax, %eax jne 0x4c7cc9 testb $0x40, 0x374(%r12) movb 0x354(%rbp), %al je 0x4c7beb orb $0x2, %al movb %al, 0x354(%rbp) movq 0x180(%rbx), %rcx testb $0x2, %al jne 0x4c7ce7 testq %rcx, %rcx je 0x4c7d06 movl 0x350(%rbp), %eax cmpl $0x2, %eax jne 0x4c72a6 movq %rbx, %rdi movl $0x1, %esi callq 0x4c7f69 cmpq $0x0, 0x180(%rbx) jne 0x4c72a0 jmp 0x4c7d06 movl $0x2a, %r13d jmp 0x4c7e49 leaq 0x1e12a6(%rip), %rsi # 0x6a8eea movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x38, %r13d jmp 0x4c7e49 leaq 0x1e121c(%rip), %rsi # 0x6a8e7c movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x1c, %r13d jmp 0x4c7e52 movl 0x3bc(%r12), %esi movq 0x190(%rbx), %rdx leaq 0x20(%rsp), %r8 movq %rbx, %rdi callq 0x4a17cd movl %eax, %r13d testl %eax, %eax jne 0x4c7cb1 movq 0x190(%rbx), %rdx movq 0x20(%rsp), %rcx movq %rbx, %rdi movl $0x2, %esi callq 0x4a1609 movq 0x20(%rsp), %rax subq %rax, 0x330(%rbp) addq %rax, 0x190(%rbx) jmp 0x4c7e49 movl %eax, %r13d jmp 0x4c7e52 testl %eax, %eax movl $0x2a, %eax movl $0x38, %r13d cmovnel %eax, %r13d jmp 0x4c7e52 testq %rcx, %rcx je 0x4c7d06 movq 0x58(%rsp), %r15 movl (%r15), %edx movq %rbx, %rdi movq %r12, %rsi callq 0x4b5897 movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF movl $0xffffff38, %eax # imm = 0xFFFFFF38 addl 0x135c(%rbx), %eax cmpl $0x64, %eax jae 0x4c7d81 movl $0x2, 0x350(%rbp) movq 0x1290(%rbx), %rdi leaq 0x398962(%rip), %rax # 0x860690 callq *(%rax) movq $0x0, 0x1290(%rbx) movb 0xdf8(%rbx), %al andb $-0x4, %al incb %al movb %al, 0xdf8(%rbx) movl 0x135c(%rbx), %edx leaq 0x1e12bf(%rip), %rsi # 0x6a9017 movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 andb $-0x9, 0x1a9(%rbx) andb $-0x3, 0x376(%r12) movq 0x40(%rsp), %rdi callq 0x4b92db jmp 0x4c71d1 testb $0x2, 0x354(%rbp) sete %al movq 0x180(%rbx), %rdi testq %rdi, %rdi sete %cl orb %al, %cl je 0x4c7dc7 leaq 0x3988ed(%rip), %rax # 0x860690 callq *(%rax) movq $0x0, 0x180(%rbx) movq %r12, %rdi movl $0x2, %esi callq 0x4b6786 jmp 0x4c7de9 movl %eax, %r13d jmp 0x4c7e49 orb $0x10, 0x374(%r12) leaq 0x1e11f9(%rip), %rsi # 0x6a8fd0 movq %rbx, %rdi xorl %eax, %eax callq 0x4a1537 movq %rbx, %rdi callq 0x4c7ebf movl $0x0, 0x350(%rbp) testb $0x10, 0x374(%r12) jne 0x4c71d1 movq 0x40(%rsp), %rdi callq 0x4b92db movl 0x140(%rbx), %edx leaq 0x1e11cf(%rip), %rsi # 0x6a8fe8 movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x38, %r13d jmp 0x4c7e52 movq %r12, %rdi leaq 0x39885b(%rip), %rax # 0x860690 callq *(%rax) jmp 0x4c7e52 movl $0x1b, %r13d movq 0x18(%rsp), %r14 jmp 0x4c7e49 movl %r12d, %r13d testl %r13d, %r13d je 0x4c71d1 movq %rbx, %rdi callq 0x4c7ebf movl %r13d, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_proxy.c
Curl_output_aws_sigv4
CURLcode Curl_output_aws_sigv4(struct Curl_easy *data, bool proxy) { CURLcode ret = CURLE_OUT_OF_MEMORY; struct connectdata *conn = data->conn; size_t len; const char *arg; char provider0[MAX_SIGV4_LEN + 1]=""; char provider1[MAX_SIGV4_LEN + 1]=""; char region[MAX_SIGV4_LEN + 1]=""; char service[MAX_SIGV4_LEN + 1]=""; const char *hostname = conn->host.name; time_t clock; struct tm tm; char timestamp[TIMESTAMP_SIZE]; char date[9]; struct dynbuf canonical_headers; struct dynbuf signed_headers; char *date_header = NULL; const char *post_data = data->set.postfields; size_t post_data_len = 0; unsigned char sha_hash[32]; char sha_hex[65]; char *canonical_request = NULL; char *request_type = NULL; char *credential_scope = NULL; char *str_to_sign = NULL; const char *user = data->state.aptr.user ? data->state.aptr.user : ""; char *secret = NULL; unsigned char sign0[32] = {0}; unsigned char sign1[32] = {0}; char *auth_headers = NULL; DEBUGASSERT(!proxy); (void)proxy; if(Curl_checkheaders(data, STRCONST("Authorization"))) { /* Authorization already present, Bailing out */ return CURLE_OK; } /* we init thoses buffers here, so goto fail will free initialized dynbuf */ Curl_dyn_init(&canonical_headers, CURL_MAX_HTTP_HEADER); Curl_dyn_init(&signed_headers, CURL_MAX_HTTP_HEADER); /* * Parameters parsing * Google and Outscale use the same OSC or GOOG, * but Amazon uses AWS and AMZ for header arguments. * AWS is the default because most of non-amazon providers * are still using aws:amz as a prefix. */ arg = data->set.str[STRING_AWS_SIGV4] ? data->set.str[STRING_AWS_SIGV4] : "aws:amz"; /* provider1[:provider2[:region[:service]]] No string can be longer than N bytes of non-whitespace */ (void)sscanf(arg, "%" MAX_SIGV4_LEN_TXT "[^:]" ":%" MAX_SIGV4_LEN_TXT "[^:]" ":%" MAX_SIGV4_LEN_TXT "[^:]" ":%" MAX_SIGV4_LEN_TXT "s", provider0, provider1, region, service); if(!provider0[0]) { failf(data, "first provider can't be empty"); ret = CURLE_BAD_FUNCTION_ARGUMENT; goto fail; } else if(!provider1[0]) strcpy(provider1, provider0); if(!service[0]) { char *hostdot = strchr(hostname, '.'); if(!hostdot) { failf(data, "service missing in parameters and hostname"); ret = CURLE_URL_MALFORMAT; goto fail; } len = hostdot - hostname; if(len > MAX_SIGV4_LEN) { failf(data, "service too long in hostname"); ret = CURLE_URL_MALFORMAT; goto fail; } strncpy(service, hostname, len); service[len] = '\0'; if(!region[0]) { const char *reg = hostdot + 1; const char *hostreg = strchr(reg, '.'); if(!hostreg) { failf(data, "region missing in parameters and hostname"); ret = CURLE_URL_MALFORMAT; goto fail; } len = hostreg - reg; if(len > MAX_SIGV4_LEN) { failf(data, "region too long in hostname"); ret = CURLE_URL_MALFORMAT; goto fail; } strncpy(region, reg, len); region[len] = '\0'; } } #ifdef DEBUGBUILD { char *force_timestamp = getenv("CURL_FORCETIME"); if(force_timestamp) clock = 0; else time(&clock); } #else time(&clock); #endif ret = Curl_gmtime(clock, &tm); if(ret) { goto fail; } if(!strftime(timestamp, sizeof(timestamp), "%Y%m%dT%H%M%SZ", &tm)) { ret = CURLE_OUT_OF_MEMORY; goto fail; } ret = make_headers(data, hostname, timestamp, provider1, &date_header, &canonical_headers, &signed_headers); if(ret) goto fail; ret = CURLE_OUT_OF_MEMORY; memcpy(date, timestamp, sizeof(date)); date[sizeof(date) - 1] = 0; if(post_data) { if(data->set.postfieldsize < 0) post_data_len = strlen(post_data); else post_data_len = (size_t)data->set.postfieldsize; } if(Curl_sha256it(sha_hash, (const unsigned char *) post_data, post_data_len)) goto fail; sha256_to_hex(sha_hex, sha_hash, sizeof(sha_hex)); { Curl_HttpReq httpreq; const char *method; Curl_http_method(data, conn, &method, &httpreq); canonical_request = curl_maprintf("%s\n" /* HTTPRequestMethod */ "%s\n" /* CanonicalURI */ "%s\n" /* CanonicalQueryString */ "%s\n" /* CanonicalHeaders */ "%s\n" /* SignedHeaders */ "%s", /* HashedRequestPayload in hex */ method, data->state.up.path, data->state.up.query ? data->state.up.query : "", Curl_dyn_ptr(&canonical_headers), Curl_dyn_ptr(&signed_headers), sha_hex); if(!canonical_request) goto fail; } /* provider 0 lowercase */ Curl_strntolower(provider0, provider0, strlen(provider0)); request_type = curl_maprintf("%s4_request", provider0); if(!request_type) goto fail; credential_scope = curl_maprintf("%s/%s/%s/%s", date, region, service, request_type); if(!credential_scope) goto fail; if(Curl_sha256it(sha_hash, (unsigned char *) canonical_request, strlen(canonical_request))) goto fail; sha256_to_hex(sha_hex, sha_hash, sizeof(sha_hex)); /* provider 0 uppercase */ Curl_strntoupper(provider0, provider0, strlen(provider0)); /* * Google allows using RSA key instead of HMAC, so this code might change * in the future. For now we ony support HMAC. */ str_to_sign = curl_maprintf("%s4-HMAC-SHA256\n" /* Algorithm */ "%s\n" /* RequestDateTime */ "%s\n" /* CredentialScope */ "%s", /* HashedCanonicalRequest in hex */ provider0, timestamp, credential_scope, sha_hex); if(!str_to_sign) { goto fail; } /* provider 0 uppercase */ secret = curl_maprintf("%s4%s", provider0, data->state.aptr.passwd ? data->state.aptr.passwd : ""); if(!secret) goto fail; HMAC_SHA256(secret, strlen(secret), date, strlen(date), sign0); HMAC_SHA256(sign0, sizeof(sign0), region, strlen(region), sign1); HMAC_SHA256(sign1, sizeof(sign1), service, strlen(service), sign0); HMAC_SHA256(sign0, sizeof(sign0), request_type, strlen(request_type), sign1); HMAC_SHA256(sign1, sizeof(sign1), str_to_sign, strlen(str_to_sign), sign0); sha256_to_hex(sha_hex, sign0, sizeof(sha_hex)); /* provider 0 uppercase */ auth_headers = curl_maprintf("Authorization: %s4-HMAC-SHA256 " "Credential=%s/%s, " "SignedHeaders=%s, " "Signature=%s\r\n" "%s\r\n", provider0, user, credential_scope, Curl_dyn_ptr(&signed_headers), sha_hex, date_header); if(!auth_headers) { goto fail; } Curl_safefree(data->state.aptr.userpwd); data->state.aptr.userpwd = auth_headers; data->state.authhost.done = TRUE; ret = CURLE_OK; fail: Curl_dyn_free(&canonical_headers); Curl_dyn_free(&signed_headers); free(canonical_request); free(request_type); free(credential_scope); free(str_to_sign); free(secret); free(date_header); return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movq %rdi, %rbx movq 0x18(%rdi), %r12 xorl %ebp, %ebp movb %bpl, 0x190(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x180(%rsp) movaps %xmm0, 0x170(%rsp) movaps %xmm0, 0x160(%rsp) movaps %xmm0, 0x150(%rsp) movb %bpl, 0x200(%rsp) movaps %xmm0, 0x1f0(%rsp) movaps %xmm0, 0x1e0(%rsp) movaps %xmm0, 0x1d0(%rsp) movaps %xmm0, 0x1c0(%rsp) movb %bpl, 0x140(%rsp) movaps %xmm0, 0x130(%rsp) movaps %xmm0, 0x120(%rsp) movaps %xmm0, 0x110(%rsp) movaps %xmm0, 0x100(%rsp) movb %bpl, 0xf0(%rsp) movaps %xmm0, 0xe0(%rsp) movaps %xmm0, 0xd0(%rsp) movaps %xmm0, 0xc0(%rsp) movaps %xmm0, 0xb0(%rsp) movq 0x98(%r12), %r15 movq 0x210(%rdi), %r13 movq 0x12e0(%rdi), %r14 testq %r14, %r14 leaq 0x1f6f00(%rip), %rax # 0x6bf049 cmoveq %rax, %r14 movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) leaq 0x1e0a65(%rip), %rsi # 0x6a8bd6 movl $0xd, %edx callq 0x4a820c testq %rax, %rax jne 0x4c857c movq %r13, 0x10(%rsp) movq %r12, 0x18(%rsp) leaq 0x218(%rsp), %rdi movl $0x19000, %esi # imm = 0x19000 callq 0x4b92c8 leaq 0x1a0(%rsp), %rdi movl $0x19000, %esi # imm = 0x19000 callq 0x4b92c8 movq 0x9a0(%rbx), %rax testq %rax, %rax leaq 0x1e0e8d(%rip), %rdi # 0x6a9050 cmovneq %rax, %rdi leaq 0x1e0e8a(%rip), %rsi # 0x6a9058 leaq 0x150(%rsp), %r12 leaq 0x1c0(%rsp), %rcx leaq 0x100(%rsp), %r8 leaq 0xb0(%rsp), %r9 movq %r12, %rdx xorl %eax, %eax callq 0x3f280 cmpb $0x0, (%r12) je 0x4c825f cmpb $0x0, 0x1c0(%rsp) jne 0x4c821e leaq 0x1c0(%rsp), %rdi leaq 0x150(%rsp), %rsi callq 0x3fdb0 cmpb $0x0, 0xb0(%rsp) je 0x4c8286 leaq 0x238(%rsp), %r12 movq %r12, %rdi callq 0x40a80 movq (%r12), %rdi leaq 0x2f8(%rsp), %rsi callq 0x4a0613 testl %eax, %eax je 0x4c82bb movl %eax, 0x10(%rsp) movq $0x0, 0x28(%rsp) jmp 0x4c8529 leaq 0x1e0e0f(%rip), %rsi # 0x6a9075 movq $0x0, 0x28(%rsp) movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x2b, 0x10(%rsp) jmp 0x4c8529 movq %r15, %rdi movl $0x2e, %esi callq 0x40250 testq %rax, %rax je 0x4c8507 movq %rax, %r12 movq %rax, %r13 subq %r15, %r13 cmpq $0x41, %r13 jb 0x4c8590 leaq 0x1e0e08(%rip), %rsi # 0x6a90be jmp 0x4c850e leaq 0x1e0e5f(%rip), %rdx # 0x6a9121 leaq 0x50(%rsp), %rdi leaq 0x2f8(%rsp), %rcx movl $0x11, %esi callq 0x410f0 testq %rax, %rax je 0x4c85ef leaq 0x1c0(%rsp), %r12 movq %r12, %rdi callq 0x3fd60 movq %r12, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x4a7ecc movsbl (%r12), %edi callq 0x4a7dac movb %al, (%r12) leaq 0x1e0eba(%rip), %rdx # 0x6a91cf leaq 0x240(%rsp), %rdi movl $0x48, %esi movq %r12, %rcx xorl %eax, %eax callq 0x49bfb4 movl $0x1, %edx movq %r12, %rdi movq %r12, %rsi callq 0x4a7ecc leaq 0x1e0e96(%rip), %rdx # 0x6a91d9 leaq 0x290(%rsp), %rdi leaq 0x50(%rsp), %r8 movl $0x5a, %esi movq %r12, %rcx xorl %eax, %eax callq 0x49bfb4 leaq 0x1e000f(%rip), %rsi # 0x6a8375 movl $0x4, %edx movq %rbx, %rdi callq 0x4a820c testq %rax, %rax je 0x4c85fc movq %r14, 0x48(%rsp) movq 0x318(%rbx), %r15 xorl %r14d, %r14d movl $0x0, %ebp testq %r15, %r15 je 0x4c8457 movq %r14, %rbp movq (%r15), %rsi movq %rbp, %rdi callq 0x4a6804 testq %rax, %rax je 0x4c8652 movq %rax, %r14 movq 0x8(%r15), %r15 movq %rax, %rbp testq %r15, %r15 jne 0x4c839c leaq 0x1bb291(%rip), %rbp # 0x683657 movq %r14, %r15 movq (%r15), %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x40b40 movq %rax, %r13 movq %r12, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x4a7ecc movq (%r15), %rax cmpb $0x0, (%rax,%r13) je 0x4c8447 addq %r13, %rax incq %rax movq %rax, %rcx movzbl (%rcx), %edx cmpl $0x9, %edx je 0x4c8408 cmpl $0x20, %edx jne 0x4c840d incq %rcx jmp 0x4c83fb testl %edx, %edx je 0x4c8444 incq %rcx xorl %esi, %esi cmpb $0x20, %dl je 0x4c8423 movzbl %dl, %edi cmpl $0x9, %edi jne 0x4c842c movb (%rcx), %dl incq %rcx decl %esi jmp 0x4c8416 testl %esi, %esi je 0x4c8439 testb %dl, %dl je 0x4c8444 decq %rcx movb $0x20, %dl movb %dl, (%rax) incq %rax movb (%rcx), %dl testb %dl, %dl jne 0x4c8411 movb $0x0, (%rax) movq 0x8(%r15), %r15 testq %r15, %r15 jne 0x4c83c9 movq %r14, %rbp leaq 0x240(%rsp), %r15 movq %r15, %rdi callq 0x3fd60 movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x4a820c testq %rax, %rax jne 0x4c8497 leaq 0x1e0d53(%rip), %rsi # 0x6a91d4 movl $0x4, %edx movq %rbx, %rdi callq 0x4a820c testq %rax, %rax je 0x4c86f8 leaq 0x398202(%rip), %rcx # 0x8606a0 movq %rax, %rdi callq *(%rcx) testq %rax, %rax je 0x4c882f movq %rax, %r12 movq %rax, %rdi movl $0x3a, %esi callq 0x40250 testq %rax, %rax je 0x4c8655 incq %rax movzbl (%rax), %ecx cmpl $0x20, %ecx je 0x4c84c5 cmpl $0x9, %ecx je 0x4c84c5 leaq 0x50(%rsp), %r15 movl $0x10, %edx movq %r15, %rdi movq %rax, %rsi callq 0x3f440 movb $0x0, 0x10(%r15) testq %rbp, %rbp je 0x4c8869 movq %r12, 0x28(%rsp) movq %rbx, 0x40(%rsp) jmp 0x4c873c leaq 0x1e0b85(%rip), %rsi # 0x6a9093 movq $0x0, 0x28(%rsp) movq %rbx, %rdi xorl %eax, %eax callq 0x4a16c7 movl $0x3, 0x10(%rsp) xorl %r14d, %r14d xorl %r15d, %r15d xorl %r12d, %r12d xorl %ebp, %ebp xorl %r13d, %r13d leaq 0x218(%rsp), %rdi callq 0x4b92db leaq 0x1a0(%rsp), %rdi callq 0x4b92db leaq 0x398138(%rip), %rbx # 0x860690 movq %r14, %rdi callq *(%rbx) movq %r15, %rdi callq *(%rbx) movq %r12, %rdi callq *(%rbx) movq %rbp, %rdi callq *(%rbx) movq %r13, %rdi callq *(%rbx) movq 0x28(%rsp), %rdi callq *(%rbx) movl 0x10(%rsp), %ebp movl %ebp, %eax addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xb0(%rsp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x3f440 movb $0x0, 0xb0(%rsp,%r13) cmpb $0x0, 0x100(%rsp) jne 0x4c8228 incq %r12 movq %r12, %rdi movl $0x2e, %esi callq 0x40250 testq %rax, %rax je 0x4c86cb movq %rax, %r13 subq %r12, %r13 cmpq $0x41, %r13 jb 0x4c86d7 leaq 0x1e0b1b(%rip), %rsi # 0x6a9105 jmp 0x4c850e movl $0x1b, 0x10(%rsp) jmp 0x4c8251 movq 0x12c0(%rbx), %r12 testq %r12, %r12 je 0x4c865f movq %r12, %rdi callq 0x3fd60 movl $0x3, %ecx cmpq $0x105, %rax # imm = 0x105 ja 0x4c883e movq %r14, 0x48(%rsp) leaq 0x330(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x3fdb0 leaq 0x1e0ba6(%rip), %rsi # 0x6a91e6 movq %r15, %rdi callq 0x40b40 movb $0x0, 0x330(%rsp,%rax) jmp 0x4c869b xorl %r12d, %r12d movl $0x1b, %ebx jmp 0x4c8845 movq %r15, %rdi callq 0x3fd60 movl $0x3, %ecx cmpq $0xff, %rax ja 0x4c883e movq %r14, 0x48(%rsp) leaq 0x1e0b65(%rip), %rdx # 0x6a91e9 leaq 0x330(%rsp), %rdi movl $0x105, %esi # imm = 0x105 movq %r15, %rcx xorl %eax, %eax callq 0x49bfb4 leaq 0x330(%rsp), %rsi xorl %edi, %edi callq 0x4a6804 testq %rax, %rax je 0x4c8839 movq %rax, %r14 movq 0x318(%rbx), %r15 testq %r15, %r15 jne 0x4c8399 jmp 0x4c83bf leaq 0x1e0a09(%rip), %rsi # 0x6a90db jmp 0x4c850e leaq 0x100(%rsp), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x3f440 movb $0x0, 0x100(%rsp,%r13) jmp 0x4c8228 leaq 0x290(%rsp), %rsi movq %rbp, %rdi callq 0x4a6804 testq %rax, %rax je 0x4c882f movq %rax, %r15 movq %rbx, 0x40(%rsp) leaq 0x1df9b9(%rip), %rdi # 0x6a80d9 leaq 0x240(%rsp), %rsi leaq 0x50(%rsp), %rdx xorl %eax, %eax callq 0x49c12b movq %rax, 0x28(%rsp) movq %r15, %rbp movq 0x8(%rbp), %rax testq %rax, %rax je 0x4c8796 movq %rax, 0x20(%rsp) movq (%rbp), %r15 xorl %r14d, %r14d movq %rbp, %r12 movq %rax, %rbx movq (%rax), %r13 movq %r15, %rdi movq %r13, %rsi callq 0x40ea0 testl %eax, %eax jle 0x4c8778 movq %r13, (%r12) movq %r15, (%rbx) movl $0x1, %r14d jmp 0x4c877b movq %r13, %r15 movq 0x8(%rbx), %rax movq %rbx, %r12 testq %rax, %rax jne 0x4c8754 testl %r14d, %r14d movq 0x20(%rsp), %rax je 0x4c8796 testq %rax, %rax jne 0x4c874a leaq 0x218(%rsp), %r15 leaq 0x1a0(%rsp), %r13 movq %rbp, %r14 movq 0x40(%rsp), %rbx movq 0x28(%rsp), %r12 movq (%r14), %rsi movq %r15, %rdi callq 0x4b942f testl %eax, %eax jne 0x4c8655 movq %r15, %rdi leaq 0x1c0245(%rip), %rsi # 0x688a15 callq 0x4b942f testl %eax, %eax jne 0x4c8655 movq (%r14), %rdi movl $0x3a, %esi callq 0x40250 testq %rax, %rax je 0x4c87f2 movb $0x0, (%rax) cmpq %rbp, %r14 movq %r13, %rdi je 0x4c8814 movq %r13, %rdi leaq 0x17d71c(%rip), %rsi # 0x645f20 callq 0x4b942f movq %r13, %rdi testl %eax, %eax jne 0x4c8655 movq (%r14), %rsi callq 0x4b942f testl %eax, %eax jne 0x4c8655 movq 0x8(%r14), %r14 testq %r14, %r14 jne 0x4c87b3 jmp 0x4c886b movl $0x1b, %ebx xorl %r12d, %r12d jmp 0x4c8845 movl $0x1b, %ecx movl %ecx, %ebx xorl %r12d, %r12d xorl %ebp, %ebp movq %r12, 0x28(%rsp) movq %rbp, %rdi callq 0x4a68e9 xorl %r14d, %r14d xorl %r15d, %r15d xorl %r12d, %r12d xorl %ebp, %ebp xorl %r13d, %r13d movl %ebx, 0x10(%rsp) jmp 0x4c8537 xorl %ebp, %ebp movq %rbp, %rdi callq 0x4a68e9 movq 0x50(%rsp), %rax movq %rax, 0x240(%rsp) movb $0x0, 0x248(%rsp) movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x4c88b0 movq 0x220(%rbx), %rdx testq %rdx, %rdx jns 0x4c88b2 movq %rsi, %rdi callq 0x3fd60 movq 0x10(%rsp), %rsi movq %rax, %rdx jmp 0x4c88b2 xorl %edx, %edx leaq 0x290(%rsp), %r15 movq %r15, %rdi callq 0x4ca34c testl %eax, %eax movq %r12, 0x28(%rsp) je 0x4c88d8 movl $0x1b, 0x10(%rsp) jmp 0x4c8529 movl $0x41, %r12d leaq 0x330(%rsp), %r13 leaq 0x1dd8d8(%rip), %r14 # 0x6a61c5 movzbl (%r15), %ecx movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x49bfb4 addq $-0x2, %r12 incq %r15 addq $0x2, %r13 cmpq $0x1, %r12 jne 0x4c88ed leaq 0x210(%rsp), %r15 leaq 0x6c(%rsp), %rcx movq %rbx, %rdi movq 0x18(%rsp), %rsi movq %r15, %rdx callq 0x4c3d33 movq (%r15), %r13 movq 0x11d0(%rbx), %rax movq %rax, 0x10(%rsp) movq 0x11d8(%rbx), %r12 testq %r12, %r12 leaq 0x1f66fa(%rip), %rax # 0x6bf049 cmoveq %rax, %r12 leaq 0x218(%rsp), %rdi callq 0x4b94f6 movq %rax, %r14 leaq 0x1a0(%rsp), %rdi callq 0x4b94f6 leaq 0x330(%rsp), %rbp movq %rbp, (%rsp) leaq 0x1e07ad(%rip), %rdi # 0x6a9130 xorl %r15d, %r15d movq %r13, %rsi movq 0x10(%rsp), %rdx movq %r12, %rcx movq %r14, %r8 movq %rax, %r9 xorl %eax, %eax callq 0x49c12b movq %rax, 0x18(%rsp) testq %rax, %rax je 0x4c8a58 leaq 0x150(%rsp), %r12 movq %r12, %rdi callq 0x3fd60 movq %r12, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x4a7ecc leaq 0x1e0771(%rip), %rdi # 0x6a9142 movq %r12, %rsi xorl %eax, %eax callq 0x49c12b testq %rax, %rax je 0x4c8a68 leaq 0x1e0763(%rip), %rdi # 0x6a914e leaq 0x240(%rsp), %rsi leaq 0x100(%rsp), %rdx leaq 0xb0(%rsp), %rcx movq %rax, 0x20(%rsp) movq %rax, %r8 xorl %eax, %eax callq 0x49c12b testq %rax, %rax je 0x4c8a85 movq %rax, %r14 movq 0x18(%rsp), %r13 movq %r13, %rdi callq 0x3fd60 leaq 0x290(%rsp), %r12 movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x4ca34c testl %eax, %eax je 0x4c8aa4 movl $0x1b, 0x10(%rsp) xorl %ebp, %ebp xorl %r13d, %r13d movq %r14, %r12 movq 0x18(%rsp), %r14 jmp 0x4c8a9a movl $0x1b, 0x10(%rsp) xorl %r14d, %r14d jmp 0x4c852f movl $0x1b, 0x10(%rsp) xorl %r15d, %r15d xorl %ebp, %ebp xorl %r13d, %r13d xorl %r12d, %r12d movq 0x18(%rsp), %r14 jmp 0x4c8537 movl $0x1b, 0x10(%rsp) xorl %r12d, %r12d xorl %r13d, %r13d movq 0x18(%rsp), %r14 xorl %ebp, %ebp movq 0x20(%rsp), %r15 jmp 0x4c8537 movl $0x41, %r13d leaq 0x1dd714(%rip), %r15 # 0x6a61c5 movzbl (%r12), %ecx movq %rbp, %rdi movq %r13, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x49bfb4 addq $-0x2, %r13 incq %r12 addq $0x2, %rbp cmpq $0x1, %r13 jne 0x4c8ab1 movl $0x1b, 0x10(%rsp) leaq 0x150(%rsp), %r12 movq %r12, %rdi callq 0x3fd60 movq %r12, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x4a7e9b leaq 0x1e0656(%rip), %rdi # 0x6a915a leaq 0x50(%rsp), %rdx leaq 0x330(%rsp), %r15 movq %r12, %rsi movq %r14, 0x30(%rsp) movq %r14, %rcx movq %r15, %r8 xorl %eax, %eax callq 0x49c12b testq %rax, %rax je 0x4c8d60 movq %rax, 0x38(%rsp) movq %rbx, 0x40(%rsp) movq 0x12e8(%rbx), %rax testq %rax, %rax leaq 0x1f64ff(%rip), %rdx # 0x6bf049 cmovneq %rax, %rdx leaq 0x1e061e(%rip), %rdi # 0x6a9173 leaq 0x150(%rsp), %rsi xorl %eax, %eax callq 0x49c12b testq %rax, %rax je 0x4c8d76 movq %rax, %rbx movq %rax, %rdi callq 0x3fd60 movl %eax, %r12d leaq 0x240(%rsp), %rbp movq %rbp, %rdi callq 0x3fd60 movl %eax, %r8d leaq 0x38f6ab(%rip), %rdi # 0x858240 leaq 0x70(%rsp), %r9 movq %rbx, %r13 movq %rbx, %rsi movq %r12, %rdx movq %rbp, %rcx callq 0x4d463b movl %eax, 0x10(%rsp) testl %eax, %eax jne 0x4c8d79 leaq 0x100(%rsp), %r12 movq %r12, %rdi callq 0x3fd60 movl %eax, %r8d leaq 0x38f66f(%rip), %rdi # 0x858240 leaq 0x70(%rsp), %rsi leaq 0x90(%rsp), %r9 movl $0x20, %edx movq %r12, %rcx callq 0x4d463b movl %eax, 0x10(%rsp) testl %eax, %eax jne 0x4c8d79 leaq 0xb0(%rsp), %r12 movq %r12, %rdi callq 0x3fd60 movl %eax, %r8d leaq 0x38f62f(%rip), %rdi # 0x858240 leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %r9 movl $0x20, %edx movq %r12, %rcx callq 0x4d463b movl %eax, 0x10(%rsp) testl %eax, %eax jne 0x4c8d79 movq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0x3fd60 movl %eax, %r8d leaq 0x38f5f2(%rip), %rdi # 0x858240 leaq 0x70(%rsp), %rsi leaq 0x90(%rsp), %r9 movl $0x20, %edx movq %rbx, %rcx callq 0x4d463b movl %eax, 0x10(%rsp) testl %eax, %eax jne 0x4c8d79 movq 0x38(%rsp), %rbx movq %rbx, %rdi callq 0x3fd60 movl %eax, %r8d leaq 0x38f5b5(%rip), %rdi # 0x858240 leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %r12 movl $0x20, %edx movq %rbx, %rcx movq %r12, %r9 callq 0x4d463b movl %eax, 0x10(%rsp) testl %eax, %eax jne 0x4c8d79 movl $0x41, %ebp leaq 0x1dd505(%rip), %rbx # 0x6a61c5 movzbl (%r12), %ecx movq %r15, %rdi movq %rbp, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x49bfb4 addq $-0x2, %rbp incq %r12 addq $0x2, %r15 cmpq $0x1, %rbp jne 0x4c8cc0 leaq 0x1a0(%rsp), %rdi callq 0x4b94f6 movq 0x28(%rsp), %rcx movq %rcx, (%rsp) leaq 0x1e0476(%rip), %rdi # 0x6a9179 movl $0x0, 0x10(%rsp) leaq 0x150(%rsp), %rsi leaq 0x330(%rsp), %r9 movq 0x48(%rsp), %rdx movq 0x30(%rsp), %rcx movq %rax, %r8 xorl %eax, %eax callq 0x49c12b testq %rax, %rax je 0x4c8d79 movq %rax, %rbx leaq 0x397952(%rip), %rax # 0x860690 movq 0x40(%rsp), %r12 movq 0x12a8(%r12), %rdi callq *(%rax) movq %rbx, 0x12a8(%r12) orb $0x1, 0xdd8(%r12) jmp 0x4c8d79 xorl %ebp, %ebp movq 0x18(%rsp), %r14 movq 0x20(%rsp), %r15 movq 0x30(%rsp), %r12 jmp 0x4c8534 xorl %r13d, %r13d movq 0x18(%rsp), %r14 movq 0x20(%rsp), %r15 movq 0x30(%rsp), %r12 movq 0x38(%rsp), %rbp jmp 0x4c8537 nop
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/http_aws_sigv4.c
Curl_ipv6_scope
unsigned int Curl_ipv6_scope(const struct sockaddr *sa) { if(sa->sa_family == AF_INET6) { const struct sockaddr_in6 * sa6 = (const struct sockaddr_in6 *)(void *) sa; const unsigned char *b = sa6->sin6_addr.s6_addr; unsigned short w = (unsigned short) ((b[0] << 8) | b[1]); if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */ return IPV6_SCOPE_UNIQUELOCAL; switch(w & 0xFFC0) { case 0xFE80: return IPV6_SCOPE_LINKLOCAL; case 0xFEC0: return IPV6_SCOPE_SITELOCAL; case 0x0000: w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] | b[10] | b[11] | b[12] | b[13] | b[14]; if(w || b[15] != 0x01) break; return IPV6_SCOPE_NODELOCAL; default: break; } } return IPV6_SCOPE_GLOBAL; }
xorl %eax, %eax cmpw $0xa, (%rdi) jne 0x4c8db4 movzbl 0x8(%rdi), %edx movl %edx, %esi andl $-0x2, %esi movl $0x3, %ecx cmpl $0xfc, %esi jne 0x4c8db5 movl %ecx, %eax retq movzbl 0x9(%rdi), %ecx shll $0x8, %edx movl %ecx, %esi andl $-0x40, %esi orl %edx, %esi je 0x4c8de3 cmpl $0xfe80, %esi # imm = 0xFE80 je 0x4c8ddc cmpl $0xfec0, %esi # imm = 0xFEC0 jne 0x4c8db4 movl $0x2, %ecx jmp 0x4c8db2 movl $0x1, %ecx jmp 0x4c8db2 movq 0xa(%rdi), %xmm0 movd 0x12(%rdi), %xmm1 pshufd $0x55, %xmm0, %xmm2 # xmm2 = xmm0[1,1,1,1] por %xmm0, %xmm2 movdqa %xmm2, %xmm0 psrld $0x10, %xmm0 por %xmm2, %xmm0 movdqa %xmm0, %xmm2 psrlw $0x8, %xmm2 por %xmm0, %xmm2 movd %xmm2, %edx movdqa %xmm1, %xmm0 psrld $0x10, %xmm0 por %xmm1, %xmm0 movdqa %xmm0, %xmm1 psrlw $0x8, %xmm1 por %xmm0, %xmm1 movd %xmm1, %esi orl %edx, %esi orb 0x16(%rdi), %sil orb %cl, %sil jne 0x4c8db4 movl $0x4, %ecx cmpb $0x1, 0x17(%rdi) je 0x4c8db2 jmp 0x4c8db4
/JKorbelRA[P]CMake/Utilities/cmcurl/lib/if2ip.c
session_predicate_push_response_headers_send
static int session_predicate_push_response_headers_send(nghttp2_session *session, nghttp2_stream *stream) { int rv; /* TODO Should disallow HEADERS if GOAWAY has already been issued? */ rv = session_predicate_for_stream_send(session, stream); if (rv != 0) { return rv; } assert(stream); if (!session->server) { return NGHTTP2_ERR_PROTO; } if (stream->state != NGHTTP2_STREAM_RESERVED) { return NGHTTP2_ERR_PROTO; } if (session->goaway_flags & NGHTTP2_GOAWAY_RECV) { return NGHTTP2_ERR_START_STREAM_NOT_ALLOWED; } return 0; }
testq %rsi, %rsi je 0x4ddcb5 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x4d7035 movl %eax, %ecx movl $0xfffffdee, %eax # imm = 0xFFFFFDEE testl %ecx, %ecx jne 0x4ddcad movl $0xfffffe00, %eax # imm = 0xFFFFFE00 testb $0x2, 0xd9(%r14) jne 0x4ddcad movl $0xfffffe07, %eax # imm = 0xFFFFFE07 cmpb $0x0, 0xb1c(%rbx) je 0x4ddcad cmpl $0x4, 0xcc(%r14) jne 0x4ddcad xorl %ecx, %ecx testb $0x8, 0xb1d(%rbx) movl $0xfffffdfc, %eax # imm = 0xFFFFFDFC cmovel %ecx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0xfffffe02, %eax # imm = 0xFFFFFE02 retq
/JKorbelRA[P]CMake/Utilities/cmnghttp2/lib/nghttp2_session.c
lz4_reader_init
static int lz4_reader_init(struct archive_read_filter *self) { int r; r = __archive_read_program(self, "lz4 -d -q"); /* Note: We set the format here even if __archive_read_program() * above fails. We do, after all, know what the format is * even if we weren't able to read it. */ self->code = ARCHIVE_FILTER_LZ4; self->name = "lz4"; return (r); }
pushq %rbx movq %rdi, %rbx leaq 0x1a36f8(%rip), %rsi # 0x6ba656 callq 0x51711d movl $0xd, 0x38(%rbx) leaq 0x1a36c6(%rip), %rcx # 0x6ba637 movq %rcx, 0x30(%rbx) popq %rbx retq nop
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_lz4.c
lzop_bidder_bid
static int lzop_bidder_bid(struct archive_read_filter_bidder *self, struct archive_read_filter *filter) { const unsigned char *p; ssize_t avail; (void)self; /* UNUSED */ p = __archive_read_filter_ahead(filter, LZOP_HEADER_MAGIC_LEN, &avail); if (p == NULL || avail == 0) return (0); if (memcmp(p, LZOP_HEADER_MAGIC, LZOP_HEADER_MAGIC_LEN)) return (0); return (LZOP_HEADER_MAGIC_LEN * 8); }
pushq %rax movq %rsi, %rdi movq %rsp, %rdx movl $0x9, %esi callq 0x511b04 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx je 0x516ff8 cmpq $0x0, (%rsp) je 0x516ff8 movabsq $0x1a0a0d004f5a4c89, %rax # imm = 0x1A0A0D004F5A4C89 xorq (%rcx), %rax movzbl 0x8(%rcx), %ecx xorq $0xa, %rcx xorl %edx, %edx orq %rax, %rcx movl $0x48, %eax cmovnel %edx, %eax popq %rcx retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_lzop.c
child_stop
static int child_stop(struct archive_read_filter *self, struct program_filter *state) { /* Close our side of the I/O with the child. */ if (state->child_stdin != -1) { close(state->child_stdin); state->child_stdin = -1; } if (state->child_stdout != -1) { close(state->child_stdout); state->child_stdout = -1; } if (state->child != 0) { /* Reap the child. */ do { state->waitpid_return = waitpid(state->child, &state->exit_status, 0); } while (state->waitpid_return == -1 && errno == EINTR); #if defined(_WIN32) && !defined(__CYGWIN__) CloseHandle(state->child); #endif state->child = 0; } if (state->waitpid_return < 0) { /* waitpid() failed? This is ugly. */ archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, "Child process exited badly"); return (ARCHIVE_WARN); } #if !defined(_WIN32) || defined(__CYGWIN__) if (WIFSIGNALED(state->exit_status)) { #ifdef SIGPIPE /* If the child died because we stopped reading before * it was done, that's okay. Some archive formats * have padding at the end that we routinely ignore. */ /* The alternative to this would be to add a step * before close(child_stdout) above to read from the * child until the child has no more to write. */ if (WTERMSIG(state->exit_status) == SIGPIPE) return (ARCHIVE_OK); #endif archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, "Child process exited with signal %d", WTERMSIG(state->exit_status)); return (ARCHIVE_WARN); } #endif /* !_WIN32 || __CYGWIN__ */ if (WIFEXITED(state->exit_status)) { if (WEXITSTATUS(state->exit_status) == 0) return (ARCHIVE_OK); archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, "Child process exited with status %d", WEXITSTATUS(state->exit_status)); return (ARCHIVE_WARN); } return (ARCHIVE_WARN); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x24(%rsi), %edi cmpl $-0x1, %edi je 0x51755e callq 0x3f770 movl $0xffffffff, 0x24(%r14) # imm = 0xFFFFFFFF movl 0x28(%r14), %edi cmpl $-0x1, %edi je 0x517574 callq 0x3f770 movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF cmpl $0x0, 0x18(%r14) je 0x5175ac leaq 0x1c(%r14), %r15 movl 0x18(%r14), %edi movq %r15, %rsi xorl %edx, %edx callq 0x412d0 movl %eax, %ebp movl %eax, 0x20(%r14) cmpl $-0x1, %eax jne 0x5175a2 callq 0x415e0 cmpl $0x4, (%rax) je 0x51757f movl $0x0, 0x18(%r14) jmp 0x5175b0 movl 0x20(%r14), %ebp testl %ebp, %ebp js 0x5175f0 movl 0x1c(%r14), %ecx movl %ecx, %eax andl $0x7f, %eax movl %eax, %edx shll $0x18, %edx addl $0x1000000, %edx # imm = 0x1000000 cmpl $0x2000000, %edx # imm = 0x2000000 jl 0x51760e cmpl $0xd, %eax je 0x51763b movq 0x18(%rbx), %rdi leaq 0x1a313d(%rip), %rdx # 0x6ba71d movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %eax, %ecx xorl %eax, %eax callq 0x53e204 jmp 0x517607 movq 0x18(%rbx), %rdi leaq 0x1a3107(%rip), %rdx # 0x6ba702 movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x53e204 movl $0xffffffec, %ebp # imm = 0xFFFFFFEC jmp 0x51763d movl $0xffffffec, %ebp # imm = 0xFFFFFFEC testl %eax, %eax jne 0x51763d shrl $0x8, %ecx andl $0xff, %ecx je 0x51763b movq 0x18(%rbx), %rdi leaq 0x1a3114(%rip), %rdx # 0x6ba741 movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x53e204 jmp 0x51763d xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_program.c
uudecode_bidder_init
static int uudecode_bidder_init(struct archive_read_filter *self) { struct uudecode *uudecode; void *out_buff; void *in_buff; self->code = ARCHIVE_FILTER_UU; self->name = "uu"; uudecode = (struct uudecode *)calloc(sizeof(*uudecode), 1); out_buff = malloc(OUT_BUFF_SIZE); in_buff = malloc(IN_BUFF_SIZE); if (uudecode == NULL || out_buff == NULL || in_buff == NULL) { archive_set_error(&self->archive->archive, ENOMEM, "Can't allocate data for uudecode"); free(uudecode); free(out_buff); free(in_buff); return (ARCHIVE_FATAL); } self->data = uudecode; uudecode->in_buff = in_buff; uudecode->in_cnt = 0; uudecode->in_allocated = IN_BUFF_SIZE; uudecode->out_buff = out_buff; uudecode->state = ST_FIND_HEAD; self->vtable = &uudecode_reader_vtable; return (ARCHIVE_OK); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x7, 0x38(%rdi) leaq 0x1a2a4e(%rip), %rax # 0x6ba7b5 movq %rax, 0x30(%rdi) movl $0x30, %edi movl $0x1, %esi callq 0x41eb8 movq %rax, %rbx movl $0x10000, %edi # imm = 0x10000 callq 0x41ec0 movq %rax, %r15 movl $0x400, %edi # imm = 0x400 callq 0x41ec0 movq %rax, %r12 testq %rbx, %rbx setne %al testq %r15, %r15 setne %cl andb %al, %cl testq %r12, %r12 setne %al testb %al, %cl jne 0x517de5 movq 0x18(%r14), %rdi leaq 0x1a2a1a(%rip), %rdx # 0x6ba7d4 movl $0xc, %esi xorl %eax, %eax callq 0x53e204 movq %rbx, %rdi callq 0x41e70 movq %r15, %rdi callq 0x41e70 movq %r12, %rdi callq 0x41e70 movl $0xffffffe2, %eax # imm = 0xFFFFFFE2 jmp 0x517e06 movq %rbx, 0x28(%r14) movq %r12, 0x8(%rbx) movq $0x400, 0x18(%rbx) # imm = 0x400 movq %r15, 0x20(%rbx) leaq 0x343aa0(%rip), %rax # 0x85b8a0 movq %rax, 0x20(%r14) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c
get_line
static ssize_t get_line(const unsigned char *b, ssize_t avail, ssize_t *nlsize) { ssize_t len; len = 0; while (len < avail) { switch (ascii[*b]) { case 0: /* Non-ascii character or control character. */ if (nlsize != NULL) *nlsize = 0; return (-1); case '\r': if (avail-len > 1 && b[1] == '\n') { if (nlsize != NULL) *nlsize = 2; return (len+2); } /* FALL THROUGH */ case '\n': if (nlsize != NULL) *nlsize = 1; return (len+1); case 1: b++; len++; break; } } if (nlsize != NULL) *nlsize = 0; return (avail); }
movq %rsi, %rax testq %rsi, %rsi jle 0x517fac xorl %ecx, %ecx leaq 0x1a28d2(%rip), %rsi # 0x6ba840 movzbl (%rdi), %r8d movzbl (%r8,%rsi), %r8d cmpl $0x9, %r8d jg 0x517f8b cmpl $0x1, %r8d jne 0x517f99 incq %rdi incq %rcx jmp 0x517f9e cmpl $0xa, %r8d je 0x517fda cmpl $0xd, %r8d jne 0x517f9e jmp 0x517fb9 testl %r8d, %r8d je 0x517fa5 cmpq %rax, %rcx jl 0x517f6e jmp 0x517fac movq $-0x1, %rax testq %rdx, %rdx je 0x517fb8 movq $0x0, (%rdx) retq subq %rcx, %rax cmpq $0x2, %rax jl 0x517fda cmpb $0xa, 0x1(%rdi) jne 0x517fda testq %rdx, %rdx je 0x517fd4 movq $0x2, (%rdx) addq $0x2, %rcx jmp 0x517fe9 testq %rdx, %rdx je 0x517fe6 movq $0x1, (%rdx) incq %rcx movq %rcx, %rax retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c
uudecode_filter_close
static int uudecode_filter_close(struct archive_read_filter *self) { struct uudecode *uudecode; uudecode = (struct uudecode *)self->data; free(uudecode->in_buff); free(uudecode->out_buff); free(uudecode); return (ARCHIVE_OK); }
pushq %rbx movq 0x28(%rdi), %rbx movq 0x8(%rbx), %rdi callq 0x41e70 movq 0x20(%rbx), %rdi callq 0x41e70 movq %rbx, %rdi callq 0x41e70 xorl %eax, %eax popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c
archive_read_support_filter_xz
int archive_read_support_filter_xz(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; if (__archive_read_register_bidder(a, NULL, "xz", &xz_bidder_vtable) != ARCHIVE_OK) return (ARCHIVE_FATAL); #if HAVE_LZMA_H && HAVE_LIBLZMA return (ARCHIVE_OK); #else archive_set_error(_a, ARCHIVE_ERRNO_MISC, "Using external xz program for xz decompression"); return (ARCHIVE_WARN); #endif }
pushq %rax leaq 0x1ad9af(%rip), %rdx # 0x6c6259 leaq 0x343007(%rip), %rcx # 0x85b8b8 xorl %esi, %esi callq 0x511a51 testl %eax, %eax movl $0xffffffe2, %ecx # imm = 0xFFFFFFE2 cmovnel %ecx, %eax popq %rcx retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_xz.c
xz_filter_close
static int xz_filter_close(struct archive_read_filter *self) { struct private_data *state; state = (struct private_data *)self->data; lzma_end(&(state->stream)); free(state->out_block); free(state); return (ARCHIVE_OK); }
pushq %rbx movq 0x28(%rdi), %rbx movq %rbx, %rdi callq 0x57912d movq 0x88(%rbx), %rdi callq 0x41e70 movq %rbx, %rdi callq 0x41e70 xorl %eax, %eax popq %rbx retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_xz.c
zstd_bidder_bid
static int zstd_bidder_bid(struct archive_read_filter_bidder *self, struct archive_read_filter *filter) { const unsigned char *buffer; ssize_t avail; unsigned prefix; /* Zstd frame magic values */ const unsigned zstd_magic = 0xFD2FB528U; const unsigned zstd_magic_skippable_start = 0x184D2A50U; const unsigned zstd_magic_skippable_mask = 0xFFFFFFF0; (void) self; /* UNUSED */ buffer = __archive_read_filter_ahead(filter, 4, &avail); if (buffer == NULL) return (0); prefix = archive_le32dec(buffer); if (prefix == zstd_magic) return (32); if ((prefix & zstd_magic_skippable_mask) == zstd_magic_skippable_start) return (32); return (0); }
pushq %rax movq %rsi, %rdi movq %rsp, %rdx movl $0x4, %esi callq 0x511b04 testq %rax, %rax je 0x5190fa movl (%rax), %ecx movl $0x20, %eax cmpl $0xfd2fb528, %ecx # imm = 0xFD2FB528 je 0x5190fc andl $-0x10, %ecx xorl %eax, %eax cmpl $0x184d2a50, %ecx # imm = 0x184D2A50 sete %al shll $0x5, %eax jmp 0x5190fc xorl %eax, %eax popq %rcx retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_zstd.c
archive_read_support_format_cab
int archive_read_support_format_cab(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; struct cab *cab; int r; archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_cab"); cab = (struct cab *)calloc(1, sizeof(*cab)); if (cab == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate CAB data"); return (ARCHIVE_FATAL); } archive_string_init(&cab->ws); archive_wstring_ensure(&cab->ws, 256); r = __archive_read_register_format(a, cab, "cab", archive_read_format_cab_bid, archive_read_format_cab_options, archive_read_format_cab_read_header, archive_read_format_cab_read_data, archive_read_format_cab_read_data_skip, NULL, archive_read_format_cab_cleanup, NULL, NULL); if (r != ARCHIVE_OK) free(cab); return (ARCHIVE_OK); }
pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x1a157a(%rip), %rcx # 0x6bb320 movl $0xdeb0c5, %esi # imm = 0xDEB0C5 movl $0x1, %edx callq 0x55de18 movl $0xffffffe2, %ebp # imm = 0xFFFFFFE2 cmpl $-0x1e, %eax je 0x519e6c movl $0x1, %edi movl $0x1c0, %esi # imm = 0x1C0 callq 0x41eb8 testq %rax, %rax je 0x519e56 movq %rax, %r14 movq %rax, %rdi addq $0x78, %rdi movl $0x100, %esi # imm = 0x100 callq 0x539f77 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rsp) leaq 0xf6c(%rip), %rax # 0x51ad66 movq %rax, 0x18(%rsp) leaq 0xe8f(%rip), %rax # 0x51ac95 movq %rax, 0x8(%rsp) leaq 0xc8b(%rip), %rax # 0x51aa9d movq %rax, (%rsp) movq $0x0, 0x10(%rsp) leaq 0x1a1516(%rip), %rdx # 0x6bb33c leaq 0x4a(%rip), %rcx # 0x519e77 leaq 0x10b(%rip), %r8 # 0x519f3f leaq 0x18c(%rip), %r9 # 0x519fc7 movq %rbx, %rdi movq %r14, %rsi callq 0x511964 xorl %ebp, %ebp testl %eax, %eax je 0x519e6c movq %r14, %rdi callq 0x41e70 jmp 0x519e6c leaq 0x1a14e3(%rip), %rdx # 0x6bb340 movq %rbx, %rdi movl $0xc, %esi xorl %eax, %eax callq 0x53e204 movl %ebp, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_cab.c
cab_minimum_consume_cfdata
static int64_t cab_minimum_consume_cfdata(struct archive_read *a, int64_t consumed_bytes) { struct cab *cab = (struct cab *)(a->format->data); struct cfdata *cfdata; int64_t cbytes, rbytes; int err; cfdata = cab->entry_cfdata; rbytes = consumed_bytes; if (cab->entry_cffolder->comptype == COMPTYPE_NONE) { if (consumed_bytes < cfdata->unconsumed) cbytes = consumed_bytes; else cbytes = cfdata->unconsumed; rbytes -= cbytes; cfdata->read_offset += (uint16_t)cbytes; cfdata->uncompressed_bytes_remaining -= (uint16_t)cbytes; cfdata->unconsumed -= cbytes; } else { cbytes = cfdata->uncompressed_avail - cfdata->read_offset; if (cbytes > 0) { if (consumed_bytes < cbytes) cbytes = consumed_bytes; rbytes -= cbytes; cfdata->read_offset += (uint16_t)cbytes; cfdata->uncompressed_bytes_remaining -= (uint16_t)cbytes; } if (cfdata->unconsumed) { cbytes = cfdata->unconsumed; cfdata->unconsumed = 0; } else cbytes = 0; } if (cbytes) { /* Compute the sum. */ cab_checksum_update(a, (size_t)cbytes); /* Consume as much as the compressor actually used. */ __archive_read_consume(a, cbytes); cab->cab_offset += cbytes; cfdata->compressed_bytes_remaining -= (uint16_t)cbytes; if (cfdata->compressed_bytes_remaining == 0) { err = cab_checksum_finish(a); if (err < 0) return (err); } } return (rbytes); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x818(%rdi), %rax movq (%rax), %r13 movq 0x28(%r13), %rax movq 0x38(%r13), %rbp cmpw $0x0, 0x6(%rax) je 0x51b449 movzwl 0xc(%rbp), %eax movzwl 0xe(%rbp), %ecx subq %rcx, %rax jle 0x51b432 cmpq %rbx, %rax cmovgeq %rbx, %rax subq %rax, %rbx addl %eax, %ecx movw %cx, 0xe(%rbp) subw %ax, 0xa(%rbp) movq 0x10(%rbp), %r15 testq %r15, %r15 je 0x51b5eb movq $0x0, 0x10(%rbp) jmp 0x51b474 movq 0x10(%rbp), %rax cmpq %rbx, %rax movq %rbx, %r15 cmovlq %rax, %r15 addw %r15w, 0xe(%rbp) subw %r15w, 0xa(%rbp) subq %r15, %rbx subq %r15, %rax movq %rax, 0x10(%rbp) testq %r15, %r15 je 0x51b5eb cmpl $0x0, (%rbp) je 0x51b530 movq 0x38(%rbp), %rsi testq %rsi, %rsi je 0x51b530 movl 0x30(%rbp), %ecx testl %ecx, %ecx je 0x51b4c3 cmpl $0x3, %ecx jg 0x51b4c8 movq %r15, %rdx movb (%rsi), %al incq %rsi leal 0x1(%rcx), %edi movl %edi, 0x30(%rbp) movslq %ecx, %rcx movb %al, 0x2c(%rbp,%rcx) leaq -0x1(%rdx), %rax movl 0x30(%rbp), %ecx cmpl $0x3, %ecx jg 0x51b4cb cmpq $0x1, %rdx movq %rax, %rdx jne 0x51b49a jmp 0x51b4cb movq %r15, %rax jmp 0x51b4e2 movq %r15, %rax cmpl $0x4, %ecx jne 0x51b4dd movl 0x2c(%rbp), %ecx xorl %ecx, 0x28(%rbp) movl $0x0, 0x30(%rbp) testq %rax, %rax je 0x51b528 movl %eax, %r12d andl $0x3, %r12d movq %rax, %rdx andq $-0x4, %rdx je 0x51b50d movl 0x28(%rbp), %ecx testl %edx, %edx je 0x51b50a movl %eax, %edx shrl $0x2, %edx xorl %edi, %edi xorl (%rsi,%rdi,4), %ecx incq %rdi cmpl %edi, %edx jne 0x51b500 movl %ecx, 0x28(%rbp) testl %r12d, %r12d je 0x51b524 leaq 0x2c(%rbp), %rdi addq %rax, %rsi subq %r12, %rsi movq %r12, %rdx callq 0x3f250 movl %r12d, 0x30(%rbp) movq $0x0, 0x38(%rbp) movq %r14, %rdi movq %r15, %rsi callq 0x511e26 addq %r15, 0x40(%r13) subw %r15w, 0x6(%rbp) jne 0x51b5eb movq 0x818(%r14), %rax movq (%rax), %r12 movq 0x38(%r12), %r15 movl (%r15), %ebp testl %ebp, %ebp je 0x51b5eb movslq 0x30(%r15), %rsi testq %rsi, %rsi je 0x51b586 leaq 0x2c(%r15), %rdi movl 0x28(%r15), %edx callq 0x51d31d movl %eax, 0x28(%r15) movl $0x0, 0x30(%r15) movl $0x4, %esi testb $0x4, 0x54(%r12) je 0x51b59d movzbl 0x5d(%r12), %esi addq $0x4, %rsi movq 0x20(%r15), %rdi addq $0x4, %rdi movl 0x28(%r15), %edx callq 0x51d31d movl %eax, 0x28(%r15) cmpl %ebp, %eax je 0x51b5eb movq 0x28(%r12), %rcx movl 0x58(%rcx), %ecx decl %ecx movzwl 0x4(%r15), %edx movl %edx, (%rsp) leaq 0x19ff68(%rip), %rdx # 0x6bb537 movq %r14, %rdi movl $0x54, %esi movl %ebp, %r8d movl %eax, %r9d xorl %eax, %eax callq 0x53e204 movq $-0x19, %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_cab.c
archive_read_format_lha_bid
static int archive_read_format_lha_bid(struct archive_read *a, int best_bid) { const char *p; const void *buff; ssize_t bytes_avail, offset, window; size_t next; /* If there's already a better bid than we can ever make, don't bother testing. */ if (best_bid > 30) return (-1); if ((p = __archive_read_ahead(a, H_SIZE, NULL)) == NULL) return (-1); if (lha_check_header_format(p) == 0) return (30); if (p[0] == 'M' && p[1] == 'Z') { /* PE file */ offset = 0; window = 4096; while (offset < (1024 * 20)) { buff = __archive_read_ahead(a, offset + window, &bytes_avail); if (buff == NULL) { /* Remaining bytes are less than window. */ window >>= 1; if (window < (H_SIZE + 3)) return (0); continue; } p = (const char *)buff + offset; while (p + H_SIZE < (const char *)buff + bytes_avail) { if ((next = lha_check_header_format(p)) == 0) return (30); p += next; } offset = p - (const char *)buff; } } return (0); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpl $0x1e, %esi jg 0x522832 movq %rdi, %rbx movl $0x16, %esi xorl %edx, %edx callq 0x511af8 testq %rax, %rax je 0x522832 movq %rax, %r14 movq %rax, %rdi callq 0x524a6b testq %rax, %rax je 0x522829 xorl %ebp, %ebp cmpb $0x4d, (%r14) jne 0x522832 cmpb $0x5a, 0x1(%r14) jne 0x522832 movl $0x1000, %r13d # imm = 0x1000 xorl %r14d, %r14d movq %rsp, %r12 leaq (%r14,%r13), %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x511af8 testq %rax, %rax jne 0x5227d7 movq %r13, %rax shrq %rax cmpq $0x32, %r13 movq %rax, %r13 jae 0x5227b2 jmp 0x522830 movq %rax, %r15 leaq (%rax,%r14), %r12 movq (%rsp), %rbp addq %rax, %rbp addq %r14, %rax addq $0x16, %rax cmpq %rbp, %rax jae 0x522813 movq %r12, %rdi callq 0x524a6b testq %rax, %rax je 0x522829 leaq (%r12,%rax), %r14 addq %r12, %rax addq $0x16, %rax movq %r14, %r12 cmpq %rbp, %rax jb 0x5227f1 jmp 0x522816 movq %r12, %r14 subq %r15, %r14 xorl %ebp, %ebp cmpq $0x5000, %r14 # imm = 0x5000 movq %rsp, %r12 jl 0x5227b2 jmp 0x522832 movl $0x1e, %ebp jmp 0x522832 xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
archive_read_format_lha_options
static int archive_read_format_lha_options(struct archive_read *a, const char *key, const char *val) { struct lha *lha; int ret = ARCHIVE_FAILED; lha = (struct lha *)(a->format->data); if (strcmp(key, "hdrcharset") == 0) { if (val == NULL || val[0] == 0) archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "lha: hdrcharset option needs a character-set name"); else { lha->opt_sconv = archive_string_conversion_from_charset( &a->archive, val, 0); if (lha->opt_sconv != NULL) ret = ARCHIVE_OK; else ret = ARCHIVE_FATAL; } return (ret); } /* Note: The "warn" return is just to inform the options * supervisor that we didn't handle it. It will generate * a suitable error if no one used this option. */ return (ARCHIVE_WARN); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rax movq %rdi, %rbx movq 0x818(%rdi), %rcx movq (%rcx), %r15 leaq 0x198af4(%rip), %rsi # 0x6bb358 movq %rax, %rdi callq 0x40ea0 movl %eax, %ecx movl $0xffffffec, %eax # imm = 0xFFFFFFEC testl %ecx, %ecx jne 0x5228c0 testq %r14, %r14 je 0x5228a5 cmpb $0x0, (%r14) je 0x5228a5 xorl %ebp, %ebp movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x53a664 movq %rax, 0xd8(%r15) testq %rax, %rax movl $0xffffffe2, %eax # imm = 0xFFFFFFE2 cmovnel %ebp, %eax jmp 0x5228c0 leaq 0x1997d4(%rip), %rdx # 0x6bc080 movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x53e204 movl $0xffffffe7, %eax # imm = 0xFFFFFFE7 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
lha_check_header_format
static size_t lha_check_header_format(const void *h) { const unsigned char *p = h; size_t next_skip_bytes; switch (p[H_METHOD_OFFSET+3]) { /* * "-lh0-" ... "-lh7-" "-lhd-" * "-lzs-" "-lz5-" */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case 'd': case 's': next_skip_bytes = 4; /* b0 == 0 means the end of an LHa archive file. */ if (p[0] == 0) break; if (p[H_METHOD_OFFSET] != '-' || p[H_METHOD_OFFSET+1] != 'l' || p[H_METHOD_OFFSET+4] != '-') break; if (p[H_METHOD_OFFSET+2] == 'h') { /* "-lh?-" */ if (p[H_METHOD_OFFSET+3] == 's') break; if (p[H_LEVEL_OFFSET] == 0) return (0); if (p[H_LEVEL_OFFSET] <= 3 && p[H_ATTR_OFFSET] == 0x20) return (0); } if (p[H_METHOD_OFFSET+2] == 'z') { /* LArc extensions: -lzs-,-lz4- and -lz5- */ if (p[H_LEVEL_OFFSET] != 0) break; if (p[H_METHOD_OFFSET+3] == 's' || p[H_METHOD_OFFSET+3] == '4' || p[H_METHOD_OFFSET+3] == '5') return (0); } break; case 'h': next_skip_bytes = 1; break; case 'z': next_skip_bytes = 1; break; case 'l': next_skip_bytes = 2; break; case '-': next_skip_bytes = 3; break; default : next_skip_bytes = 4; break; } return (next_skip_bytes); }
movzbl 0x5(%rdi), %ecx cmpl $0x63, %ecx jg 0x524abf leal -0x30(%rcx), %eax cmpl $0x8, %eax jae 0x524ae5 movl $0x4, %eax cmpb $0x0, (%rdi) je 0x524ae4 cmpb $0x2d, 0x2(%rdi) jne 0x524ae4 cmpb $0x6c, 0x3(%rdi) jne 0x524ae4 cmpb $0x2d, 0x6(%rdi) jne 0x524ae4 movzbl 0x4(%rdi), %edx cmpl $0x7a, %edx je 0x524afc cmpl $0x68, %edx jne 0x524ae4 cmpl $0x73, %ecx je 0x524ae4 movb 0x14(%rdi), %cl testb %cl, %cl je 0x524b1a cmpb $0x3, %cl ja 0x524ae4 cmpb $0x20, 0x13(%rdi) jne 0x524ae4 jmp 0x524b1a movl $0x1, %eax cmpl $0x6b, %ecx jle 0x524ada cmpl $0x6c, %ecx je 0x524af0 cmpl $0x7a, %ecx je 0x524ae4 cmpl $0x73, %ecx je 0x524a7c jmp 0x524af6 cmpl $0x64, %ecx je 0x524a7c cmpl $0x68, %ecx jne 0x524af6 retq cmpl $0x2d, %ecx jne 0x524af6 movl $0x3, %eax retq movl $0x2, %eax retq movl $0x4, %eax retq cmpb $0x0, 0x14(%rdi) jne 0x524ae4 addl $-0x34, %ecx cmpl $0x3f, %ecx ja 0x524ae4 movabsq $-0x7ffffffffffffffd, %rdx # imm = 0x8000000000000003 btq %rcx, %rdx jae 0x524ae4 xorl %eax, %eax retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
lha_parse_linkname
static int lha_parse_linkname(struct archive_wstring *linkname, struct archive_wstring *pathname) { wchar_t * linkptr; size_t symlen; linkptr = wcschr(pathname->s, L'|'); if (linkptr != NULL) { symlen = wcslen(linkptr + 1); archive_wstrncpy(linkname, linkptr+1, symlen); *linkptr = 0; pathname->length = wcslen(pathname->s); return (1); } return (0); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rdi movl $0x7c, %esi callq 0x40fc0 testq %rax, %rax je 0x524b7f movq %rax, %r15 movq %rax, %r12 addq $0x4, %r12 movq %r12, %rdi callq 0x40820 movq $0x0, 0x8(%r14) movq %r14, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x53a05c movl $0x0, (%r15) movq (%rbx), %rdi callq 0x40820 movq %rax, 0x8(%rbx) movl $0x1, %eax jmp 0x524b81 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
lzh_huffman_init
static int lzh_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { int bits; if (hf->bitlen == NULL) { hf->bitlen = malloc(len_size * sizeof(hf->bitlen[0])); if (hf->bitlen == NULL) return (ARCHIVE_FATAL); } if (hf->tbl == NULL) { if (tbl_bits < HTBL_BITS) bits = tbl_bits; else bits = HTBL_BITS; hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); } if (hf->tree == NULL && tbl_bits > HTBL_BITS) { hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); if (hf->tree == NULL) return (ARCHIVE_FATAL); } hf->len_size = (int)len_size; hf->tbl_bits = tbl_bits; return (ARCHIVE_OK); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x50(%rdi) jne 0x525673 movq %r14, %rdi callq 0x41ec0 movq %rax, 0x50(%rbx) testq %rax, %rax je 0x5256bc cmpq $0x0, 0x70(%rbx) jne 0x52568d movl $0x800, %edi # imm = 0x800 callq 0x41ec0 movq %rax, 0x70(%rbx) testq %rax, %rax je 0x5256bc cmpq $0x0, 0x78(%rbx) jne 0x5256ae movl $0x400, 0x68(%rbx) # imm = 0x400 movl $0x1000, %edi # imm = 0x1000 callq 0x41ec0 movq %rax, 0x78(%rbx) testq %rax, %rax je 0x5256bc movl %r14d, (%rbx) movl $0x10, 0x60(%rbx) xorl %eax, %eax jmp 0x5256c1 movl $0xffffffe2, %eax # imm = 0xFFFFFFE2 addq $0x8, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
lzh_read_pt_bitlen
static int lzh_read_pt_bitlen(struct lzh_stream *strm, int start, int end) { struct lzh_dec *ds = strm->ds; struct lzh_br *br = &(ds->br); int c, i; for (i = start; i < end; ) { /* * bit pattern the number we need * 000 -> 0 * 001 -> 1 * 010 -> 2 * ... * 110 -> 6 * 1110 -> 7 * 11110 -> 8 * ... * 1111111111110 -> 16 */ if (!lzh_br_read_ahead(strm, br, 3)) return (i); if ((c = lzh_br_bits(br, 3)) == 7) { if (!lzh_br_read_ahead(strm, br, 13)) return (i); c = bitlen_tbl[lzh_br_bits(br, 13) & 0x3FF]; if (c) lzh_br_consume(br, c - 3); else return (-1);/* Invalid data. */ } else lzh_br_consume(br, 3); ds->pt.bitlen[i++] = c; ds->pt.freq[c]++; } return (i); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx cmpl %edx, %esi jge 0x525920 movl %edx, %ebp movq %rdi, %r14 movq 0x30(%rdi), %r12 leaq 0x28(%r12), %r15 movslq %ebx, %rbx movl $0x3ff, %r13d # imm = 0x3FF movl 0x30(%r12), %eax cmpl $0x2, %eax jg 0x525896 movq %r14, %rdi movq %r15, %rsi callq 0x5256c9 testl %eax, %eax setne %cl movl 0x30(%r12), %eax cmpl $0x3, %eax setge %dl orb %cl, %dl cmpb $0x1, %dl jne 0x525920 movq (%r15), %rdx leal -0x3(%rax), %ecx shrq %cl, %rdx andl $0x7, %edx cmpl $0x7, %edx jne 0x5258f1 cmpl $0xc, %eax jg 0x5258ce movq %r14, %rdi movq %r15, %rsi callq 0x5256c9 testl %eax, %eax setne %cl movl 0x30(%r12), %eax cmpl $0xd, %eax setge %dl orb %cl, %dl cmpb $0x1, %dl jne 0x525920 movq (%r15), %rdx leal -0xd(%rax), %ecx shrq %cl, %rdx andq %r13, %rdx cmpq %r13, %rdx je 0x52591b leaq 0x1969ca(%rip), %rcx # 0x6bc2b0 movsbl (%rdx,%rcx), %edx subl %edx, %eax addl $0x3, %eax movl %eax, %ecx movl %ecx, 0x30(%r12) movq 0x108(%r12), %rax movb %dl, (%rax,%rbx) incq %rbx movslq %edx, %rax incl 0xc4(%r12,%rax,4) cmpl %ebx, %ebp jne 0x525866 movl %ebp, %ebx jmp 0x525920 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
read_header
static int read_header(struct archive_read *a, struct archive_entry *entry) { struct mtree *mtree; char *p; int r, use_next; mtree = (struct mtree *)(a->format->data); if (mtree->fd >= 0) { close(mtree->fd); mtree->fd = -1; } if (mtree->entries == NULL) { mtree->resolver = archive_entry_linkresolver_new(); if (mtree->resolver == NULL) return ARCHIVE_FATAL; archive_entry_linkresolver_set_strategy(mtree->resolver, ARCHIVE_FORMAT_MTREE); r = read_mtree(a, mtree); if (r != ARCHIVE_OK) return (r); } a->archive.archive_format = mtree->archive_format; a->archive.archive_format_name = mtree->archive_format_name; for (;;) { if (mtree->this_entry == NULL) return (ARCHIVE_EOF); if (strcmp(mtree->this_entry->name, "..") == 0) { mtree->this_entry->used = 1; if (archive_strlen(&mtree->current_dir) > 0) { /* Roll back current path. */ p = mtree->current_dir.s + mtree->current_dir.length - 1; while (p >= mtree->current_dir.s && *p != '/') --p; if (p >= mtree->current_dir.s) --p; mtree->current_dir.length = p - mtree->current_dir.s + 1; } } if (!mtree->this_entry->used) { use_next = 0; r = parse_file(a, entry, mtree, mtree->this_entry, &use_next); if (use_next == 0) return (r); } mtree->this_entry = mtree->this_entry->next; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rsi, %r15 movq %rdi, %r14 movq 0x818(%rdi), %rax movq (%rax), %rbx movl 0x30(%rbx), %edi testl %edi, %edi js 0x525e55 callq 0x3f770 movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF cmpq $0x0, 0x40(%rbx) movq %r14, (%rsp) je 0x52622e movl 0x34(%rbx), %eax movl %eax, 0x10(%r14) movq 0x38(%rbx), %rax movq %rax, 0x18(%r14) movq 0x48(%rbx), %r13 movl $0x1, %r12d testq %r13, %r13 je 0x526ac2 leaq 0x60(%rbx), %rsi leaq 0x98(%rbx), %r12 movq %rsi, 0x8(%rsp) movq %r12, 0x38(%rsp) movq 0x30(%r13), %rax cmpb $0x2e, (%rax) jne 0x525eb4 cmpb $0x2e, 0x1(%rax) jne 0x525eb4 cmpb $0x0, 0x2(%rax) je 0x5260fe cmpb $0x0, 0x39(%r13) jne 0x526212 movq %r15, 0x10(%rsp) movb $0x1, 0x39(%r13) movq %r15, %rdi movl $0x8000, %esi # imm = 0x8000 callq 0x50cbd2 movq %r15, %rdi xorl %esi, %esi callq 0x50d589 movq $0x0, 0x80(%rbx) movl $0x0, 0x1c(%rsp) movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx leaq 0x1c(%rsp), %r8 callq 0x5277cb movl %eax, %ebp cmpb $0x0, 0x38(%r13) je 0x525f6f movq 0x30(%r13), %rsi movq %r15, %rdi callq 0x50d4be movq 0x30(%r13), %rsi movq %r12, %rdi callq 0x5105bc testq %rax, %rax je 0x525fc0 movq %rax, %r13 cmpb $0x0, 0x38(%r13) je 0x525f64 cmpb $0x0, 0x39(%r13) jne 0x525f64 movb $0x1, 0x39(%r13) movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx leaq 0x1c(%rsp), %r8 callq 0x5277cb cmpl %ebp, %eax cmovll %eax, %ebp movq 0x18(%r13), %r13 testq %r13, %r13 jne 0x525f36 jmp 0x525fc0 movq 0x68(%rbx), %r14 testq %r14, %r14 movq 0x8(%rsp), %r12 je 0x525f8c movq %r12, %rdi leaq 0x19277b(%rip), %rsi # 0x6b8702 callq 0x53a099 movq 0x30(%r13), %rsi movq %r12, %rdi callq 0x53a099 movq (%r12), %rsi movq %r15, %rdi callq 0x50d4be movq %r15, %rdi callq 0x50c423 cmpl $0x4000, %eax # imm = 0x4000 je 0x525fb7 movq %r14, 0x68(%rbx) movq (%rsp), %r14 movq 0x38(%rsp), %r12 cmpb $0x0, 0xb0(%rbx) je 0x526a3e movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF cmpq $0x0, 0x80(%rbx) je 0x525fe4 movq 0x78(%rbx), %r13 jmp 0x525fef movq %r15, %rdi callq 0x50c801 movq %rax, %r13 movq %r15, %rdi callq 0x50c423 cmpl $0x8000, %eax # imm = 0x8000 je 0x52600d movq %r15, %rdi callq 0x50c423 cmpl $0x4000, %eax # imm = 0x4000 jne 0x52605d movq %r13, %rdi movl $0x80000, %esi # imm = 0x80000 xorl %eax, %eax callq 0x3ff20 movl %eax, 0x30(%rbx) movl %eax, %edi callq 0x53e3fb movl 0x30(%rbx), %edi cmpl $-0x1, %edi jne 0x526060 callq 0x415e0 movl (%rax), %esi cmpl $0x2, %esi jne 0x526044 cmpq $0x0, 0x80(%rbx) je 0x52605d movq %r14, %rdi leaq 0x19698f(%rip), %rdx # 0x6bc9dd movq %r13, %rcx xorl %eax, %eax callq 0x53e204 movl $0xffffffec, %ebp # imm = 0xFFFFFFEC movl 0x30(%rbx), %edi testl %edi, %edi js 0x5260a4 leaq 0x68(%rsp), %rsi callq 0x41090 cmpl $-0x1, %eax jne 0x5260b6 callq 0x415e0 movl (%rax), %esi movq %r14, %rdi leaq 0x196967(%rip), %rdx # 0x6bc9eb movq %r13, %rcx xorl %eax, %eax callq 0x53e204 movl 0x30(%rbx), %edi callq 0x3f770 movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF movl $0xffffffec, %ebp # imm = 0xFFFFFFEC jmp 0x5260ee movq %r13, %rdi leaq 0x68(%rsp), %rsi callq 0x3f880 cmpl $-0x1, %eax je 0x5260ee movl 0x80(%rsp), %r13d movl %r13d, %r14d andl $0xf000, %r14d # imm = 0xF000 cmpl $0xa000, %r14d # imm = 0xA000 je 0x526145 cmpl $0x8000, %r14d # imm = 0x8000 jne 0x526158 movq %r15, %rdi callq 0x50c423 cmpl $0x8000, %eax # imm = 0x8000 jne 0x526158 jmp 0x52690b testb $0x8, 0x1d(%rsp) jne 0x526209 jmp 0x526a3e movb $0x1, 0x39(%r13) movq 0x68(%rbx), %rcx testq %rcx, %rcx je 0x526212 movq (%rsi), %rax leaq (%rax,%rcx), %rdx decq %rdx movq %rdx, %rcx cmpq %rax, %rdx jb 0x52612b leaq -0x1(%rcx), %rdx cmpb $0x2f, (%rcx) jne 0x52611a leaq -0x1(%rcx), %rdx cmpq %rax, %rcx cmovbq %rcx, %rdx subq %rax, %rdx incq %rdx movq %rdx, 0x68(%rbx) jmp 0x526212 movq %r15, %rdi callq 0x50c423 cmpl $0xa000, %eax # imm = 0xA000 je 0x52690b movl %r13d, %eax notl %eax testl $0xc000, %eax # imm = 0xC000 jne 0x526177 movq %r15, %rdi callq 0x50c423 cmpl $0xc000, %eax # imm = 0xC000 je 0x52690b addl $0xfffff000, %r14d # imm = 0xFFFFF000 shrl $0xc, %r14d cmpl $0x5, %r14d ja 0x5261e7 leaq 0x196521(%rip), %rcx # 0x6bc6b0 movslq (%rcx,%r14,4), %rax addq %rcx, %rax jmpq *%rax movq %r15, %rdi callq 0x50c423 cmpl $0x1000, %eax # imm = 0x1000 jne 0x5261e7 jmp 0x52690b movq %r15, %rdi callq 0x50c423 cmpl $0x4000, %eax # imm = 0x4000 jne 0x5261e7 jmp 0x52690b movq %r15, %rdi callq 0x50c423 cmpl $0x2000, %eax # imm = 0x2000 jne 0x5261e7 jmp 0x52690b movq %r15, %rdi callq 0x50c423 cmpl $0x6000, %eax # imm = 0x6000 je 0x52690b movl 0x30(%rbx), %edi testl %edi, %edi js 0x5261f3 callq 0x3f770 movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF testb $0x8, 0x1d(%rsp) movq (%rsp), %r14 je 0x526a5a movq 0x48(%rbx), %r13 movq 0x8(%rsp), %rsi movq 0x20(%r13), %r13 movq %r13, 0x48(%rbx) testq %r13, %r13 jne 0x525e9b movl $0x1, %r12d jmp 0x526ac2 callq 0x55e86c movq %rax, 0x90(%rbx) testq %rax, %rax je 0x5268e0 movq %r15, 0x38(%rsp) movq %rax, %rdi movl $0x80000, %esi # imm = 0x80000 callq 0x55e8b2 movl $0x80000, 0x34(%rbx) # imm = 0x80000 leaq 0x196682(%rip), %rax # 0x6bc8e5 movq %rax, 0x38(%rbx) movq $0x0, 0x10(%rsp) leaq 0x58(%rsp), %rsi movq %r14, %rdi callq 0x526d1f movl $0x1, %eax movq %rax, 0x8(%rsp) leaq 0x68(%rsp), %rdx movl $0x1, %esi movq %r14, %rdi callq 0x511af8 testq %rax, %rax je 0x5268eb movq %rax, %r12 leaq 0x40(%rbx), %rax movq %rax, 0x60(%rsp) leaq 0x98(%rbx), %rax movq %rax, 0x50(%rsp) movq $0x0, 0x30(%rsp) xorl %r15d, %r15d xorl %r14d, %r14d movq 0x68(%rsp), %rbp testq %rbp, %rbp js 0x526aaf movq %r12, %rdi movl $0xa, %esi movq %rbp, %rdx callq 0x3fe70 movq %rax, %r13 testq %rax, %rax je 0x5262fd movq %r13, %rbp subq %r12, %rbp incq %rbp movq %rbp, 0x68(%rsp) addq %r15, %rbp cmpq $0x10000, %rbp # imm = 0x10000 jge 0x526a86 incq %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x539f80 testq %rax, %rax je 0x526a98 movq (%rbx), %rdi addq %r15, %rdi movq 0x68(%rsp), %rdx movq %r12, %rsi callq 0x3f250 movq 0x68(%rsp), %rsi movq (%rsp), %rdi callq 0x511e26 movq 0x68(%rsp), %rsi leaq (%rsi,%r15), %r12 movq (%rbx), %rax movb $0x0, (%rax,%r12) movq (%rbx), %rbp addq %rbp, %r14 movzbl (%r14), %eax cmpl $0x5b, %eax jg 0x526371 cmpl $0x23, %eax jne 0x526389 testq %r13, %r13 jne 0x526392 jmp 0x526397 cmpl $0x5c, %eax jne 0x526392 movzbl 0x1(%r14), %eax testl %eax, %eax je 0x526392 cmpl $0xa, %eax je 0x5263c1 incq %r14 jmp 0x526392 testl %eax, %eax je 0x526397 cmpl $0xa, %eax je 0x5263d3 incq %r14 jmp 0x52635c movq %r12, %r15 subq %rbp, %r14 movl $0x1, %esi movq (%rsp), %rdi leaq 0x68(%rsp), %rdx callq 0x511af8 movq %rax, %r12 testq %rax, %rax jne 0x5262c9 jmp 0x5268eb movb $0x0, -0x2(%rbp,%r12) addq $-0x2, %r12 movq %r12, %r15 movq (%rbx), %rbp jmp 0x52639a testq %r12, %r12 je 0x5268eb js 0x526afa leaq 0x1(%rbp), %r14 xorl %r13d, %r13d movabsq $0x100000200, %rax # imm = 0x100000200 movzbl (%rbp,%r13), %r12d cmpq $0x23, %r12 ja 0x52644e btq %r12, %rax jae 0x52640d incq %r13 incq %r14 jmp 0x5263f3 movabsq $0x800002401, %rax # imm = 0x800002401 btq %r12, %rax jae 0x52644e movq 0x8(%rsp), %r15 incq %r15 movq %r15, 0x8(%rsp) movl $0x1, %esi movq (%rsp), %rdi leaq 0x68(%rsp), %rdx callq 0x511af8 movq %rax, %r12 testq %rax, %rax jne 0x5262c3 jmp 0x5268eb movq %rbp, %rdi addq %r13, %rdi addq %r15, %rsi subq %r13, %rsi leaq (%rsi,%rdi), %r15 decq %r15 cmpq %r15, %rdi jae 0x52649b movq %rsi, 0x40(%rsp) movq %rdi, 0x28(%rsp) callq 0x3f3e0 movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rsi movq (%rax), %rax movq %rdi, %rcx movzbl (%rcx), %edx testb $0x40, 0x1(%rax,%rdx,2) je 0x526ad7 incq %rcx cmpq %r15, %rcx jb 0x526485 cmpb $0x2f, %r12b jne 0x5265dd cmpq $0x5, %rsi jl 0x526ad7 movq %rsi, %r14 movl $0x4, %edx movq %rdi, %r15 leaq 0x19642a(%rip), %rsi # 0x6bc8eb callq 0x3f7a0 testl %eax, %eax je 0x52669d cmpq $0x7, %r14 jb 0x526ad7 movq %r15, %rdi movl $0x6, %edx leaq 0x196409(%rip), %rsi # 0x6bc8f0 callq 0x3f7a0 testl %eax, %eax jne 0x526ad7 movzbl 0x6(%rbp,%r13), %eax cmpl $0x20, %eax je 0x526508 cmpl $0x9, %eax jne 0x526ad7 leaq 0x6(,%r13), %r12 addq %rbp, %r12 movq %r12, %rdi movl $0x3d, %esi callq 0x40250 testq %rax, %rax jne 0x526b2e movq %r12, %rdi leaq 0x168049(%rip), %rsi # 0x68e57c callq 0x40360 addq %rax, %rbp movb 0x6(%r13,%rbp), %r14b testb %r14b, %r14b je 0x52641d leaq 0x6(,%rbp), %r12 addq %r13, %r12 movq 0x8(%rsp), %r15 leaq 0x16801c(%rip), %rbp # 0x68e57c movq %r12, %rdi movq %rbp, %rsi callq 0x40b40 movq %rax, %r13 cmpq $0x3, %rax jne 0x52659f cmpb $0x61, %r14b jne 0x5265ac cmpb $0x6c, 0x1(%r12) jne 0x5265ac cmpb $0x6c, 0x2(%r12) jne 0x5265ac movq 0x10(%rsp), %rdi callq 0x526cef movq $0x0, 0x10(%rsp) jmp 0x5265be leaq 0x10(%rsp), %rdi movq %r12, %rsi movq %r13, %rdx jmp 0x5265b9 movl $0x3, %edx leaq 0x10(%rsp), %rdi movq %r12, %rsi callq 0x527738 addq %r13, %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x40360 movb (%rax,%r12), %r14b addq %rax, %r12 testb %r14b, %r14b jne 0x526560 jmp 0x526422 movq %rdi, 0x28(%rsp) movq %rsi, 0x40(%rsp) movl 0x58(%rsp), %r12d movl $0x40, %edi callq 0x41ec0 movq %rax, 0x48(%rsp) testq %rax, %rax je 0x526b17 movq 0x48(%rsp), %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x2a(%rdx) movups %xmm0, 0x20(%rdx) movq 0x30(%rsp), %rcx leaq 0x20(%rcx), %rax testq %rcx, %rcx cmoveq 0x60(%rsp), %rax movq %rdx, 0x20(%rsp) movq %rdx, (%rax) testl %r12d, %r12d je 0x526739 movq 0x40(%rsp), %rsi testq %rsi, %rsi movabsq $0x100002600, %rdx # imm = 0x100002600 movq 0x28(%rsp), %rdi jle 0x52667a movzbl (%r15), %eax cmpq $0x20, %rax ja 0x5268b2 btq %rax, %rdx jae 0x5268b2 leaq -0x1(%rsi), %rax decq %r15 cmpq $0x1, %rsi movq %rax, %rsi jg 0x526650 xorl %esi, %esi movq %rdi, %r8 movq 0x20(%rsp), %r15 subq %r8, %rsi addq %rbp, %rsi addq %r13, %rsi movq %rdi, %rbp movq %r8, 0x30(%rsp) movq %r8, 0x28(%rsp) jmp 0x526765 movzbl 0x4(%rbp,%r13), %eax cmpl $0x20, %eax je 0x5266b1 cmpl $0x9, %eax jne 0x526ad7 leaq 0x4(,%r13), %r12 addq %rbp, %r12 leaq 0x167eb9(%rip), %r15 # 0x68e57c movq %r12, %rdi movq %r15, %rsi callq 0x40360 cmpb $0x0, (%r12,%rax) je 0x52641d addq %rax, %r12 movq %r12, %rdi movq %r15, %rsi callq 0x40b40 movq %rax, %r13 leaq (%r12,%rax), %r14 movq %r12, %rdi movl $0x3d, %esi callq 0x40250 movq %rax, %rdx subq %r12, %rdx cmpq %r14, %rax cmovaq %r13, %rdx leaq 0x10(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi callq 0x527738 movq (%rsp), %rdi movq %rbp, %rsi movq %r12, %rdx movq %r13, %rcx callq 0x5276a3 movq %r14, %r12 movq %rax, %r14 testl %eax, %eax je 0x5266c3 jmp 0x526ab5 movq 0x28(%rsp), %rdi leaq 0x167e37(%rip), %rsi # 0x68e57c callq 0x40b40 addq %rax, %rbp addq %r13, %rbp movq 0x40(%rsp), %rcx addq %rbp, %rcx movq %rcx, 0x30(%rsp) movq %rax, %rsi movq 0x20(%rsp), %r15 movq %rsi, %r14 leaq 0x1(%rsi), %rdi callq 0x41ec0 movq %rax, 0x30(%r15) testq %rax, %rax je 0x526b17 movq %rax, %r13 movq %rax, %rdi movq 0x28(%rsp), %rsi movq %r14, %rdx callq 0x3f250 movb $0x0, (%r13,%r14) movq %r13, %rdi movq %r15, %rsi callq 0x527534 movq $0x0, 0x18(%r15) cmpb $0x0, 0x38(%r15) movq 0x48(%rsp), %r13 je 0x5267e5 movq 0x50(%rsp), %rdi movq %r15, %rsi callq 0x5106a9 testl %eax, %eax jne 0x5267e5 movq 0x30(%r15), %rsi movq 0x50(%rsp), %rdi callq 0x5105bc movq %rax, %rcx movq 0x18(%rax), %rax testq %rax, %rax jne 0x5267d5 movq %r15, 0x18(%rcx) addq $0x28, %r13 leaq 0x10(%rsp), %r14 movq (%r14), %r14 testq %r14, %r14 je 0x52681d movq 0x8(%r14), %r12 movq %r12, %rdi callq 0x3fd60 movq (%rsp), %rdi movq %r13, %rsi movq %r12, %rdx movq %rax, %rcx callq 0x5276a3 testl %eax, %eax je 0x5267ee jmp 0x526af5 leaq 0x167d58(%rip), %r15 # 0x68e57c movq %rbp, %rdi movq %r15, %rsi callq 0x40360 cmpb $0x0, (%rbp,%rax) je 0x5268a3 addq %rax, %rbp cmpq 0x30(%rsp), %rbp jae 0x5268a3 movq %rbp, %rdi leaq 0x167d32(%rip), %r15 # 0x68e57c movq %r15, %rsi callq 0x40b40 movq %rax, %r12 leaq (%rax,%rbp), %r14 movq %rbp, %rdi movl $0x3d, %esi callq 0x40250 movq %rax, %rdx subq %rbp, %rdx cmpq %r14, %rax cmovaq %r12, %rdx testq %rax, %rax cmoveq %r12, %rdx movq %r13, %rdi movq %rbp, %rsi callq 0x527738 movq (%rsp), %rdi movq %r13, %rsi movq %rbp, %rdx movq %r12, %rcx callq 0x5276a3 movq %r14, %rbp testl %eax, %eax je 0x526824 jmp 0x526af5 movq 0x20(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x52641d xorl %eax, %eax movq %rdi, %r8 movq 0x20(%rsp), %r15 movzbl -0x1(%r14), %ecx cmpq $0x20, %rcx ja 0x5268d0 btq %rcx, %rdx jae 0x5268d0 movq %r14, %r8 incq %rax incq %r14 cmpq %rax, %rsi jne 0x5268bc jmp 0x526682 movl $0xffffffe2, %r12d # imm = 0xFFFFFFE2 jmp 0x526ac2 movq 0x40(%rbx), %rax movq %rax, 0x48(%rbx) movq 0x10(%rsp), %rdi callq 0x526cef movq 0x38(%rsp), %r15 movq (%rsp), %r14 jmp 0x525e64 movl 0x1c(%rsp), %r14d movl %r14d, %eax andl $0x1001, %eax # imm = 0x1001 cmpl $0x1, %eax je 0x52694b movq %r15, %rdi callq 0x50c423 cmpl $0x2000, %eax # imm = 0x2000 je 0x52693b movq %r15, %rdi callq 0x50c423 cmpl $0x6000, %eax # imm = 0x6000 jne 0x52694b movq 0x90(%rsp), %rsi movq %r15, %rdi callq 0x50d544 btl $0xc, %r14d setae %al testb $0xc, %r14b setne %cl testb %al, %cl jne 0x52696d movl 0x88(%rsp), %esi movq %r15, %rdi callq 0x50cf48 btl $0xc, %r14d setae %al testl $0x600, %r14d # imm = 0x600 setne %cl testb %al, %cl jne 0x526992 movl 0x84(%rsp), %esi movq %r15, %rdi callq 0x50d74f movl %r14d, %eax andl $0x1010, %eax # imm = 0x1010 cmpl $0x10, %eax je 0x5269b7 movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx movq %r15, %rdi callq 0x50d429 movl %r14d, %eax andl $0x1020, %eax # imm = 0x1020 cmpl $0x20, %eax je 0x5269d0 movl 0x78(%rsp), %esi movq %r15, %rdi callq 0x50d49b movl %r14d, %eax andl $0x1040, %eax # imm = 0x1040 cmpl $0x40, %eax je 0x5269e8 movq %r15, %rdi movl %r13d, %esi callq 0x50d523 andl $0x1080, %r14d # imm = 0x1080 cmpl $0x80, %r14d je 0x526a08 movq 0x98(%rsp), %rsi movq %r15, %rdi callq 0x50d589 movq 0x70(%rsp), %rsi movq %r15, %rdi callq 0x50cfd1 movq 0x68(%rsp), %rsi movq %r15, %rdi callq 0x50d2cc movq 0x90(%rbx), %rdi leaq 0x10(%rsp), %r14 leaq 0x58(%rsp), %rdx movq %r14, %rsi callq 0x55e9ed movq (%r14), %r15 movq %r15, %rdi callq 0x50c953 movq %rax, 0xa8(%rbx) movq $0x0, 0x28(%rbx) movl %ebp, %r12d jmp 0x526ac2 testl %ebp, %ebp jne 0x526a55 movq %r15, %rdi callq 0x50c801 leaq 0x195f91(%rip), %rdx # 0x6bc9fe movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rax, %rcx xorl %eax, %eax callq 0x53e204 movl $0xffffffec, %ebp # imm = 0xFFFFFFEC jmp 0x526a55 leaq 0x195f07(%rip), %rdx # 0x6bc994 movq (%rsp), %rdi movl $0x54, %esi jmp 0x526aa8 leaq 0x195f03(%rip), %rdx # 0x6bc9a2 movq (%rsp), %rdi movl $0xc, %esi xorl %eax, %eax callq 0x53e204 movl $0xffffffe2, %r14d # imm = 0xFFFFFFE2 movq 0x10(%rsp), %rdi callq 0x526cef movq %r14, %r12 movl %r12d, %eax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x195ea1(%rip), %rdx # 0x6bc97f movq (%rsp), %rdi movl $0x54, %esi movq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x53e204 jmp 0x526aaf movq %rax, %r14 jmp 0x526ab5 movq 0x10(%rsp), %rdi callq 0x526cef testl %r12d, %r12d movq 0x38(%rsp), %r15 movq (%rsp), %r14 jne 0x526ac2 jmp 0x525e64 callq 0x415e0 movl (%rax), %esi leaq 0x19343c(%rip), %rdx # 0x6b9f61 movq (%rsp), %rdi jmp 0x526aa8 leaq 0x195e8b(%rip), %rdx # 0x6bc9c0 movq (%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF jmp 0x526aa8
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_mtree.c
archive_read_format_rar_read_data
static int archive_read_format_rar_read_data(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { struct rar *rar = (struct rar *)(a->format->data); int ret; if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) { rar->has_encrypted_entries = 0; } if (rar->bytes_unconsumed > 0) { /* Consume as much as the decompressor actually used. */ __archive_read_consume(a, rar->bytes_unconsumed); rar->bytes_unconsumed = 0; } *buff = NULL; if (rar->entry_eof || rar->offset_seek >= rar->unp_size) { *size = 0; *offset = rar->offset; if (*offset < rar->unp_size) *offset = rar->unp_size; return (ARCHIVE_EOF); } switch (rar->compression_method) { case COMPRESS_METHOD_STORE: ret = read_data_stored(a, buff, size, offset); break; case COMPRESS_METHOD_FASTEST: case COMPRESS_METHOD_FAST: case COMPRESS_METHOD_NORMAL: case COMPRESS_METHOD_GOOD: case COMPRESS_METHOD_BEST: ret = read_data_compressed(a, buff, size, offset, 0); if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) { __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context); rar->start_new_table = 1; rar->ppmd_valid = 0; } break; default: archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Unsupported compression method for RAR file."); ret = ARCHIVE_FATAL; break; } return (ret); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %r13 movq 0x818(%rdi), %rax movq (%rax), %rbp cmpl $-0x1, 0x4f50(%rbp) jne 0x528bc6 movl $0x0, 0x4f50(%rbp) movq 0xa0(%rbp), %rsi testq %rsi, %rsi jle 0x528be5 movq %r13, %rdi callq 0x511e26 movq $0x0, 0xa0(%rbp) movq $0x0, (%r14) cmpb $0x0, 0xed(%rbp) jne 0x529344 movq 0xc8(%rbp), %rax cmpq 0x28(%rbp), %rax jge 0x529344 movzbl 0x17(%rbp), %eax leal -0x31(%rax), %ecx cmpl $0x5, %ecx movq %r14, 0x18(%rsp) jae 0x52937e leaq 0x33480a(%rip), %rax # 0x85d430 movq 0x40(%rax), %rax movq %rax, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %r15, 0x20(%rsp) movq %r12, 0x48(%rsp) movq 0x818(%r13), %rax movq (%rax), %rsi cmpb $0x0, 0xd0(%rsi) je 0x529612 movl $0xffffffe2, 0x14(%rsp) # imm = 0xFFFFFFE2 incq 0x50(%rsp) leaq 0x4f30(%rsi), %rax movq %rax, 0x68(%rsp) leaq 0x4f40(%rsi), %rax movq %rax, 0x70(%rsp) leaq 0x3d8(%rsi), %rax movq %rax, 0x38(%rsp) leaq 0x4ec8(%rsi), %rax movq %rax, 0x30(%rsp) xorl %ecx, %ecx movq %rsi, 0x8(%rsp) movq %rbp, 0x58(%rsp) movq %r13, 0x28(%rsp) movq 0x3c8(%rsi), %rax testq %rax, %rax jne 0x529477 cmpb $0x0, 0x3d1(%rsi) jne 0x52941c cmpl $0x0, 0xe8(%rsi) je 0x528ceb movq 0xb8(%rsi), %rdx cmpq 0x28(%rsi), %rdx jge 0x52941c cmpb $0x0, 0x3d2(%rsi) je 0x528ed5 movq 0x3b8(%rsi), %rax cmpq 0x3a8(%rsi), %rax jne 0x528dd2 movq %rcx, 0x78(%rsp) movq 0x818(%r13), %rax movq (%rax), %r14 movq 0x3a0(%r14), %rbx movq 0x3a8(%r14), %r12 movl 0x40(%rbx), %esi addq %r12, %rsi movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x3a8(%r14) movq %r13, %rdi callq 0x52b25a movl 0x40(%rbx), %r13d leaq (%r12,%r13), %rcx movq %rax, 0x60(%rsp) cmpq %rcx, %rax jne 0x5296af movq 0x390(%r14), %r15 testq %r15, %r15 jne 0x528d7f movl $0x1, %edi movl $0x40024, %esi # imm = 0x40024 callq 0x41eb8 movq %rax, %r15 movq %rax, 0x390(%r14) testq %rax, %rax je 0x5296af movq 0x28(%rsp), %rax movq 0x818(%rax), %rax movq (%rax), %rbp movl 0x358(%rbp), %eax andl %eax, %r12d subl %r12d, %eax incl %eax js 0x52957b addq $0x20, %r15 movslq %r12d, %rsi addq 0x350(%rbp), %rsi movl %r13d, %r12d subl %eax, %r12d jle 0x528f36 movl %eax, %edx movq %r15, %rdi callq 0x3f250 movq 0x350(%rbp), %rsi jmp 0x528f39 cmpq $0x0, 0x4f48(%rsi) jne 0x528e36 movq 0x818(%r13), %rax movq (%rax), %rax xorl %ecx, %ecx cmpq $0x0, 0xa8(%rax) jle 0x528e36 movl $0x1, %esi movq %r13, %rdi movq 0x70(%rsp), %rdx callq 0x52a7eb movq 0x8(%rsp), %rsi movq %rax, 0x4f48(%rsi) testq %rax, %rax je 0x529699 cmpl $0x0, 0x4f38(%rsi) jne 0x528e34 movq %r13, %rdi movq 0x68(%rsp), %rsi callq 0x52c83c movq 0x8(%rsp), %rsi xorl %ecx, %ecx cmpb $0x0, 0x388(%rsi) je 0x528e57 movq %r13, %rdi callq 0x52a9e3 movq 0x8(%rsp), %rsi movl %eax, %ecx cmpl $-0x14, %eax jl 0x5295f8 cmpb $0x0, 0x3d2(%rsi) je 0x529001 movq %rcx, %r15 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi callq *0x40(%rsp) testl %eax, %eax js 0x5294a8 movl %eax, %ebx movq 0x8(%rsp), %rsi cmpl 0x3d4(%rsi), %eax jne 0x529278 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi callq *0x40(%rsp) testl %eax, %eax js 0x5294a8 cmpl $0x5, %eax ja 0x529273 movl %eax, %eax leaq 0x193ce0(%rip), %rcx # 0x6bcb98 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rax movb $0x1, 0x3d1(%rax) movq %r15, %rcx jmp 0x5292f7 movq 0xb0(%rsi), %rax testq %rax, %rax jle 0x528ceb movl 0xd8(%rsi), %ebx subl 0xd4(%rsi), %ebx cmpq %rbx, %rax cmovbq %rax, %rbx movq %r13, %rdi movq %rsi, %r15 movq %r14, %rsi movl %ebx, %ecx callq 0x52a8b9 testl %eax, %eax jne 0x529577 addq %rbx, 0xb8(%r15) subq %rbx, 0xb0(%r15) movq (%r14), %rsi xorl %ecx, %ecx testq %rsi, %rsi movq 0x20(%rsp), %r15 je 0x529308 jmp 0x529651 movl %r13d, %r12d movslq %r12d, %rdx movq %r15, %rdi callq 0x3f250 movq 0x390(%r14), %rdx movq 0xb8(%r14), %rcx movq 0x28(%rsp), %r13 movq %r13, %rdi movq %rbx, %rsi callq 0x52c24b testl %eax, %eax movq 0x58(%rsp), %rbp je 0x5296af movl 0x44(%rbx), %r12d movl 0x48(%rbx), %r15d movq 0x50(%rbx), %rax movq %rax, 0x3a0(%r14) movq $0x0, 0x50(%rbx) movq %rbx, %rdi callq 0x52c762 movq 0x3a0(%r14), %rbx testq %rbx, %rbx je 0x529077 movq 0x38(%rbx), %rax cmpq 0x3a8(%r14), %rax jne 0x529065 cmpl %r15d, 0x40(%rbx) jne 0x529065 movq 0x390(%r14), %rdi movl %r12d, %eax leaq (%rdi,%rax), %rsi addq $0x20, %rsi addq $0x20, %rdi movl %r15d, %edx callq 0x3f470 movq 0x390(%r14), %rdx movq 0xb8(%r14), %rcx movq %r13, %rdi movq %rbx, %rsi callq 0x52c24b testl %eax, %eax jne 0x528f6f jmp 0x5296af movq 0xb8(%rsi), %rbx movq %rsi, %r15 movl 0xe8(%rsi), %esi addq %rbx, %rsi movq 0x3a8(%r15), %rax cmpq %rsi, %rax cmovlq %rax, %rsi movq %r13, %rdi callq 0x52b25a movq %rax, %rcx testq %rax, %rax js 0x5295f8 movq %rcx, %rax subq %rbx, %rax movq %rax, 0xb0(%r15) movq %rcx, 0x3b8(%r15) movq %r15, %rsi jne 0x5292b5 cmpq 0x3a8(%rsi), %rcx je 0x5292b5 jmp 0x529648 cmpq 0x60(%rsp), %rax jb 0x5296af movq %rax, 0x3a8(%r14) movq 0x60(%rsp), %rax movq %rax, 0x3b8(%r14) movq 0x390(%r14), %rax movl %r12d, %ecx addq %rcx, %rax addq $0x20, %rax movq %rax, 0x3c0(%r14) movl %r15d, %eax movq %rax, 0x3c8(%r14) movq 0x20(%rsp), %r15 movq 0x48(%rsp), %r12 movq 0x18(%rsp), %r14 movq 0x78(%rsp), %rcx jmp 0x5292fc xorl %r14d, %r14d movl $0x10, %ebx movq 0x40(%rsp), %r15 movq 0x38(%rsp), %r12 movq %r12, %rdi movq 0x30(%rsp), %rsi callq *%r15 testl %eax, %eax js 0x5294a8 movl %ebx, %ecx shll %cl, %eax orl %eax, %r14d addl $-0x8, %ebx cmpl $-0x8, %ebx jne 0x5290d0 movq %r12, %rdi movq 0x30(%rsp), %rsi callq *%r15 testl %eax, %eax js 0x5294a8 movl %eax, %ebx addl $0x20, %ebx movq 0x8(%rsp), %rsi movl 0x358(%rsi), %ecx movl 0x360(%rsi), %eax andl %ecx, %eax movl %eax, %r15d subl %r14d, %r15d addl $-0x2, %r15d andl %ecx, %r15d movl %ebx, %r14d cmpl %r15d, %eax movslq %r15d, %rdx cmovgl %eax, %r15d subl %r15d, %ecx incl %ecx cmpl %ecx, %r14d movl %ecx, %r12d cmovll %r14d, %r12d movq 0x350(%rsi), %rsi movslq %eax, %rdi addq %rsi, %rdi addq %rdx, %rsi leal (%r12,%rax), %r13d leal (%r12,%rdx), %r15d cmpl %edx, %r13d jl 0x529182 cmpl %eax, %r15d jl 0x529182 testl %r12d, %r12d jle 0x52918a movl %r12d, %eax xorl %ecx, %ecx movb (%rsi,%rcx), %dl movb %dl, (%rdi,%rcx) incq %rcx cmpq %rcx, %rax jne 0x529172 jmp 0x52918a movslq %r12d, %rdx callq 0x3f250 movq 0x8(%rsp), %rsi movl 0x358(%rsi), %ecx andl %ecx, %r13d andl %ecx, %r15d movl %r13d, %eax subl %r12d, %r14d jg 0x52912d jmp 0x529256 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi callq *0x40(%rsp) testl %eax, %eax js 0x5294a8 movl %eax, %ebx addl $0x4, %ebx movq 0x8(%rsp), %rsi movl 0x358(%rsi), %ecx movl 0x360(%rsi), %eax andl %ecx, %eax leal -0x1(%rax), %r15d andl %ecx, %r15d movl %ebx, %r14d cmpl %r15d, %eax movslq %r15d, %rdx cmovgl %eax, %r15d subl %r15d, %ecx incl %ecx cmpl %ecx, %r14d movl %ecx, %r12d cmovll %r14d, %r12d movq 0x350(%rsi), %rsi movslq %eax, %rdi addq %rsi, %rdi addq %rdx, %rsi leal (%r12,%rax), %r13d leal (%r12,%rdx), %r15d cmpl %edx, %r13d jl 0x529235 cmpl %eax, %r15d jl 0x529235 testl %r12d, %r12d jle 0x52923d movl %r12d, %eax xorl %ecx, %ecx movb (%rsi,%rcx), %dl movb %dl, (%rdi,%rcx) incq %rcx cmpq %rcx, %rax jne 0x529225 jmp 0x52923d movslq %r12d, %rdx callq 0x3f250 movq 0x8(%rsp), %rsi movl 0x358(%rsi), %ecx andl %ecx, %r13d andl %ecx, %r15d movl %r13d, %eax subl %r12d, %r14d jg 0x5291e0 movl %ebx, %eax movq 0x360(%rsi), %rcx addq %rax, %rcx movq 0x28(%rsp), %r13 movq 0x48(%rsp), %r12 movq 0x18(%rsp), %r14 jmp 0x5292a0 movq 0x8(%rsp), %rsi movq 0x350(%rsi), %rax movl 0x358(%rsi), %ecx andl 0x360(%rsi), %ecx movslq %ecx, %rcx movb %bl, (%rax,%rcx) movq 0x360(%rsi), %rcx incq %rcx movl $0x1, %eax movq %rcx, 0x360(%rsi) addq 0xb0(%rsi), %rax movq %rax, 0xb0(%rsi) movl 0xd8(%rsi), %ebx subl 0xd4(%rsi), %ebx cmpq %rbx, %rax cmovlq %rax, %rbx movq 0xb8(%rsi), %rdx movq %r13, %rdi movq %rsi, %r15 movq %r14, %rsi movl %ebx, %ecx callq 0x52a8b9 testl %eax, %eax jne 0x529577 addq %rbx, 0xb8(%r15) subq %rbx, 0xb0(%r15) xorl %ecx, %ecx movq 0x20(%rsp), %r15 movq (%r14), %rsi testq %rsi, %rsi jne 0x5294fb movq 0x8(%rsp), %rsi cmpb $0x0, 0xd0(%rsi) jne 0x528ca7 jmp 0x5296af movq 0x8(%rsp), %rax movb $0x1, 0x388(%rax) cmpq $0x401, 0x50(%rsp) # imm = 0x401 movq 0x20(%rsp), %r15 jne 0x528c42 jmp 0x5296af movq $0x0, (%r15) movq 0xb8(%rbp), %rax movq %rax, (%r12) movq 0x28(%rbp), %rcx cmpq %rcx, %rax cmovgq %rax, %rcx movq %rcx, (%r12) movl $0x1, %ecx movl %ecx, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x30, %eax jne 0x529410 movq 0x818(%r13), %rax movq (%rax), %r14 cmpq $0x0, 0xa8(%r14) je 0x5294b4 leaq 0x80(%rsp), %rbx movl $0x1, %esi movq %r13, %rdi movq %rbx, %rdx callq 0x52a7eb movq 0x18(%rsp), %rcx movq %rax, (%rcx) movq (%rbx), %rdx testq %rdx, %rdx jle 0x52956b movq %rdx, (%r15) movq 0xb8(%r14), %rcx movq %rcx, (%r12) addq %rdx, %rcx movq %rcx, 0xb8(%r14) addq %rdx, 0xc8(%r14) subq %rdx, 0xa8(%r14) movq %rdx, 0xa0(%r14) movq 0xf0(%r14), %rdi movq %rax, %rsi callq 0x62f0bd movq %rax, 0xf0(%r14) jmp 0x529470 leaq 0x193c6c(%rip), %rdx # 0x6bd083 jmp 0x52962f movl 0xd4(%rsi), %eax testq %rax, %rax je 0x529533 movq %rsi, %rbx movq 0xe0(%rsi), %rsi movq %rsi, (%r14) movq %rax, (%r15) movq 0xc0(%rbx), %rax movq %rax, (%r12) addq (%r15), %rax movq %rax, 0xc0(%rbx) movq 0xf0(%rbx), %rdi movl (%r15), %edx callq 0x62f0bd movq %rax, 0xf0(%rbx) movl $0x0, 0xd4(%rbx) xorl %ecx, %ecx jmp 0x52936a movq %r15, %rdx movq %rcx, %r15 movl 0xd4(%rsi), %ecx testq %rcx, %rcx je 0x52959d movq %rsi, %rbx movq 0xe0(%rsi), %rsi movq %rsi, (%r14) movq %rcx, (%rdx) movl $0x0, 0xd4(%rbx) jmp 0x529519 leaq 0x193c28(%rip), %rdx # 0x6bd0d7 jmp 0x5296a0 testb $0x1, (%r14) je 0x5294c5 testb $0x2, 0x18(%r14) jne 0x52939f xorl %eax, %eax movq 0x18(%rsp), %rcx movq %rax, (%rcx) movq %rax, (%r15) movq 0xb8(%r14), %rax movq %rax, (%r12) movq 0x8(%r14), %rax cmpq 0xf0(%r14), %rax jne 0x529628 movb $0x1, 0xed(%r14) jmp 0x529365 movq %r15, %rdx movq %rcx, %r15 movq 0x8(%rsp), %rbx movl $0x0, 0xd4(%rbx) movl 0xd8(%rbx), %eax movq %rax, (%rdx) movq 0xc0(%rbx), %rax movq %rax, (%r12) addq (%rdx), %rax movq %rax, 0xc0(%rbx) jmp 0x5295e0 xorl %eax, %eax movq %rax, (%r14) movq %rax, (%r15) movq 0xb8(%rsi), %rax movq %rax, (%r12) movq 0x8(%rsi), %rax cmpq 0xf0(%rsi), %rax jne 0x52961f movb $0x1, 0xed(%rsi) movl $0x1, 0x14(%rsp) jmp 0x5296af leaq 0x193b4d(%rip), %rdx # 0x6bd0bf jmp 0x52962f movl %eax, %ecx jmp 0x5295f8 leaq 0x193bd8(%rip), %rdx # 0x6bd15a movq 0x28(%rsp), %rdi movl $0x54, %esi xorl %eax, %eax callq 0x53e204 movq 0x58(%rsp), %rbp jmp 0x5296af movq 0x3c0(%rsi), %rcx movq %rcx, (%r14) movq %rax, (%rdx) addq %rax, 0xb8(%rsi) movq 0xc0(%rsi), %rax movq %rax, (%r12) addq (%rdx), %rax movq %rax, 0xc0(%rsi) movq (%rdx), %rax subq %rax, 0x3c8(%rsi) addq (%rdx), %rcx movq %rcx, 0x3c0(%rsi) movq %rsi, %rbx movq (%r14), %rsi movq 0xf0(%rbx), %rdi movl (%rdx), %edx callq 0x62f0bd movq %rax, 0xf0(%rbx) movq %r15, %rcx cmpl $-0x14, %ecx je 0x52936a movl %ecx, 0x14(%rsp) testl %ecx, %ecx je 0x52936a jmp 0x5296af movl $0xffffffe2, 0x14(%rsp) # imm = 0xFFFFFFE2 jmp 0x5296af leaq 0x193a8a(%rip), %rdx # 0x6bd0b0 jmp 0x5296a0 leaq 0x193a81(%rip), %rdx # 0x6bd0b0 movq %r13, %rdi movl $0x54, %esi xorl %eax, %eax callq 0x53e204 movl $0xffffffe2, %ecx # imm = 0xFFFFFFE2 jmp 0x52936a leaq 0x193ab7(%rip), %rdx # 0x6bd106 jmp 0x5296a0 movq 0x8(%rsp), %rbx movl $0x0, 0xd4(%rbx) movl 0xd8(%rbx), %eax movq %rax, (%r15) movq 0xc0(%rbx), %rax movq %rax, (%r12) addq (%r15), %rax movq %rax, 0xc0(%rbx) movq 0xf0(%rbx), %rdi movl (%r15), %edx callq 0x62f0bd movq %rax, 0xf0(%rbx) jmp 0x529470 leaq 0x193a1f(%rip), %rdx # 0x6bd0bf movq %r13, %rdi movl $0x54, %esi xorl %eax, %eax callq 0x53e204 leaq 0x3d8(%rbp), %rdi leaq 0x333d73(%rip), %rax # 0x85d430 callq *0x10(%rax) movb $0x1, 0x388(%rbp) movb $0x0, 0x3d0(%rbp) movl 0x14(%rsp), %eax movl %eax, %ecx jmp 0x52936a leaq 0x193a06(%rip), %rdx # 0x6bd0e6 movq %r13, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x53e204 movl $0xffffffe7, 0x14(%rsp) # imm = 0xFFFFFFE7 jmp 0x5296af
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c
archive_read_format_rar_read_data_skip
static int archive_read_format_rar_read_data_skip(struct archive_read *a) { struct rar *rar; int64_t bytes_skipped; int ret; rar = (struct rar *)(a->format->data); if (rar->bytes_unconsumed > 0) { /* Consume as much as the decompressor actually used. */ __archive_read_consume(a, rar->bytes_unconsumed); rar->bytes_unconsumed = 0; } if (rar->bytes_remaining > 0) { bytes_skipped = __archive_read_consume(a, rar->bytes_remaining); if (bytes_skipped < 0) return (ARCHIVE_FATAL); } /* Compressed data to skip must be read from each header in a multivolume * archive. */ if (rar->main_flags & MHD_VOLUME && rar->file_flags & FHD_SPLIT_AFTER) { ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) ret = archive_read_format_rar_read_header(a, a->entry); if (ret != (ARCHIVE_OK)) return ret; return archive_read_format_rar_read_data_skip(a); } return (ARCHIVE_OK); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x818(%rbx), %rax movq (%rax), %r14 movq 0xa0(%r14), %rsi testq %rsi, %rsi jle 0x529729 movq %rbx, %rdi callq 0x511e26 movq $0x0, 0xa0(%r14) movq 0xa8(%r14), %rsi testq %rsi, %rsi jle 0x529742 movq %rbx, %rdi callq 0x511e26 testq %rax, %rax js 0x52977a xorl %eax, %eax testb $0x1, (%r14) je 0x52977f testb $0x2, 0x18(%r14) je 0x52977f movq 0x90(%rbx), %rsi movq %rbx, %rdi callq 0x528783 cmpl $0x1, %eax jne 0x529774 movq 0x90(%rbx), %rsi movq %rbx, %rdi callq 0x528783 testl %eax, %eax je 0x529700 jmp 0x52977f movl $0xffffffe2, %eax # imm = 0xFFFFFFE2 addq $0x8, %rsp popq %rbx popq %r14 retq
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c
archive_read_format_rar_seek_data
static int64_t archive_read_format_rar_seek_data(struct archive_read *a, int64_t offset, int whence) { int64_t client_offset, ret; unsigned int i; struct rar *rar = (struct rar *)(a->format->data); if (rar->compression_method == COMPRESS_METHOD_STORE) { /* Modify the offset for use with SEEK_SET */ switch (whence) { case SEEK_CUR: client_offset = rar->offset_seek; break; case SEEK_END: client_offset = rar->unp_size; break; case SEEK_SET: default: client_offset = 0; } client_offset += offset; if (client_offset < 0) { /* Can't seek past beginning of data block */ return -1; } else if (client_offset > rar->unp_size) { /* * Set the returned offset but only seek to the end of * the data block. */ rar->offset_seek = client_offset; client_offset = rar->unp_size; } client_offset += rar->dbo[0].start_offset; i = 0; while (i < rar->cursor) { i++; client_offset += rar->dbo[i].start_offset - rar->dbo[i-1].end_offset; } if (rar->main_flags & MHD_VOLUME) { /* Find the appropriate offset among the multivolume archive */ while (1) { if (client_offset < rar->dbo[rar->cursor].start_offset && rar->file_flags & FHD_SPLIT_BEFORE) { /* Search backwards for the correct data block */ if (rar->cursor == 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Attempt to seek past beginning of RAR data block"); return (ARCHIVE_FAILED); } rar->cursor--; client_offset -= rar->dbo[rar->cursor+1].start_offset - rar->dbo[rar->cursor].end_offset; if (client_offset < rar->dbo[rar->cursor].start_offset) continue; ret = __archive_read_seek(a, rar->dbo[rar->cursor].start_offset - rar->dbo[rar->cursor].header_size, SEEK_SET); if (ret < (ARCHIVE_OK)) return ret; ret = archive_read_format_rar_read_header(a, a->entry); if (ret != (ARCHIVE_OK)) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Error during seek of RAR file"); return (ARCHIVE_FAILED); } rar->cursor--; break; } else if (client_offset > rar->dbo[rar->cursor].end_offset && rar->file_flags & FHD_SPLIT_AFTER) { /* Search forward for the correct data block */ rar->cursor++; if (rar->cursor < rar->nodes && client_offset > rar->dbo[rar->cursor].end_offset) { client_offset += rar->dbo[rar->cursor].start_offset - rar->dbo[rar->cursor-1].end_offset; continue; } rar->cursor--; ret = __archive_read_seek(a, rar->dbo[rar->cursor].end_offset, SEEK_SET); if (ret < (ARCHIVE_OK)) return ret; ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) { rar->has_endarc_header = 1; ret = archive_read_format_rar_read_header(a, a->entry); } if (ret != (ARCHIVE_OK)) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Error during seek of RAR file"); return (ARCHIVE_FAILED); } client_offset += rar->dbo[rar->cursor].start_offset - rar->dbo[rar->cursor-1].end_offset; continue; } break; } } ret = __archive_read_seek(a, client_offset, SEEK_SET); if (ret < (ARCHIVE_OK)) return ret; rar->bytes_remaining = rar->dbo[rar->cursor].end_offset - ret; i = rar->cursor; while (i > 0) { i--; ret -= rar->dbo[i+1].start_offset - rar->dbo[i].end_offset; } ret -= rar->dbo[0].start_offset; /* Always restart reading the file after a seek */ __archive_reset_read_data(&a->archive); rar->bytes_unconsumed = 0; rar->offset = 0; /* * If a seek past the end of file was requested, return the requested * offset. */ if (ret == rar->unp_size && rar->offset_seek > rar->unp_size) return rar->offset_seek; /* Return the new offset */ rar->offset_seek = ret; return rar->offset_seek; } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Seeking of compressed RAR files is unsupported"); } return (ARCHIVE_FAILED); }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x818(%rdi), %rax movq (%rax), %r15 cmpb $0x30, 0x17(%r15) jne 0x5297b1 cmpl $0x1, %edx je 0x5297d3 cmpl $0x2, %edx jne 0x5297de movl $0x28, %eax jmp 0x5297d8 leaq 0x193b65(%rip), %rdx # 0x6bd31d movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x53e204 movq $-0x19, %rax jmp 0x5298d3 movl $0xc8, %eax movq (%r15,%rax), %rax jmp 0x5297e0 xorl %eax, %eax addq %rsi, %rax js 0x5297f7 movq 0x28(%r15), %r14 cmpq %r14, %rax jle 0x529803 movq %rax, 0xc8(%r15) jmp 0x529806 movq $-0x1, %rax jmp 0x5298d3 movq %rax, %r14 movq 0x100(%r15), %rax addq 0x8(%rax), %r14 movl 0x108(%r15), %ecx testq %rcx, %rcx je 0x52983e leaq (,%rcx,8), %rdx leaq (%rdx,%rdx,2), %rdx xorl %esi, %esi addq 0x20(%rax,%rsi), %r14 subq 0x10(%rax,%rsi), %r14 addq $0x18, %rsi cmpq %rsi, %rdx jne 0x52982b testb $0x1, (%r15) jne 0x5298d9 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x5120cc testq %rax, %rax js 0x5298d3 movq 0x100(%r15), %rcx movl 0x108(%r15), %edx leaq (%rdx,%rdx,2), %rsi movq 0x10(%rcx,%rsi,8), %rsi subq %rax, %rsi movq %rsi, 0xa8(%r15) testq %rdx, %rdx je 0x529898 shlq $0x3, %rdx leaq (%rdx,%rdx,2), %rdx subq 0x8(%rcx,%rdx), %rax addq -0x8(%rcx,%rdx), %rax addq $-0x18, %rdx jne 0x529888 movq %rax, %r14 subq 0x8(%rcx), %r14 movq %rbx, %rdi callq 0x51181c xorl %eax, %eax movq %rax, 0xa0(%r15) movq %rax, 0xb8(%r15) cmpq 0x28(%r15), %r14 jne 0x5298c9 movq 0xc8(%r15), %rax cmpq %r14, %rax jg 0x5298d3 movq %r14, 0xc8(%r15) movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movl %ecx, %edx leaq (%rdx,%rdx,2), %rsi movq 0x8(%rax,%rsi,8), %rdx cmpq %rdx, %r14 jge 0x5298f0 testb $0x1, 0x18(%r15) jne 0x52993c movq 0x10(%rax,%rsi,8), %rsi movq %r14, %rdx subq %rsi, %rdx jle 0x529848 testb $0x2, 0x18(%r15) je 0x529848 leal 0x1(%rcx), %edi movl %edi, 0x108(%r15) cmpl 0x10c(%r15), %edi jae 0x52996c movl %edi, %r8d leaq (%r8,%r8,2), %r8 cmpq 0x10(%rax,%r8,8), %r14 jle 0x52996c leaq (%rax,%r8,8), %rcx addq 0x8(%rcx), %rdx movl %edi, %ecx movq %rdx, %r14 jmp 0x5298d9 testl %ecx, %ecx je 0x5299dd decl %ecx movl %ecx, 0x108(%r15) leaq (%rcx,%rcx,2), %rdi movq 0x8(%rax,%rdi,8), %rsi movq 0x10(%rax,%rdi,8), %r8 subq %rdx, %r8 addq %r8, %r14 cmpq %rsi, %r14 jl 0x5298d9 jmp 0x5299e9 movl %ecx, 0x108(%r15) movq %rbx, %rdi xorl %edx, %edx callq 0x5120cc testq %rax, %rax js 0x5298d3 movq 0x90(%rbx), %rsi movq %rbx, %rdi callq 0x528783 cmpl $0x1, %eax jne 0x5299b1 movb $0x1, 0xfc(%r15) movq 0x90(%rbx), %rsi movq %rbx, %rdi callq 0x528783 testl %eax, %eax jne 0x529a16 movq 0x100(%r15), %rax movl 0x108(%r15), %ecx leaq (%rcx,%rcx,2), %rdx leal -0x1(%rcx), %esi leaq (%rsi,%rsi,2), %rsi addq 0x8(%rax,%rdx,8), %r14 subq 0x10(%rax,%rsi,8), %r14 jmp 0x5298d9 leaq 0x1938ea(%rip), %rdx # 0x6bd2ce jmp 0x5297b8 leaq (%rax,%rdi,8), %rax subq (%rax), %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x5120cc testq %rax, %rax js 0x5298d3 movq 0x90(%rbx), %rsi movq %rbx, %rdi callq 0x528783 testl %eax, %eax je 0x529a22 leaq 0x1938e2(%rip), %rdx # 0x6bd2ff jmp 0x5297b8 decl 0x108(%r15) jmp 0x529848
/JKorbelRA[P]CMake/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c