name
string
code
string
asm
string
file
string
wabt::interp::RunResult wabt::interp::Thread::DoSimdNarrow<wabt::interp::Simd<signed char, (unsigned char)16>, wabt::interp::Simd<short, (unsigned char)8>>()
RunResult Thread::DoSimdNarrow() { using SL = typename S::LaneType; using TL = typename T::LaneType; auto rhs = Pop<T>(); auto lhs = Pop<T>(); S result; for (u8 i = 0; i < T::lanes; ++i) { result[i] = Saturate<SL, TL>(lhs[i]); } for (u8 i = 0; i < T::lanes; ++i) { result[T::lanes + i] = Saturate<SL, TL>(rhs[i]); } Push(result); return RunResult::Ok; }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x9af70 movq %rdx, %xmm0 movq %rax, %xmm1 punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movdqa %xmm1, (%rsp) movq %rbx, %rdi callq 0x9af70 movq %rdx, %xmm0 movq %rax, %xmm1 punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] packsswb %xmm1, %xmm1 movq %xmm1, %rsi movdqa (%rsp), %xmm0 packsswb %xmm0, %xmm0 movq %xmm0, %rdx movq %rbx, %rdi callq 0x9b328 xorl %eax, %eax addq $0x10, %rsp popq %rbx retq nop
/dcodeIO[P]wabt/src/interp/interp.cc
wabt::interp::RunResult wabt::interp::Thread::DoSimdWiden<wabt::interp::Simd<short, (unsigned char)8>, wabt::interp::Simd<signed char, (unsigned char)16>, true>()
RunResult Thread::DoSimdWiden() { auto val = Pop<T>(); S result; for (u8 i = 0; i < S::lanes; ++i) { result[i] = val[(low ? 0 : S::lanes) + i]; } Push(result); return RunResult::Ok; }
pushq %rbx movq %rdi, %rbx callq 0x9aeae movq %rax, %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] psraw $0x8, %xmm0 movq %xmm0, %rsi pshufd $0xee, %xmm0, %xmm0 # xmm0 = xmm0[2,3,2,3] movq %xmm0, %rdx movq %rbx, %rdi callq 0x9b370 xorl %eax, %eax popq %rbx retq
/dcodeIO[P]wabt/src/interp/interp.cc
wabt::interp::RunResult wabt::interp::Thread::DoAtomicStore<unsigned long, unsigned char>(wabt::interp::Instr, wabt::interp::RefPtr<wabt::interp::Trap>*)
RunResult Thread::DoAtomicStore(Instr instr, Trap::Ptr* out_trap) { Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]}; V val = static_cast<V>(Pop<T>()); u64 offset = PopPtr(memory); TRAP_IF(Failed(memory->AtomicStore(offset, instr.imm_u32x2.snd, val)), StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset, instr.imm_u32x2.snd)); return RunResult::Ok; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x60, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x90(%rsp), %r13 movq 0x88(%rdi), %rsi movq 0x90(%rdi), %rax movl 0x8(%r13), %ecx movq 0x90(%rax), %rax movq (%rax,%rcx,8), %rdx leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x90132 movq %r14, %rdi callq 0x904ec movq %rax, %r15 movq (%r12), %rax cmpb $0x1, 0x62(%rax) jne 0x94740 movq %r14, %rdi callq 0x904ec jmp 0x9474a movq %r14, %rdi callq 0x90562 movl %eax, %eax movq 0x8(%rsp), %rsi movl 0xc(%r13), %ecx movq 0x68(%rsi), %rdx movq 0x70(%rsi), %rdi movq %rdi, %rsi subq %rdx, %rsi leaq (%rax,%rcx), %r8 incq %r8 cmpq %rsi, %r8 ja 0x94787 cmpq %rdx, %rdi je 0x94787 cmpq %rax, %rsi jb 0x94787 cmpq %rcx, %rsi jb 0x94787 addq %rcx, %rax movb %r15b, (%rdx,%rax) xorl %ebx, %ebx jmp 0x947fc movq 0x88(%r14), %r15 leaq 0x21cdf(%rip), %rsi # 0xb6474 leaq 0x20(%rsp), %r12 movq %r12, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x32a89 addq $0x40, %r14 leaq 0x40(%rsp), %r13 movq %r13, %rdi movq %r15, %rsi movq %r15, %rdx movq %r12, %rcx movq %r14, %r8 callq 0x96aee movaps (%r13), %xmm0 movups %xmm0, (%rbx) movq 0x10(%r13), %rax movq %rax, 0x10(%rbx) xorps %xmm0, %xmm0 movaps %xmm0, (%r13) movq $0x0, 0x10(%r13) movq (%r12), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x947f7 callq 0x1d540 movl $0x2, %ebx cmpq $0x0, 0x8(%rsp) je 0x94817 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi addq $0x68, %rdi callq 0x8f2d8 movl %ebx, %eax addq $0x60, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
/dcodeIO[P]wabt/src/interp/interp.cc
wabt::interp::RunResult wabt::interp::Thread::DoAtomicRmw<unsigned long, unsigned int>(unsigned int (*)(unsigned int, unsigned int), wabt::interp::Instr, wabt::interp::RefPtr<wabt::interp::Trap>*)
RunResult Thread::DoAtomicRmw(BinopFunc<T, T> f, Instr instr, Trap::Ptr* out_trap) { Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]}; T val = static_cast<T>(Pop<R>()); u64 offset = PopPtr(memory); T old; TRAP_IF(Failed(memory->AtomicRmw(offset, instr.imm_u32x2.snd, val, f, &old)), StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset, instr.imm_u32x2.snd)); Push(static_cast<R>(old)); return RunResult::Ok; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %rbx movq %rdi, %r14 leaq 0xa0(%rsp), %r13 movq %rsi, 0x10(%rsp) movq 0x88(%rdi), %rsi movq 0x90(%rdi), %rax movl 0x8(%r13), %ecx movq 0x90(%rax), %rax movq (%rax,%rcx,8), %rdx leaq 0x18(%rsp), %r15 movq %r15, %rdi callq 0x90132 movq %r14, %rdi callq 0x904ec movq %rax, %r12 movq (%r15), %rax cmpb $0x1, 0x62(%rax) jne 0x95328 movq %r14, %rdi callq 0x904ec movq %rax, %r15 jmp 0x95333 movq %r14, %rdi callq 0x90562 movl %eax, %r15d movq 0x18(%rsp), %rdi movl 0xc(%r13), %r13d leaq 0x10(%rsp), %r8 leaq 0xc(%rsp), %r9 movq %r15, %rsi movq %r13, %rdx movl %r12d, %ecx callq 0x9bca2 cmpl $0x1, %eax je 0x95393 movl 0xc(%rsp), %esi movq %r14, %rdi callq 0x911ce xorl %ebx, %ebx cmpq $0x0, 0x18(%rsp) je 0x95382 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x68, %rdi callq 0x8f2d8 movl %ebx, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x88(%r14), %r12 leaq 0x210d3(%rip), %rsi # 0xb6474 leaq 0x30(%rsp), %rbp movq %rbp, %rdi movq %r15, %rdx movl %r13d, %ecx xorl %eax, %eax callq 0x32a89 addq $0x40, %r14 leaq 0x50(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi movq %r12, %rdx movq %rbp, %rcx movq %r14, %r8 callq 0x96aee movaps (%r15), %xmm0 movups %xmm0, (%rbx) movq 0x10(%r15), %rax movq %rax, 0x10(%rbx) xorps %xmm0, %xmm0 movaps %xmm0, (%r15) movq $0x0, 0x10(%r15) movq (%rbp), %rdi leaq 0x40(%rsp), %rax cmpq %rax, %rdi je 0x95404 callq 0x1d540 movl $0x2, %ebx jmp 0x95367
/dcodeIO[P]wabt/src/interp/interp.cc
wabt::interp::RunResult wabt::interp::Thread::DoAtomicRmwCmpxchg<unsigned long, unsigned short>(wabt::interp::Instr, wabt::interp::RefPtr<wabt::interp::Trap>*)
RunResult Thread::DoAtomicRmwCmpxchg(Instr instr, Trap::Ptr* out_trap) { Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]}; V replace = static_cast<V>(Pop<T>()); V expect = static_cast<V>(Pop<T>()); V old; u64 offset = PopPtr(memory); TRAP_IF(Failed(memory->AtomicRmwCmpxchg(offset, instr.imm_u32x2.snd, expect, replace, &old)), StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset, instr.imm_u32x2.snd)); Push(static_cast<T>(old)); return RunResult::Ok; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x90(%rsp), %rbp movq 0x88(%rdi), %rsi movq 0x90(%rdi), %rax movl 0x8(%rbp), %ecx movq 0x90(%rax), %rax movq (%rax,%rcx,8), %rdx leaq 0x8(%rsp), %r13 movq %r13, %rdi callq 0x90132 movq %rbx, %rdi callq 0x904ec movq %rax, %r15 movq %rbx, %rdi callq 0x904ec movq %rax, %r12 movq (%r13), %rax cmpb $0x1, 0x62(%rax) jne 0x95bbe movq %rbx, %rdi callq 0x904ec movq %rax, %rdx jmp 0x95bc8 movq %rbx, %rdi callq 0x90562 movl %eax, %edx movq 0x8(%rsp), %rsi movl 0xc(%rbp), %ecx movq 0x68(%rsi), %rax movq 0x70(%rsi), %rsi subq %rax, %rsi cmpq $0x2, %rsi jb 0x95c19 cmpq %rdx, %rsi jb 0x95c19 cmpq %rcx, %rsi jb 0x95c19 leaq (%rdx,%rcx), %rdi testb $0x1, %dil jne 0x95c19 leaq 0x2(%rdi), %r8 cmpq %rsi, %r8 ja 0x95c19 movzwl (%rax,%rdi), %esi cmpw %r12w, %si jne 0x95c0d movw %r15w, (%rax,%rdi) movq %rbx, %rdi callq 0x911ce xorl %ebx, %ebx jmp 0x95c8c movq 0x88(%rbx), %r15 leaq 0x2084d(%rip), %rsi # 0xb6474 leaq 0x20(%rsp), %r12 movq %r12, %rdi xorl %eax, %eax callq 0x32a89 addq $0x40, %rbx leaq 0x40(%rsp), %r13 movq %r13, %rdi movq %r15, %rsi movq %r15, %rdx movq %r12, %rcx movq %rbx, %r8 callq 0x96aee movaps (%r13), %xmm0 movups %xmm0, (%r14) movq 0x10(%r13), %rax movq %rax, 0x10(%r14) xorps %xmm0, %xmm0 movaps %xmm0, (%r13) movq $0x0, 0x10(%r13) movq (%r12), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x95c87 callq 0x1d540 movl $0x2, %ebx cmpq $0x0, 0x8(%rsp) je 0x95ca7 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi addq $0x68, %rdi callq 0x8f2d8 movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/dcodeIO[P]wabt/src/interp/interp.cc
unsigned long wabt::interp::FreeList<std::unique_ptr<wabt::interp::Object, std::default_delete<wabt::interp::Object>>>::New<wabt::interp::Event*>(wabt::interp::Event*&&)
auto FreeList<T>::New(Args&&... args) -> Index { if (!free_.empty()) { Index index = free_.back(); assert(is_free_[index]); free_.pop_back(); is_free_[index] = false; list_[index] = T(std::forward<Args>(args)...); return index; } assert(list_.size() == is_free_.size()); is_free_.push_back(false); list_.emplace_back(std::forward<Args>(args)...); return list_.size() - 1; }
pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rdi), %rax cmpq %rax, 0x18(%rdi) je 0x97c1b movq -0x8(%rax), %r15 leaq 0x3f(%r15), %rdx testq %r15, %r15 cmovnsq %r15, %rdx sarq $0x6, %rdx shlq $0x3, %rdx addq 0x30(%rbx), %rdx movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 leaq 0x3f(%rcx), %rdi andq %r15, %rdi xorl %esi, %esi cmpq %rcx, %rdi setbe %sil movl $0x1, %edi movl %r15d, %ecx shlq %cl, %rdi movq -0x8(%rdx,%rsi,8), %rcx btq %r15, %rcx jae 0x97c85 addq $-0x8, %rax leaq -0x8(,%rsi,8), %rsi movq %rax, 0x20(%rbx) notq %rdi andq %rdi, %rcx movq %rcx, (%rdx,%rsi) movq (%r14), %rax movq (%rbx), %rcx movq (%rcx,%r15,8), %rdi movq %rax, (%rcx,%r15,8) testq %rdi, %rdi je 0x97c7c movq (%rdi), %rax callq *0x8(%rax) jmp 0x97c7c movq 0x8(%rbx), %rax movq 0x40(%rbx), %rcx subq (%rbx), %rax sarq $0x3, %rax movl 0x48(%rbx), %edx subq 0x30(%rbx), %rcx leaq (%rdx,%rcx,8), %rcx cmpq %rcx, %rax jne 0x97ca4 leaq 0x30(%rbx), %rdi xorl %esi, %esi callq 0x1d7e0 movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x97c63 movq (%r14), %rax movq %rax, (%rsi) movq 0x8(%rbx), %r15 addq $0x8, %r15 movq %r15, 0x8(%rbx) jmp 0x97c72 movq %rbx, %rdi movq %r14, %rdx callq 0x97d26 movq 0x8(%rbx), %r15 subq (%rbx), %r15 sarq $0x3, %r15 decq %r15 movq %r15, %rax popq %rbx popq %r14 popq %r15 retq leaq 0x1de13(%rip), %rdi # 0xb5a9f leaq 0x1de1c(%rip), %rsi # 0xb5aaf leaq 0x1e34c(%rip), %rcx # 0xb5fe6 movl $0x92, %edx callq 0x1d360 leaq 0x1df04(%rip), %rdi # 0xb5baf leaq 0x1ddfd(%rip), %rsi # 0xb5aaf leaq 0x1e32d(%rip), %rcx # 0xb5fe6 movl $0x98, %edx callq 0x1d360 nop
/dcodeIO[P]wabt/src/interp/interp-inl.h
unsigned long wabt::interp::Istream::ReadAt<unsigned long>(unsigned int*) const
T WABT_VECTORCALL Istream::ReadAt(Offset* offset) const { assert(*offset + sizeof(T) <= data_.size()); T result; memcpy(&result, data_.data() + *offset, sizeof(T)); *offset += sizeof(T); return result; }
movl (%rsi), %ecx leaq 0x8(%rcx), %rdx movq (%rdi), %rax movq 0x8(%rdi), %rdi subq %rax, %rdi cmpq %rdi, %rdx ja 0x9d111 movq (%rax,%rcx), %rax addl $0x8, %ecx movl %ecx, (%rsi) retq pushq %rax leaq 0x1a01f(%rip), %rdi # 0xb7138 leaq 0x19e47(%rip), %rsi # 0xb6f67 leaq 0x1a078(%rip), %rcx # 0xb719f movl $0x62, %edx callq 0x1d360 nop
/dcodeIO[P]wabt/src/interp/istream.cc
float wabt::interp::Istream::ReadAt<float>(unsigned int*) const
T WABT_VECTORCALL Istream::ReadAt(Offset* offset) const { assert(*offset + sizeof(T) <= data_.size()); T result; memcpy(&result, data_.data() + *offset, sizeof(T)); *offset += sizeof(T); return result; }
movl (%rsi), %eax leaq 0x4(%rax), %rdx movq (%rdi), %rcx movq 0x8(%rdi), %rdi subq %rcx, %rdi cmpq %rdi, %rdx ja 0x9d152 movss (%rcx,%rax), %xmm0 addl $0x4, %eax movl %eax, (%rsi) retq pushq %rax leaq 0x19fde(%rip), %rdi # 0xb7138 leaq 0x19e06(%rip), %rsi # 0xb6f67 leaq 0x1a07b(%rip), %rcx # 0xb71e3 movl $0x62, %edx callq 0x1d360
/dcodeIO[P]wabt/src/interp/istream.cc
wasm_externtype_t::New(std::unique_ptr<wabt::interp::ExternType, std::default_delete<wabt::interp::ExternType>>)
std::unique_ptr<wasm_externtype_t> wasm_externtype_t::New( std::unique_ptr<ExternType> ptr) { switch (ptr->kind) { case ExternKind::Func: return MakeUnique<wasm_functype_t>(*cast<FuncType>(ptr.get())); case ExternKind::Table: return MakeUnique<wasm_tabletype_t>(*cast<TableType>(ptr.get())); case ExternKind::Memory: return MakeUnique<wasm_memorytype_t>(*cast<MemoryType>(ptr.get())); case ExternKind::Global: return MakeUnique<wasm_globaltype_t>(*cast<GlobalType>(ptr.get())); case ExternKind::Event: break; } assert(false); return {}; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq (%rsi), %r14 movl 0x8(%r14), %eax cmpq $0x3, %rax ja 0x9d2f7 movq %rdi, %rbx leaq 0x1a080(%rip), %rcx # 0xb72dc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x9fba3 jmp 0x9d2e4 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x9fcd4 jmp 0x9d2e4 movl $0x18, %edi callq 0x1d5a0 movq %rax, %r15 movq 0xc(%r14), %r14 movl $0x18, %edi callq 0x1d5a0 movl $0x3, 0x8(%rax) leaq 0x4e69e(%rip), %rcx # 0xeb950 addq $0x10, %rcx movq %rcx, (%rax) movq %r14, 0xc(%rax) movq %rax, 0x8(%r15) leaq 0x4e988(%rip), %rax # 0xebc50 movq %rax, (%r15) movl %r14d, 0x10(%r15) movq %r15, (%rbx) jmp 0x9d2ea leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x9fc38 movq (%r15), %rax movq %rax, (%rbx) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xa86d(%rip), %rdi # 0xa7b6b leaq 0x1a275(%rip), %rsi # 0xb757a leaq 0x1a2d4(%rip), %rcx # 0xb75e0 movl $0xc0, %edx callq 0x1d360
/dcodeIO[P]wabt/src/interp/interp-wasm-c-api.cc
wasm_trap_message
void wasm_trap_message(const wasm_trap_t* trap, own wasm_message_t* out) { assert(trap); *out = FromString(trap->As<Trap>()->message()); }
subq $0x28, %rsp testq %rdi, %rdi je 0x9d609 movq (%rdi), %rdi cmpl $0x2, 0x8(%rdi) jne 0x9d628 movq %rsi, %rdx leaq 0x8(%rsp), %rsi callq 0x2a270 addq $0x28, %rsp retq leaq 0xd49e(%rip), %rdi # 0xaaaae leaq 0x19f63(%rip), %rsi # 0xb757a leaq 0x1a0b2(%rip), %rcx # 0xb76d0 movl $0x236, %edx # imm = 0x236 callq 0x1d360 leaq 0x8693(%rip), %rdi # 0xa5cc2 leaq 0x869f(%rip), %rsi # 0xa5cd5 leaq 0x1b83b(%rip), %rcx # 0xb8e78 movl $0x4e, %edx callq 0x1d360
/dcodeIO[P]wabt/src/interp/interp-wasm-c-api.cc
wasm_module_new
own wasm_module_t* wasm_module_new(wasm_store_t* store, const wasm_byte_vec_t* binary) { Errors errors; ModuleDesc module_desc; if (Failed(ReadBinaryInterp(binary->data, binary->size, GetOptions(), &errors, &module_desc))) { FormatErrorsToFile(errors, Location::Type::Binary); return nullptr; } return new wasm_module_t{Module::New(store->I, module_desc), binary}; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 movq %rsi, %rbx movq %rdi, %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movq $0x0, 0x40(%rsp) leaq 0x188(%rsp), %rdi movl $0x120, %edx # imm = 0x120 xorl %esi, %esi callq 0x1d2e0 movq (%rbx), %r15 movq 0x8(%rbx), %r13 leaq 0x95f4f(%rip), %rdi # 0x1336af callq 0xa034c leaq 0x1b2ad(%rip), %rdi # 0xb8a19 callq 0x1d760 testq %rax, %rax je 0x9d7b6 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x6400a movq (%r14), %rax movq $0x0, (%r14) movq 0xa0414(%rip), %rdi # 0x13dba8 movq %rax, 0xa040d(%rip) # 0x13dba8 testq %rdi, %rdi je 0x9d7b6 movq (%rdi), %rax callq *0x8(%rax) movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x9d7b6 movq (%rdi), %rax callq *0x8(%rax) movq 0xa03eb(%rip), %rax # 0x13dba8 movq 0x95eeb(%rip), %rcx # 0x1336af leaq 0x48(%rsp), %rdx movq %rcx, (%rdx) movq 0x95ee1(%rip), %rcx # 0x1336b4 movq %rcx, 0x5(%rdx) movq %rax, 0x10(%rdx) movw $0x101, 0x18(%rdx) # imm = 0x101 movb $0x1, 0x1a(%rdx) leaq 0x30(%rsp), %rcx leaq 0x188(%rsp), %r12 movq %r13, %rdi movq %r15, %rsi movq %r12, %r8 callq 0x800bc cmpl $0x1, %eax jne 0x9d85c movq 0x4e7cc(%rip), %rax # 0xebfd8 movq (%rax), %rcx leaq 0x58(%rsp), %r14 movq %r14, -0x10(%r14) movq $0x0, -0x8(%r14) movb $0x0, (%r14) movl $0x50, (%rsp) leaq 0x30(%rsp), %rdi leaq 0x48(%rsp), %rbx movl $0x1, %esi xorl %edx, %edx movq %rbx, %r8 xorl %r9d, %r9d callq 0x528c3 movq (%rbx), %rdi cmpq %r14, %rdi je 0x9d854 callq 0x1d540 xorl %r15d, %r15d jmp 0x9da31 movq %rbp, 0x8(%rsp) movl $0x28, %edi callq 0x1d5a0 movq %rax, %r15 leaq 0x68(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi callq 0xa086e leaq 0x80(%rsp), %rdi leaq 0x1a0(%rsp), %rsi callq 0xa08da leaq 0x98(%rsp), %rdi leaq 0x1b8(%rsp), %rsi callq 0xa0954 leaq 0xb0(%rsp), %rdi leaq 0x1d0(%rsp), %rsi callq 0xa09d2 leaq 0xc8(%rsp), %rdi leaq 0x1e8(%rsp), %rsi callq 0xa0a7a leaq 0xe0(%rsp), %rbp leaq 0x200(%rsp), %r14 movq %rbp, %rdi movq %r14, %rsi callq 0xa0b22 movl $0x90, %esi leaq (%rsi,%r13), %rdi addq %r12, %rsi callq 0xa0bd6 movl $0xa8, %esi leaq (%rsi,%r13), %rdi addq %r12, %rsi callq 0xa0c96 movl $0xc0, %esi leaq (%rsi,%r13), %rdi addq %r12, %rsi callq 0xa0d14 movl $0xd8, %esi leaq (%rsi,%r13), %rdi addq %r12, %rsi callq 0xa0d94 movl $0xf0, %eax addq %rax, %r13 addq %rax, %r12 movq %r13, %rdi movq %r12, %rsi callq 0xa0e3e movq 0x90(%r14), %rsi movq 0x98(%r14), %rax movq %rax, %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x90(%rbp) movq $0x0, 0xa0(%rbp) subq %rsi, %r14 je 0x9d99b js 0x9da5d movq %r14, %rdi callq 0x1d5a0 movq %rax, %r12 movq 0x290(%rsp), %rsi movq 0x298(%rsp), %rax movq %rax, %r13 subq %rsi, %r13 jmp 0x9d9a1 xorl %r12d, %r12d movq %r14, %r13 movq %r12, 0x170(%rsp) movq %r12, 0x178(%rsp) addq %r12, %r14 movq %r14, 0x180(%rsp) cmpq %rsi, %rax movq 0x8(%rsp), %rbp je 0x9d9d1 movq %r12, %rdi movq %r13, %rdx callq 0x1da20 addq %r13, %r12 leaq 0x68(%rsp), %rcx movq %r12, 0x110(%rcx) leaq 0x10(%rsp), %r14 movq %r14, %rdi movq %rbp, %rsi movq %rbp, %rdx callq 0xa03f4 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x9fdc4 cmpq $0x0, (%r14) je 0x9da27 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x86dd6 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movq $0x0, 0x20(%rsp) leaq 0x68(%rsp), %rdi callq 0x97ebc leaq 0x188(%rsp), %rdi callq 0x97ebc leaq 0x30(%rsp), %rdi callq 0x5e53e movq %r15, %rax addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x1d1c0
/dcodeIO[P]wabt/src/interp/interp-wasm-c-api.cc
stumpless_set_transport_port
struct stumpless_target * stumpless_set_transport_port( struct stumpless_target *target, const char *port ) { const char *port_copy; struct network_target *net_target; const char *old_port; VALIDATE_ARG_NOT_NULL( target ); VALIDATE_ARG_NOT_NULL( port ); port_copy = copy_cstring( port ); if( !port_copy ) { return NULL; } lock_target( target ); if( target->type != STUMPLESS_NETWORK_TARGET ) { raise_target_incompatible( L10N_TRANSPORT_PORT_NETWORK_ONLY_ERROR_MESSAGE ); goto cleanup_and_fail; } net_target = target->id; old_port = net_target->port; net_target->port = port_copy; clear_error( ); reopen_network_target( net_target ); unlock_target( target ); free_mem( old_port ); return target; cleanup_and_fail: unlock_target( target ); free_mem( port_copy ); return NULL; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x16700 leaq 0x3792(%rip), %rdi # 0x19e80 callq 0x9d70 movq $0x0, -0x8(%rbp) jmp 0x167c9 cmpq $0x0, -0x18(%rbp) jne 0x16720 leaq 0x3d33(%rip), %rdi # 0x1a441 callq 0x9d70 movq $0x0, -0x8(%rbp) jmp 0x167c9 movq -0x18(%rbp), %rdi callq 0x9880 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x16741 movq $0x0, -0x8(%rbp) jmp 0x167c9 movq -0x10(%rbp), %rdi callq 0x9ea0 movq -0x10(%rbp), %rax cmpl $0x4, 0x8(%rax) je 0x16762 leaq 0x3c67(%rip), %rdi # 0x1a3c2 callq 0x9740 jmp 0x167af movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x18(%rax) callq 0xa2a0 movq -0x28(%rbp), %rdi callq 0x16690 movq -0x10(%rbp), %rdi callq 0x9810 movq -0x30(%rbp), %rdi callq 0x9e50 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x167c9 movq -0x10(%rbp), %rdi callq 0x9810 movq -0x20(%rbp), %rdi callq 0x9e50 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/goatshriek[P]stumpless/src/target/network.c
json2map_hookMethod
void json2map_hookMethod(void *data, char *key, char *value) { int i; keyvalue_t *list = (keyvalue_t *) data; i = 0; while ( strcmp(list->key, "") ) { i++; list++; } strcpy(list->key, key); strcpy(list->value, value); }
pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 addq $-0xff, %r14 cmpb $0x0, 0xff(%r14) leaq 0x1fe(%r14), %r14 jne 0x227d leaq -0xff(%r14), %rdi callq 0x2060 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2060
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_map2json_array
int test_map2json_array() { map2json_t *map2jsonObj = map2json_init(NULL); map2json_push(map2jsonObj, "array[0].object1.key1", "value1"); map2json_push(map2jsonObj, "array[0].object1.key2", "2"); map2json_push(map2jsonObj, "array[3]", "1"); map2json_push(map2jsonObj, "array[2]", "b"); map2json_push(map2jsonObj, "array[1].array2[0]", "test"); map2json_push(map2jsonObj, "array[1].array2[1]", "test2"); map2json_push(map2jsonObj, "array[1].array2[x]", "2"); map2json_push(map2jsonObj, "array[x]", "4"); ASSERTSTR("{\"array\":[{\"object1\":{\"key1\":\"value1\",\"key2\":2}},{\"array2\":[\"test\",\"test2\"]},\"b\",1]}", map2json_create(map2jsonObj)); map2json_destroy(map2jsonObj); return 0; }
pushq %r14 pushq %rbx pushq %rax xorl %edi, %edi callq 0x47f4 movq %rax, %rbx leaq 0x3b4c(%rip), %rsi # 0x60bf leaq 0x3b5b(%rip), %rdx # 0x60d5 movq %rax, %rdi callq 0x4829 leaq 0x3b53(%rip), %rsi # 0x60dc leaq 0x3ba5(%rip), %r14 # 0x6135 movq %rbx, %rdi movq %r14, %rdx callq 0x4829 leaq 0x3b50(%rip), %rsi # 0x60f2 leaq 0x3b31(%rip), %rdx # 0x60da movq %rbx, %rdi callq 0x4829 leaq 0x3b43(%rip), %rsi # 0x60fb leaq 0x3b45(%rip), %rdx # 0x6104 movq %rbx, %rdi callq 0x4829 leaq 0x3b38(%rip), %rsi # 0x6106 leaq 0x3b44(%rip), %rdx # 0x6119 movq %rbx, %rdi callq 0x4829 leaq 0x3b3a(%rip), %rsi # 0x611e leaq 0x3b46(%rip), %rdx # 0x6131 movq %rbx, %rdi callq 0x4829 leaq 0x3b3d(%rip), %rsi # 0x6137 movq %rbx, %rdi movq %r14, %rdx callq 0x4829 leaq 0x3b3e(%rip), %rsi # 0x614a leaq 0x3b40(%rip), %rdx # 0x6153 movq %rbx, %rdi callq 0x4829 movq %rbx, %rdi callq 0x491d leaq 0x39da(%rip), %rdi # 0x6004 leaq 0x3b24(%rip), %r14 # 0x6155 movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x2090 movq %rbx, %rdi callq 0x491d movq %r14, %rdi movq %rax, %rsi callq 0x2100 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x2666 movq %rbx, %rdi callq 0x4e10 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_map2json_primitive
int test_map2json_primitive() { map2json_t *map2jsonObj = map2json_init(NULL); char primitiveMethod[] = " function()"; *primitiveMethod = JSON2MAP_PRIMITIVE_PREFIXER; map2json_push(map2jsonObj, "fakePrimitive", primitiveMethod); ASSERTSTR("{\"fakePrimitive\":function()}", map2json_create(map2jsonObj)); map2json_destroy(map2jsonObj); return 0; }
pushq %r14 pushq %rbx subq $0x18, %rsp xorl %edi, %edi callq 0x47f4 movq %rax, %rbx movabsq $0x6f6974636e756620, %rax # imm = 0x6F6974636E756620 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) movl $0x29286e, 0x8(%rdx) # imm = 0x29286E movb $0x1b, (%rdx) leaq 0x3b14(%rip), %rsi # 0x61b6 movq %rbx, %rdi callq 0x4829 movq %rbx, %rdi callq 0x491d leaq 0x394b(%rip), %rdi # 0x6004 leaq 0x3b04(%rip), %r14 # 0x61c4 movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x2090 movq %rbx, %rdi callq 0x491d movq %r14, %rdi movq %rax, %rsi callq 0x2100 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x26f5 movq %rbx, %rdi callq 0x4e10 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r14 retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_emptyJson
int test_json2map_emptyJson() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{}"); ASSERTSTR("", map[0].key); ASSERTSTR("", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r14 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x5ab(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x37f7(%rip), %rdx # 0x6020 movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x37ca(%rip), %rdi # 0x6004 leaq 0x37de(%rip), %rsi # 0x601f movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movl $0x1, %ebp cmpb $0x0, (%rbx) jne 0x288f movq %rbx, %rdx addq $0xff, %rdx leaq 0x379e(%rip), %rdi # 0x6004 leaq 0x37b2(%rip), %rsi # 0x601f xorl %eax, %eax callq 0x2090 cmpb $0x0, 0xff(%rbx) jne 0x288f movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_null
int test_json2map_null() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"nullpointer\":null}"); ASSERTSTR("nullpointer", map[0].key); ASSERTSTR("null", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x655(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x375c(%rip), %rdx # 0x602f movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x3720(%rip), %rdi # 0x6004 leaq 0x3738(%rip), %r15 # 0x6023 movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x294f leaq 0xff(%rbx), %r15 leaq 0x36ea(%rip), %rdi # 0x6004 leaq 0x3e90(%rip), %r12 # 0x67b1 movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x294f movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_true
int test_json2map_true() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"booleanValue\":true}"); ASSERTSTR("booleanValue", map[0].key); ASSERTSTR("true", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x719(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x36ba(%rip), %rdx # 0x6051 movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x365c(%rip), %rdi # 0x6004 leaq 0x3695(%rip), %r15 # 0x6044 movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x2a13 leaq 0xff(%rbx), %r15 leaq 0x3626(%rip), %rdi # 0x6004 leaq 0x3ddf(%rip), %r12 # 0x67c4 movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x2a13 movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_numberInt
int test_json2map_numberInt() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"number\":123456}"); ASSERTSTR("number", map[0].key); ASSERTSTR("123456", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x8a1(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x356d(%rip), %rdx # 0x608c movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x34d4(%rip), %rdi # 0x6004 leaq 0x3547(%rip), %r15 # 0x607e movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x2b9b leaq 0xff(%rbx), %r15 leaq 0x349e(%rip), %rdi # 0x6004 leaq 0x3518(%rip), %r12 # 0x6085 movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x2b9b movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_numberFloat
int test_json2map_numberFloat() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"number\":123456.789}"); ASSERTSTR("number", map[0].key); ASSERTSTR("123456.789", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x965(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x34c6(%rip), %rdx # 0x60a9 movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x3410(%rip), %rdi # 0x6004 leaq 0x3483(%rip), %r15 # 0x607e movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x2c5f leaq 0xff(%rbx), %r15 leaq 0x33da(%rip), %rdi # 0x6004 leaq 0x346d(%rip), %r12 # 0x609e movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x2c5f movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_array
int test_json2map_array() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"array\":[{\"object1\":{\"key1\":\"value1\",\"key2\":2}},{\"array2\":[\"test\",\"test2\"]},\"b\",1]}"); ASSERTSTR("array[0].object1.key1", map[0].key); ASSERTSTR("value1", map[0].value); ASSERTSTR("array[0].object1.key2", map[1].key); ASSERTSTR("2", map[1].value); ASSERTSTR("array[1].array2[0]", map[2].key); ASSERTSTR("test", map[2].value); ASSERTSTR("array[1].array2[1]", map[3].key); ASSERTSTR("test2", map[3].value); ASSERTSTR("array[1].array2[x]", map[4].key); ASSERTSTR("2", map[4].value); ASSERTSTR("array[2]", map[5].key); ASSERTSTR("b", map[5].value); ASSERTSTR("array[3]", map[6].key); ASSERTSTR("1", map[6].value); ASSERTSTR("array[x]", map[7].key); ASSERTSTR("4", map[7].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %r14 xorl %edi, %edi callq 0x40e0 movq %rax, %r15 leaq -0xa2a(%rip), %rdx # 0x226c movq %rax, %rdi movq %r14, %rsi callq 0x4736 leaq 0x34ad(%rip), %rdx # 0x6155 movq %r15, %rdi xorl %esi, %esi callq 0x40fd leaq 0x334b(%rip), %rdi # 0x6004 leaq 0x33ff(%rip), %rbx # 0x60bf movq %rbx, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x2090 movq %rbx, %rdi movq %r14, %rsi callq 0x2100 movl $0x1, %ebx testl %eax, %eax jne 0x3027 leaq 0xff(%r14), %r12 leaq 0x3311(%rip), %rdi # 0x6004 leaq 0x33db(%rip), %r13 # 0x60d5 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x1fe(%r14), %r12 leaq 0x32dc(%rip), %rdi # 0x6004 leaq 0x33ad(%rip), %r13 # 0x60dc movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x2fd(%r14), %rdx leaq 0x32a7(%rip), %rdi # 0x6004 leaq 0x33d1(%rip), %rsi # 0x6135 xorl %eax, %eax callq 0x2090 movzbl 0x2fd(%r14), %eax subl $0x32, %eax jne 0x2d80 movzbl 0x2fe(%r14), %eax negl %eax testl %eax, %eax jne 0x3027 leaq 0x3fc(%r14), %r12 leaq 0x326c(%rip), %rdi # 0x6004 leaq 0x3367(%rip), %r13 # 0x6106 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x4fb(%r14), %r12 leaq 0x3237(%rip), %rdi # 0x6004 leaq 0x3345(%rip), %r13 # 0x6119 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x5fa(%r14), %r12 leaq 0x3202(%rip), %rdi # 0x6004 leaq 0x3315(%rip), %r13 # 0x611e movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x6f9(%r14), %r12 leaq 0x31cd(%rip), %rdi # 0x6004 leaq 0x32f3(%rip), %r13 # 0x6131 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x7f8(%r14), %r12 leaq 0x3198(%rip), %rdi # 0x6004 leaq 0x32c4(%rip), %r13 # 0x6137 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0x8f7(%r14), %rdx leaq 0x3163(%rip), %rdi # 0x6004 leaq 0x328d(%rip), %rsi # 0x6135 xorl %eax, %eax callq 0x2090 movzbl 0x8f7(%r14), %eax subl $0x32, %eax jne 0x2ec4 movzbl 0x8f8(%r14), %eax negl %eax testl %eax, %eax jne 0x3027 leaq 0x9f6(%r14), %r12 leaq 0x3128(%rip), %rdi # 0x6004 leaq 0x3218(%rip), %r13 # 0x60fb movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0xaf5(%r14), %rdx leaq 0x30f3(%rip), %rdi # 0x6004 leaq 0x31ec(%rip), %rsi # 0x6104 xorl %eax, %eax callq 0x2090 movzbl 0xaf5(%r14), %eax subl $0x62, %eax jne 0x2f34 movzbl 0xaf6(%r14), %eax negl %eax testl %eax, %eax jne 0x3027 leaq 0xbf4(%r14), %r12 leaq 0x30b8(%rip), %rdi # 0x6004 leaq 0x319f(%rip), %r13 # 0x60f2 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 leaq 0xcf3(%r14), %rdx leaq 0x3083(%rip), %rdi # 0x6004 leaq 0x3152(%rip), %rsi # 0x60da xorl %eax, %eax callq 0x2090 movzbl 0xcf3(%r14), %eax subl $0x31, %eax jne 0x2fa4 movzbl 0xcf4(%r14), %eax negl %eax testl %eax, %eax jne 0x3027 leaq 0xdf2(%r14), %r12 leaq 0x304c(%rip), %rdi # 0x6004 leaq 0x318b(%rip), %r13 # 0x614a movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x3027 movq %r14, %rdx addq $0xef1, %rdx # imm = 0xEF1 leaq 0x3018(%rip), %rdi # 0x6004 leaq 0x3160(%rip), %rsi # 0x6153 xorl %eax, %eax callq 0x2090 movzbl 0xef1(%r14), %eax subl $0x34, %eax jne 0x300f movzbl 0xef2(%r14), %eax negl %eax testl %eax, %eax jne 0x3027 movq %r15, %rdi callq 0x40f8 movq %r14, %rdi callq 0x2030 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_primitive
int test_json2map_primitive() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"fakePrimitive\":function()}"); ASSERTSTR("fakePrimitive", map[0].key); ASSERTSTR("function()", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0xdf2(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x3154(%rip), %rdx # 0x61c4 movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x2f83(%rip), %rdi # 0x6004 leaq 0x312e(%rip), %r15 # 0x61b6 movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x30ec leaq 0xff(%rbx), %r15 leaq 0x2f4d(%rip), %rdi # 0x6004 leaq 0x30ed(%rip), %r12 # 0x61ab movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x30ec movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_deepNesting
int test_json2map_deepNesting() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"lvl1\":{\"lvl2\":{\"lvl3\":{\"lvl4\":{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}]}}}]}}}}}"); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[0].lvl9", map[0].key); ASSERTSTR("123456789", map[0].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[x]", map[1].key); ASSERTSTR("1", map[1].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[x]", map[2].key); ASSERTSTR("1", map[2].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0xeb6(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 leaq 0x30b7(%rip), %rdx # 0x61eb movq %r14, %rdi xorl %esi, %esi callq 0x40fd leaq 0x2ebf(%rip), %rdi # 0x6004 leaq 0x3105(%rip), %r15 # 0x6251 movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movq %r15, %rdi movq %rbx, %rsi callq 0x2100 movl $0x1, %ebp testl %eax, %eax jne 0x328b leaq 0xff(%rbx), %r15 leaq 0x2e85(%rip), %rdi # 0x6004 leaq 0x305b(%rip), %r12 # 0x61e1 movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x328b leaq 0x1fe(%rbx), %r15 leaq 0x2e50(%rip), %rdi # 0x6004 leaq 0x3570(%rip), %r12 # 0x672b movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x328b leaq 0x2fd(%rbx), %rdx leaq 0x2e1b(%rip), %rdi # 0x6004 leaq 0x2eea(%rip), %rsi # 0x60da xorl %eax, %eax callq 0x2090 movzbl 0x2fd(%rbx), %eax subl $0x31, %eax jne 0x320a movzbl 0x2fe(%rbx), %eax negl %eax testl %eax, %eax jne 0x328b leaq 0x3fc(%rbx), %r15 leaq 0x2de6(%rip), %rdi # 0x6004 leaq 0x353b(%rip), %r12 # 0x6760 movq %r12, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r15, %rsi callq 0x2100 testl %eax, %eax jne 0x328b movq %rbx, %rdx addq $0x4fb, %rdx # imm = 0x4FB leaq 0x2db2(%rip), %rdi # 0x6004 leaq 0x2e81(%rip), %rsi # 0x60da xorl %eax, %eax callq 0x2090 movzbl 0x4fb(%rbx), %eax subl $0x31, %eax jne 0x3273 movzbl 0x4fc(%rbx), %eax negl %eax testl %eax, %eax jne 0x328b movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_jsonNull
int test_json2map_jsonNull() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); json2map_t *json2mapObj = json2map_init(0); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, NULL); ASSERTSTR("", map[0].key); ASSERTSTR("", map[0].value); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r14 pushq %rbx movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %rbx xorl %edi, %edi callq 0x40e0 movq %rax, %r14 leaq -0x1051(%rip), %rdx # 0x226c movq %rax, %rdi movq %rbx, %rsi callq 0x4736 movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x40fd leaq 0x2d29(%rip), %rdi # 0x6004 leaq 0x2d3d(%rip), %rsi # 0x601f movq %rbx, %rdx xorl %eax, %eax callq 0x2090 movl $0x1, %ebp cmpb $0x0, (%rbx) jne 0x3330 movq %rbx, %rdx addq $0xff, %rdx leaq 0x2cfd(%rip), %rdi # 0x6004 leaq 0x2d11(%rip), %rsi # 0x601f xorl %eax, %eax callq 0x2090 cmpb $0x0, 0xff(%rbx) jne 0x3330 movq %r14, %rdi callq 0x40f8 movq %rbx, %rdi callq 0x2030 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
test_json2map_objectHook
int test_json2map_objectHook() { keyvalue_t *map = (keyvalue_t *) calloc(sizeof(keyvalue_t), LIST_SIZE); int i; json2map_t *json2mapObj = json2map_init(1); json2map_registerDataHook(json2mapObj, map, &json2map_hookMethod); json2map_parse(json2mapObj, NULL, "{\"lvl1\":{\"lvl2\":{\"lvl3\":{\"lvl4\":{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}, \"abc\"]}}}}}"); ASSERTSTR("lvl1[o]", map[0].key); ASSERTSTR("{\"lvl2\":{\"lvl3\":{\"lvl4\":{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}, \"abc\"]}}}}", map[0].value); ASSERTSTR("lvl1.lvl2[o]", map[1].key); ASSERTSTR("{\"lvl3\":{\"lvl4\":{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}, \"abc\"]}}}", map[1].value); ASSERTSTR("lvl1.lvl2.lvl3[o]", map[2].key); ASSERTSTR("{\"lvl4\":{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}, \"abc\"]}}", map[2].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4[o]", map[3].key); ASSERTSTR("{\"lvl5\":[{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}, \"abc\"]}", map[3].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0][o]", map[4].key); ASSERTSTR("{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}", map[4].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6[o]", map[5].key); ASSERTSTR("{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}", map[5].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7[o]", map[6].key); ASSERTSTR("{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}", map[6].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[0][o]", map[7].key); ASSERTSTR("{\"lvl9\":123456789}", map[7].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[0].lvl9", map[8].key); ASSERTSTR("123456789", map[8].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[1][o]", map[9].key); ASSERTSTR("{\"key\":\"value\"}", map[9].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[1].key", map[10].key); ASSERTSTR("value", map[10].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[0].lvl6.lvl7.lvl8[x]", map[11].key); ASSERTSTR("2", map[11].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[1]", map[12].key); ASSERTSTR("abc", map[12].value); ASSERTSTR("lvl1.lvl2.lvl3.lvl4.lvl5[x]", map[13].key); ASSERTSTR("2", map[13].value); map2json_t *tree = map2json_init(NULL); for ( i = 0; i < 14; i++ ) { map2json_push(tree, map[i].key, map[i].value); } ASSERTSTR("{\"lvl1\":{\"lvl2\":{\"lvl3\":{\"lvl4\":{\"lvl5\":[\"{\"lvl6\":{\"lvl7\":{\"lvl8\":[{\"lvl9\":123456789}, {\"key\":\"value\"}]}}}\",\"abc\"]}}}}}", map2json_create(tree)); json2map_destroy(json2mapObj); free(map); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl $0x1fe, %edi # imm = 0x1FE movl $0xff, %esi callq 0x20e0 movq %rax, %r14 movl $0x1, %ebx movl $0x1, %edi callq 0x40e0 movq %rax, %r15 leaq -0x1124(%rip), %rdx # 0x226c movq %rax, %rdi movq %r14, %rsi callq 0x4736 leaq 0x2ee2(%rip), %rdx # 0x6284 movq %r15, %rdi xorl %esi, %esi callq 0x40fd leaq 0x2c51(%rip), %rdi # 0x6004 leaq 0x2f41(%rip), %r12 # 0x62fb movq %r12, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x2090 movq %r12, %rdi movq %r14, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xff(%r14), %r12 leaq 0x2c1c(%rip), %rdi # 0x6004 leaq 0x2f14(%rip), %r13 # 0x6303 movq %r13, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x1fe(%r14), %r13 leaq 0x2be7(%rip), %rdi # 0x6004 leaq 0x2f4d(%rip), %rbp # 0x6371 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x2fd(%r14), %r13 leaq 0x2bb2(%rip), %rdi # 0x6004 leaq 0x2f25(%rip), %rbp # 0x637e movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x3fc(%r14), %r13 leaq 0x2b7d(%rip), %rdi # 0x6004 leaq 0x2f55(%rip), %rbp # 0x63e3 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x4fb(%r14), %r13 leaq 0x2b48(%rip), %rdi # 0x6004 leaq 0x2f32(%rip), %rbp # 0x63f5 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x5fa(%r14), %r13 leaq 0x2b13(%rip), %rdi # 0x6004 leaq 0x2f59(%rip), %rbp # 0x6451 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x6f9(%r14), %r13 leaq 0x2ade(%rip), %rdi # 0x6004 leaq 0x2f3b(%rip), %rbp # 0x6468 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x7f8(%r14), %r13 leaq 0x2aa9(%rip), %rdi # 0x6004 leaq 0x2f59(%rip), %rbp # 0x64bb movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x8f7(%r14), %r13 leaq 0x2a74(%rip), %rdi # 0x6004 leaq 0x2f43(%rip), %rbp # 0x64da movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x9f6(%r14), %r13 leaq 0x2a3f(%rip), %rdi # 0x6004 leaq 0x2f4f(%rip), %rbp # 0x651b movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xaf5(%r14), %r13 leaq 0x2a0a(%rip), %rdi # 0x6004 leaq 0x2f3e(%rip), %rbp # 0x653f movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xbf4(%r14), %r13 leaq 0x29d5(%rip), %rdi # 0x6004 leaq 0x2f41(%rip), %rbp # 0x6577 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xcf3(%r14), %r13 leaq 0x29a0(%rip), %rdi # 0x6004 leaq 0x2f35(%rip), %rbp # 0x65a0 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xdf2(%r14), %r13 leaq 0x296b(%rip), %rdi # 0x6004 leaq 0x2f2f(%rip), %rbp # 0x65cf movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xef1(%r14), %r13 leaq 0x2936(%rip), %rdi # 0x6004 leaq 0x2f2b(%rip), %rbp # 0x6600 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0xff0(%r14), %r13 leaq 0x2901(%rip), %rdi # 0x6004 leaq 0x2b47(%rip), %rbp # 0x6251 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x10ef(%r14), %r13 leaq 0x28cc(%rip), %rdi # 0x6004 leaq 0x2aa2(%rip), %rbp # 0x61e1 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x11ee(%r14), %r13 leaq 0x2897(%rip), %rdi # 0x6004 leaq 0x2e9f(%rip), %rbp # 0x6613 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x12ed(%r14), %r13 leaq 0x2862(%rip), %rdi # 0x6004 leaq 0x2e9b(%rip), %rbp # 0x6644 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x13ec(%r14), %r13 leaq 0x282d(%rip), %rdi # 0x6004 leaq 0x2e76(%rip), %rbp # 0x6654 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x14eb(%r14), %r13 leaq 0x27f8(%rip), %rdi # 0x6004 leaq 0x2e73(%rip), %rbp # 0x6686 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x15ea(%r14), %r13 leaq 0x27c3(%rip), %rdi # 0x6004 leaq 0x2ee3(%rip), %rbp # 0x672b movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x16e9(%r14), %rdx leaq 0x278e(%rip), %rdi # 0x6004 leaq 0x28b8(%rip), %rsi # 0x6135 xorl %eax, %eax callq 0x2090 movzbl 0x16e9(%r14), %eax subl $0x32, %eax jne 0x3899 movzbl 0x16ea(%r14), %eax negl %eax testl %eax, %eax jne 0x39f1 leaq 0x17e8(%r14), %r13 leaq 0x2753(%rip), %rdi # 0x6004 leaq 0x2dd4(%rip), %rbp # 0x668c movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x18e7(%r14), %r13 leaq 0x271e(%rip), %rdi # 0x6004 leaq 0x2dbb(%rip), %rbp # 0x66a8 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x19e6(%r14), %r13 leaq 0x26e9(%rip), %rdi # 0x6004 leaq 0x2e3e(%rip), %rbp # 0x6760 movq %rbp, %rsi movq %r13, %rdx xorl %eax, %eax callq 0x2090 movq %rbp, %rdi movq %r13, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 leaq 0x1ae5(%r14), %rdx leaq 0x26b4(%rip), %rdi # 0x6004 leaq 0x27de(%rip), %rsi # 0x6135 xorl %eax, %eax callq 0x2090 movzbl 0x1ae5(%r14), %eax subl $0x32, %eax jne 0x3973 movzbl 0x1ae6(%r14), %eax negl %eax testl %eax, %eax jne 0x39f1 xorl %ebp, %ebp xorl %edi, %edi callq 0x47f4 movq %rax, %r13 leaq (%r14,%rbp), %rsi leaq (%r12,%rbp), %rdx movq %r13, %rdi callq 0x4829 addq $0x1fe, %rbp # imm = 0x1FE cmpq $0x1be4, %rbp # imm = 0x1BE4 jne 0x3985 movq %r13, %rdi callq 0x491d leaq 0x2650(%rip), %rdi # 0x6004 leaq 0x2cf1(%rip), %r12 # 0x66ac movq %r12, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x2090 movq %r13, %rdi callq 0x491d movq %r12, %rdi movq %rax, %rsi callq 0x2100 testl %eax, %eax jne 0x39f1 movq %r15, %rdi callq 0x40f8 movq %r14, %rdi callq 0x2030 xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
main
int main(int argc, char **argv) { TESTCALL("test_map2json_emptyMap", test_map2json_emptyMap); TESTCALL("test_map2json_null", test_map2json_null); TESTCALL("test_map2json_true", test_map2json_true); TESTCALL("test_map2json_false", test_map2json_false); TESTCALL("test_map2json_numberInt", test_map2json_numberInt); TESTCALL("test_map2json_numberFloat", test_map2json_numberFloat); TESTCALL("test_map2json_array", test_map2json_array); TESTCALL("test_map2json_primitive", test_map2json_primitive); TESTCALL("test_map2json_deepNesting", test_map2json_deepNesting); TESTCALL("test_map2json_prefix", test_map2json_prefix); TESTCALL("test_json2map_emptyJson", test_json2map_emptyJson); TESTCALL("test_json2map_null", test_json2map_null); TESTCALL("test_json2map_true", test_json2map_true); TESTCALL("test_json2map_false", test_json2map_false); TESTCALL("test_json2map_numberInt", test_json2map_numberInt); TESTCALL("test_json2map_numberFloat", test_json2map_numberFloat); TESTCALL("test_json2map_array", test_json2map_array); TESTCALL("test_json2map_primitive", test_json2map_primitive); TESTCALL("test_json2map_deepNesting", test_json2map_deepNesting); TESTCALL("test_json2map_jsonNull", test_json2map_jsonNull); TESTCALL("test_json2map_noDataHook", test_json2map_noDataHook); TESTCALL("test_json2map_objectHook", test_json2map_objectHook); TESTCALL("test_json2map_prefix", test_json2map_prefix); return -1; }
pushq %rbx movq %rsi, %rbx leaq 0x2bcb(%rip), %rdi # 0x677c leaq 0x2bd4(%rip), %rsi # 0x678c xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3bde leaq 0x2bbd(%rip), %rsi # 0x678c callq 0x2100 testl %eax, %eax jne 0x3be3 popq %rbx jmp 0x22ac callq 0x22ac leaq 0x2b92(%rip), %rdi # 0x677c leaq 0x2bb2(%rip), %rsi # 0x67a3 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3c17 leaq 0x2b9b(%rip), %rsi # 0x67a3 callq 0x2100 testl %eax, %eax jne 0x3c1c popq %rbx jmp 0x230b callq 0x230b leaq 0x2b59(%rip), %rdi # 0x677c leaq 0x2b8c(%rip), %rsi # 0x67b6 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3c50 leaq 0x2b75(%rip), %rsi # 0x67b6 callq 0x2100 testl %eax, %eax jne 0x3c55 popq %rbx jmp 0x2382 callq 0x2382 leaq 0x2b20(%rip), %rdi # 0x677c leaq 0x2b66(%rip), %rsi # 0x67c9 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3c89 leaq 0x2b4f(%rip), %rsi # 0x67c9 callq 0x2100 testl %eax, %eax jne 0x3c8e popq %rbx jmp 0x23f9 callq 0x23f9 leaq 0x2ae7(%rip), %rdi # 0x677c leaq 0x2b41(%rip), %rsi # 0x67dd xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3cc2 leaq 0x2b2a(%rip), %rsi # 0x67dd callq 0x2100 testl %eax, %eax jne 0x3cc7 popq %rbx jmp 0x2470 callq 0x2470 leaq 0x2aae(%rip), %rdi # 0x677c leaq 0x2b20(%rip), %rsi # 0x67f5 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3cfb leaq 0x2b09(%rip), %rsi # 0x67f5 callq 0x2100 testl %eax, %eax jne 0x3d00 popq %rbx jmp 0x24e7 callq 0x24e7 leaq 0x2a75(%rip), %rdi # 0x677c leaq 0x2b01(%rip), %rsi # 0x680f xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3d34 leaq 0x2aea(%rip), %rsi # 0x680f callq 0x2100 testl %eax, %eax jne 0x3d39 popq %rbx jmp 0x255e callq 0x255e leaq 0x2a3c(%rip), %rdi # 0x677c leaq 0x2adc(%rip), %rsi # 0x6823 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3d6d leaq 0x2ac5(%rip), %rsi # 0x6823 callq 0x2100 testl %eax, %eax jne 0x3d72 popq %rbx jmp 0x266e callq 0x266e leaq 0x2a03(%rip), %rdi # 0x677c leaq 0x2abb(%rip), %rsi # 0x683b xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3da6 leaq 0x2aa4(%rip), %rsi # 0x683b callq 0x2100 testl %eax, %eax jne 0x3dab popq %rbx jmp 0x26fd callq 0x26fd leaq 0x29ca(%rip), %rdi # 0x677c leaq 0x2a9c(%rip), %rsi # 0x6855 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3ddf leaq 0x2a85(%rip), %rsi # 0x6855 callq 0x2100 testl %eax, %eax jne 0x3de4 popq %rbx jmp 0x2774 callq 0x2774 leaq 0x2991(%rip), %rdi # 0x677c leaq 0x2a78(%rip), %rsi # 0x686a xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3e18 leaq 0x2a61(%rip), %rsi # 0x686a callq 0x2100 testl %eax, %eax jne 0x3e1d popq %rbx jmp 0x27f0 callq 0x27f0 leaq 0x2958(%rip), %rdi # 0x677c leaq 0x2a57(%rip), %rsi # 0x6882 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3e51 leaq 0x2a40(%rip), %rsi # 0x6882 callq 0x2100 testl %eax, %eax jne 0x3e56 popq %rbx jmp 0x2896 callq 0x2896 leaq 0x291f(%rip), %rdi # 0x677c leaq 0x2a31(%rip), %rsi # 0x6895 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3e8a leaq 0x2a1a(%rip), %rsi # 0x6895 callq 0x2100 testl %eax, %eax jne 0x3e8f popq %rbx jmp 0x295a callq 0x295a leaq 0x28e6(%rip), %rdi # 0x677c leaq 0x2a0b(%rip), %rsi # 0x68a8 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3ec3 leaq 0x29f4(%rip), %rsi # 0x68a8 callq 0x2100 testl %eax, %eax jne 0x3ec8 popq %rbx jmp 0x2a1e callq 0x2a1e leaq 0x28ad(%rip), %rdi # 0x677c leaq 0x29e6(%rip), %rsi # 0x68bc xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3efc leaq 0x29cf(%rip), %rsi # 0x68bc callq 0x2100 testl %eax, %eax jne 0x3f01 popq %rbx jmp 0x2ae2 callq 0x2ae2 leaq 0x2874(%rip), %rdi # 0x677c leaq 0x29c5(%rip), %rsi # 0x68d4 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3f35 leaq 0x29ae(%rip), %rsi # 0x68d4 callq 0x2100 testl %eax, %eax jne 0x3f3a popq %rbx jmp 0x2ba6 callq 0x2ba6 leaq 0x283b(%rip), %rdi # 0x677c leaq 0x29a6(%rip), %rsi # 0x68ee xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3f6e leaq 0x298f(%rip), %rsi # 0x68ee callq 0x2100 testl %eax, %eax jne 0x3f73 popq %rbx jmp 0x2c6a callq 0x2c6a leaq 0x2802(%rip), %rdi # 0x677c leaq 0x2981(%rip), %rsi # 0x6902 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3fa7 leaq 0x296a(%rip), %rsi # 0x6902 callq 0x2100 testl %eax, %eax jne 0x3fac popq %rbx jmp 0x3033 callq 0x3033 leaq 0x27c9(%rip), %rdi # 0x677c leaq 0x2960(%rip), %rsi # 0x691a xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x3fe0 leaq 0x2949(%rip), %rsi # 0x691a callq 0x2100 testl %eax, %eax jne 0x3fe5 popq %rbx jmp 0x30f7 callq 0x30f7 leaq 0x2790(%rip), %rdi # 0x677c leaq 0x2941(%rip), %rsi # 0x6934 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x4019 leaq 0x292a(%rip), %rsi # 0x6934 callq 0x2100 testl %eax, %eax jne 0x401e popq %rbx jmp 0x3296 callq 0x3296 leaq 0x2757(%rip), %rdi # 0x677c leaq 0x291f(%rip), %rsi # 0x694b xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x4058 leaq 0x2908(%rip), %rsi # 0x694b callq 0x2100 testl %eax, %eax jne 0x405d callq 0x3337 xorl %eax, %eax jmp 0x40db callq 0x3337 leaq 0x2718(%rip), %rdi # 0x677c leaq 0x28f9(%rip), %rsi # 0x6964 xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x4091 leaq 0x28e2(%rip), %rsi # 0x6964 callq 0x2100 testl %eax, %eax jne 0x4096 popq %rbx jmp 0x335a callq 0x335a leaq 0x26df(%rip), %rdi # 0x677c leaq 0x28d9(%rip), %rsi # 0x697d xorl %eax, %eax callq 0x2090 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x40d1 leaq 0x28c2(%rip), %rsi # 0x697d callq 0x2100 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x40db popq %rbx jmp 0x3a02 callq 0x3a02 movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx retq nopl (%rax)
/maximilianvoss[P]ctemplate/libs/json2map/test/testcases.c
json2map_parse
int json2map_parse(json2map_t *obj, char *prefix, char *jsonString) { DEBUG_TEXT("json2map_parseObject([json2map_t *], %s)... ", jsonString); jsmn_parser p; jsmntok_t *token; if ( jsonString == NULL ) { return -1; } jsmn_init(&p); int count = jsmn_parse(&p, jsonString, strlen(jsonString), NULL, 0); DEBUG_TEXT("json2map_parseObject([json2map_t *], %s): Count: %d", jsonString, count); if ( count < 0 ) { DEBUG_TEXT("json2map_parseObject([json2map_t *], %s): ERROR: no object found", jsonString); return -1; } token = (jsmntok_t *) malloc(sizeof(jsmntok_t) * count); p.pos = 0; jsmn_parse(&p, jsonString, strlen(jsonString), token, count); if ( count < 1 || token[0].type != JSMN_OBJECT ) { DEBUG_TEXT("json2map_parseObject([json2map_t *], %s): ERROR: first object needs to be a valid object", jsonString); return -1; } DEBUG_TEXT("json2map_parseObject([json2map_t *], %s)... DONE", jsonString); int retVal = json2map_parseObject(obj, prefix, jsonString, token, 1, count); free(token); return retVal; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x41ba movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 leaq 0xc(%rsp), %r13 movq %r13, %rdi callq 0x54e5 movq %r14, %rdi callq 0x2070 movq %r13, %rdi movq %r14, %rsi movq %rax, %rdx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x4fb0 testl %eax, %eax js 0x41ba movl %eax, %ebp movq %r15, (%rsp) movl %eax, %edi shlq $0x4, %rdi callq 0x2120 movq %rax, %r13 leaq 0xc(%rsp), %r15 movl $0x0, (%r15) movq %r14, %rdi callq 0x2070 movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx movq %r13, %rcx movl %ebp, %r8d callq 0x4fb0 testl %ebp, %ebp je 0x41ba cmpl $0x1, (%r13) jne 0x41ba movq %r12, %rdi movq (%rsp), %rsi movq %r14, %rdx movq %r13, %rcx movl $0x1, %r8d movl %ebp, %r9d callq 0x41cb movl %eax, %ebx movq %r13, %rdi callq 0x2030 movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/json2map.c
json2map_parseObject
static int json2map_parseObject(json2map_t *obj, char *path, char *jsonString, jsmntok_t *token, int start, int end) { DEBUG_TEXT("json2map_parseObject([json2map_t *], %s, %s, [jsmntok_t *], %d, %d)...", path, jsonString, start, end); int newEnd; char *buffer; csafestring_t *pathBuff = NULL; csafestring_t *objPathBuff = NULL; int i = start; while ( i < end && i > 0 ) { if ( token[i].type == JSMN_STRING ) { buffer = json2map_setTokenValue(jsonString, &token[i]); pathBuff = json2map_concatPaths(path, buffer, -1); free(buffer); } else { DEBUG_TEXT("json2map_parseObject([json2map_t *], %s, %s, [jsmntok_t *], %d, %d): ERROR: Name of object has to be a string", path, jsonString, start, end); return -1; } i++; switch ( token[i].type ) { case JSMN_OBJECT: newEnd = json2map_calcEnd(token, i, end); if ( obj->saveSubobjectString ) { objPathBuff = safe_clone(pathBuff); safe_strchrappend(objPathBuff, JSON2MAP_MAP_ARRAY_START); safe_strchrappend(objPathBuff, JSON2MAP_MAP_OBJECT_CODE); safe_strchrappend(objPathBuff, JSON2MAP_MAP_ARRAY_END); csafestring_t *tmp = safe_create(NULL); safe_memset(tmp, '\0', token[i].end - token[i].start + 1); safe_memcpy(tmp, &jsonString[token[i].start], token[i].end - token[i].start); obj->dataMapHook(obj->dataMapData, objPathBuff->data, tmp->data); safe_destroy(tmp); safe_destroy(objPathBuff); } i = json2map_parseObject(obj, pathBuff->data, jsonString, token, i + 1, newEnd + 1); break; case JSMN_STRING: case JSMN_PRIMITIVE: buffer = json2map_setTokenValue(jsonString, &token[i]); if ( obj->dataMapHook != NULL ) { obj->dataMapHook(obj->dataMapData, pathBuff->data, buffer); } free(buffer); i++; break; case JSMN_ARRAY: newEnd = json2map_calcEnd(token, i, end); i = json2map_parseArray(obj, pathBuff->data, jsonString, token, i + 1, newEnd + 1); break; default: DEBUG_TEXT("json2map_parseObject([json2map_t *], %s, %s, [jsmntok_t *], %d, %d): ERROR: Not defined type", path, jsonString, start, end); return -1; } safe_destroy(pathBuff); } DEBUG_TEXT("json2map_parseObject([json2map_t *], %s, %s, [jsmntok_t *], %d, %d)... DONE", path, jsonString, start, end); if ( i < 0 ) { return i; } return end; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movl %r9d, %r12d movl %r8d, %r13d movq %rcx, %rbp movq %rsi, 0x60(%rsp) cmpl %r9d, %r8d setge %al testl %r8d, %r8d setle %cl orb %al, %cl jne 0x4711 movslq %r12d, %r14 leal -0x1(%r12), %eax movl %eax, 0x38(%rsp) leaq 0x14(%rbp), %rax movq %rax, 0x30(%rsp) movq %rbp, 0x48(%rsp) movq %r12, 0x28(%rsp) movq %rdx, 0x18(%rsp) movq %rdi, 0x10(%rsp) movq %r14, 0x50(%rsp) movl %r13d, %r15d movq %r15, %rax shlq $0x4, %rax cmpl $0x3, (%rbp,%rax) jne 0x471d movq %r13, 0x8(%rsp) addq %rbp, %rax movslq 0x4(%rax), %rbx movslq 0x8(%rax), %r12 subq %rbx, %r12 leaq 0x1(%r12), %rsi movl $0x1, %edi callq 0x20e0 movq %rax, %r14 movq 0x18(%rsp), %r13 addq %r13, %rbx movslq %r12d, %rdx movq %rax, %rdi movq %rbx, %rsi callq 0x2110 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movq 0x60(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF callq 0x473e movq %rax, 0x20(%rsp) movq %r14, %rdi callq 0x2030 incq %r15 movq %r15, %rax shlq $0x4, %rax leaq (%rax,%rbp), %r12 movl (%rbp,%rax), %ecx leal -0x3(%rcx), %edx cmpl $0x2, %edx jb 0x430c cmpl $0x2, %ecx movq 0x50(%rsp), %r14 je 0x436f cmpl $0x1, %ecx movq 0x10(%rsp), %r13 movq 0x8(%rsp), %r8 jne 0x4722 leal 0x1(%r8), %ebx leaq (%rax,%rbp), %rcx addq $0x8, %rcx addq 0x30(%rsp), %rax incq %r15 cmpq %r14, %r15 jge 0x43aa movl (%rax), %edx incl %ebx addq $0x10, %rax incq %r15 cmpl (%rcx), %edx jle 0x42ef jmp 0x43b1 movslq 0x4(%r12), %r14 movslq 0x8(%r12), %r15 subq %r14, %r15 leaq 0x1(%r15), %rsi movl $0x1, %edi callq 0x20e0 movq %rax, %rbx addq %r13, %r14 movslq %r15d, %rdx movq %rax, %rdi movq %r14, %rsi callq 0x2110 movq 0x10(%rsp), %r14 movq (%r14), %rax testq %rax, %rax movq 0x20(%rsp), %r15 je 0x4359 movq 0x8(%r14), %rdi movq (%r15), %rsi movq %rbx, %rdx callq *%rax movq %rbx, %rdi callq 0x2030 movq 0x8(%rsp), %r13 addl $0x2, %r13d jmp 0x4479 leaq (%rax,%rbp), %rcx addq $0x8, %rcx addq 0x30(%rsp), %rax incq %r15 movq 0x8(%rsp), %rsi movl %esi, %r12d movq 0x10(%rsp), %r13 cmpq %r14, %r15 jge 0x4483 movl (%rax), %edx incl %r12d addq $0x10, %rax incq %r15 cmpl (%rcx), %edx jle 0x438c jmp 0x448a movq 0x28(%rsp), %rax movl %eax, %ebx cmpb $0x0, 0x10(%r13) movq 0x20(%rsp), %r15 je 0x445c movq %r15, %rdi callq 0x5566 movq %rax, %r15 movq %rax, %rdi movl $0x5b, %esi callq 0x580e movq %r15, %rdi movl $0x6f, %esi callq 0x580e movq %r15, %rdi movl $0x5d, %esi callq 0x580e xorl %edi, %edi callq 0x54f4 movq %rax, %r14 movl 0x8(%r12), %eax subl 0x4(%r12), %eax incl %eax movslq %eax, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x5732 movslq 0x4(%r12), %rax movq 0x18(%rsp), %rcx leaq (%rcx,%rax), %rsi movslq 0x8(%r12), %rdx subq %rax, %rdx movq %r14, %rdi callq 0x56e0 movq 0x8(%r13), %rdi movq (%r15), %rsi movq (%r14), %rdx callq *(%r13) movq %r14, %rdi callq 0x55a5 movq %r15, %rdi movq 0x20(%rsp), %r15 callq 0x55a5 movq 0x8(%rsp), %r8 movq (%r15), %rsi addl $0x2, %r8d movq %r13, %rdi movq 0x18(%rsp), %rdx movq %rbp, %rcx movl %ebx, %r9d callq 0x41cb movl %eax, %r13d movq 0x28(%rsp), %r12 jmp 0x46ec movl 0x38(%rsp), %eax movl %eax, %r12d movq 0x20(%rsp), %rax movq (%rax), %rax movq %rax, 0x40(%rsp) leal 0x2(%rsi), %ebx leal 0x1(%r12), %edx cmpl %r12d, %ebx setg %al cmpl $-0x1, %esi setl %cl orb %al, %cl movl %edx, 0x3c(%rsp) jne 0x4692 movslq %edx, %rax movq %rax, 0x58(%rsp) xorl %r15d, %r15d xorl %edi, %edi movq 0x40(%rsp), %rsi movl %r15d, %edx callq 0x473e movq %rax, 0x8(%rsp) movl %ebx, %ebx movq %rbx, %rax shlq $0x4, %rax leaq (%rax,%rbp), %r14 movl (%rbp,%rax), %ecx leal -0x3(%rcx), %edx cmpl $0x2, %edx jae 0x454d movslq 0x4(%r14), %r13 movslq 0x8(%r14), %rbp subq %r13, %rbp leaq 0x1(%rbp), %rsi movl $0x1, %edi callq 0x20e0 movq %rax, %r14 addq 0x18(%rsp), %r13 movslq %ebp, %rdx movq %rax, %rdi movq %r13, %rsi movq 0x10(%rsp), %r13 callq 0x2110 movq (%r13), %rax testq %rax, %rax movq 0x8(%rsp), %rbp je 0x453e movq 0x8(%r13), %rdi movq (%rbp), %rsi movq %r14, %rdx callq *%rax movq %r14, %rdi callq 0x2030 incl %ebx jmp 0x4670 cmpl $0x1, %ecx jne 0x4704 leaq (%rax,%rbp), %rcx addq $0x8, %rcx leal -0x1(%rbx), %ebp addq 0x30(%rsp), %rax leaq 0x1(%rbx), %rdx movq 0x58(%rsp), %rdi cmpq %rdi, %rdx jge 0x4585 movl (%rax), %esi incl %ebp addq $0x10, %rax incq %rdx cmpl (%rcx), %esi jle 0x456f jmp 0x4588 movl %r12d, %ebp cmpb $0x0, 0x10(%r13) movq 0x18(%rsp), %rdx movq 0x8(%rsp), %rax je 0x464e movq 0x8(%rsp), %rdi callq 0x5566 movq %rax, %r13 movq %rax, 0x68(%rsp) movq %rax, %rdi movl $0x5b, %esi callq 0x580e movq %r13, %rdi movl $0x6f, %esi callq 0x580e movq %r13, %rdi movl $0x5d, %esi callq 0x580e xorl %edi, %edi callq 0x54f4 movq %rax, %r13 movl 0x8(%r14), %eax subl 0x4(%r14), %eax incl %eax movslq %eax, %rdx movq %r13, %rdi xorl %esi, %esi callq 0x5732 movslq 0x4(%r14), %rax movq 0x18(%rsp), %rcx leaq (%rcx,%rax), %rsi movslq 0x8(%r14), %rdx subq %rax, %rdx movq %r13, %rdi callq 0x56e0 movq 0x10(%rsp), %rax movq 0x8(%rax), %rdi movq 0x68(%rsp), %r14 movq (%r14), %rsi movq (%r13), %rdx movq 0x10(%rsp), %rax callq *(%rax) movq %r13, %rdi movq 0x10(%rsp), %r13 callq 0x55a5 movq %r14, %rdi callq 0x55a5 movq 0x18(%rsp), %rdx movq 0x8(%rsp), %rax movq (%rax), %rsi incl %ebx incl %ebp movq %rax, %r14 movq %r13, %rdi movq 0x48(%rsp), %rcx movl %ebx, %r8d movl %ebp, %r9d callq 0x41cb movl %eax, %ebx movq %r14, %rbp incl %r15d movq %rbp, %rdi callq 0x55a5 cmpl %r12d, %ebx movq 0x48(%rsp), %rbp jg 0x468d testl %ebx, %ebx jg 0x44c2 movl %r15d, %r15d jmp 0x4695 xorl %r15d, %r15d xorl %edi, %edi movq 0x40(%rsp), %rsi movl $0xfffffffe, %edx # imm = 0xFFFFFFFE callq 0x473e movq %rax, %r14 leaq 0x70(%rsp), %rdi movq %r15, %rsi movq %rdi, %r15 callq 0x4f94 movq (%r13), %rax testq %rax, %rax movq 0x28(%rsp), %r12 je 0x46d3 movq 0x8(%r13), %rdi movq (%r14), %rsi movq %r15, %rdx callq *%rax movq %r14, %rdi callq 0x55a5 testl %ebx, %ebx movl 0x3c(%rsp), %eax cmovsl %ebx, %eax movl %eax, %r13d movq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x55a5 cmpl %r12d, %r13d jge 0x4711 testl %r13d, %r13d jg 0x422c jmp 0x4711 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF movq 0x28(%rsp), %r12 jmp 0x46e7 testl %r13d, %r13d cmovsl %r13d, %r12d movl %r12d, %ebx jmp 0x4722 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/json2map.c
json2map_concatPaths
static csafestring_t *json2map_concatPaths(char *parent, char *key, int arrayIdx) { DEBUG_TEXT("json2map_concatPaths(%s, %s, %d)...", parent, key, arrayIdx); char arrayIdxBuff[10]; csafestring_t *buffer = safe_create(NULL); if ( parent != NULL && *parent != '\0' ) { safe_strcpy(buffer, parent); safe_strchrappend(buffer, JSON2MAP_MAP_OBJECT_SEPARATOR); safe_strcat(buffer, key); } else { safe_strcpy(buffer, key); } if ( arrayIdx >= 0 ) { sprintf(arrayIdxBuff, "%c%d%c", JSON2MAP_MAP_ARRAY_START, arrayIdx, JSON2MAP_MAP_ARRAY_END); safe_strcat(buffer, arrayIdxBuff); } if ( arrayIdx == -2 ) { sprintf(arrayIdxBuff, "%c%c%c", JSON2MAP_MAP_ARRAY_START, JSON2MAP_MAP_ARRAY_COUNT, JSON2MAP_MAP_ARRAY_END); safe_strcat(buffer, arrayIdxBuff); } DEBUG_TEXT("json2map_concatPaths(%s, %s, %d)... DONE", parent, key, arrayIdx); return buffer; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 xorl %edi, %edi callq 0x54f4 movq %rax, %rbx testq %r15, %r15 je 0x478a cmpb $0x0, (%r15) je 0x478a movq %rbx, %rdi movq %r15, %rsi callq 0x5757 movq %rbx, %rdi movl $0x2e, %esi callq 0x580e movq %rbx, %rdi movq %r14, %rsi callq 0x5638 jmp 0x4795 movq %rbx, %rdi movq %r14, %rsi callq 0x5757 testl %ebp, %ebp js 0x47ae leaq 0x21f2(%rip), %rsi # 0x6992 leaq 0xe(%rsp), %rdi movl $0x5b, %edx movl %ebp, %ecx jmp 0x47c9 cmpl $-0x2, %ebp jne 0x47e3 leaq 0x21df(%rip), %rsi # 0x6999 leaq 0xe(%rsp), %rdi movl $0x5b, %edx movl $0x78, %ecx movl $0x5d, %r8d xorl %eax, %eax callq 0x2160 leaq 0xe(%rsp), %rsi movq %rbx, %rdi callq 0x5638 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nopl (%rax)
/maximilianvoss[P]ctemplate/libs/json2map/json2map.c
map2json_init
map2json_t *map2json_init(char *prefix) { DEBUG_TEXT("map2json_init(%s)... ", prefix); map2json_t *obj; obj = (map2json_t *) malloc(sizeof(map2json_t)); obj->buffer = safe_create(NULL); obj->pairs = NULL; obj->tree = NULL; obj->prefix = prefix; DEBUG_TEXT("map2json_init(%s)... DONE", prefix); return obj; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x20, %edi callq 0x2120 movq %rax, %r14 xorl %edi, %edi callq 0x54f4 movq %rax, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%r14) movq %rbx, 0x18(%r14) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_push
void map2json_push(map2json_t *obj, char *key, char *value) { DEBUG_TEXT("map2json_push([map2json_t *], %s, %s)... ", key, value); map2json_keyvalue_t *pair = (map2json_keyvalue_t *) malloc(sizeof(map2json_keyvalue_t)); char *realKey; if ( obj->prefix == NULL ) { realKey = key; } else { size_t prefixLength = strlen(obj->prefix); if ( !strncmp(key, obj->prefix, prefixLength) ) { realKey = &key[prefixLength + 1]; } else { DEBUG_TEXT("map2json_push([map2json_t *], %s, %s)... DONE", key, value); return; } } size_t keyLen = strlen(realKey) + 1; size_t valLen = strlen(value) + 1; if ( realKey[keyLen - 3] == JSON2MAP_MAP_ARRAY_START && realKey[keyLen - 2] == JSON2MAP_MAP_OBJECT_CODE && realKey[keyLen - 1] == JSON2MAP_MAP_ARRAY_END ) { DEBUG_TEXT("map2json_push([map2json_t *], %s, %s)... DONE", key, value); return; } pair->key = (char *) calloc(sizeof(char), keyLen); pair->value = (char *) calloc(sizeof(char), valLen); memcpy(pair->key, realKey, keyLen); memcpy(pair->value, value, valLen); pair->next = obj->pairs; obj->pairs = pair; DEBUG_TEXT("map2json_push([map2json_t *], %s, %s)... DONE", key, value); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movl $0x18, %edi callq 0x2120 movq %rax, %r15 movq 0x18(%rbx), %r13 testq %r13, %r13 je 0x487d movq %r13, %rdi callq 0x2070 movq %rax, %rbp movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x2050 testl %eax, %eax jne 0x490e addq %rbp, %r12 incq %r12 movq %r12, %rdi callq 0x2070 movq %rax, %rbp movq %r14, %rdi callq 0x2070 movq %rax, %r13 cmpb $0x5b, -0x2(%rbp,%r12) jne 0x48aa cmpb $0x6f, -0x1(%rbp,%r12) jne 0x48aa cmpb $0x5d, (%r12,%rbp) je 0x490e incq %rbp incq %r13 movl $0x1, %edi movq %rbp, %rsi callq 0x20e0 movq %r14, 0x10(%rsp) movq %rax, %r14 movq %rax, (%r15) movl $0x1, %edi movq %r13, %rsi callq 0x20e0 movq %rbx, 0x8(%rsp) movq %rax, %rbx movq %rax, 0x8(%r15) movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x2110 movq %rbx, %rdi movq 0x10(%rsp), %rsi movq %r13, %rdx callq 0x2110 movq 0x8(%rsp), %rcx movq (%rcx), %rax movq %rax, 0x10(%r15) movq %r15, (%rcx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_create
char *map2json_create(map2json_t *obj) { DEBUG_PUT("map2json_create([map2json_t *])... "); map2json_freeTreeMemory(obj->tree); map2json_createTree(obj); safe_strcpy(obj->buffer, ""); map2json_createJsonString(obj->buffer, obj->tree); DEBUG_PUT("map2json_create([map2json_t *])... DONE"); return obj->buffer->data; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq 0x8(%rdi), %rdi callq 0x4c78 movl $0x40, %edi callq 0x2120 pxor %xmm0, %xmm0 movdqu %xmm0, 0x28(%rax) movq $0x0, 0x38(%rax) movl $0x1, 0x20(%rax) pcmpeqd %xmm1, %xmm1 movdqu %xmm1, 0x10(%rax) movdqu %xmm0, (%rax) movq %rax, 0x18(%rsp) movq %rax, 0x8(%rbx) movq %rbx, 0x28(%rsp) movq (%rbx), %rbx testq %rbx, %rbx je 0x4c40 movq (%rbx), %rdi movl $0x2e, %esi callq 0x4e97 movq 0x18(%rsp), %r14 movq %rax, 0x20(%rsp) testq %rax, %rax je 0x4ba2 movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rbp movq %rbx, 0x30(%rsp) movq (%rbx), %rsi movq %rbp, %rdi callq 0x4e64 movq %rax, %r12 movq %rax, %rdi movl $0x5b, %esi callq 0x2080 movq $-0x1, %r13 movb $0x1, %bl testq %rax, %rax je 0x4a64 movq %rax, %r15 movq %r12, %rdi movl $0x5d, %esi callq 0x2080 cmpq %r12, %r15 je 0x4a64 testq %rax, %rax je 0x4a64 movq %r15, %r14 incq %r14 movq %r14, %rdi callq 0x2070 movq %rax, %r13 movl $0x1, %edi movq %rax, %rsi callq 0x20e0 movq %rax, %rbx movq %rax, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x2110 movb $0x0, -0x1(%rbx,%r13) cmpb $0x78, 0x1(%r15) jne 0x4a48 movq %rbx, %rdi callq 0x2030 movq $-0x2, %r13 jmp 0x4a5e movq %rbx, %rdi callq 0x2140 movl %eax, %r14d movq %rbx, %rdi callq 0x2030 movslq %r14d, %r13 movb $0x0, (%r15) xorl %ebx, %ebx movq 0x8(%rsp), %rax movq 0x30(%rax), %r14 testq %r14, %r14 je 0x4a8b movq (%r14), %rdi movq %r12, %rsi callq 0x2100 testl %eax, %eax je 0x4b1b movq 0x28(%r14), %r14 jmp 0x4a6d movl %ebx, 0x14(%rsp) movl $0x40, %edi callq 0x2120 movq %rax, %r14 xorl %eax, %eax movq %rax, 0x8(%r14) pxor %xmm0, %xmm0 movdqu %xmm0, 0x28(%r14) movq %rax, 0x38(%r14) movl $0x1, 0x20(%r14) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%r14) movl $0x0, %ebx testq %r12, %r12 je 0x4af6 movq %r12, %rdi callq 0x2070 movq %rax, %r15 leaq 0x1(%rax), %rsi movl $0x1, %edi callq 0x20e0 movq %rax, %rbx movq %rax, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x2110 movq %rbx, (%r14) movq 0x8(%rsp), %rcx movq 0x30(%rcx), %rax movq %rax, 0x28(%r14) movq %r14, 0x30(%rcx) cmpb $0x0, 0x14(%rsp) jne 0x4b83 movl $0x2, 0x20(%r14) jmp 0x4b1f testb %bl, %bl jne 0x4b83 cmpq $-0x2, %r13 je 0x4b83 movq 0x38(%r14), %rbx testq %rbx, %rbx je 0x4b40 movq %rbx, %rax cmpq %r13, 0x10(%rax) je 0x4b80 movq 0x38(%rax), %rax testq %rax, %rax jne 0x4b31 movl $0x40, %edi callq 0x2120 pxor %xmm0, %xmm0 movdqu %xmm0, 0x28(%rax) movl $0x1, 0x20(%rax) movq $-0x1, 0x18(%rax) movdqu %xmm0, (%rax) cmpq %r13, 0x18(%r14) jge 0x4b74 leaq 0x1(%r13), %rcx movq %rcx, 0x18(%r14) movq %r13, 0x10(%rax) movq %rbx, 0x38(%rax) movq %rax, 0x38(%r14) movq %rax, %r14 movq %r12, %rdi callq 0x2030 movq 0x10(%rbp), %rbp movq %r14, 0x8(%rsp) testq %rbp, %rbp movq 0x30(%rsp), %rbx jne 0x49b4 movq 0x8(%rbx), %r12 cmpl $0x2, 0x20(%r14) jne 0x4bbd movq %r12, %rdi callq 0x2140 cltq movq %rax, 0x18(%r14) jmp 0x4be3 movq %r12, %rdi callq 0x4f67 testl %eax, %eax je 0x4bf6 movl $0x4, 0x20(%r14) movq %r12, 0x8(%r14) cmpb $0x1b, (%r12) jne 0x4be3 incq %r12 movq %r12, 0x8(%r14) movq 0x10(%rbx), %rbx movq 0x20(%rsp), %rdi callq 0x4f4e jmp 0x4977 movq %r12, %rdi leaq 0x1bb1(%rip), %rsi # 0x67b1 callq 0x2100 testl %eax, %eax je 0x4bc9 movq %r12, %rdi leaq 0x1bb1(%rip), %rsi # 0x67c4 callq 0x2100 testl %eax, %eax je 0x4bc9 movq %r12, %rdi leaq 0x1bb1(%rip), %rsi # 0x67d7 callq 0x2100 testl %eax, %eax je 0x4bc9 cmpb $0x1b, (%r12) je 0x4bc9 movl $0x3, 0x20(%r14) jmp 0x4bdf movq 0x28(%rsp), %rbx movq 0x10(%rbx), %rdi leaq 0x13cf(%rip), %rsi # 0x601f callq 0x5757 movq 0x8(%rbx), %rsi movq 0x10(%rbx), %rdi callq 0x4cb3 movq 0x10(%rbx), %rax movq (%rax), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_freeTreeMemory
static void map2json_freeTreeMemory(map2json_tree_t *obj) { DEBUG_PUT("map2json_freeTreeMemory([map2json_t *])... "); if ( obj == NULL ) { DEBUG_PUT("map2json_freeTreeMemory([map2json_t *])... DONE"); return; } map2json_freeTreeMemory(obj->arrayObjects); map2json_freeTreeMemory(obj->children); map2json_freeTreeMemory(obj->next); if ( obj->key != NULL ) { free(obj->key); } free(obj); DEBUG_PUT("map2json_freeTreeMemory([map2json_t *])... DONE"); }
testq %rdi, %rdi je 0x4cb2 pushq %rbx movq %rdi, %rbx movq 0x38(%rdi), %rdi callq 0x4c78 movq 0x30(%rbx), %rdi callq 0x4c78 movq 0x28(%rbx), %rdi callq 0x4c78 movq (%rbx), %rdi testq %rdi, %rdi je 0x4ca9 callq 0x2030 movq %rbx, %rdi popq %rbx jmp 0x2030 retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_createJsonString
static void map2json_createJsonString(csafestring_t *buffer, map2json_tree_t *tree) { DEBUG_TEXT("map2json_createJsonString(%s, [map2json_tree_t *])... ", buffer->data); if ( tree == NULL ) { DEBUG_TEXT("map2json_createJsonString(%s, [map2json_tree_t *])... DONE", buffer->data); return; } if ( tree->key != NULL ) { safe_strchrappend(buffer, '\"'); safe_strcat(buffer, tree->key); safe_strchrappend(buffer, '\"'); safe_strchrappend(buffer, ':'); } if ( tree->type == JSMN_OBJECT ) { safe_strchrappend(buffer, '{'); map2json_createJsonString(buffer, tree->children); safe_strchrappend(buffer, '}'); } if ( tree->type == JSMN_ARRAY ) { map2json_createJsonStringArray(buffer, tree); } if ( tree->type == JSMN_PRIMITIVE || tree->type == JSMN_STRING ) { if ( tree->type == JSMN_STRING ) { safe_strchrappend(buffer, '\"'); } safe_strcat(buffer, tree->value); if ( tree->type == JSMN_STRING ) { safe_strchrappend(buffer, '\"'); } } if ( tree->next != NULL ) { safe_strchrappend(buffer, ','); map2json_createJsonString(buffer, tree->next); } DEBUG_TEXT("map2json_createJsonString(%s, [map2json_tree_t *])... DONE", buffer->data); }
testq %rsi, %rsi je 0x4e0f pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, (%rbx) je 0x4d02 movq %r14, %rdi movl $0x22, %esi callq 0x580e movq (%rbx), %rsi movq %r14, %rdi callq 0x5638 movq %r14, %rdi movl $0x22, %esi callq 0x580e movq %r14, %rdi movl $0x3a, %esi callq 0x580e movl 0x20(%rbx), %eax cmpl $0x1, %eax jne 0x4d33 movq %r14, %rdi movl $0x7b, %esi callq 0x580e movq 0x30(%rbx), %rsi movq %r14, %rdi callq 0x4cb3 movq %r14, %rdi movl $0x7d, %esi callq 0x580e movl 0x20(%rbx), %eax cmpl $0x2, %eax jne 0x4daa movq %r14, %rdi movl $0x5b, %esi callq 0x580e movq 0x18(%rbx), %rax testq %rax, %rax jle 0x4d9a xorl %r12d, %r12d movq 0x38(%rbx), %r15 testq %r15, %r15 je 0x4d78 cmpq %r12, 0x10(%r15) jne 0x4d6b movq %r14, %rdi movq %r15, %rsi callq 0x4cb3 movq 0x38(%r15), %r15 testq %r15, %r15 jne 0x4d5a movq 0x18(%rbx), %rax leaq -0x1(%rax), %rcx cmpq %r12, %rcx jle 0x4d92 movq %r14, %rdi movl $0x2c, %esi callq 0x580e movq 0x18(%rbx), %rax incq %r12 cmpq %r12, %rax jg 0x4d51 movq %r14, %rdi movl $0x5d, %esi callq 0x580e movl 0x20(%rbx), %eax leal -0x3(%rax), %ecx cmpl $0x1, %ecx ja 0x4de3 cmpl $0x3, %eax jne 0x4dc4 movq %r14, %rdi movl $0x22, %esi callq 0x580e movq 0x8(%rbx), %rsi movq %r14, %rdi callq 0x5638 cmpl $0x3, 0x20(%rbx) jne 0x4de3 movq %r14, %rdi movl $0x22, %esi callq 0x580e cmpq $0x0, 0x28(%rbx) je 0x4e04 movq %r14, %rdi movl $0x2c, %esi callq 0x580e movq 0x28(%rbx), %rbx testq %rbx, %rbx jne 0x4cca addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_destroy
void map2json_destroy(map2json_t *obj) { DEBUG_PUT("map2json_destroy([map2json_t *])... "); map2json_freePairsMemory(obj->pairs); map2json_freeTreeMemory(obj->tree); safe_destroy(obj->buffer); free(obj); DEBUG_PUT("map2json_destroy([map2json_t *])... DONE"); }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi callq 0x4e37 movq 0x8(%rbx), %rdi callq 0x4c78 movq 0x10(%rbx), %rdi callq 0x55a5 movq %rbx, %rdi popq %rbx jmp 0x2030
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
map2json_freePairsMemory
static void map2json_freePairsMemory(map2json_keyvalue_t *pair) { DEBUG_PUT("map2json_freePairsMemory([map2json_t *])... "); if ( pair == NULL ) { DEBUG_PUT("map2json_freePairsMemory([map2json_t *])... DONE"); return; } map2json_freePairsMemory(pair->next); free(pair->key); free(pair->value); free(pair); DEBUG_PUT("map2json_freePairsMemory([map2json_t *])... DONE"); }
testq %rdi, %rdi je 0x4e63 pushq %rbx movq %rdi, %rbx movq 0x10(%rdi), %rdi callq 0x4e37 movq (%rbx), %rdi callq 0x2030 movq 0x8(%rbx), %rdi callq 0x2030 movq %rbx, %rdi popq %rbx jmp 0x2030 retq
/maximilianvoss[P]ctemplate/libs/json2map/map2json.c
stringlib_splitTokens
stringlib_tokens_t *stringlib_splitTokens(char *str, char chr) { char *lastPos; char *newPos; stringlib_tokens_t *tokens = NULL; stringlib_tokens_t *currentToken; stringlib_tokens_t *newToken; newPos = str; lastPos = str; while ( *newPos != '\0' ) { if ( *newPos == chr ) { newToken = (stringlib_tokens_t *) malloc(sizeof(stringlib_tokens_t)); newToken->next = NULL; if ( tokens == NULL ) { tokens = newToken; currentToken = newToken; } else { currentToken->next = newToken; currentToken = newToken; } currentToken->start = ( lastPos - str ); currentToken->length = ( newPos - lastPos ); lastPos = newPos + 1; } newPos++; } if ( newPos != str ) { newToken = (stringlib_tokens_t *) malloc(sizeof(stringlib_tokens_t)); newToken->next = NULL; if ( tokens == NULL ) { tokens = newToken; currentToken = newToken; } else { currentToken->next = newToken; currentToken = newToken; } currentToken->start = ( lastPos - str ); currentToken->length = ( newPos - lastPos ); } return tokens; }
movb (%rdi), %al testb %al, %al je 0x4f4b pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebp leaq 0x1(%rdi), %r13 xorl %r12d, %r12d movq %rdi, %r14 movq %rdi, %r15 movq %rdi, (%rsp) cmpb %bpl, %al jne 0x4eff movl $0x18, %edi callq 0x2120 movq $0x0, 0x10(%rax) movq %rax, %rcx testq %r12, %r12 je 0x4ee5 movq %rax, 0x10(%rbx) movq %r12, %rcx movq %r14, %rdx subq %r15, %rdx subq (%rsp), %r15 movq %r15, (%rax) movq %rdx, 0x8(%rax) movq %r13, %r15 movq %rcx, %r12 movq %rax, %rbx movb (%r13), %al incq %r14 incq %r13 testb %al, %al jne 0x4ebf movl $0x18, %edi callq 0x2120 movq %rax, %rcx movq $0x0, 0x10(%rax) testq %r12, %r12 je 0x4f2e movq %rcx, 0x10(%rbx) movq %r12, %rax subq %r15, %r14 subq (%rsp), %r15 movq %r15, (%rcx) movq %r14, 0x8(%rcx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax retq
/maximilianvoss[P]ctemplate/libs/json2map/stringlib.c
stringlib_isInteger
int stringlib_isInteger(char *str) { char *ptr = str; if ( *ptr == '\0' ) { return 0; } while ( *ptr != '\0' ) { if ( ( *ptr < 48 || *ptr > 57 ) && *ptr != '.' ) { return 0; } ptr++; } return 1; }
movb (%rdi), %cl xorl %eax, %eax testb %cl, %cl je 0x4f93 incq %rdi leal -0x30(%rcx), %edx cmpb $0xa, %dl setae %dl cmpb $0x2e, %cl setne %cl testb %dl, %cl jne 0x4f93 movb (%rdi), %cl incq %rdi testb %cl, %cl jne 0x4f72 movl $0x1, %eax retq
/maximilianvoss[P]ctemplate/libs/json2map/stringlib.c
jsmn_parse
int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens) { int r; int i; jsmntok_t *token; int count = parser->toknext; for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { char c; jsmntype_t type; c = js[parser->pos]; switch (c) { case '{': case '[': count++; if (tokens == NULL) { break; } token = jsmn_alloc_token(parser, tokens, num_tokens); if (token == NULL) return JSMN_ERROR_NOMEM; if (parser->toksuper != -1) { tokens[parser->toksuper].size++; #ifdef JSMN_PARENT_LINKS token->parent = parser->toksuper; #endif } token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); token->start = parser->pos; parser->toksuper = parser->toknext - 1; break; case '}': case ']': if (tokens == NULL) break; type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); #ifdef JSMN_PARENT_LINKS if (parser->toknext < 1) { return JSMN_ERROR_INVAL; } token = &tokens[parser->toknext - 1]; for (;;) { if (token->start != -1 && token->end == -1) { if (token->type != type) { return JSMN_ERROR_INVAL; } token->end = parser->pos + 1; parser->toksuper = token->parent; break; } if (token->parent == -1) { break; } token = &tokens[token->parent]; } #else for (i = parser->toknext - 1; i >= 0; i--) { token = &tokens[i]; if (token->start != -1 && token->end == -1) { if (token->type != type) { return JSMN_ERROR_INVAL; } parser->toksuper = -1; token->end = parser->pos + 1; break; } } /* Error if unmatched closing bracket */ if (i == -1) return JSMN_ERROR_INVAL; for (; i >= 0; i--) { token = &tokens[i]; if (token->start != -1 && token->end == -1) { parser->toksuper = i; break; } } #endif break; case '\"': r = jsmn_parse_string(parser, js, len, tokens, num_tokens); if (r < 0) return r; count++; if (parser->toksuper != -1 && tokens != NULL) tokens[parser->toksuper].size++; break; case '\t' : case '\r' : case '\n' : case ' ': break; case ':': parser->toksuper = parser->toknext - 1; break; case ',': if (tokens != NULL && parser->toksuper != -1 && tokens[parser->toksuper].type != JSMN_ARRAY && tokens[parser->toksuper].type != JSMN_OBJECT) { #ifdef JSMN_PARENT_LINKS parser->toksuper = tokens[parser->toksuper].parent; #else for (i = parser->toknext - 1; i >= 0; i--) { if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { if (tokens[i].start != -1 && tokens[i].end == -1) { parser->toksuper = i; break; } } } #endif } break; #ifdef JSMN_STRICT /* In strict mode primitives are: numbers and booleans */ case '-': case '0': case '1' : case '2': case '3' : case '4': case '5': case '6': case '7' : case '8': case '9': case 't': case 'f': case 'n' : /* And they must not be keys of the object */ if (tokens != NULL && parser->toksuper != -1) { jsmntok_t *t = &tokens[parser->toksuper]; if (t->type == JSMN_OBJECT || (t->type == JSMN_STRING && t->size != 0)) { return JSMN_ERROR_INVAL; } } #else /* In non-strict mode every unquoted value is a primitive */ default: #endif r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); if (r < 0) return r; count++; if (parser->toksuper != -1 && tokens != NULL) tokens[parser->toksuper].size++; break; #ifdef JSMN_STRICT /* Unexpected char in strict mode */ default: return JSMN_ERROR_INVAL; #endif } } if (tokens != NULL) { for (i = parser->toknext - 1; i >= 0; i--) { /* Unmatched opened object or array */ if (tokens[i].start != -1 && tokens[i].end == -1) { return JSMN_ERROR_PART; } } } return count; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %r8d, -0x14(%rsp) movl (%rdi), %r14d movl 0x4(%rdi), %r12d cmpq %rdx, %r14 jae 0x546b leaq 0x8(%rcx), %rax movq %rax, -0x10(%rsp) movl %r12d, %r15d movl %r12d, %r9d movl %r12d, %r10d movl %r14d, %r11d movb (%rsi,%r14), %al movzbl %al, %ebp cmpl $0x2b, %ebp jle 0x501c cmpl $0x5c, %ebp jg 0x5155 cmpl $0x2c, %ebp je 0x52d0 cmpl $0x3a, %ebp je 0x5359 movl %r11d, %r13d cmpl $0x5b, %ebp je 0x526b jmp 0x51d0 cmpl $0xc, %ebp jle 0x51b9 cmpl $0xd, %ebp je 0x5336 cmpl $0x20, %ebp je 0x5336 movl %r11d, %r13d cmpl $0x22, %ebp jne 0x51d0 leal 0x1(%r11), %r14d movl %r14d, (%rdi) cmpq %rdx, %r14 jae 0x54a1 movl %r9d, -0x4(%rsp) movq %r14, %rbp movl %r14d, %r13d movzbl (%rsi,%rbp), %eax cmpl $0x5c, %eax je 0x507d testl %eax, %eax je 0x54a1 cmpl $0x22, %eax jne 0x511d jmp 0x53d9 leal 0x1(%r13), %ebp cmpq %rdx, %rbp jae 0x511d movl %ebp, (%rdi) movzbl (%rsi,%rbp), %r9d leal -0x2f(%r9), %eax cmpl $0x37, %eax jbe 0x5135 movl $0xfffffffe, %eax # imm = 0xFFFFFFFE leal -0x6e(%r9), %ebx cmpl $0x7, %ebx ja 0x514a leaq 0x190d(%rip), %r8 # 0x69c4 movslq (%r8,%rbx,4), %r9 addq %r8, %r9 jmpq *%r9 addl $0x2, %r13d movl %r13d, (%rdi) movl $0x4, %r9d movl %r13d, %ebp movl %ebp, %ebx cmpq %rdx, %rbx jae 0x5119 movb (%rsi,%rbx), %r13b testb %r13b, %r13b je 0x5119 leal -0x30(%r13), %ebx cmpb $0xa, %bl jb 0x5110 movzbl %r13b, %r13d addl $-0x41, %r13d cmpl $0x25, %r13d ja 0x54a6 movabsq $0x3f0000003f, %r8 # imm = 0x3F0000003F btq %r13, %r8 jae 0x54a6 incl %ebp movl %ebp, (%rdi) decl %r9d jne 0x50d1 decl %ebp jmp 0x5120 movl %r13d, %ebp incl %ebp movl %ebp, (%rdi) movl %ebp, %r13d cmpq %rdx, %rbp jb 0x505e jmp 0x54a1 movabsq $0x88200000000001, %r8 # imm = 0x88200000000001 btq %rax, %r8 jb 0x5120 jmp 0x509e cmpl $0x22, %r9d je 0x5120 jmp 0x54a6 cmpl $0x5d, %ebp je 0x516b cmpl $0x7b, %ebp je 0x526b movl %r11d, %r13d cmpl $0x7d, %ebp jne 0x51d0 testq %rcx, %rcx je 0x5336 xorl %r9d, %r9d cmpb $0x7d, %al setne %al movl %r12d, %ebp decl %ebp js 0x536b movb %al, %r9b incl %r9d movl %ebp, %ebx leaq 0x1(%rbx), %rax shlq $0x4, %rbx addq -0x10(%rsp), %rbx cmpl $-0x1, -0x4(%rbx) je 0x51ab cmpl $-0x1, (%rbx) je 0x5381 addq $-0x10, %rbx decq %rax jg 0x519c jmp 0x54ae leal -0x9(%rbp), %eax cmpl $0x2, %eax jb 0x5336 movl %r11d, %r13d testl %ebp, %ebp je 0x54d9 movzbl (%rsi,%r14), %eax cmpq $0x3a, %rax ja 0x51eb movabsq $0x400100100002601, %r8 # imm = 0x400100100002601 btq %rax, %r8 jb 0x520d cmpl $0x5d, %eax je 0x520d cmpl $0x7d, %eax je 0x520d addb $-0x7f, %al cmpb $-0x5f, %al jb 0x54ca incl %r13d movl %r13d, (%rdi) movq %r13, %r14 cmpq %rdx, %r13 jb 0x51d0 testq %rcx, %rcx je 0x5370 cmpl -0x14(%rsp), %r12d jae 0x54de movl %r12d, %eax incl %r12d movl %r12d, 0x4(%rdi) shlq $0x4, %rax movl $0x4, (%rcx,%rax) movl %r11d, 0x4(%rcx,%rax) movl %r13d, 0x8(%rcx,%rax) movl $0x0, 0xc(%rcx,%rax) decl %r13d incl %r10d movslq 0x8(%rdi), %rax cmpq $-0x1, %rax je 0x5260 shlq $0x4, %rax incl 0xc(%rcx,%rax) movl %r12d, %ebp movl %r12d, %r9d jmp 0x542e incl %r10d testq %rcx, %rcx je 0x5336 cmpl -0x14(%rsp), %r12d jae 0x54d1 movl %r12d, %r9d leal 0x1(%r12), %ebp movl %ebp, 0x4(%rdi) shlq $0x4, %r9 movl $0xffffffff, %r8d # imm = 0xFFFFFFFF movq %r8, 0x8(%rcx,%r9) movslq 0x8(%rdi), %rbx cmpq $-0x1, %rbx je 0x52ae shlq $0x4, %rbx incl 0xc(%rcx,%rbx) addq %rcx, %r9 xorl %r8d, %r8d cmpb $0x7b, %al setne %r8b incl %r8d movl %r8d, (%r9) movl %r11d, 0x4(%r9) movl %r12d, 0x8(%rdi) movl %ebp, %r12d movl %ebp, %r9d jmp 0x533c testq %rcx, %rcx je 0x5336 movslq 0x8(%rdi), %rax cmpq $-0x1, %rax je 0x5336 shlq $0x4, %rax movl (%rcx,%rax), %eax decl %eax cmpl $0x2, %eax jb 0x5336 movl %r9d, %eax decl %eax js 0x5336 movl %r9d, %r8d movl %eax, %eax movq %rax, %r9 shlq $0x4, %r9 addq -0x10(%rsp), %r9 movl -0x8(%r9), %ebx decl %ebx cmpl $0x1, %ebx ja 0x5321 cmpl $-0x1, -0x4(%r9) je 0x5321 cmpl $-0x1, (%r9) je 0x545a leaq -0x1(%rax), %rbx addq $-0x10, %r9 testq %rax, %rax movq %rbx, %rax jg 0x5305 jmp 0x545d movl %r12d, %ebp movl %r15d, %r12d movl %r12d, %r15d incl %r11d movl %r11d, (%rdi) movl %ebp, %r12d movq %r11, %r14 cmpq %rdx, %r11 jb 0x4fe4 jmp 0x5471 leal -0x1(%r15), %eax movl %eax, 0x8(%rdi) movl %r12d, %ebp movl %r15d, %r12d movl %r15d, %r9d jmp 0x533c movl %r12d, %eax jmp 0x539c decl %r13d incl %r10d movl %r12d, %ebp movl %r15d, %r12d jmp 0x542e cmpl %r9d, -0x8(%rbx) jne 0x54ae leal -0x1(%rax), %ebp movl $0xffffffff, 0x8(%rdi) # imm = 0xFFFFFFFF leal 0x1(%r11), %r8d movl %r8d, (%rbx) testl %eax, %eax je 0x54ae testl %ebp, %ebp js 0x5439 movl %ebp, %eax movq %rax, %r9 shlq $0x4, %r9 addq -0x10(%rsp), %r9 cmpl $-0x1, -0x4(%r9) je 0x53c7 cmpl $-0x1, (%r9) je 0x5436 leaq -0x1(%rax), %r8 addq $-0x10, %r9 testq %rax, %rax movq %r8, %rax jg 0x53ba jmp 0x5439 testq %rcx, %rcx je 0x5444 cmpl -0x14(%rsp), %r15d jae 0x54de movl %r15d, %eax incl %r15d movl %r15d, 0x4(%rdi) shlq $0x4, %rax movl $0x3, (%rcx,%rax) movl %r14d, 0x4(%rcx,%rax) movl %r13d, 0x8(%rcx,%rax) movl $0x0, 0xc(%rcx,%rax) incl %r10d movslq 0x8(%rdi), %rax cmpq $-0x1, %rax je 0x5425 shlq $0x4, %rax incl 0xc(%rcx,%rax) movl %r15d, %ebp movl %r15d, %r12d movl %r15d, %r9d movl %r13d, %r11d jmp 0x533c movl %eax, 0x8(%rdi) movl %r12d, %ebp movl %r12d, %r9d jmp 0x533c incl %r10d movl %r12d, %ebp movl %r15d, %r12d movl %r13d, %r11d movl -0x4(%rsp), %r9d jmp 0x533c movl %eax, 0x8(%rdi) movl %r12d, %ebp movl %r15d, %r12d movl %r8d, %r9d jmp 0x533c movl %r12d, %ebp movl %r12d, %r10d testq %rcx, %rcx je 0x54bc decl %ebp js 0x54bc movl %ebp, %edx leaq 0x1(%rdx), %rax shlq $0x4, %rdx addq %rdx, %rcx addq $0x8, %rcx cmpl $-0x1, -0x4(%rcx) je 0x5496 cmpl $-0x1, (%rcx) je 0x54b6 addq $-0x10, %rcx decq %rax jg 0x548b jmp 0x54bc movl $0xfffffffd, %eax # imm = 0xFFFFFFFD movl %r11d, (%rdi) movl %eax, %r10d jmp 0x54bc movl $0xfffffffe, %r10d # imm = 0xFFFFFFFE jmp 0x54bc movl $0xfffffffd, %r10d # imm = 0xFFFFFFFD movl %r10d, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xfffffffe, %eax # imm = 0xFFFFFFFE jmp 0x54a6 movl $0xffffffff, %r10d # imm = 0xFFFFFFFF jmp 0x54bc movl %r12d, %ebp jmp 0x5471 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x54a6
/maximilianvoss[P]ctemplate/libs/json2map/jsmn.c
safe_create
csafestring_t *safe_create(char *str) { csafestring_t *obj = (csafestring_t *) malloc(sizeof(csafestring_t)); #ifdef EXPERIMENTAL_SIZING obj->sizing_size = safe_getInitSize(); obj->buffer_length = 1<<obj->sizing_size; sizing_size += obj->sizing_size; #else obj->buffer_length = INIT_LENGTH_CALC; #endif if ( str == NULL ) { obj->data = (char *) calloc(sizeof(char), obj->buffer_length); } else { size_t newLength = strlen(str) + 1; while ( obj->buffer_length < newLength ) { obj->buffer_length <<= 1; #ifdef EXPERIMENTAL_SIZING obj->sizing_size++; sizing_size++; #endif } obj->data = (char *) malloc(obj->buffer_length); strcpy(obj->data, str); } #ifdef EXPERIMENTAL_SIZING sizing_count++; #endif return obj; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x10, %edi callq 0x2120 movq %rax, %rbx movq $0x8, 0x8(%rax) testq %r14, %r14 je 0x5549 movq %r14, %rdi callq 0x2070 incq %rax movl $0x8, %ecx movq %rcx, %rdi addq %rcx, %rcx cmpq %rax, %rdi jb 0x5525 movq %rdi, 0x8(%rbx) callq 0x2120 movq %rax, (%rbx) movq %rax, %rdi movq %r14, %rsi callq 0x2060 jmp 0x555b movl $0x1, %edi movl $0x8, %esi callq 0x20e0 movq %rax, (%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
/maximilianvoss[P]ctemplate/libs/json2map/libs/csafestring/csafestring.c
safe_clone
csafestring_t *safe_clone(csafestring_t *obj) { csafestring_t *clone = (csafestring_t *) malloc(sizeof(csafestring_t)); clone->buffer_length = obj->buffer_length; clone->data = malloc(clone->buffer_length); memcpy(clone->data, obj->data, clone->buffer_length); #ifdef EXPERIMENTAL_SIZING clone->sizing_size = obj->sizing_size; sizing_size += clone->sizing_size; sizing_count++; #endif return clone; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movl $0x10, %edi callq 0x2120 movq %rax, %r14 movq 0x8(%rbx), %r15 movq %r15, 0x8(%rax) movq %r15, %rdi callq 0x2120 movq %rax, (%r14) movq (%rbx), %rsi movq %rax, %rdi movq %r15, %rdx callq 0x2110 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq
/maximilianvoss[P]ctemplate/libs/json2map/libs/csafestring/csafestring.c
safe_destroy
void safe_destroy(csafestring_t *obj) { if ( obj == NULL ) { return; } if ( obj->data != NULL ) { free(obj->data); } #ifdef EXPERIMENTAL_SIZING sizing_size -= obj->sizing_size; sizing_count--; #endif free(obj); }
testq %rdi, %rdi je 0x55c4 pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x55bb callq 0x2030 movq %rbx, %rdi popq %rbx jmp 0x2030 retq
/maximilianvoss[P]ctemplate/libs/json2map/libs/csafestring/csafestring.c
safe_resizeBuffer
void safe_resizeBuffer(csafestring_t *obj, size_t newLength) { char hit = 0; newLength++; while ( obj->buffer_length < newLength ) { hit = 1; obj->buffer_length <<= 1; #ifdef EXPERIMENTAL_SIZING obj->sizing_size++; sizing_size++; #endif } if ( hit ) { char *tmp = (char *) calloc(sizeof(char), obj->buffer_length); memmove(tmp, obj->data, strlen(obj->data)); free(obj->data); obj->data = tmp; } }
incq %rsi movq 0x8(%rdi), %rcx cmpq %rsi, %rcx jae 0x5626 pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq %rcx, %rax addq %rax, %rax cmpq %rsi, %rax jb 0x55dc movq %rax, 0x8(%rbx) cmpq %rsi, %rcx jae 0x5621 movl $0x1, %edi movq %rax, %rsi callq 0x20e0 movq %rax, %r14 movq (%rbx), %r15 movq %r15, %rdi callq 0x2070 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x2130 movq %r15, %rdi callq 0x2030 movq %r14, (%rbx) popq %rbx popq %r14 popq %r15 retq
/maximilianvoss[P]ctemplate/libs/json2map/libs/csafestring/csafestring.c
safe_strncmp
int safe_strncmp(csafestring_t *obj, const char *str, size_t size) { size_t length = size; if ( str == NULL ) { return 1; } size_t strLength = strlen(str); if ( obj->buffer_length < length ) { length = obj->buffer_length; } if ( strLength < length ) { length = strLength; } return strncmp(obj->data, str, length); }
testq %rsi, %rsi je 0x56b4 pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi callq 0x2070 movq 0x8(%r15), %rcx cmpq %rbx, %rcx cmovbq %rcx, %rbx cmpq %rbx, %rax cmovbq %rax, %rbx movq (%r15), %rdi movq %r14, %rsi movq %rbx, %rdx popq %rbx popq %r14 popq %r15 jmp 0x2050 movl $0x1, %eax retq
/maximilianvoss[P]ctemplate/libs/json2map/libs/csafestring/csafestring.c
Test_Versioning::~Test_Versioning()
Q_OBJECT private slots: void TestPrefixSameVersion() { bool needsUpgrade; needsUpgrade = QSimpleUpdater::compareVersions("0.0.1", "0.0.1"); QVERIFY(!needsUpgrade); needsUpgrade = QSimpleUpdater::compareVersions("0.0.1", "v0.0.1"); QVERIFY(!needsUpgrade); needsUpgrade = QSimpleUpdater::compareVersions("v0.0.1", "0.0.1"); QVERIFY(!needsUpgrade); needsUpgrade = QSimpleUpdater::compareVersions("v0.0.1", "v0.0.1"); QVERIFY(!needsUpgrade); }
pushq %rbx movq %rdi, %rbx callq 0x98a0 movl $0x10, %esi movq %rbx, %rdi popq %rbx jmp 0x90f0 nop
/alex-spataru[P]QSimpleUpdater/build_O3/UnitTests_autogen/KRHXW7JQHD/../../../tests/Test_Versioning.h
QSimpleUpdater::~QSimpleUpdater()
QSimpleUpdater::~QSimpleUpdater() { URLS.clear(); foreach (Updater *updater, UPDATERS) updater->deleteLater(); UPDATERS.clear(); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leaq 0x12cc1(%rip), %rax # 0x20290 addq $0x10, %rax movq %rax, (%rdi) leaq 0x1478b(%rip), %rdi # 0x21d68 callq 0xe342 movq 0x14797(%rip), %r14 # 0x21d80 movq 0x14798(%rip), %r15 # 0x21d88 movq 0x14799(%rip), %r12 # 0x21d90 testq %r14, %r14 je 0xd600 lock incl (%r14) testq %r12, %r12 je 0xd61e shlq $0x3, %r12 xorl %r13d, %r13d movq (%r15,%r13), %rdi callq 0x9270 addq $0x8, %r13 cmpq %r13, %r12 jne 0xd60c testq %r14, %r14 je 0xd63b lock decl (%r14) jne 0xd63b movl $0x8, %esi movl $0x8, %edx movq %r14, %rdi callq 0x9570 leaq 0x1473e(%rip), %rdi # 0x21d80 callq 0xe3e6 movq %rbx, %rdi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x98a0 jmp 0xd65a movq %rax, %rdi callq 0xe3da
/alex-spataru[P]QSimpleUpdater/src/QSimpleUpdater.cpp
QSimpleUpdater::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
void QSimpleUpdater::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { auto *_t = static_cast<QSimpleUpdater *>(_o); (void)_t; switch (_id) { case 0: _t->checkingFinished((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1]))); break; case 1: _t->appcastDownloaded((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QByteArray>>(_a[2]))); break; case 2: _t->downloadFinished((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 3: _t->checkForUpdates((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1]))); break; case 4: _t->setDownloadDir((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 5: _t->setModuleName((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 6: _t->setNotifyOnUpdate((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 7: _t->setNotifyOnFinish((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 8: _t->setPlatformKey((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 9: _t->setModuleVersion((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 10: _t->setDownloaderEnabled((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 11: _t->setUserAgentString((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 12: _t->setUseCustomAppcast((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 13: _t->setUseCustomInstallProcedures((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 14: _t->setMandatoryUpdate((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<bool>>(_a[2]))); break; case 15: _t->setDownloadUserName((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; case 16: _t->setDownloadPassword((*reinterpret_cast< std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); { using _t = void (QSimpleUpdater::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&QSimpleUpdater::checkingFinished)) { *result = 0; return; } } { using _t = void (QSimpleUpdater::*)(const QString & , const QByteArray & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&QSimpleUpdater::appcastDownloaded)) { *result = 1; return; } } { using _t = void (QSimpleUpdater::*)(const QString & , const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&QSimpleUpdater::downloadFinished)) { *result = 2; return; } } } }
pushq %rbx subq $0x20, %rsp cmpl $0x5, %esi je 0xdfa7 testl %esi, %esi jne 0xe14e cmpl $0x10, %edx ja 0xe14e movl %edx, %eax leaq 0xa602(%rip), %rdx # 0x18580 movslq (%rdx,%rax,4), %rax addq %rdx, %rax jmpq *%rax movq 0x8(%rcx), %rax movq %rsp, %rcx movq $0x0, (%rcx) movq %rax, 0x8(%rcx) leaq 0x12360(%rip), %rsi # 0x20300 xorl %edx, %edx jmp 0xe149 movq (%rcx), %rax movq 0x8(%rcx), %rdx movq (%rdx), %rcx movq 0x8(%rdx), %rdx leaq 0x230(%rip), %rsi # 0xe1ec xorq %rcx, %rsi orq %rdx, %rsi jne 0xdfcf movl $0x0, (%rax) jmp 0xe14e leaq 0x23c(%rip), %rsi # 0xe212 xorq %rcx, %rsi orq %rdx, %rsi jne 0xdfe9 movl $0x1, (%rax) jmp 0xe14e xorq 0x12fb0(%rip), %rcx # 0x20fa0 orq %rdx, %rcx jne 0xe14e movl $0x2, (%rax) jmp 0xe14e movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x102e4 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x102d2 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0xfc66 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x102aa movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x102c0 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x10298 movq %rsp, %rax movq $0x0, (%rax) movups 0x8(%rcx), %xmm0 movups %xmm0, 0x8(%rax) leaq 0x12231(%rip), %rsi # 0x20300 movl $0x2, %edx jmp 0xe146 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x102d8 movq 0x8(%rcx), %rsi callq 0xdb96 movq %rax, %rdi addq $0x20, %rsp popq %rbx jmp 0xfff2 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x10292 movq %rsp, %rax movq $0x0, (%rax) movups 0x8(%rcx), %xmm0 movups %xmm0, 0x8(%rax) leaq 0x121bf(%rip), %rsi # 0x20300 movl $0x1, %edx movq %rax, %rcx callq 0x93a0 addq $0x20, %rsp popq %rbx retq movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x10280 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x102c6 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x1028c movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rax movzbl (%rax), %ebx callq 0xdb96 movq %rax, %rdi movl %ebx, %esi addq $0x20, %rsp popq %rbx jmp 0x102a4 movq 0x8(%rcx), %rsi movq 0x10(%rcx), %rbx callq 0xdb96 movq %rax, %rdi movq %rbx, %rsi addq $0x20, %rsp popq %rbx jmp 0x102b6 nop
/alex-spataru[P]QSimpleUpdater/build_O3/QSimpleUpdater_autogen/include/moc_QSimpleUpdater.cpp
Updater::~Updater()
Updater::~Updater() { delete m_downloader; }
pushq %rbx movq %rdi, %rbx leaq 0x10845(%rip), %rax # 0x204e0 addq $0x10, %rax movq %rax, (%rdi) movq 0x120(%rdi), %rdi testq %rdi, %rdi je 0xfcb4 movq (%rdi), %rax callq *0x20(%rax) movq 0x108(%rbx), %rax testq %rax, %rax je 0xfcdb lock decl (%rax) jne 0xfcdb movq 0x108(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xf0(%rbx), %rax testq %rax, %rax je 0xfd02 lock decl (%rax) jne 0xfd02 movq 0xf0(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xd8(%rbx), %rax testq %rax, %rax je 0xfd29 lock decl (%rax) jne 0xfd29 movq 0xd8(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xc0(%rbx), %rax testq %rax, %rax je 0xfd50 lock decl (%rax) jne 0xfd50 movq 0xc0(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xa8(%rbx), %rax testq %rax, %rax je 0xfd77 lock decl (%rax) jne 0xfd77 movq 0xa8(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x90(%rbx), %rax testq %rax, %rax je 0xfd9e lock decl (%rax) jne 0xfd9e movq 0x90(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x78(%rbx), %rax testq %rax, %rax je 0xfdbf lock decl (%rax) jne 0xfdbf movq 0x78(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x60(%rbx), %rax testq %rax, %rax je 0xfde0 lock decl (%rax) jne 0xfde0 movq 0x60(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x48(%rbx), %rax testq %rax, %rax je 0xfe01 lock decl (%rax) jne 0xfe01 movq 0x48(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x28(%rbx), %rax testq %rax, %rax je 0xfe22 lock decl (%rax) jne 0xfe22 movq 0x28(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x10(%rbx), %rax testq %rax, %rax je 0xfe43 lock decl (%rax) jne 0xfe43 movq 0x10(%rbx), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq %rbx, %rdi popq %rbx jmp 0x98a0
/alex-spataru[P]QSimpleUpdater/src/Updater.cpp
Updater::onReply(QNetworkReply*)
void Updater::onReply(QNetworkReply *reply) { /* Check if we need to redirect */ QUrl redirect = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); if (!redirect.isEmpty()) { setUrl(redirect.toString()); checkForUpdates(); return; } /* There was a network error */ if (reply->error() != QNetworkReply::NoError) { setUpdateAvailable(false); emit checkingFinished(url()); return; } /* The application wants to interpret the appcast by itself */ if (customAppcast()) { emit appcastDownloaded(url(), reply->readAll()); emit checkingFinished(url()); return; } /* Try to create a JSON document from downloaded data */ QJsonDocument document = QJsonDocument::fromJson(reply->readAll()); /* JSON is invalid */ if (document.isNull()) { setUpdateAvailable(false); emit checkingFinished(url()); return; } /* Get the platform information */ QJsonObject updates = document.object().value("updates").toObject(); QJsonObject platform = updates.value(platformKey()).toObject(); /* Get update information */ m_openUrl = platform.value("open-url").toString(); m_changelog = platform.value("changelog").toString(); m_downloadUrl = platform.value("download-url").toString(); m_latestVersion = platform.value("latest-version").toString(); if (platform.contains("mandatory-update")) m_mandatoryUpdate = platform.value("mandatory-update").toBool(); /* Compare latest and current version */ setUpdateAvailable(compare(latestVersion(), moduleVersion())); emit checkingFinished(url()); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x20(%rsp), %r15 movq %r15, %rdi movl $0x2, %edx callq 0x9d20 leaq 0x88(%rsp), %rdi movq %r15, %rsi callq 0x9a90 leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x9340 leaq 0x88(%rsp), %rdi callq 0x9810 testb %al, %al je 0x103a4 movq %r14, %rdi callq 0x9b50 testl %eax, %eax je 0x103f7 movq %rbx, %rdi xorl %esi, %esi callq 0x10ec8 movq 0x10(%rbx), %rax movq %rax, 0x20(%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x10380 lock incl (%rax) movq %rsp, %rcx movq $0x0, (%rcx) movq %r15, 0x8(%rcx) leaq 0x101bb(%rip), %rsi # 0x20550 movq %rbx, %rdi xorl %edx, %edx callq 0x93a0 jmp 0x104e7 leaq 0x20(%rsp), %rdi leaq 0x88(%rsp), %rsi xorl %edx, %edx callq 0x92d0 leaq 0x10(%rbx), %rdi leaq 0x20(%rsp), %r14 movq %r14, %rsi callq 0x9d40 movq (%r14), %rax testq %rax, %rax je 0x103ea lock decl (%rax) jne 0x103ea movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq %rbx, %rdi callq 0xfff2 jmp 0x10c13 cmpb $0x1, 0x40(%rbx) jne 0x10517 movq 0x10(%rbx), %rax movq %rax, (%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x10423 lock incl (%rax) leaq 0x40(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x9310 leaq 0x20(%rsp), %r14 movq $0x0, (%r14) movq %rsp, %rax movq %rax, 0x8(%r14) movq %r15, 0x10(%r14) leaq 0x100ff(%rip), %rsi # 0x20550 movq %rbx, %rdi movl $0x2, %edx movq %r14, %rcx callq 0x93a0 movq 0x40(%rsp), %rax testq %rax, %rax je 0x10484 lock decl (%rax) jne 0x10484 movq 0x40(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 movq (%rsp), %rax testq %rax, %rax je 0x104a5 lock decl (%rax) jne 0x104a5 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x10(%rbx), %rax movq %rax, 0x20(%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x104c8 lock incl (%rax) movq %rsp, %rcx movq $0x0, (%rcx) movq %r14, 0x8(%rcx) leaq 0x10073(%rip), %rsi # 0x20550 movq %rbx, %rdi xorl %edx, %edx callq 0x93a0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x10c13 lock decl (%rax) jne 0x10c13 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10c13 leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x9310 leaq 0x80(%rsp), %rdi leaq 0x20(%rsp), %r14 movq %r14, %rsi xorl %edx, %edx callq 0x9960 movq 0x20(%rsp), %rax testq %rax, %rax je 0x1055e lock decl (%rax) jne 0x1055e movq 0x20(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 leaq 0x80(%rsp), %rdi callq 0x98f0 testb %al, %al je 0x105eb movq %rbx, %rdi xorl %esi, %esi callq 0x10ec8 movq 0x10(%rbx), %rax movq %rax, 0x20(%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x1059c lock incl (%rax) movq %rsp, %rcx movq $0x0, (%rcx) movq %r14, 0x8(%rcx) leaq 0xff9f(%rip), %rsi # 0x20550 movq %rbx, %rdi xorl %edx, %edx callq 0x93a0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x10c06 lock decl (%rax) jne 0x10c06 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10c06 leaq 0x60(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x9cc0 leaq 0x9582(%rip), %rdx # 0x19b86 leaq 0x20(%rsp), %rdi movl $0x7, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x40(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) movq %rsp, %rdi leaq 0x60(%rsp), %rsi callq 0x9780 leaq 0x90(%rsp), %rdi movq %rsp, %rsi callq 0x99e0 movq %rsp, %rdi callq 0x9900 movq 0x40(%rsp), %rax testq %rax, %rax je 0x10671 lock decl (%rax) jne 0x10671 movq 0x40(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x60(%rsp), %rdi callq 0x9b30 movq 0x60(%rbx), %rax movq %rax, (%rsp) movq 0x68(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0x70(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x1069d lock incl (%rax) leaq 0x20(%rsp), %rdi leaq 0x90(%rsp), %rsi movq %rsp, %rdx callq 0x9780 leaq 0x58(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x99e0 leaq 0x20(%rsp), %rdi callq 0x9900 movq (%rsp), %rax testq %rax, %rax je 0x106ec lock decl (%rax) jne 0x106ec movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x8ccb(%rip), %rdx # 0x193be leaq 0x20(%rsp), %rdi movl $0x8, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) leaq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x9780 movq %rsp, %rdi leaq 0x40(%rsp), %rsi callq 0x9440 movq 0x48(%rbx), %rax movq 0x50(%rbx), %rcx movaps (%rsp), %xmm0 movq %rax, (%rsp) movups %xmm0, 0x48(%rbx) movq %rcx, 0x8(%rsp) movq 0x58(%rbx), %rcx movq 0x10(%rsp), %rdx movq %rdx, 0x58(%rbx) movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x1077c lock decl (%rax) jne 0x1077c movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x40(%rsp), %rdi callq 0x9900 movq 0x60(%rsp), %rax testq %rax, %rax je 0x107a9 lock decl (%rax) jne 0x107a9 movq 0x60(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x8c17(%rip), %rdx # 0x193c7 leaq 0x20(%rsp), %rdi movl $0x9, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) leaq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x9780 movq %rsp, %rdi leaq 0x40(%rsp), %rsi callq 0x9440 movq 0x78(%rbx), %rax movq 0x80(%rbx), %rcx movaps (%rsp), %xmm0 movq %rax, (%rsp) movups %xmm0, 0x78(%rbx) movq %rcx, 0x8(%rsp) movq 0x88(%rbx), %rcx movq 0x10(%rsp), %rdx movq %rdx, 0x88(%rbx) movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x10842 lock decl (%rax) jne 0x10842 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x40(%rsp), %rdi callq 0x9900 movq 0x60(%rsp), %rax testq %rax, %rax je 0x1086f lock decl (%rax) jne 0x1086f movq 0x60(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x8b5b(%rip), %rdx # 0x193d1 leaq 0x20(%rsp), %rdi movl $0xc, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) leaq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x9780 movq %rsp, %rdi leaq 0x40(%rsp), %rsi callq 0x9440 movq 0xa8(%rbx), %rax movq 0xb0(%rbx), %rcx movaps (%rsp), %xmm0 movq %rax, (%rsp) movups %xmm0, 0xa8(%rbx) movq %rcx, 0x8(%rsp) movq 0xb8(%rbx), %rcx movq 0x10(%rsp), %rdx movq %rdx, 0xb8(%rbx) movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x1090e lock decl (%rax) jne 0x1090e movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x40(%rsp), %rdi callq 0x9900 movq 0x60(%rsp), %rax testq %rax, %rax je 0x1093b lock decl (%rax) jne 0x1093b movq 0x60(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x8a9c(%rip), %rdx # 0x193de leaq 0x20(%rsp), %rdi movl $0xe, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) leaq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x9780 movq %rsp, %rdi leaq 0x40(%rsp), %rsi callq 0x9440 movq 0xd8(%rbx), %rax movq 0xe0(%rbx), %rcx movaps (%rsp), %xmm0 movq %rax, (%rsp) movups %xmm0, 0xd8(%rbx) movq %rcx, 0x8(%rsp) movq 0xe8(%rbx), %rcx movq 0x10(%rsp), %rdx movq %rdx, 0xe8(%rbx) movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x109da lock decl (%rax) jne 0x109da movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x40(%rsp), %rdi callq 0x9900 movq 0x60(%rsp), %rax testq %rax, %rax je 0x10a07 lock decl (%rax) jne 0x10a07 movq 0x60(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x89df(%rip), %rdx # 0x193ed leaq 0x20(%rsp), %rdi movl $0x10, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq 0x30(%rsp), %rax movq %rax, 0x10(%rsi) leaq 0x58(%rsp), %rdi callq 0x94f0 movl %eax, %ebp movq (%rsp), %rax testq %rax, %rax je 0x10a5e lock decl (%rax) jne 0x10a5e movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 testb %bpl, %bpl je 0x10ad4 leaq 0x8983(%rip), %rdx # 0x193ed leaq 0x20(%rsp), %rdi movl $0x10, %esi callq 0x9600 movaps 0x20(%rsp), %xmm0 leaq 0x40(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdx) movq %rsp, %rdi leaq 0x58(%rsp), %rsi callq 0x9780 movq %rsp, %rdi xorl %esi, %esi callq 0x9aa0 movb %al, 0x45(%rbx) movq %rsp, %rdi callq 0x9900 movq 0x40(%rsp), %rax testq %rax, %rax je 0x10ad4 lock decl (%rax) jne 0x10ad4 movq 0x40(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xd8(%rbx), %rax movq %rax, 0x20(%rsp) movq 0xe0(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0xe8(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x10b00 lock incl (%rax) movq 0xc0(%rbx), %rax movq %rax, (%rsp) movq 0xc8(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0xd0(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x10b2b lock incl (%rax) leaq 0x20(%rsp), %r14 movq %rsp, %rsi movq %r14, %rdi callq 0xd6fe movzbl %al, %esi movq %rbx, %rdi callq 0x10ec8 movq (%rsp), %rax testq %rax, %rax je 0x10b67 lock decl (%rax) jne 0x10b67 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x20(%rsp), %rax testq %rax, %rax je 0x10b8a lock decl (%rax) jne 0x10b8a movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x10(%rbx), %rax movq %rax, 0x20(%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x10bad lock incl (%rax) movq %rsp, %rcx movq $0x0, (%rcx) movq %r14, 0x8(%rcx) leaq 0xf98e(%rip), %rsi # 0x20550 movq %rbx, %rdi xorl %edx, %edx callq 0x93a0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x10bef lock decl (%rax) jne 0x10bef movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x58(%rsp), %rdi callq 0x9b30 leaq 0x90(%rsp), %rdi callq 0x9b30 leaq 0x80(%rsp), %rdi callq 0x9040 leaq 0x88(%rsp), %rdi callq 0x9190 addq $0x98, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %rsp, %rdi callq 0x9900 jmp 0x10c3e movq %rax, %rbx movq 0x40(%rsp), %rax testq %rax, %rax je 0x10dbf lock decl (%rax) jne 0x10dbf movq 0x40(%rsp), %rdi jmp 0x10ce5 jmp 0x10cf9 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x10dbf leaq 0x20(%rsp), %rsi callq 0x9dd4 jmp 0x10dbf movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x10dbf lock decl (%rax) jne 0x10dbf movq (%rsp), %rdi jmp 0x10ce5 jmp 0x10cf9 jmp 0x10cb7 jmp 0x10cc6 jmp 0x10cf9 jmp 0x10cb7 jmp 0x10cc6 jmp 0x10cf9 jmp 0x10cb7 jmp 0x10cc6 jmp 0x10cf9 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x9900 jmp 0x10cc9 movq %rax, %rbx movq 0x60(%rsp), %rax testq %rax, %rax je 0x10dbf lock decl (%rax) jne 0x10dbf movq 0x60(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10dbf movq %rax, %rbx jmp 0x10dbf movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x9900 jmp 0x10d13 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x10dc9 lock decl (%rax) jne 0x10dc9 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10dc9 movq %rax, %rbx movq %rsp, %rdi callq 0x9900 jmp 0x10d51 movq %rax, %rbx movq 0x40(%rsp), %rax testq %rax, %rax je 0x10d79 lock decl (%rax) jne 0x10d79 movq 0x40(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10d79 movq %rax, %rbx leaq 0x60(%rsp), %rdi jmp 0x10dd1 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x10dd6 leaq 0x20(%rsp), %rsi callq 0x9ded jmp 0x10dd6 jmp 0x10e7e movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x10db2 movq %rsp, %rsi callq 0x9dbb movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x9d9a leaq 0x58(%rsp), %rdi callq 0x9b30 leaq 0x90(%rsp), %rdi callq 0x9b30 leaq 0x80(%rsp), %rdi callq 0x9040 jmp 0x10eb3 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x10eb3 leaq 0x20(%rsp), %rsi callq 0x9e06 jmp 0x10eb3 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x10eb3 lock decl (%rax) jne 0x10eb3 movq 0x20(%rsp), %rdi movl $0x1, %esi jmp 0x10e72 movq %rax, %rbx movq 0x40(%rsp), %rax testq %rax, %rax je 0x10e5b lock decl (%rax) jne 0x10e5b movq 0x40(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 jmp 0x10e5b jmp 0x10eb0 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x10eb3 lock decl (%rax) jne 0x10eb3 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x10eb3 movq %rax, %rbx jmp 0x10dd6 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x10eb3 leaq 0x20(%rsp), %rsi callq 0x9d81 jmp 0x10eb3 jmp 0x10eb0 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x9340 jmp 0x10ec0 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x9190 movq %rbx, %rdi callq 0x9430
/alex-spataru[P]QSimpleUpdater/src/Updater.cpp
Updater::setUpdateAvailable(bool)
void Updater::setUpdateAvailable(const bool available) { m_updateAvailable = available; QMessageBox box; box.setTextFormat(Qt::RichText); box.setIcon(QMessageBox::Information); if (updateAvailable() && (notifyOnUpdate() || notifyOnFinish())) { QString text = tr("Would you like to download the update now?"); if (m_mandatoryUpdate) { text = tr("Would you like to download the update now?<br />This is a mandatory update, exiting now will close " "the application."); } text += "<br/><br/>"; if (!m_changelog.isEmpty()) text += tr("<strong>Change log:</strong><br/>%1").arg(m_changelog); QString title = "<h3>" + tr("Version %1 of %2 has been released!").arg(latestVersion()).arg(moduleName()) + "</h3>"; box.setText(title); box.setInformativeText(text); box.setStandardButtons(QMessageBox::No | QMessageBox::Yes); box.setDefaultButton(QMessageBox::Yes); if (box.exec() == QMessageBox::Yes) { if (!openUrl().isEmpty()) QDesktopServices::openUrl(QUrl(openUrl())); else if (downloaderEnabled()) { m_downloader->setUrlId(url()); m_downloader->setFileName(downloadUrl().split("/").last()); m_downloader->setMandatoryUpdate(m_mandatoryUpdate); auto url = QUrl(downloadUrl()); url.setUserName(m_downloadUserName); url.setPassword(m_downloadPassword); m_downloader->startDownload(url); } else QDesktopServices::openUrl(QUrl(downloadUrl())); } else { if (m_mandatoryUpdate) { QApplication::quit(); } } } else if (notifyOnFinish()) { box.setStandardButtons(QMessageBox::Close); box.setInformativeText(tr("No updates are available for the moment")); box.setText("<h3>" + tr("Congratulations! You are running the " "latest version of %1") .arg(moduleName()) + "</h3>"); box.exec(); } }
pushq %r14 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rdi, %rbx movb %sil, 0x43(%rdi) leaq 0xc8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x9b60 movq %r14, %rdi movl $0x1, %esi callq 0x9a80 leaq 0xc8(%rsp), %rdi movl $0x1, %esi callq 0x9140 cmpb $0x0, 0x43(%rbx) je 0x11394 cmpb $0x0, 0x41(%rbx) jne 0x10f25 movb 0x42(%rbx), %al cmpb $0x1, %al jne 0x11397 leaq 0xf624(%rip), %rsi # 0x20550 leaq 0x84cb(%rip), %rdx # 0x193fe leaq 0x50(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 cmpb $0x1, 0x45(%rbx) jne 0x10fac leaq 0xf5fe(%rip), %rsi # 0x20550 leaq 0x84d0(%rip), %rdx # 0x19429 movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0x50(%rsp), %rax movups 0x58(%rsp), %xmm0 movaps (%rsp), %xmm1 movq %rax, (%rsp) movaps %xmm1, 0x50(%rsp) movq 0x10(%rsp), %rcx movups %xmm0, 0x8(%rsp) movq %rcx, 0x60(%rsp) testq %rax, %rax je 0x10fac lock decl (%rax) jne 0x10fac movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x84ea(%rip), %rdx # 0x1949d movq %rsp, %rdi movl $0xa, %esi callq 0x9600 leaq 0x50(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x10fee lock decl (%rax) jne 0x10fee movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 cmpq $0x0, 0x88(%rbx) je 0x11086 leaq 0xf54d(%rip), %rsi # 0x20550 leaq 0x849e(%rip), %rdx # 0x194a8 leaq 0x38(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 leaq 0x78(%rbx), %rdx movq %rsp, %rdi leaq 0x38(%rsp), %rsi xorl %ecx, %ecx movl $0x20, %r8d callq 0x9580 leaq 0x50(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x11063 lock decl (%rax) jne 0x11063 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x38(%rsp), %rax testq %rax, %rax je 0x11086 lock decl (%rax) jne 0x11086 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xf4c3(%rip), %rsi # 0x20550 leaq 0x843d(%rip), %rdx # 0x194d1 leaq 0xf0(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0xd8(%rbx), %rax movq %rax, 0xb0(%rsp) movq 0xe0(%rbx), %rcx movq %rcx, 0xb8(%rsp) movq 0xe8(%rbx), %rcx movq %rcx, 0xc0(%rsp) testq %rax, %rax je 0x110de lock incl (%rax) leaq 0x80(%rsp), %rdi leaq 0xf0(%rsp), %rsi leaq 0xb0(%rsp), %rdx xorl %ecx, %ecx movl $0x20, %r8d callq 0x9580 movq 0x90(%rbx), %rax movq %rax, 0x98(%rsp) movq 0x98(%rbx), %rcx movq %rcx, 0xa0(%rsp) movq 0xa0(%rbx), %rcx movq %rcx, 0xa8(%rsp) testq %rax, %rax je 0x11138 lock incl (%rax) leaq 0x68(%rsp), %rdi leaq 0x80(%rsp), %rsi leaq 0x98(%rsp), %rdx xorl %ecx, %ecx movl $0x20, %r8d callq 0x9580 leaq 0x836b(%rip), %rdx # 0x194cc leaq 0x20(%rsp), %rdi movl $0x4, %esi callq 0x9600 leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x91c0 movq 0x20(%rsp), %rax movq %rax, 0x38(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, 0x40(%rsp) testq %rax, %rax je 0x1119b lock incl (%rax) leaq 0x8353(%rip), %rdx # 0x194f5 movq %rsp, %rdi movl $0x5, %esi callq 0x9600 leaq 0x38(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x111dd lock decl (%rax) jne 0x111dd movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x20(%rsp), %rax testq %rax, %rax je 0x11200 lock decl (%rax) jne 0x11200 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x11223 lock decl (%rax) jne 0x11223 movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x98(%rsp), %rax testq %rax, %rax je 0x1124c lock decl (%rax) jne 0x1124c movq 0x98(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x80(%rsp), %rax testq %rax, %rax je 0x11275 lock decl (%rax) jne 0x11275 movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xb0(%rsp), %rax testq %rax, %rax je 0x1129e lock decl (%rax) jne 0x1129e movq 0xb0(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xf0(%rsp), %rax testq %rax, %rax je 0x112c7 lock decl (%rax) jne 0x112c7 movq 0xf0(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xc8(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x9710 leaq 0xc8(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x94b0 leaq 0xc8(%rsp), %rdi movl $0x14000, %esi # imm = 0x14000 callq 0x96c0 leaq 0xc8(%rsp), %rdi movl $0x4000, %esi # imm = 0x4000 callq 0x98d0 leaq 0xc8(%rsp), %rdi callq 0x9ad0 cmpl $0x4000, %eax # imm = 0x4000 jne 0x115d0 movq 0x48(%rbx), %rdi movq 0x58(%rbx), %r14 testq %rdi, %rdi je 0x1134b lock incl (%rdi) lock decl (%rdi) jne 0x1134b movl $0x2, %esi movl $0x8, %edx callq 0x9570 testq %r14, %r14 je 0x115e4 movq 0x48(%rbx), %rax movq %rax, (%rsp) movq 0x50(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0x58(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x11376 lock incl (%rax) leaq 0x20(%rsp), %rdi movq %rsp, %rsi xorl %edx, %edx callq 0x9630 leaq 0x20(%rsp), %rdi callq 0x9820 jmp 0x1181d movb 0x42(%rbx), %al testb $0x1, %al je 0x1188e leaq 0xc8(%rsp), %rdi movl $0x200000, %esi # imm = 0x200000 callq 0x96c0 leaq 0xf198(%rip), %rsi # 0x20550 leaq 0x813c(%rip), %rdx # 0x194fb movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 leaq 0xc8(%rsp), %rdi movq %rsp, %rsi callq 0x94b0 movq (%rsp), %rax testq %rax, %rax je 0x11400 lock decl (%rax) jne 0x11400 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xf149(%rip), %rsi # 0x20550 leaq 0x8115(%rip), %rdx # 0x19523 leaq 0x68(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0x90(%rbx), %rax movq %rax, 0x80(%rsp) movq 0x98(%rbx), %rcx movq %rcx, 0x88(%rsp) movq 0xa0(%rbx), %rcx movq %rcx, 0x90(%rsp) testq %rax, %rax je 0x11455 lock incl (%rax) leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0x80(%rsp), %rdx xorl %ecx, %ecx movl $0x20, %r8d callq 0x9580 leaq 0x8051(%rip), %rdx # 0x194cc leaq 0x38(%rsp), %rdi movl $0x4, %esi callq 0x9600 leaq 0x38(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x91c0 movq 0x38(%rsp), %rax movq %rax, 0x50(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, 0x58(%rsp) testq %rax, %rax je 0x114b5 lock incl (%rax) leaq 0x8039(%rip), %rdx # 0x194f5 movq %rsp, %rdi movl $0x5, %esi callq 0x9600 leaq 0x50(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x114f7 lock decl (%rax) jne 0x114f7 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xc8(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x9710 movq 0x50(%rsp), %rax testq %rax, %rax je 0x1152c lock decl (%rax) jne 0x1152c movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x38(%rsp), %rax testq %rax, %rax je 0x1154f lock decl (%rax) jne 0x1154f movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x20(%rsp), %rax testq %rax, %rax je 0x11572 lock decl (%rax) jne 0x11572 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x80(%rsp), %rax testq %rax, %rax je 0x1159b lock decl (%rax) jne 0x1159b movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x115be lock decl (%rax) jne 0x115be movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xc8(%rsp), %rdi callq 0x9ad0 jmp 0x1188e cmpb $0x1, 0x45(%rbx) jne 0x11848 callq 0x93d0 jmp 0x11848 cmpb $0x1, 0x44(%rbx) jne 0x117d9 movq 0x120(%rbx), %rdi movq 0x10(%rbx), %rax movq %rax, (%rsp) movq 0x18(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0x20(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x11617 lock incl (%rax) movq %rsp, %rsi callq 0x129e6 movq (%rsp), %rax testq %rax, %rax je 0x11640 lock decl (%rax) jne 0x11640 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x120(%rbx), %r14 movq 0xa8(%rbx), %rax movq %rax, 0x68(%rsp) movq 0xb0(%rbx), %rcx movq %rcx, 0x70(%rsp) movq 0xb8(%rbx), %rcx movq %rcx, 0x78(%rsp) testq %rax, %rax je 0x11673 lock incl (%rax) leaq 0x84cb(%rip), %rdx # 0x19b45 movq %rsp, %rdi movl $0x1, %esi callq 0x9600 movaps (%rsp), %xmm0 leaq 0x80(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x10(%rsp), %rax movq %rax, 0x10(%rdx) leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi xorl %ecx, %ecx movl $0x1, %r8d callq 0x9350 leaq 0x20(%rsp), %rdi callq 0x122aa addq $-0x18, %rax movq %r14, %rdi movq %rax, %rsi callq 0x130cc leaq 0x20(%rsp), %rdi callq 0xe466 movq 0x80(%rsp), %rax testq %rax, %rax je 0x11702 lock decl (%rax) jne 0x11702 movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x11725 lock decl (%rax) jne 0x11725 movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x120(%rbx), %rdi movzbl 0x45(%rbx), %esi callq 0x15716 movq 0xa8(%rbx), %rax movq %rax, (%rsp) movq 0xb0(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0xb8(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x11760 lock incl (%rax) leaq 0x20(%rsp), %rdi movq %rsp, %rsi xorl %edx, %edx callq 0x9630 movq (%rsp), %rax testq %rax, %rax je 0x11790 lock decl (%rax) jne 0x11790 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xf0(%rbx), %rsi leaq 0x20(%rsp), %rdi movl $0x2, %edx callq 0x9220 leaq 0x108(%rbx), %rsi leaq 0x20(%rsp), %rdi movl $0x2, %edx callq 0x9660 movq 0x120(%rbx), %rdi leaq 0x20(%rsp), %rsi callq 0x129f0 leaq 0x20(%rsp), %rdi callq 0x9190 jmp 0x11848 movq 0xa8(%rbx), %rax movq %rax, (%rsp) movq 0xb0(%rbx), %rcx movq %rcx, 0x8(%rsp) movq 0xb8(%rbx), %rcx movq %rcx, 0x10(%rsp) testq %rax, %rax je 0x11804 lock incl (%rax) leaq 0x20(%rsp), %rdi movq %rsp, %rsi xorl %edx, %edx callq 0x9630 leaq 0x20(%rsp), %rdi callq 0x9820 leaq 0x20(%rsp), %rdi callq 0x9190 movq (%rsp), %rax testq %rax, %rax je 0x11848 lock decl (%rax) jne 0x11848 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x38(%rsp), %rax testq %rax, %rax je 0x1186b lock decl (%rax) jne 0x1186b movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x50(%rsp), %rax testq %rax, %rax je 0x1188e lock decl (%rax) jne 0x1188e movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xc8(%rsp), %rdi callq 0x9c00 addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x11c23 movq %rsp, %rsi callq 0x9e51 jmp 0x11c23 movq %rax, %rbx jmp 0x11901 jmp 0x1195a movq %rax, %rbx jmp 0x1192a jmp 0x11970 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x11c23 movq %rsp, %rsi callq 0x9e38 jmp 0x11c23 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xe466 movq 0x80(%rsp), %rax testq %rax, %rax je 0x1192a lock decl (%rax) jne 0x1192a movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x11c23 lock decl (%rax) jne 0x11c23 movq 0x68(%rsp), %rdi jmp 0x1198d movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x9190 jmp 0x11c23 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x9190 jmp 0x11973 jmp 0x11970 jmp 0x11c19 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x11c23 lock decl (%rax) jne 0x11c23 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11c23 jmp 0x11c20 jmp 0x11c19 jmp 0x119d3 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x119d6 lock decl (%rax) jne 0x119d6 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x119d6 movq %rax, %rbx movq 0x50(%rsp), %rax testq %rax, %rax je 0x119fe lock decl (%rax) jne 0x119fe movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x119fe movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x11a26 lock decl (%rax) jne 0x11a26 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11a26 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x11a4e lock decl (%rax) jne 0x11a4e movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11a4e movq %rax, %rbx movq 0x80(%rsp), %rax testq %rax, %rax je 0x11a77 lock decl (%rax) jne 0x11a77 movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x11c6e lock decl (%rax) jne 0x11c6e movq 0x68(%rsp), %rdi jmp 0x11c5a jmp 0x11c6b movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x11c6e lock decl (%rax) jne 0x11c6e movq (%rsp), %rdi jmp 0x11c5a jmp 0x11c6b movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x11aed lock decl (%rax) jne 0x11aed movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11aed movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x11b15 lock decl (%rax) jne 0x11b15 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11b15 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x11b3d lock decl (%rax) jne 0x11b3d movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11b3d movq %rax, %rbx movq 0x68(%rsp), %rax testq %rax, %rax je 0x11b65 lock decl (%rax) jne 0x11b65 movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11b65 movq %rax, %rbx movq 0x98(%rsp), %rax testq %rax, %rax je 0x11b8e lock decl (%rax) jne 0x11b8e movq 0x98(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x80(%rsp), %rax testq %rax, %rax je 0x11bbc lock decl (%rax) jne 0x11bbc movq 0x80(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11bbc movq %rax, %rbx movq 0xb0(%rsp), %rax testq %rax, %rax je 0x11be5 lock decl (%rax) jne 0x11be5 movq 0xb0(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0xf0(%rsp), %rax testq %rax, %rax je 0x11c46 lock decl (%rax) jne 0x11c46 movq 0xf0(%rsp), %rdi jmp 0x11c37 jmp 0x11c19 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x11c46 movq %rsp, %rsi callq 0x9e1f jmp 0x11c46 movq %rax, %rbx jmp 0x11c46 jmp 0x11c6b movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x11c46 lock decl (%rax) jne 0x11c46 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x50(%rsp), %rax testq %rax, %rax je 0x11c6e lock decl (%rax) jne 0x11c6e movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x11c6e movq %rax, %rbx leaq 0xc8(%rsp), %rdi callq 0x9c00 movq %rbx, %rdi callq 0x9430 nop
/alex-spataru[P]QSimpleUpdater/src/Updater.cpp
Downloader::startDownload(QUrl const&)
void Downloader::startDownload(const QUrl &url) { /* Reset UI */ m_ui->progressBar->setValue(0); m_ui->stopButton->setText(tr("Stop")); m_ui->downloadLabel->setText(tr("Downloading updates")); m_ui->timeLabel->setText(tr("Time remaining") + ": " + tr("unknown")); /* Configure the network request */ QNetworkRequest request(url); request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) /* 10s timeout */ request.setTransferTimeout(10000); #endif if (!m_userAgentString.isEmpty()) request.setRawHeader("User-Agent", m_userAgentString.toUtf8()); /* Start download */ m_reply = m_manager->get(request); m_startTime = QDateTime::currentDateTime().toSecsSinceEpoch(); /* Ensure that downloads directory exists */ if (!m_downloadDir.exists()) m_downloadDir.mkpath("."); /* Remove old downloads */ QFile::remove(m_downloadDir.filePath(m_fileName)); QFile::remove(m_downloadDir.filePath(m_fileName + PARTIAL_DOWN)); /* Update UI when download progress changes or download finishes */ connect(m_reply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged())); connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(updateProgress(qint64, qint64))); connect(m_reply, SIGNAL(finished()), this, SLOT(finished())); showNormal(); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x68(%rdi), %rax movq 0x38(%rax), %rdi xorl %esi, %esi callq 0x9940 movq 0x68(%rbx), %rax movq 0x68(%rax), %r15 leaq 0xdece(%rip), %rsi # 0x208f0 leaq 0x714c(%rip), %rdx # 0x19b75 movq %rsp, %r12 movq %r12, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq %r15, %rdi movq %r12, %rsi callq 0x9410 movq (%rsp), %rax testq %rax, %rax je 0x12a68 lock decl (%rax) jne 0x12a68 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rbx), %rax movq 0x30(%rax), %r15 leaq 0xde79(%rip), %rsi # 0x208f0 leaq 0x70fc(%rip), %rdx # 0x19b7a movq %rsp, %r12 movq %r12, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq %r15, %rdi movq %r12, %rsi callq 0x95d0 movq (%rsp), %rax testq %rax, %rax je 0x12abd lock decl (%rax) jne 0x12abd movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rbx), %rax movq 0x40(%rax), %r15 leaq 0xde24(%rip), %rsi # 0x208f0 leaq 0x70bb(%rip), %rdx # 0x19b8e leaq 0x70(%rsp), %r12 movq %r12, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq (%r12), %rax movq %rax, 0x40(%rsp) movups 0x8(%r12), %xmm0 movups %xmm0, 0x48(%rsp) testq %rax, %rax je 0x12b04 lock incl (%rax) leaq 0x7092(%rip), %rdx # 0x19b9d movq %rsp, %rdi movl $0x2, %esi callq 0x9600 leaq 0x40(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x12b46 lock decl (%rax) jne 0x12b46 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0xdda3(%rip), %rsi # 0x208f0 leaq 0x704c(%rip), %rdx # 0x19ba0 movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, 0x28(%rsp) testq %rax, %rax je 0x12b80 lock incl (%rax) leaq 0x20(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 leaq 0x20(%rsp), %rsi movq %r15, %rdi callq 0x95d0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x12bbd lock decl (%rax) jne 0x12bbd movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq (%rsp), %rax testq %rax, %rax je 0x12bde lock decl (%rax) jne 0x12bde movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x40(%rsp), %rax testq %rax, %rax je 0x12c01 lock decl (%rax) jne 0x12c01 movq 0x40(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x70(%rsp), %rax testq %rax, %rax je 0x12c24 lock decl (%rax) jne 0x12c24 movq 0x70(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x9b20 movq %rsp, %rdi movl $0x1, %esi callq 0x9700 leaq 0x40(%rsp), %rdi movq %rsp, %rdx movl $0x16, %esi callq 0x9740 movq %rsp, %rdi callq 0x9340 leaq 0x40(%rsp), %rdi movl $0x2710, %esi # imm = 0x2710 callq 0x9910 cmpq $0x0, 0x88(%rbx) je 0x12ceb leaq 0x673b(%rip), %rsi # 0x193b3 movq %rsp, %rdi movq $-0x1, %rdx callq 0x9b90 leaq 0x78(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x91e0 leaq 0x40(%rsp), %rdi movq %rsp, %rsi leaq 0x20(%rsp), %rdx callq 0x9c80 movq 0x20(%rsp), %rax testq %rax, %rax je 0x12cca lock decl (%rax) jne 0x12cca movq 0x20(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 movq (%rsp), %rax testq %rax, %rax je 0x12ceb lock decl (%rax) jne 0x12ceb movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 movq 0x98(%rbx), %rdi leaq 0x40(%rsp), %rsi callq 0x93f0 movq %rax, 0x70(%rbx) movq %rsp, %rdi callq 0x9320 movq %rsp, %rdi callq 0x9210 movl %eax, 0x40(%rbx) movq %rsp, %rdi callq 0x95c0 leaq 0x48(%rbx), %r14 movq %r14, %rdi callq 0x9a40 testb %al, %al jne 0x12d7f leaq 0x6f68(%rip), %rdx # 0x19c9a movq %rsp, %rdi movl $0x1, %esi callq 0x9600 movaps (%rsp), %xmm0 leaq 0x20(%rsp), %rsi movaps %xmm0, (%rsi) movq 0x10(%rsp), %rax movq %rax, 0x10(%rsi) movq %r14, %rdi callq 0x9a30 movq 0x20(%rsp), %rax testq %rax, %rax je 0x12d7f lock decl (%rax) jne 0x12d7f movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x50(%rbx), %rdx movq %rsp, %rdi movq %r14, %rsi callq 0x9200 movq %rsp, %rdi callq 0x9950 movq (%rsp), %rax testq %rax, %rax je 0x12db7 lock decl (%rax) jne 0x12db7 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x50(%rbx), %rax movq %rax, 0x20(%rsp) movq 0x58(%rbx), %rcx movq %rcx, 0x28(%rsp) movq 0x60(%rbx), %rcx movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x12dda lock incl (%rax) leaq 0xefef(%rip), %rsi # 0x21dd0 leaq 0x20(%rsp), %rdi callq 0x91c0 movq %rsp, %rdi leaq 0x20(%rsp), %rdx movq %r14, %rsi callq 0x9200 movq %rsp, %rdi callq 0x9950 movq (%rsp), %rax testq %rax, %rax je 0x12e24 lock decl (%rax) jne 0x12e24 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x20(%rsp), %rax testq %rax, %rax je 0x12e47 lock decl (%rax) jne 0x12e47 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x70(%rbx), %rsi leaq 0x6d56(%rip), %rdx # 0x19ba8 leaq 0x6d62(%rip), %r8 # 0x19bbb leaq 0x68(%rsp), %rdi movq %rbx, %rcx xorl %r9d, %r9d callq 0x9c10 leaq 0x68(%rsp), %rdi callq 0x9420 movq 0x70(%rbx), %rsi leaq 0x6d50(%rip), %rdx # 0x19bce leaq 0x6d6b(%rip), %r8 # 0x19bf0 leaq 0x60(%rsp), %rdi movq %rbx, %rcx xorl %r9d, %r9d callq 0x9c10 leaq 0x60(%rsp), %rdi callq 0x9420 movq 0x70(%rbx), %rsi leaq 0x6d66(%rip), %rdx # 0x19c10 leaq 0x6d6b(%rip), %r8 # 0x19c1c leaq 0x58(%rsp), %rdi movq %rbx, %rcx xorl %r9d, %r9d callq 0x9c10 leaq 0x58(%rsp), %rdi callq 0x9420 movq %rbx, %rdi callq 0x9930 leaq 0x40(%rsp), %rdi callq 0x9150 addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x12f6c jmp 0x130b6 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x12f1e lock decl (%rax) jne 0x12f1e movq 0x20(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 jmp 0x12f1e movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x130b9 lock decl (%rax) jne 0x130b9 movq (%rsp), %rdi movl $0x1, %esi jmp 0x12faf jmp 0x130b6 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x12f6f lock decl (%rax) jne 0x12f6f movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x12f6f jmp 0x12f6c movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x130b9 lock decl (%rax) jne 0x130b9 movq 0x20(%rsp), %rdi jmp 0x12faa movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x130b9 lock decl (%rax) jne 0x130b9 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x130b9 jmp 0x130b6 movq %rax, %rbx movq %rsp, %rdi callq 0x95c0 jmp 0x130b9 jmp 0x130b6 movq %rax, %rbx movq %rsp, %rdi callq 0x9340 jmp 0x130b9 jmp 0x130b6 jmp 0x12fef movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x1301c lock decl (%rax) jne 0x1301c movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x1301c jmp 0x1303f movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x13042 lock decl (%rax) jne 0x13042 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x13042 movq %rax, %rbx movq 0x40(%rsp), %rax testq %rax, %rax je 0x13065 lock decl (%rax) jne 0x13065 movq 0x40(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x70(%rsp), %rax testq %rax, %rax je 0x130c3 lock decl (%rax) jne 0x130c3 movq 0x70(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x130c3 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x130c3 movq %rsp, %rsi callq 0x9f64 jmp 0x130c3 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x130c3 movq %rsp, %rsi callq 0x9f4b jmp 0x130c3 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x9150 movq %rbx, %rdi callq 0x9430 nop
/alex-spataru[P]QSimpleUpdater/src/Downloader.cpp
Downloader::openDownload()
void Downloader::openDownload() { if (!m_fileName.isEmpty()) QDesktopServices::openUrl(QUrl::fromLocalFile(m_downloadDir.filePath(m_fileName))); else { QMessageBox::critical(this, tr("Error"), tr("Cannot find downloaded update!"), QMessageBox::Close); } }
pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx cmpq $0x0, 0x60(%rdi) je 0x13afb leaq 0x50(%rbx), %rdx addq $0x48, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x9200 leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x9c30 leaq 0x20(%rsp), %rdi callq 0x9820 leaq 0x20(%rsp), %rdi callq 0x9190 movq 0x8(%rsp), %rax testq %rax, %rax je 0x13af3 lock decl (%rax) jne 0x13af3 movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 addq $0x38, %rsp popq %rbx popq %r14 retq leaq 0xcdee(%rip), %r14 # 0x208f0 leaq 0x612e(%rip), %rdx # 0x19c37 leaq 0x8(%rsp), %rdi movq %r14, %rsi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 leaq 0x6118(%rip), %rdx # 0x19c3d leaq 0x20(%rsp), %rdi movq %r14, %rsi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 leaq 0x8(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x200000, %ecx # imm = 0x200000 xorl %r8d, %r8d callq 0x99b0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x13ad0 lock decl (%rax) jne 0x13ad0 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x13ad0 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x13bc0 lock decl (%rax) jne 0x13bc0 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x13bc0 jmp 0x13bbd movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x9190 jmp 0x13bc0 movq %rax, %rbx movq 0x8(%rsp), %rax testq %rax, %rax je 0x13be3 lock decl (%rax) jne 0x13be3 movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq %rbx, %rdi callq 0x9430 nop
/alex-spataru[P]QSimpleUpdater/src/Downloader.cpp
Downloader::saveFile(long long, long long)
void Downloader::saveFile(qint64 received, qint64 total) { Q_UNUSED(received); Q_UNUSED(total); /* Check if we need to redirect */ QUrl url = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); if (!url.isEmpty()) { startDownload(url); return; } /* Save downloaded data to disk */ QFile file(m_downloadDir.filePath(m_fileName + PARTIAL_DOWN)); if (file.open(QIODevice::WriteOnly | QIODevice::Append)) { file.write(m_reply->readAll()); file.close(); } }
pushq %r14 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq 0x70(%rdi), %rsi leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x2, %edx callq 0x9d20 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x9a90 leaq 0x10(%rsp), %rdi callq 0x9340 leaq 0x8(%rsp), %rdi callq 0x9810 testb %al, %al je 0x13f20 movq 0x50(%rbx), %rax movq %rax, 0x30(%rsp) movq 0x58(%rbx), %rcx movq %rcx, 0x38(%rsp) movq 0x60(%rbx), %rcx movq %rcx, 0x40(%rsp) testq %rax, %rax je 0x13e3e lock incl (%rax) leaq 0xdf8b(%rip), %rsi # 0x21dd0 leaq 0x30(%rsp), %rdi callq 0x91c0 leaq 0x48(%rbx), %rsi leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x9200 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x9c40 movq 0x10(%rsp), %rax testq %rax, %rax je 0x13e94 lock decl (%rax) jne 0x13e94 movq 0x10(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x30(%rsp), %rax testq %rax, %rax je 0x13eb7 lock decl (%rax) jne 0x13eb7 movq 0x30(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 leaq 0x48(%rsp), %rdi movl $0x6, %esi callq 0x9560 testb %al, %al je 0x13f14 movq 0x70(%rbx), %rsi leaq 0x10(%rsp), %rdi callq 0x9310 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x9b80 movq 0x10(%rsp), %rax testq %rax, %rax je 0x13f0a lock decl (%rax) jne 0x13f0a movq 0x10(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 leaq 0x48(%rsp), %rdi callq 0x9be0 leaq 0x48(%rsp), %rdi callq 0x9c70 jmp 0x13f2d leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x129f0 leaq 0x8(%rsp), %rdi callq 0x9190 addq $0x58, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x13fbe lock decl (%rax) jne 0x13fbe movq 0x10(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x9570 jmp 0x13fbe jmp 0x13fbb movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x13f96 lock decl (%rax) jne 0x13f96 movq 0x10(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x13f96 jmp 0x13f93 movq %rax, %rbx movq 0x30(%rsp), %rax testq %rax, %rax je 0x13fdc lock decl (%rax) jne 0x13fdc movq 0x30(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x13fdc movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x9c70 jmp 0x13fdc movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x9340 jmp 0x13fe6 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x9190 movq %rbx, %rdi callq 0x9430
/alex-spataru[P]QSimpleUpdater/src/Downloader.cpp
Downloader::calculateTimeRemaining(long long, long long)
void Downloader::calculateTimeRemaining(qint64 received, qint64 total) { uint difference = QDateTime::currentDateTime().toSecsSinceEpoch() - m_startTime; if (difference > 0) { QString timeString; qreal timeRemaining = (total - received) / (received / difference); if (timeRemaining > 7200) { timeRemaining /= 3600; int hours = int(timeRemaining + 0.5); if (hours > 1) timeString = tr("about %1 hours").arg(hours); else timeString = tr("about one hour"); } else if (timeRemaining > 60) { timeRemaining /= 60; int minutes = int(timeRemaining + 0.5); if (minutes > 1) timeString = tr("%1 minutes").arg(minutes); else timeString = tr("1 minute"); } else if (timeRemaining <= 60) { int seconds = int(timeRemaining + 0.5); if (seconds > 1) timeString = tr("%1 seconds").arg(seconds); else timeString = tr("1 second"); } m_ui->timeLabel->setText(tr("Time remaining") + ": " + timeString); } }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi callq 0x9320 movq %r12, %rdi callq 0x9210 movq %rax, %r12 movl 0x40(%rbx), %ebp movq %rsp, %rdi callq 0x95c0 subl %ebp, %r12d je 0x1555f xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) subq %r15, %r14 movq %r15, %rax cqto idivq %r12 movq %rax, %rcx movq %r14, %rax cqto idivq %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 cmpq $0x1c21, %rax # imm = 0x1C21 jl 0x15254 divsd 0x43bb(%rip), %xmm0 # 0x195b8 addsd 0x43a3(%rip), %xmm0 # 0x195a8 cvttsd2si %xmm0, %ebp cmpl $0x2, %ebp jl 0x152b6 leaq 0xb6d7(%rip), %rsi # 0x208f0 leaq 0x4ca5(%rip), %rdx # 0x19ec5 leaq 0x38(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movl %ebp, %edx movq %rsp, %rdi leaq 0x38(%rsp), %rsi xorl %ecx, %ecx movl $0xa, %r8d movl $0x20, %r9d callq 0x9d10 jmp 0x1532b cmpq $0x3d, %rax jl 0x152d9 divsd 0x434e(%rip), %xmm0 # 0x195b0 addsd 0x433e(%rip), %xmm0 # 0x195a8 cvttsd2si %xmm0, %ebp cmpl $0x2, %ebp jl 0x1538e leaq 0xb672(%rip), %rsi # 0x208f0 leaq 0x4c5e(%rip), %rdx # 0x19ee3 leaq 0x38(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movl %ebp, %edx movq %rsp, %rdi leaq 0x38(%rsp), %rsi xorl %ecx, %ecx movl $0xa, %r8d movl $0x20, %r9d callq 0x9d10 jmp 0x1532b leaq 0xb633(%rip), %rsi # 0x208f0 leaq 0x4c10(%rip), %rdx # 0x19ed4 movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 jmp 0x153cc addsd 0x42c7(%rip), %xmm0 # 0x195a8 cvttsd2si %xmm0, %ebp cmpl $0x2, %ebp jl 0x153ae leaq 0xb5fb(%rip), %rsi # 0x208f0 leaq 0x4bfb(%rip), %rdx # 0x19ef7 leaq 0x38(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movl %ebp, %edx movq %rsp, %rdi leaq 0x38(%rsp), %rsi xorl %ecx, %ecx movl $0xa, %r8d movl $0x20, %r9d callq 0x9d10 movq 0x20(%rsp), %rax movupd 0x28(%rsp), %xmm0 movaps (%rsp), %xmm1 movq %rax, (%rsp) movaps %xmm1, 0x20(%rsp) movq 0x10(%rsp), %rcx movupd %xmm0, 0x8(%rsp) movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x15370 lock decl (%rax) jne 0x15370 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x38(%rsp), %rax testq %rax, %rax je 0x15411 lock decl (%rax) jne 0x15411 movq 0x38(%rsp), %rdi jmp 0x15402 leaq 0xb55b(%rip), %rsi # 0x208f0 leaq 0x4b52(%rip), %rdx # 0x19eee movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 jmp 0x153cc leaq 0xb53b(%rip), %rsi # 0x208f0 leaq 0x4b46(%rip), %rdx # 0x19f02 movq %rsp, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0x20(%rsp), %rax movupd 0x28(%rsp), %xmm0 movaps (%rsp), %xmm1 movq %rax, (%rsp) movaps %xmm1, 0x20(%rsp) movq 0x10(%rsp), %rcx movupd %xmm0, 0x8(%rsp) movq %rcx, 0x30(%rsp) testq %rax, %rax je 0x15411 lock decl (%rax) jne 0x15411 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rbx), %rax movq 0x40(%rax), %rbx leaq 0xb4d0(%rip), %rsi # 0x208f0 leaq 0x4767(%rip), %rdx # 0x19b8e leaq 0x68(%rsp), %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9970 movq 0x68(%rsp), %rax movq %rax, 0x50(%rsp) movupd 0x70(%rsp), %xmm0 movupd %xmm0, 0x58(%rsp) testq %rax, %rax je 0x15457 lock incl (%rax) leaq 0x473f(%rip), %rdx # 0x19b9d movq %rsp, %rdi movl $0x2, %esi callq 0x9600 leaq 0x50(%rsp), %rdi movq %rsp, %rsi callq 0x91c0 movq (%rsp), %rax testq %rax, %rax je 0x15499 lock decl (%rax) jne 0x15499 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x50(%rsp), %rax movq %rax, 0x38(%rsp) movupd 0x58(%rsp), %xmm0 movupd %xmm0, 0x40(%rsp) testq %rax, %rax je 0x154b7 lock incl (%rax) leaq 0x38(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x91c0 leaq 0x38(%rsp), %rsi movq %rbx, %rdi callq 0x95d0 movq 0x38(%rsp), %rax testq %rax, %rax je 0x154f6 lock decl (%rax) jne 0x154f6 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x50(%rsp), %rax testq %rax, %rax je 0x15519 lock decl (%rax) jne 0x15519 movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x1553c lock decl (%rax) jne 0x1553c movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x20(%rsp), %rax testq %rax, %rax je 0x1555f lock decl (%rax) jne 0x1555f movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x15587 jmp 0x15587 jmp 0x15641 jmp 0x15641 jmp 0x15641 jmp 0x15641 movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x15644 lock decl (%rax) jne 0x15644 movq 0x38(%rsp), %rdi jmp 0x15630 jmp 0x15641 jmp 0x15641 jmp 0x155b7 movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x155f9 lock decl (%rax) jne 0x155f9 movq 0x38(%rsp), %rdi jmp 0x155e5 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x155f9 lock decl (%rax) jne 0x155f9 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x155f9 movq %rax, %rbx movq 0x50(%rsp), %rax testq %rax, %rax je 0x1561c lock decl (%rax) jne 0x1561c movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rsp), %rax testq %rax, %rax je 0x15644 lock decl (%rax) jne 0x15644 movq 0x68(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x15644 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x15674 lock decl (%rax) jne 0x15674 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 jmp 0x15674 movq %rax, %rbx movq %rsp, %rdi callq 0x95c0 movq %rbx, %rdi callq 0x9430
/alex-spataru[P]QSimpleUpdater/src/Downloader.cpp
Downloader::qt_metacall(QMetaObject::Call, int, void**)
int Downloader::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 17) qt_static_metacall(this, _c, _id, _a); _id -= 17; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 17) *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); _id -= 17; } return _id; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movl %esi, %ebp movq %rdi, %r15 callq 0x98c0 movl %eax, %ebx testl %eax, %eax js 0x158e1 cmpl $0x7, %ebp je 0x158cf testl %ebp, %ebp jne 0x158e1 cmpl $0x10, %ebx ja 0x158de movq %r15, %rdi xorl %esi, %esi movl %ebx, %edx movq %r14, %rcx callq 0x15726 jmp 0x158de cmpl $0x10, %ebx ja 0x158de movq (%r14), %rax movq $0x0, (%rax) addl $-0x11, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/alex-spataru[P]QSimpleUpdater/build_O3/QSimpleUpdater_autogen/include/moc_Downloader.cpp
Ui_Downloader::retranslateUi(QWidget*)
void retranslateUi(QWidget *Downloader) { Downloader->setWindowTitle(QCoreApplication::translate("Downloader", "Updater", nullptr)); updater_icon->setText(QString()); downloadLabel->setText(QCoreApplication::translate("Downloader", "Downloading updates", nullptr)); timeLabel->setText(QCoreApplication::translate("Downloader", "Time remaining: 0 minutes", nullptr)); openButton->setText(QCoreApplication::translate("Downloader", "Open", nullptr)); stopButton->setText(QCoreApplication::translate("Downloader", "Stop", nullptr)); }
pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x3bd5(%rip), %rsi # 0x19f0b leaq 0x3a85(%rip), %rdx # 0x19dc2 movq %rsp, %r15 movq %r15, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9cd0 movq %r14, %rdi movq %r15, %rsi callq 0x9920 movq (%rsp), %rax testq %rax, %rax je 0x1637c lock decl (%rax) jne 0x1637c movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x18(%rbx), %rdi xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0x95d0 movq (%rsp), %rax testq %rax, %rax je 0x163b7 lock decl (%rax) jne 0x163b7 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x30(%rbx), %r14 leaq 0x3b49(%rip), %rsi # 0x19f0b leaq 0x37b1(%rip), %rdx # 0x19b7a movq %rsp, %r15 movq %r15, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9cd0 movq %r14, %rdi movq %r15, %rsi callq 0x95d0 movq (%rsp), %rax testq %rax, %rax je 0x16408 lock decl (%rax) jne 0x16408 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x40(%rbx), %r14 leaq 0x3af8(%rip), %rsi # 0x19f0b leaq 0x3bbb(%rip), %rdx # 0x19fd5 movq %rsp, %r15 movq %r15, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9cd0 movq %r14, %rdi movq %r15, %rsi callq 0x95d0 movq (%rsp), %rax testq %rax, %rax je 0x16459 lock decl (%rax) jne 0x16459 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x60(%rbx), %r14 leaq 0x3aa7(%rip), %rsi # 0x19f0b leaq 0x3b84(%rip), %rdx # 0x19fef movq %rsp, %r15 movq %r15, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9cd0 movq %r14, %rdi movq %r15, %rsi callq 0x9410 movq (%rsp), %rax testq %rax, %rax je 0x164aa lock decl (%rax) jne 0x164aa movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 movq 0x68(%rbx), %rbx leaq 0x3a56(%rip), %rsi # 0x19f0b leaq 0x36b9(%rip), %rdx # 0x19b75 movq %rsp, %r14 movq %r14, %rdi xorl %ecx, %ecx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0x9cd0 movq %rbx, %rdi movq %r14, %rsi callq 0x9410 movq (%rsp), %rax testq %rax, %rax je 0x164fb lock decl (%rax) jne 0x164fb movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9570 addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0xa045 jmp 0x16587 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0xa02c jmp 0x16587 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0xa013 jmp 0x16587 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0x9ffa jmp 0x16587 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0x9fe1 jmp 0x16587 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x16587 movq %rsp, %rsi callq 0x9fc8 movq %rbx, %rdi callq 0x9430 nop
/alex-spataru[P]QSimpleUpdater/build_O3/QSimpleUpdater_autogen/include/ui_Downloader.h
Curl_add_buffer
CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size) { char *new_rb; size_t new_size; if(~size < in->size_used) { /* If resulting used size of send buffer would wrap size_t, cleanup the whole buffer and return error. Otherwise the required buffer size will fit into a single allocatable memory chunk */ Curl_safefree(in->buffer); free(in); return CURLE_OUT_OF_MEMORY; } if(!in->buffer || ((in->size_used + size) > (in->size_max - 1))) { /* If current buffer size isn't enough to hold the result, use a buffer size that doubles the required size. If this new size would wrap size_t, then just use the largest possible one */ if((size > (size_t)-1 / 2) || (in->size_used > (size_t)-1 / 2) || (~(size * 2) < (in->size_used * 2))) new_size = (size_t)-1; else new_size = (in->size_used + size) * 2; if(in->buffer) /* we have a buffer, enlarge the existing one */ new_rb = Curl_saferealloc(in->buffer, new_size); else /* create a new buffer */ new_rb = malloc(new_size); if(!new_rb) { /* If we failed, we cleanup the whole buffer and return error */ free(in); return CURLE_OUT_OF_MEMORY; } in->buffer = new_rb; in->size_max = new_size; } memcpy(&in->buffer[in->size_used], inptr, size); in->size_used += size; return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax xorq $-0x1, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x17312 jmp 0x172d8 leaq 0x7c771(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rdi callq *%rax movq -0x10(%rbp), %rax movq $0x0, (%rax) leaq 0x7c753(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl $0x1b, -0x4(%rbp) jmp 0x17437 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x1733d movq -0x10(%rbp), %rax movq 0x10(%rax), %rax addq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq $0x1, %rcx cmpq %rcx, %rax jbe 0x17404 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x20(%rbp) ja 0x1737c movq -0x10(%rbp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) ja 0x1737c movq -0x20(%rbp), %rax shlq %rax xorq $-0x1, %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx shlq %rcx cmpq %rcx, %rax jae 0x17386 movq $-0x1, -0x30(%rbp) jmp 0x17399 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax addq -0x20(%rbp), %rax shlq %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x173b9 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x30(%rbp), %rsi callq 0x4a6e0 movq %rax, -0x28(%rbp) jmp 0x173cd leaq 0x7c688(%rip), %rax # 0x93a48 movq (%rax), %rax movq -0x30(%rbp), %rdi callq *%rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x173ed leaq 0x7c675(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl $0x1b, -0x4(%rbp) jmp 0x17437 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax addq 0x10(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x97b0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
/macressler[P]curl/lib/http.c
Curl_compareheader
bool Curl_compareheader(const char *headerline, /* line to check */ const char *header, /* header keyword _with_ colon */ const char *content) /* content string to find */ { /* RFC2616, section 4.2 says: "Each header field consists of a name followed * by a colon (":") and the field value. Field names are case-insensitive. * The field value MAY be preceded by any amount of LWS, though a single SP * is preferred." */ size_t hlen = strlen(header); size_t clen; size_t len; const char *start; const char *end; if(!strncasecompare(headerline, header, hlen)) return FALSE; /* doesn't start with header */ /* pass the header */ start = &headerline[hlen]; /* pass all white spaces */ while(*start && ISSPACE(*start)) start++; /* find the end of the header line */ end = strchr(start, '\r'); /* lines end with CRLF */ if(!end) { /* in case there's a non-standard compliant line here */ end = strchr(start, '\n'); if(!end) /* hm, there's no line ending here, use the zero byte! */ end = strchr(start, '\0'); } len = end-start; /* length of the content part of the input line */ clen = strlen(content); /* length of the word to find */ /* find the content string in the rest of the line */ for(; len >= clen; len--, start++) { if(strncasecompare(start, content, clen)) return TRUE; /* match! */ } return FALSE; /* no match */ }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x93b0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x367b0 cmpl $0x0, %eax jne 0x17480 movb $0x0, -0x1(%rbp) jmp 0x1756e movq -0x10(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x49(%rbp) je 0x174b2 movq -0x40(%rbp), %rax movzbl (%rax), %edi callq 0x6d380 cmpl $0x0, %eax setne %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0x174bb jmp 0x174c9 movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x1748c movq -0x40(%rbp), %rdi movl $0xd, %esi callq 0x9300 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x1750c movq -0x40(%rbp), %rdi movl $0xa, %esi callq 0x9300 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x1750a movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x9300 movq %rax, -0x48(%rbp) jmp 0x1750c movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x93b0 movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax cmpq -0x30(%rbp), %rax jb 0x1756a movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x367b0 cmpl $0x0, %eax je 0x1754e movb $0x1, -0x1(%rbp) jmp 0x1756e jmp 0x17550 movq -0x38(%rbp), %rax addq $-0x1, %rax movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x17528 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/http.c
use_http_1_1plus
static bool use_http_1_1plus(const struct Curl_easy *data, const struct connectdata *conn) { if((data->state.httpversion == 10) || (conn->httpversion == 10)) return FALSE; if((data->set.httpversion == CURL_HTTP_VERSION_1_0) && (conn->httpversion <= 10)) return FALSE; return ((data->set.httpversion == CURL_HTTP_VERSION_NONE) || (data->set.httpversion >= CURL_HTTP_VERSION_1_1)); }
pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0xa, 0x507c(%rax) je 0x17d86 movq -0x18(%rbp), %rax cmpl $0xa, 0x230(%rax) jne 0x17d8c movb $0x0, -0x1(%rbp) jmp 0x17dda movq -0x10(%rbp), %rax cmpq $0x1, 0x5d8(%rax) jne 0x17dad movq -0x18(%rbp), %rax cmpl $0xa, 0x230(%rax) jg 0x17dad movb $0x0, -0x1(%rbp) jmp 0x17dda movq -0x10(%rbp), %rcx movb $0x1, %al cmpq $0x0, 0x5d8(%rcx) movb %al, -0x19(%rbp) je 0x17dd2 movq -0x10(%rbp), %rax cmpq $0x2, 0x5d8(%rax) setge %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/http.c
expect100
static CURLcode expect100(struct Curl_easy *data, struct connectdata *conn, Curl_send_buffer *req_buffer) { CURLcode result = CURLE_OK; const char *ptr; data->state.expect100header = FALSE; /* default to false unless it is set to TRUE below */ if(use_http_1_1plus(data, conn) && (conn->httpversion != 20)) { /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an Expect: 100-continue to the headers which actually speeds up post operations (as there is one packet coming back from the web server) */ ptr = Curl_checkheaders(conn, "Expect"); if(ptr) { data->state.expect100header = Curl_compareheader(ptr, "Expect:", "100-continue"); } else { result = Curl_add_bufferf(req_buffer, "Expect: 100-continue\r\n"); if(!result) data->state.expect100header = TRUE; } } return result; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x8(%rbp), %rax movb $0x0, 0x5080(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x17d60 testb $0x1, %al jne 0x17e79 jmp 0x17ef3 movq -0x10(%rbp), %rax cmpl $0x14, 0x230(%rax) je 0x17ef3 movq -0x10(%rbp), %rdi leaq 0x63d2c(%rip), %rsi # 0x7bbbd callq 0x33450 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x17ec9 movq -0x28(%rbp), %rdi leaq 0x63d18(%rip), %rsi # 0x7bbc4 leaq 0x63d19(%rip), %rdx # 0x7bbcc callq 0x17440 movb %al, %cl movq -0x8(%rbp), %rax andb $0x1, %cl movb %cl, 0x5080(%rax) jmp 0x17ef1 movq -0x18(%rbp), %rdi leaq 0x6418e(%rip), %rsi # 0x7c062 movb $0x0, %al callq 0x17180 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x17eef movq -0x8(%rbp), %rax movb $0x1, 0x5080(%rax) jmp 0x17ef1 jmp 0x17ef3 movl -0x1c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/http.c
header_append
static CURLcode header_append(struct Curl_easy *data, struct SingleRequest *k, size_t length) { size_t newsize = k->hbuflen + length; if(newsize > CURL_MAX_HTTP_HEADER) { /* The reason to have a max limit for this is to avoid the risk of a bad server feeding libcurl with a never-ending header that will cause reallocs infinitely */ failf(data, "Rejected %zd bytes header (max is %d)!", newsize, CURL_MAX_HTTP_HEADER); return CURLE_OUT_OF_MEMORY; } if(newsize >= data->state.headersize) { /* We enlarge the header buffer as it is too small */ char *newbuff; size_t hbufp_index; newsize = CURLMAX((k->hbuflen + length) * 3 / 2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = realloc(data->state.headerbuff, newsize); if(!newbuff) { failf(data, "Failed to alloc memory for big header!"); return CURLE_OUT_OF_MEMORY; } data->state.headersize = newsize; data->state.headerbuff = newbuff; k->hbufp = data->state.headerbuff + hbufp_index; } memcpy(k->hbufp, k->str_start, length); k->hbufp += length; k->hbuflen += length; *k->hbufp = 0; return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax addq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x19000, -0x28(%rbp) # imm = 0x19000 jbe 0x19785 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rdx leaq 0x6290c(%rip), %rsi # 0x7c079 movl $0x19000, %ecx # imm = 0x19000 movb $0x0, %al callq 0x19f90 movl $0x1b, -0x4(%rbp) jmp 0x198d4 movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0xc98(%rcx), %rax jb 0x19886 movq -0x18(%rbp), %rax movq 0x78(%rax), %rax addq -0x20(%rbp), %rax imulq $0x3, %rax, %rax shrq %rax movq -0x10(%rbp), %rcx movq 0xc98(%rcx), %rcx shlq %rcx cmpq %rcx, %rax jbe 0x197d9 movq -0x18(%rbp), %rax movq 0x78(%rax), %rax addq -0x20(%rbp), %rax imulq $0x3, %rax, %rax shrq %rax movq %rax, -0x40(%rbp) jmp 0x197eb movq -0x10(%rbp), %rax movq 0xc98(%rax), %rax shlq %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x70(%rax), %rax movq -0x10(%rbp), %rcx movq 0xc90(%rcx), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) leaq 0x7a244(%rip), %rax # 0x93a58 movq (%rax), %rax movq -0x10(%rbp), %rcx movq 0xc90(%rcx), %rdi movq -0x28(%rbp), %rsi callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x19851 movq -0x10(%rbp), %rdi leaq 0x62862(%rip), %rsi # 0x7c0a0 movb $0x0, %al callq 0x19f90 movl $0x1b, -0x4(%rbp) jmp 0x198d4 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc98(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc90(%rax) movq -0x10(%rbp), %rax movq 0xc90(%rax), %rcx addq -0x38(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x70(%rax) movq -0x18(%rbp), %rax movq 0x70(%rax), %rdi movq -0x18(%rbp), %rax movq 0x88(%rax), %rsi movq -0x20(%rbp), %rdx callq 0x97b0 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax addq 0x70(%rax), %rcx movq %rcx, 0x70(%rax) movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax addq 0x78(%rax), %rcx movq %rcx, 0x78(%rax) movq -0x18(%rbp), %rax movq 0x70(%rax), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/http.c
checkhttpprefix
static bool checkhttpprefix(struct Curl_easy *data, const char *s) { struct curl_slist *head = data->set.http200aliases; bool rc = FALSE; #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding using a scratch area */ char *scratch = strdup(s); if(NULL == scratch) { failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s) + 1)) { /* Curl_convert_from_network calls failf if unsuccessful */ free(scratch); return FALSE; /* can't return CURLE_foobar so return FALSE */ } s = scratch; #endif /* CURL_DOES_CONVERSIONS */ while(head) { if(checkprefix(head->data, s)) { rc = TRUE; break; } head = head->next; } if(!rc && (checkprefix("HTTP/", s))) rc = TRUE; #ifdef CURL_DOES_CONVERSIONS free(scratch); #endif /* CURL_DOES_CONVERSIONS */ return rc; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x760(%rax), %rax movq %rax, -0x18(%rbp) movb $0x0, -0x19(%rbp) cmpq $0x0, -0x18(%rbp) je 0x199b2 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdi callq 0x93b0 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movq %rax, %rdx callq 0x9420 cmpl $0x0, %eax je 0x199a4 movb $0x1, -0x19(%rbp) jmp 0x199b2 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x19963 testb $0x1, -0x19(%rbp) jne 0x199d6 movq -0x10(%rbp), %rsi leaq 0x6270a(%rip), %rdi # 0x7c0cd movl $0x5, %edx callq 0x9420 cmpl $0x0, %eax je 0x199d6 movb $0x1, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/http.c
print_http_error
static void print_http_error(struct Curl_easy *data) { struct SingleRequest *k = &data->req; char *beg = k->p; /* make sure that data->req.p points to the HTTP status line */ if(!strncmp(beg, "HTTP", 4)) { /* skip to HTTP status code */ beg = strchr(beg, ' '); if(beg && *++beg) { /* find trailing CR */ char end_char = '\r'; char *end = strchr(beg, end_char); if(!end) { /* try to find LF (workaround for non-compliant HTTP servers) */ end_char = '\n'; end = strchr(beg, end_char); } if(end) { /* temporarily replace CR or LF by NUL and print the error message */ *end = '\0'; failf(data, "The requested URL returned error: %s", beg); /* restore the previously replaced CR or LF */ *end = end_char; return; } } } /* fall-back to printing the HTTP status code only */ failf(data, "The requested URL returned error: %d", k->httpcode); }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xc0, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x61d4c(%rip), %rsi # 0x7b770 movl $0x4, %edx callq 0x9400 cmpl $0x0, %eax jne 0x19acc movq -0x18(%rbp), %rdi movl $0x20, %esi callq 0x9300 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x19aca movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movsbl 0x1(%rax), %eax cmpl $0x0, %eax je 0x19aca movb $0xd, -0x19(%rbp) movq -0x18(%rbp), %rdi movsbl -0x19(%rbp), %esi callq 0x9300 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x19a99 movb $0xa, -0x19(%rbp) movq -0x18(%rbp), %rdi movsbl -0x19(%rbp), %esi callq 0x9300 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x19ac8 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x6261d(%rip), %rsi # 0x7c0d3 movb $0x0, %al callq 0x19f90 movb -0x19(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, (%rax) jmp 0x19ae8 jmp 0x19aca jmp 0x19acc movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl 0xb0(%rax), %edx leaq 0x61c9a(%rip), %rsi # 0x7b77b movb $0x0, %al callq 0x19f90 addq $0x30, %rsp popq %rbp retq nop
/macressler[P]curl/lib/http.c
http_output_basic
static CURLcode http_output_basic(struct connectdata *conn, bool proxy) { size_t size = 0; char *authorization = NULL; struct Curl_easy *data = conn->data; char **userp; const char *user; const char *pwd; CURLcode result; char *out; if(proxy) { userp = &conn->allocptr.proxyuserpwd; user = conn->http_proxy.user; pwd = conn->http_proxy.passwd; } else { userp = &conn->allocptr.userpwd; user = conn->user; pwd = conn->passwd; } out = aprintf("%s:%s", user, pwd); if(!out) return CURLE_OUT_OF_MEMORY; result = Curl_base64_encode(data, out, strlen(out), &authorization, &size); if(result) goto fail; if(!authorization) { result = CURLE_REMOTE_ACCESS_DENIED; goto fail; } free(*userp); *userp = aprintf("%sAuthorization: Basic %s\r\n", proxy ? "Proxy-" : "", authorization); free(authorization); if(!*userp) { result = CURLE_OUT_OF_MEMORY; goto fail; } fail: free(out); return result; }
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) andb $0x1, %al movb %al, -0x11(%rbp) movq $0x0, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) testb $0x1, -0x11(%rbp) je 0x19b53 movq -0x10(%rbp), %rax addq $0x3f0, %rax # imm = 0x3F0 movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x180(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x188(%rax), %rax movq %rax, -0x48(%rbp) jmp 0x19b83 movq -0x10(%rbp), %rax addq $0x3f0, %rax # imm = 0x3F0 addq $0x18, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x210(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x218(%rax), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx leaq 0x69613(%rip), %rdi # 0x831a5 movb $0x0, %al callq 0x9810 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0x19bb0 movl $0x1b, -0x4(%rbp) jmp 0x19c7e movq -0x30(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rdi callq 0x93b0 movq -0x68(%rbp), %rdi movq -0x60(%rbp), %rsi movq %rax, %rdx leaq -0x28(%rbp), %rcx leaq -0x20(%rbp), %r8 callq 0xb630 movl %eax, -0x4c(%rbp) cmpl $0x0, -0x4c(%rbp) je 0x19bec jmp 0x19c68 cmpq $0x0, -0x28(%rbp) jne 0x19bfc movl $0x9, -0x4c(%rbp) jmp 0x19c68 leaq 0x79e4d(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x38(%rbp), %rcx movq (%rcx), %rdi callq *%rax movb -0x11(%rbp), %cl leaq 0x69893(%rip), %rsi # 0x834ac leaq 0x6241a(%rip), %rax # 0x7c03a testb $0x1, %cl cmovneq %rax, %rsi movq -0x28(%rbp), %rdx leaq 0x623ec(%rip), %rdi # 0x7c01e movb $0x0, %al callq 0x9810 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) leaq 0x79e06(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x38(%rbp), %rax cmpq $0x0, (%rax) jne 0x19c66 movl $0x1b, -0x4c(%rbp) jmp 0x19c68 jmp 0x19c68 leaq 0x79de1(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x58(%rbp), %rdi callq *%rax movl -0x4c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
/macressler[P]curl/lib/http.c
checkrtspprefix
static bool checkrtspprefix(struct Curl_easy *data, const char *s) { bool result = FALSE; #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding using a scratch area */ char *scratch = strdup(s); if(NULL == scratch) { failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s) + 1)) { /* Curl_convert_from_network calls failf if unsuccessful */ result = FALSE; /* can't return CURLE_foobar so return FALSE */ } else result = checkprefix("RTSP/", scratch)? TRUE: FALSE; free(scratch); #else (void)data; /* unused */ result = checkprefix("RTSP/", s)? TRUE: FALSE; #endif /* CURL_DOES_CONVERSIONS */ return result; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) movq -0x10(%rbp), %rsi leaq 0x62418(%rip), %rdi # 0x7c0c7 movl $0x5, %edx callq 0x9420 movl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nop
/macressler[P]curl/lib/http.c
Curl_infof
void Curl_infof(struct Curl_easy *data, const char *fmt, ...) { if(data && data->set.verbose) { va_list ap; size_t len; char print_buffer[2048 + 1]; va_start(ap, fmt); vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap); va_end(ap); len = strlen(print_buffer); Curl_debug(data, CURLINFO_TEXT, print_buffer, len, NULL); } }
pushq %rbp movq %rsp, %rbp subq $0x8f0, %rsp # imm = 0x8F0 testb %al, %al je 0x19d47 movaps %xmm0, -0x8c0(%rbp) movaps %xmm1, -0x8b0(%rbp) movaps %xmm2, -0x8a0(%rbp) movaps %xmm3, -0x890(%rbp) movaps %xmm4, -0x880(%rbp) movaps %xmm5, -0x870(%rbp) movaps %xmm6, -0x860(%rbp) movaps %xmm7, -0x850(%rbp) movq %r9, -0x8c8(%rbp) movq %r8, -0x8d0(%rbp) movq %rcx, -0x8d8(%rbp) movq %rdx, -0x8e0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0x19deb movq -0x8(%rbp), %rax testb $0x1, 0x7a8(%rax) je 0x19deb leaq -0x30(%rbp), %rax leaq -0x8f0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq -0x840(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x30(%rbp), %rcx movl $0x801, %esi # imm = 0x801 callq 0x96d0 leaq -0x30(%rbp), %rax leaq -0x840(%rbp), %rdi callq 0x93b0 movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rdi leaq -0x840(%rbp), %rdx movq -0x38(%rbp), %rcx xorl %esi, %esi xorl %eax, %eax movl %eax, %r8d callq 0x19e00 addq $0x8f0, %rsp # imm = 0x8F0 popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/sendf.c
Curl_debug
int Curl_debug(struct Curl_easy *data, curl_infotype type, char *ptr, size_t size, struct connectdata *conn) { int rc; if(data->set.printhost && conn && conn->host.dispname) { char buffer[160]; const char *t = NULL; const char *w = "Data"; switch(type) { case CURLINFO_HEADER_IN: w = "Header"; /* FALLTHROUGH */ case CURLINFO_DATA_IN: t = "from"; break; case CURLINFO_HEADER_OUT: w = "Header"; /* FALLTHROUGH */ case CURLINFO_DATA_OUT: t = "to"; break; default: break; } if(t) { snprintf(buffer, sizeof(buffer), "[%s %s %s]", w, t, conn->host.dispname); rc = showit(data, CURLINFO_TEXT, buffer, strlen(buffer)); if(rc) return rc; } } rc = showit(data, type, ptr, size); return rc; }
pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax testb $0x1, 0x791(%rax) je 0x19f60 cmpq $0x0, -0x30(%rbp) je 0x19f60 movq -0x30(%rbp), %rax cmpq $0x0, 0xe0(%rax) je 0x19f60 movq $0x0, -0xe8(%rbp) leaq 0x622e9(%rip), %rax # 0x7c147 movq %rax, -0xf0(%rbp) movl -0x14(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0xf8(%rbp) subl $0x3, %eax ja 0x19ecb movq -0xf8(%rbp), %rax leaq 0x6227a(%rip), %rcx # 0x7c100 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x622b6(%rip), %rax # 0x7c14c movq %rax, -0xf0(%rbp) leaq 0x622af(%rip), %rax # 0x7c153 movq %rax, -0xe8(%rbp) jmp 0x19ecd leaq 0x62298(%rip), %rax # 0x7c14c movq %rax, -0xf0(%rbp) leaq 0x62296(%rip), %rax # 0x7c158 movq %rax, -0xe8(%rbp) jmp 0x19ecd jmp 0x19ecd cmpq $0x0, -0xe8(%rbp) je 0x19f5e leaq -0xe0(%rbp), %rdi movq -0xf0(%rbp), %rcx movq -0xe8(%rbp), %r8 movq -0x30(%rbp), %rax movq 0xe0(%rax), %r9 movl $0xa0, %esi leaq 0x62254(%rip), %rdx # 0x7c15b movb $0x0, %al callq 0x9510 movq -0x10(%rbp), %rax movq %rax, -0x108(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0x100(%rbp) leaq -0xe0(%rbp), %rdi callq 0x93b0 movq -0x108(%rbp), %rdi movq -0x100(%rbp), %rdx movq %rax, %rcx xorl %esi, %esi callq 0x1aea0 movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x19f5c movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x19f7d jmp 0x19f5e jmp 0x19f60 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0x1aea0 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/sendf.c
Curl_failf
void Curl_failf(struct Curl_easy *data, const char *fmt, ...) { if(data->set.verbose || data->set.errorbuffer) { va_list ap; size_t len; char error[CURL_ERROR_SIZE + 2]; va_start(ap, fmt); vsnprintf(error, CURL_ERROR_SIZE, fmt, ap); len = strlen(error); if(data->set.errorbuffer && !data->state.errorbuf) { strcpy(data->set.errorbuffer, error); data->state.errorbuf = TRUE; /* wrote error string */ } if(data->set.verbose) { error[len] = '\n'; error[++len] = '\0'; Curl_debug(data, CURLINFO_TEXT, error, len, NULL); } va_end(ap); } }
pushq %rbp movq %rsp, %rbp subq $0x1f0, %rsp # imm = 0x1F0 testb %al, %al je 0x19fd7 movaps %xmm0, -0x1c0(%rbp) movaps %xmm1, -0x1b0(%rbp) movaps %xmm2, -0x1a0(%rbp) movaps %xmm3, -0x190(%rbp) movaps %xmm4, -0x180(%rbp) movaps %xmm5, -0x170(%rbp) movaps %xmm6, -0x160(%rbp) movaps %xmm7, -0x150(%rbp) movq %r9, -0x1c8(%rbp) movq %r8, -0x1d0(%rbp) movq %rcx, -0x1d8(%rbp) movq %rdx, -0x1e0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax testb $0x1, 0x7a8(%rax) jne 0x1a01a movq -0x8(%rbp), %rax cmpq $0x0, 0x200(%rax) je 0x1a0f3 leaq -0x30(%rbp), %rax leaq -0x1f0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq -0x140(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x30(%rbp), %rcx movl $0x100, %esi # imm = 0x100 callq 0x96d0 leaq -0x140(%rbp), %rdi callq 0x93b0 movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x200(%rax) je 0x1a0a4 movq -0x8(%rbp), %rax testb $0x1, 0x4d38(%rax) jne 0x1a0a4 movq -0x8(%rbp), %rax movq 0x200(%rax), %rdi leaq -0x140(%rbp), %rsi callq 0x98f0 movq -0x8(%rbp), %rax movb $0x1, 0x4d38(%rax) movq -0x8(%rbp), %rax testb $0x1, 0x7a8(%rax) je 0x1a0ef movq -0x38(%rbp), %rax movb $0xa, -0x140(%rbp,%rax) movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x38(%rbp) movb $0x0, -0x13f(%rbp,%rax) movq -0x8(%rbp), %rdi leaq -0x140(%rbp), %rdx movq -0x38(%rbp), %rcx xorl %esi, %esi xorl %eax, %eax movl %eax, %r8d callq 0x19e00 leaq -0x30(%rbp), %rax addq $0x1f0, %rsp # imm = 0x1F0 popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/sendf.c
Curl_sendf
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, const char *fmt, ...) { struct Curl_easy *data = conn->data; ssize_t bytes_written; size_t write_len; CURLcode result = CURLE_OK; char *s; char *sptr; va_list ap; va_start(ap, fmt); s = vaprintf(fmt, ap); /* returns an allocated string */ va_end(ap); if(!s) return CURLE_OUT_OF_MEMORY; /* failure */ bytes_written = 0; write_len = strlen(s); sptr = s; for(;;) { /* Write the buffer to the socket */ result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); if(result) break; if(data->set.verbose) Curl_debug(data, CURLINFO_DATA_OUT, sptr, (size_t)bytes_written, conn); if((size_t)bytes_written != write_len) { /* if not all was written at once, we must advance the pointer, decrease the size left and try again! */ write_len -= bytes_written; sptr += bytes_written; } else break; } free(s); /* free the output string */ return result; }
pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 testb %al, %al je 0x1a141 movaps %xmm0, -0xe0(%rbp) movaps %xmm1, -0xd0(%rbp) movaps %xmm2, -0xc0(%rbp) movaps %xmm3, -0xb0(%rbp) movaps %xmm4, -0xa0(%rbp) movaps %xmm5, -0x90(%rbp) movaps %xmm6, -0x80(%rbp) movaps %xmm7, -0x70(%rbp) movq %r9, -0xe8(%rbp) movq %r8, -0xf0(%rbp) movq %rcx, -0xf8(%rbp) movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movl $0x0, -0x34(%rbp) leaq -0x60(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x18, (%rax) movq -0x18(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x9da0 movq %rax, -0x40(%rbp) leaq -0x60(%rbp), %rax cmpq $0x0, -0x40(%rbp) jne 0x1a1bf movl $0x1b, -0x4(%rbp) jmp 0x1a267 movq $0x0, -0x28(%rbp) movq -0x40(%rbp), %rdi callq 0x93b0 movq %rax, -0x30(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi movl -0x8(%rbp), %esi movq -0x48(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x28(%rbp), %r8 callq 0x1a280 movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x1a1ff jmp 0x1a251 movq -0x20(%rbp), %rax testb $0x1, 0x7a8(%rax) je 0x1a226 movq -0x20(%rbp), %rdi movq -0x48(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x10(%rbp), %r8 movl $0x4, %esi callq 0x19e00 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x1a24d movq -0x28(%rbp), %rcx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x1a24f jmp 0x1a251 jmp 0x1a1dc leaq 0x797f8(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/sendf.c
Curl_write
CURLcode Curl_write(struct connectdata *conn, curl_socket_t sockfd, const void *mem, size_t len, ssize_t *written) { ssize_t bytes_written; CURLcode result = CURLE_OK; int num = (sockfd == conn->sock[SECONDARYSOCKET]); bytes_written = conn->send[num](conn, num, mem, len, &result); *written = bytes_written; if(bytes_written >= 0) /* we completely ignore the curlcode value when subzero is not returned */ return CURLE_OK; /* handle CURLE_AGAIN or a send failure */ switch(result) { case CURLE_AGAIN: *written = 0; return CURLE_OK; case CURLE_OK: /* general send failure */ return CURLE_SEND_ERROR; default: /* we got a specific curlcode, forward it */ return result; } }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl $0x0, -0x3c(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x25c(%rcx), %eax sete %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rax movslq -0x40(%rbp), %rcx movq 0x280(%rax,%rcx,8), %rax movq -0x10(%rbp), %rdi movl -0x40(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x3c(%rbp), %r8 callq *%rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x38(%rbp) jl 0x1a2fe movl $0x0, -0x4(%rbp) jmp 0x1a337 movl -0x3c(%rbp), %eax movl %eax, -0x44(%rbp) testl %eax, %eax je 0x1a328 jmp 0x1a30a movl -0x44(%rbp), %eax subl $0x51, %eax jne 0x1a331 jmp 0x1a314 movq -0x30(%rbp), %rax movq $0x0, (%rax) movl $0x0, -0x4(%rbp) jmp 0x1a337 movl $0x37, -0x4(%rbp) jmp 0x1a337 movl -0x3c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq
/macressler[P]curl/lib/sendf.c
Curl_write_plain
CURLcode Curl_write_plain(struct connectdata *conn, curl_socket_t sockfd, const void *mem, size_t len, ssize_t *written) { ssize_t bytes_written; CURLcode result; int num = (sockfd == conn->sock[SECONDARYSOCKET]); bytes_written = Curl_send_plain(conn, num, mem, len, &result); *written = bytes_written; return result; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x25c(%rcx), %eax sete %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x38(%rbp) movq -0x8(%rbp), %rdi movl -0x38(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x34(%rbp), %r8 callq 0x1a340 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/sendf.c
Curl_recv_plain
ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf, size_t len, CURLcode *code) { curl_socket_t sockfd = conn->sock[num]; ssize_t nread; /* Check and return data that already received and storied in internal intermediate buffer */ nread = get_pre_recved(conn, num, buf, len); if(nread > 0) { *code = CURLE_OK; return nread; } nread = sread(sockfd, buf, len); *code = CURLE_OK; if(-1 == nread) { int err = SOCKERRNO; if( #ifdef WSAEWOULDBLOCK /* This is how Windows does it */ (WSAEWOULDBLOCK == err) #else /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned due to its inability to send off data without blocking. We therefore treat both error codes the same here */ (EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err) #endif ) { /* this is just a case of EWOULDBLOCK */ *code = CURLE_AGAIN; } else { failf(conn->data, "Recv failure: %s", Curl_strerror(conn, err)); conn->data->state.os_errno = err; *code = CURLE_RECV_ERROR; } } return nread; }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx movl 0x258(%rax,%rcx,4), %eax movl %eax, -0x34(%rbp) movq $0x0, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jle 0x1a553 movq -0x30(%rbp), %rax movl $0x0, (%rax) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x1a604 movl -0x34(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx xorl %ecx, %ecx callq 0x92b0 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movl $0x0, (%rax) movq $-0x1, %rax cmpq -0x40(%rbp), %rax jne 0x1a5fc callq 0x90b0 movl (%rax), %eax movl %eax, -0x44(%rbp) movl $0xb, %eax cmpl -0x44(%rbp), %eax je 0x1a5a8 movl $0xb, %eax cmpl -0x44(%rbp), %eax je 0x1a5a8 movl $0x4, %eax cmpl -0x44(%rbp), %eax jne 0x1a5b4 movq -0x30(%rbp), %rax movl $0x51, (%rax) jmp 0x1a5fa movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi movl -0x44(%rbp), %esi callq 0x45ef0 movq -0x50(%rbp), %rdi movq %rax, %rdx leaq 0x61b5d(%rip), %rsi # 0x7c136 movb $0x0, %al callq 0x19f90 movl -0x44(%rbp), %ecx movq -0x10(%rbp), %rax movq (%rax), %rax movl %ecx, 0x4d3c(%rax) movq -0x30(%rbp), %rax movl $0x38, (%rax) jmp 0x1a5fc movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
/macressler[P]curl/lib/sendf.c
Curl_client_write
CURLcode Curl_client_write(struct connectdata *conn, int type, char *ptr, size_t len) { struct Curl_easy *data = conn->data; if(0 == len) len = strlen(ptr); DEBUGASSERT(type <= 3); /* FTP data may need conversion. */ if((type & CLIENTWRITE_BODY) && (conn->handler->protocol & PROTO_FAMILY_FTP) && conn->proto.ftpc.transfertype == 'A') { /* convert from the network encoding */ CURLcode result = Curl_convert_from_network(data, ptr, len); /* Curl_convert_from_network calls failf if unsuccessful */ if(result) return result; #ifdef CURL_DO_LINEEND_CONV /* convert end-of-line markers */ len = convert_lineends(data, ptr, len); #endif /* CURL_DO_LINEEND_CONV */ } return chop_write(conn, type, ptr, len); }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) xorl %eax, %eax cmpq -0x28(%rbp), %rax jne 0x1a647 movq -0x20(%rbp), %rdi callq 0x93b0 movq %rax, -0x28(%rbp) jmp 0x1a649 jmp 0x1a64b movl -0x14(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x1a6a9 movq -0x10(%rbp), %rax movq 0x3d0(%rax), %rax movl 0x80(%rax), %eax andl $0xc, %eax cmpl $0x0, %eax je 0x1a6a9 movq -0x10(%rbp), %rax movsbl 0x6d4(%rax), %eax cmpl $0x41, %eax jne 0x1a6a9 movl $0x0, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x1a694 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1a6c0 movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x1a6d0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0x1a8b0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/sendf.c
convert_lineends
static size_t convert_lineends(struct Curl_easy *data, char *startPtr, size_t size) { char *inPtr, *outPtr; /* sanity check */ if((startPtr == NULL) || (size < 1)) { return size; } if(data->state.prev_block_had_trailing_cr) { /* The previous block of incoming data had a trailing CR, which was turned into a LF. */ if(*startPtr == '\n') { /* This block of incoming data starts with the previous block's LF so get rid of it */ memmove(startPtr, startPtr + 1, size-1); size--; /* and it wasn't a bare CR but a CRLF conversion instead */ data->state.crlf_conversions++; } data->state.prev_block_had_trailing_cr = FALSE; /* reset the flag */ } /* find 1st CR, if any */ inPtr = outPtr = memchr(startPtr, '\r', size); if(inPtr) { /* at least one CR, now look for CRLF */ while(inPtr < (startPtr + size-1)) { /* note that it's size-1, so we'll never look past the last byte */ if(memcmp(inPtr, "\r\n", 2) == 0) { /* CRLF found, bump past the CR and copy the NL */ inPtr++; *outPtr = *inPtr; /* keep track of how many CRLFs we converted */ data->state.crlf_conversions++; } else { if(*inPtr == '\r') { /* lone CR, move LF instead */ *outPtr = '\n'; } else { /* not a CRLF nor a CR, just copy whatever it is */ *outPtr = *inPtr; } } outPtr++; inPtr++; } /* end of while loop */ if(inPtr < startPtr + size) { /* handle last byte */ if(*inPtr == '\r') { /* deal with a CR at the end of the buffer */ *outPtr = '\n'; /* copy a NL instead */ /* note that a CRLF might be split across two blocks */ data->state.prev_block_had_trailing_cr = TRUE; } else { /* copy last byte */ *outPtr = *inPtr; } outPtr++; } if(outPtr < startPtr + size) /* tidy up by null terminating the now shorter data */ *outPtr = '\0'; return (outPtr - startPtr); } return size; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1a6f2 cmpq $0x1, -0x20(%rbp) jae 0x1a6ff movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x1a89e movq -0x10(%rbp), %rax testb $0x1, 0x5082(%rax) je 0x1a75e movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0xa, %eax jne 0x1a753 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x1, %rsi movq -0x20(%rbp), %rdx subq $0x1, %rdx callq 0x9ff0 movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x5088(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x5088(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x5082(%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movl $0xd, %esi callq 0x9aa0 movq %rax, -0x30(%rbp) movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x1a896 jmp 0x1a785 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx addq -0x20(%rbp), %rcx addq $-0x1, %rcx cmpq %rcx, %rax jae 0x1a824 movq -0x28(%rbp), %rax movw (%rax), %ax subw $0xa0d, %ax # imm = 0xA0D setne %al movzbl %al, %eax cmpl $0x0, %eax jne 0x1a7e4 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movb (%rax), %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x5088(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x5088(%rax) jmp 0x1a807 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0xd, %eax jne 0x1a7f9 movq -0x30(%rbp), %rax movb $0xa, (%rax) jmp 0x1a805 movq -0x28(%rbp), %rax movb (%rax), %cl movq -0x30(%rbp), %rax movb %cl, (%rax) jmp 0x1a807 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x1a785 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx addq -0x20(%rbp), %rcx cmpq %rcx, %rax jae 0x1a86d movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0xd, %eax jne 0x1a855 movq -0x30(%rbp), %rax movb $0xa, (%rax) movq -0x10(%rbp), %rax movb $0x1, 0x5082(%rax) jmp 0x1a861 movq -0x28(%rbp), %rax movb (%rax), %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx addq -0x20(%rbp), %rcx cmpq %rcx, %rax jae 0x1a885 movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x1a89e movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/sendf.c
chop_write
static CURLcode chop_write(struct connectdata *conn, int type, char *optr, size_t olen) { struct Curl_easy *data = conn->data; curl_write_callback writeheader = NULL; curl_write_callback writebody = NULL; char *ptr = optr; size_t len = olen; if(!len) return CURLE_OK; /* If reading is paused, append this data to the already held data for this type. */ if(data->req.keepon & KEEP_RECV_PAUSE) return pausewrite(data, type, ptr, len); /* Determine the callback(s) to use. */ if(type & CLIENTWRITE_BODY) writebody = data->set.fwrite_func; if((type & CLIENTWRITE_HEADER) && (data->set.fwrite_header || data->set.writeheader)) { /* * Write headers to the same callback or to the especially setup * header callback function (added after version 7.7.1). */ writeheader = data->set.fwrite_header? data->set.fwrite_header: data->set.fwrite_func; } /* Chop data, write chunks. */ while(len) { size_t chunklen = len <= CURL_MAX_WRITE_SIZE? len: CURL_MAX_WRITE_SIZE; if(writebody) { size_t wrote = writebody(ptr, 1, chunklen, data->set.out); if(CURL_WRITEFUNC_PAUSE == wrote) { if(conn->handler->flags & PROTOPT_NONETWORK) { /* Protocols that work without network cannot be paused. This is actually only FILE:// just now, and it can't pause since the transfer isn't done using the "normal" procedure. */ failf(data, "Write callback asked for PAUSE when not supported!"); return CURLE_WRITE_ERROR; } return pausewrite(data, type, ptr, len); } if(wrote != chunklen) { failf(data, "Failed writing body (%zu != %zu)", wrote, chunklen); return CURLE_WRITE_ERROR; } } ptr += chunklen; len -= chunklen; } if(writeheader) { size_t wrote; ptr = optr; len = olen; Curl_set_in_callback(data, true); wrote = writeheader(ptr, 1, len, data->set.writeheader); Curl_set_in_callback(data, false); if(CURL_WRITEFUNC_PAUSE == wrote) /* here we pass in the HEADER bit only since if this was body as well then it was passed already and clearly that didn't trigger the pause, so this is saved for later with the HEADER bit only */ return pausewrite(data, CLIENTWRITE_HEADER, ptr, len); if(wrote != len) { failf(data, "Failed writing header"); return CURLE_WRITE_ERROR; } } return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) jne 0x1a908 movl $0x0, -0x4(%rbp) jmp 0x1ab68 movq -0x30(%rbp), %rax movl 0x1b4(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x1a936 movq -0x30(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx callq 0x1af80 movl %eax, -0x4(%rbp) jmp 0x1ab68 movl -0x14(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x1a950 movq -0x30(%rbp), %rax movq 0x288(%rax), %rax movq %rax, -0x40(%rbp) movl -0x14(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x1a9ad movq -0x30(%rbp), %rax cmpq $0x0, 0x290(%rax) jne 0x1a977 movq -0x30(%rbp), %rax cmpq $0x0, 0x220(%rax) je 0x1a9ad movq -0x30(%rbp), %rax cmpq $0x0, 0x290(%rax) je 0x1a996 movq -0x30(%rbp), %rax movq 0x290(%rax), %rax movq %rax, -0x70(%rbp) jmp 0x1a9a5 movq -0x30(%rbp), %rax movq 0x288(%rax), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x1a9af cmpq $0x0, -0x50(%rbp) je 0x1aabe cmpq $0x4000, -0x50(%rbp) # imm = 0x4000 ja 0x1a9ce movq -0x50(%rbp), %rax movq %rax, -0x78(%rbp) jmp 0x1a9d9 movl $0x4000, %eax # imm = 0x4000 movq %rax, -0x78(%rbp) jmp 0x1a9d9 movq -0x78(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x40(%rbp) je 0x1aa9e movq -0x40(%rbp), %rax movq -0x48(%rbp), %rdi movq -0x58(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x210(%rcx), %rcx movl $0x1, %esi callq *%rax movq %rax, -0x60(%rbp) movl $0x10000001, %eax # imm = 0x10000001 cmpq -0x60(%rbp), %rax jne 0x1aa6c movq -0x10(%rbp), %rax movq 0x3d0(%rax), %rax movl 0x84(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x1aa50 movq -0x30(%rbp), %rdi leaq 0x61729(%rip), %rsi # 0x7c166 movb $0x0, %al callq 0x19f90 movl $0x17, -0x4(%rbp) jmp 0x1ab68 movq -0x30(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx callq 0x1af80 movl %eax, -0x4(%rbp) jmp 0x1ab68 movq -0x60(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x1aa9c movq -0x30(%rbp), %rdi movq -0x60(%rbp), %rdx movq -0x58(%rbp), %rcx leaq 0x61710(%rip), %rsi # 0x7c199 movb $0x0, %al callq 0x19f90 movl $0x17, -0x4(%rbp) jmp 0x1ab68 jmp 0x1aa9e movq -0x58(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x58(%rbp), %rcx movq -0x50(%rbp), %rax subq %rcx, %rax movq %rax, -0x50(%rbp) jmp 0x1a9af cmpq $0x0, -0x38(%rbp) je 0x1ab61 movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x42ce0 movq -0x38(%rbp), %rax movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x220(%rcx), %rcx movl $0x1, %esi callq *%rax movq %rax, -0x68(%rbp) movq -0x30(%rbp), %rdi xorl %esi, %esi callq 0x42ce0 movl $0x10000001, %eax # imm = 0x10000001 cmpq -0x68(%rbp), %rax jne 0x1ab3a movq -0x30(%rbp), %rdi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx movl $0x2, %esi callq 0x1af80 movl %eax, -0x4(%rbp) jmp 0x1ab68 movq -0x68(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x1ab5f movq -0x30(%rbp), %rdi leaq 0x6166b(%rip), %rsi # 0x7c1ba movb $0x0, %al callq 0x19f90 movl $0x17, -0x4(%rbp) jmp 0x1ab68 jmp 0x1ab61 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/sendf.c
Curl_read_plain
CURLcode Curl_read_plain(curl_socket_t sockfd, char *buf, size_t bytesfromsocket, ssize_t *n) { ssize_t nread = sread(sockfd, buf, bytesfromsocket); if(-1 == nread) { int err = SOCKERRNO; int return_error; #ifdef USE_WINSOCK return_error = WSAEWOULDBLOCK == err; #else return_error = EWOULDBLOCK == err || EAGAIN == err || EINTR == err; #endif if(return_error) return CURLE_AGAIN; return CURLE_RECV_ERROR; } /* we only return number of bytes read when we return OK */ *n = nread; return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl -0x8(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx xorl %ecx, %ecx callq 0x92b0 movq %rax, -0x28(%rbp) movq $-0x1, %rax cmpq -0x28(%rbp), %rax jne 0x1ac13 callq 0x90b0 movl (%rax), %eax movl %eax, -0x2c(%rbp) movb $0x1, %al movl $0xb, %ecx cmpl -0x2c(%rbp), %ecx movb %al, -0x31(%rbp) je 0x1abf0 movb $0x1, %al movl $0xb, %ecx cmpl -0x2c(%rbp), %ecx movb %al, -0x31(%rbp) je 0x1abf0 movl $0x4, %eax cmpl -0x2c(%rbp), %eax sete %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x30(%rbp) cmpl $0x0, -0x30(%rbp) je 0x1ac0a movl $0x51, -0x4(%rbp) jmp 0x1ac25 movl $0x38, -0x4(%rbp) jmp 0x1ac25 movq -0x28(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nop
/macressler[P]curl/lib/sendf.c
Curl_read
CURLcode Curl_read(struct connectdata *conn, /* connection data */ curl_socket_t sockfd, /* read from this socket */ char *buf, /* store read data here */ size_t sizerequested, /* max amount to read */ ssize_t *n) /* amount bytes read */ { CURLcode result = CURLE_RECV_ERROR; ssize_t nread = 0; size_t bytesfromsocket = 0; char *buffertofill = NULL; struct Curl_easy *data = conn->data; /* if HTTP/1 pipelining is both wanted and possible */ bool pipelining = Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && (conn->bundle->multiuse == BUNDLE_PIPELINING); /* Set 'num' to 0 or 1, depending on which socket that has been sent here. If it is the second socket, we set num to 1. Otherwise to 0. This lets us use the correct ssl handle. */ int num = (sockfd == conn->sock[SECONDARYSOCKET]); *n = 0; /* reset amount to zero */ /* If session can pipeline, check connection buffer */ if(pipelining) { size_t bytestocopy = CURLMIN(conn->buf_len - conn->read_pos, sizerequested); /* Copy from our master buffer first if we have some unread data there*/ if(bytestocopy > 0) { memcpy(buf, conn->master_buffer + conn->read_pos, bytestocopy); conn->read_pos += bytestocopy; conn->bits.stream_was_rewound = FALSE; *n = (ssize_t)bytestocopy; return CURLE_OK; } /* If we come here, it means that there is no data to read from the buffer, * so we read from the socket */ bytesfromsocket = CURLMIN(sizerequested, MASTERBUF_SIZE); buffertofill = conn->master_buffer; } else { bytesfromsocket = CURLMIN(sizerequested, (size_t)data->set.buffer_size); buffertofill = buf; } nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &result); if(nread < 0) return result; if(pipelining) { memcpy(buf, conn->master_buffer, nread); conn->buf_len = nread; conn->read_pos = nread; } *n += nread; return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl $0x38, -0x34(%rbp) movq $0x0, -0x40(%rbp) movq $0x0, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq 0xa8(%rax), %rdi movl $0x1, %esi callq 0x3f3c0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x69(%rbp) jne 0x1ac9b jmp 0x1acaf movq -0x10(%rbp), %rax movq 0x738(%rax), %rax cmpl $0x1, (%rax) sete %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al andb $0x1, %al movb %al, -0x59(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x25c(%rcx), %eax sete %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x60(%rbp) movq -0x30(%rbp), %rax movq $0x0, (%rax) testb $0x1, -0x59(%rbp) je 0x1adc6 movq -0x10(%rbp), %rax movq 0x498(%rax), %rax movq -0x10(%rbp), %rcx subq 0x490(%rcx), %rax cmpq -0x28(%rbp), %rax jae 0x1ad1c movq -0x10(%rbp), %rax movq 0x498(%rax), %rax movq -0x10(%rbp), %rcx subq 0x490(%rcx), %rax movq %rax, -0x78(%rbp) jmp 0x1ad24 movq -0x28(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x68(%rbp) jbe 0x1ad8e movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x488(%rax), %rsi movq -0x10(%rbp), %rax addq 0x490(%rax), %rsi movq -0x68(%rbp), %rdx callq 0x97b0 movq -0x68(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x490(%rax), %rcx movq %rcx, 0x490(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x3a1(%rax) movq -0x68(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x1ae92 cmpq $0x4000, -0x28(%rbp) # imm = 0x4000 jae 0x1ada2 movq -0x28(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x1adad movl $0x4000, %eax # imm = 0x4000 movq %rax, -0x80(%rbp) jmp 0x1adad movq -0x80(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x488(%rax), %rax movq %rax, -0x50(%rbp) jmp 0x1ae09 movq -0x28(%rbp), %rax movq -0x58(%rbp), %rcx cmpq 0x750(%rcx), %rax jae 0x1ade4 movq -0x28(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0x1adf6 movq -0x58(%rbp), %rax movq 0x750(%rax), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movslq -0x60(%rbp), %rcx movq 0x270(%rax,%rcx,8), %rax movq -0x10(%rbp), %rdi movl -0x60(%rbp), %esi movq -0x50(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x34(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jge 0x1ae41 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1ae92 testb $0x1, -0x59(%rbp) je 0x1ae7d movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x488(%rax), %rsi movq -0x40(%rbp), %rdx callq 0x97b0 movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x498(%rax) movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x490(%rax) movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nop
/macressler[P]curl/lib/sendf.c
showit
static int showit(struct Curl_easy *data, curl_infotype type, char *ptr, size_t size) { static const char s_infotype[CURLINFO_END][3] = { "* ", "< ", "> ", "{ ", "} ", "{ ", "} " }; int rc = 0; #ifdef CURL_DOES_CONVERSIONS char *buf = NULL; size_t conv_size = 0; switch(type) { case CURLINFO_HEADER_OUT: buf = Curl_memdup(ptr, size); if(!buf) return 1; conv_size = size; /* Special processing is needed for this block if it * contains both headers and data (separated by CRLFCRLF). * We want to convert just the headers, leaving the data as-is. */ if(size > 4) { size_t i; for(i = 0; i < size-4; i++) { if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) { /* convert everything through this CRLFCRLF but no further */ conv_size = i + 4; break; } } } Curl_convert_from_network(data, buf, conv_size); /* Curl_convert_from_network calls failf if unsuccessful */ /* we might as well continue even if it fails... */ ptr = buf; /* switch pointer to use my buffer instead */ break; default: /* leave everything else as-is */ break; } #endif /* CURL_DOES_CONVERSIONS */ if(data->set.fdebug) { Curl_set_in_callback(data, true); rc = (*data->set.fdebug)(data, type, ptr, size, data->set.debugdata); Curl_set_in_callback(data, false); } else { switch(type) { case CURLINFO_TEXT: case CURLINFO_HEADER_OUT: case CURLINFO_HEADER_IN: fwrite(s_infotype[type], 2, 1, data->set.err); fwrite(ptr, size, 1, data->set.err); #ifdef CURL_DOES_CONVERSIONS if(size != conv_size) { /* we had untranslated data so we need an explicit newline */ fwrite("\n", 1, 1, data->set.err); } #endif break; default: /* nada */ break; } } #ifdef CURL_DOES_CONVERSIONS free(buf); #endif return rc; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x2c0(%rax) je 0x1af11 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x42ce0 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rax movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x8(%rbp), %r8 movq 0x1f8(%r8), %r8 callq *%rax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x42ce0 jmp 0x1af69 movl -0xc(%rbp), %eax subl $0x2, %eax ja 0x1af65 jmp 0x1af1b movl -0xc(%rbp), %eax leaq 0x611eb(%rip), %rdi # 0x7c110 imulq $0x3, %rax, %rax addq %rax, %rdi movq -0x8(%rbp), %rax movq 0x1f0(%rax), %rcx movl $0x2, %esi movl $0x1, %edx callq 0xa3a0 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rax movq 0x1f0(%rax), %rcx movl $0x1, %edx callq 0xa3a0 jmp 0x1af67 jmp 0x1af67 jmp 0x1af69 movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/sendf.c
pausewrite
static CURLcode pausewrite(struct Curl_easy *data, int type, /* what type of data */ const char *ptr, size_t len) { /* signalled to pause sending on this connection, but since we have data we want to send we need to dup it to save a copy for when the sending is again enabled */ struct SingleRequest *k = &data->req; struct UrlState *s = &data->state; char *dupl; unsigned int i; bool newtype = TRUE; if(s->tempcount) { for(i = 0; i< s->tempcount; i++) { if(s->tempwrite[i].type == type) { /* data for this type exists */ newtype = FALSE; break; } } DEBUGASSERT(i < 3); } else i = 0; if(!newtype) { /* append new data to old data */ /* figure out the new size of the data to save */ size_t newlen = len + s->tempwrite[i].len; /* allocate the new memory area */ char *newptr = realloc(s->tempwrite[i].buf, newlen); if(!newptr) return CURLE_OUT_OF_MEMORY; /* copy the new data to the end of the new area */ memcpy(newptr + s->tempwrite[i].len, ptr, len); /* update the pointer and the size */ s->tempwrite[i].buf = newptr; s->tempwrite[i].len = newlen; } else { dupl = Curl_memdup(ptr, len); if(!dupl) return CURLE_OUT_OF_MEMORY; /* store this information in the state struct for later use */ s->tempwrite[i].buf = dupl; s->tempwrite[i].len = len; s->tempwrite[i].type = type; if(newtype) s->tempcount++; } /* mark the connection as RECV paused */ k->keepon |= KEEP_RECV_PAUSE; DEBUGF(infof(data, "Paused %zu bytes in buffer for type %02x\n", len, type)); return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax addq $0xc0, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0xc68, %rax # imm = 0xC68 movq %rax, -0x38(%rbp) movb $0x1, -0x45(%rbp) movq -0x38(%rbp), %rax cmpl $0x0, 0x4078(%rax) je 0x1b00f movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax movq -0x38(%rbp), %rcx cmpl 0x4078(%rcx), %eax jae 0x1b009 movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movl 0x10(%rax), %eax cmpl -0x14(%rbp), %eax jne 0x1affc movb $0x0, -0x45(%rbp) jmp 0x1b009 jmp 0x1affe movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x1afcb jmp 0x1b00b jmp 0x1b00d jmp 0x1b016 movl $0x0, -0x44(%rbp) testb $0x1, -0x45(%rbp) jne 0x1b0e5 movq -0x28(%rbp), %rax movq -0x38(%rbp), %rcx addq $0x4080, %rcx # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rcx addq 0x8(%rcx), %rax movq %rax, -0x50(%rbp) leaq 0x78a10(%rip), %rax # 0x93a58 movq (%rax), %rax movq -0x38(%rbp), %rcx addq $0x4080, %rcx # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq (%rcx), %rdi movq -0x50(%rbp), %rsi callq *%rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0x1b080 movl $0x1b, -0x4(%rbp) jmp 0x1b191 movq -0x58(%rbp), %rdi movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax addq 0x8(%rax), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x97b0 movq -0x58(%rbp), %rcx movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rax movq %rcx, (%rax) movq -0x50(%rbp), %rcx movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) jmp 0x1b175 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x4a680 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x1b109 movl $0x1b, -0x4(%rbp) jmp 0x1b191 movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) movl -0x14(%rbp), %ecx movq -0x38(%rbp), %rax addq $0x4080, %rax # imm = 0x4080 movl -0x44(%rbp), %edx imulq $0x18, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x10(%rax) testb $0x1, -0x45(%rbp) je 0x1b173 movq -0x38(%rbp), %rax movl 0x4078(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x4078(%rax) jmp 0x1b175 movq -0x30(%rbp), %rax movl 0xf4(%rax), %ecx orl $0x10, %ecx movl %ecx, 0xf4(%rax) jmp 0x1b18a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
/macressler[P]curl/lib/sendf.c
ftp_setup_connection
static CURLcode ftp_setup_connection(struct connectdata *conn) { struct Curl_easy *data = conn->data; char *type; char command; struct FTP *ftp; conn->data->req.protop = ftp = malloc(sizeof(struct FTP)); if(NULL == ftp) return CURLE_OUT_OF_MEMORY; data->state.path++; /* don't include the initial slash */ data->state.slash_removed = TRUE; /* we've skipped the slash */ /* FTP URLs support an extension like ";type=<typecode>" that * we'll try to get now! */ type = strstr(data->state.path, ";type="); if(!type) type = strstr(conn->host.rawalloc, ";type="); if(type) { *type = 0; /* it was in the middle of the hostname */ command = Curl_raw_toupper(type[6]); conn->bits.type_set = TRUE; switch(command) { case 'A': /* ASCII mode */ data->set.prefer_ascii = TRUE; break; case 'D': /* directory mode */ data->set.ftp_list_only = TRUE; break; case 'I': /* binary mode */ default: /* switch off ASCII */ data->set.prefer_ascii = FALSE; break; } } /* get some initial data into the ftp struct */ ftp->bytecountp = &conn->data->req.bytecount; ftp->transfer = FTPTRANSFER_BODY; ftp->downloadsize = 0; /* No need to duplicate user+password, the connectdata struct won't change during a session, but we re-init them here since on subsequent inits since the conn struct may have changed or been replaced. */ ftp->user = conn->user; ftp->passwd = conn->passwd; if(isBadFtpString(ftp->user)) return CURLE_URL_MALFORMAT; if(isBadFtpString(ftp->passwd)) return CURLE_URL_MALFORMAT; conn->proto.ftpc.known_filesize = -1; /* unknown size for now */ return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movl $0x28, %edi leaq 0x78885(%rip), %rax # 0x93a48 callq *(%rax) movq %rax, %rcx movq %rcx, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x1e8(%rax) xorl %eax, %eax cmpq -0x30(%rbp), %rax jne 0x1b1ee movl $0x1b, -0x4(%rbp) jmp 0x1b364 movq -0x18(%rbp), %rax movq 0x5098(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x5098(%rax) movq -0x18(%rbp), %rax movb $0x1, 0x50a0(%rax) movq -0x18(%rbp), %rax movq 0x5098(%rax), %rdi leaq 0x607c1(%rip), %rsi # 0x7b9e2 callq 0x91d0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x1b24c movq -0x10(%rbp), %rax movq 0xc8(%rax), %rdi leaq 0x6079f(%rip), %rsi # 0x7b9e2 callq 0x91d0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x1b2c0 movq -0x20(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax movsbl 0x6(%rax), %edi callq 0x36650 movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movb $0x1, 0x3a4(%rax) movsbl -0x21(%rbp), %eax movl %eax, -0x34(%rbp) subl $0x41, %eax je 0x1b297 jmp 0x1b283 movl -0x34(%rbp), %eax subl $0x44, %eax je 0x1b2a4 jmp 0x1b28d movl -0x34(%rbp), %eax subl $0x49, %eax je 0x1b2b1 jmp 0x1b2b3 movq -0x18(%rbp), %rax movb $0x1, 0x794(%rax) jmp 0x1b2be movq -0x18(%rbp), %rax movb $0x1, 0x796(%rax) jmp 0x1b2be jmp 0x1b2b3 movq -0x18(%rbp), %rax movb $0x0, 0x794(%rax) jmp 0x1b2c0 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0xc0, %rcx addq $0x20, %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x30(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x10(%rbp), %rax movq 0x210(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq 0x218(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rdi callq 0x22ba0 testb $0x1, %al jne 0x1b329 jmp 0x1b332 movl $0x3, -0x4(%rbp) jmp 0x1b364 movq -0x30(%rbp), %rax movq 0x10(%rax), %rdi callq 0x22ba0 testb $0x1, %al jne 0x1b345 jmp 0x1b34e movl $0x3, -0x4(%rbp) jmp 0x1b364 movq -0x10(%rbp), %rax movq $-0x1, 0x700(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c
ftp_do
static CURLcode ftp_do(struct connectdata *conn, bool *done) { CURLcode result = CURLE_OK; struct ftp_conn *ftpc = &conn->proto.ftpc; *done = FALSE; /* default to false */ ftpc->wait_data_conn = FALSE; /* default to no such wait */ if(conn->data->state.wildcardmatch) { result = wc_statemach(conn); if(conn->data->wildcard.state == CURLWC_SKIP || conn->data->wildcard.state == CURLWC_DONE) { /* do not call ftp_regular_transfer */ return CURLE_OK; } if(result) /* error, loop or skipping the file */ return result; } else { /* no wildcard FSM needed */ result = ftp_parse_url_path(conn); if(result) return result; } result = ftp_regular_transfer(conn, done); return result; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movb $0x0, 0x99(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax testb $0x1, 0x5079(%rax) je 0x1b3fc movq -0x10(%rbp), %rdi callq 0x21930 movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x5, 0x5108(%rax) je 0x1b3e3 movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x7, 0x5108(%rax) jne 0x1b3ec movl $0x0, -0x4(%rbp) jmp 0x1b42e cmpl $0x0, -0x1c(%rbp) je 0x1b3fa movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1b42e jmp 0x1b418 movq -0x10(%rbp), %rdi callq 0x21d70 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1b416 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1b42e jmp 0x1b418 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x224e0 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_done
static CURLcode ftp_done(struct connectdata *conn, CURLcode status, bool premature) { struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; ssize_t nread; int ftpcode; CURLcode result = CURLE_OK; char *path = NULL; const char *path_to_use = data->state.path; if(!ftp) return CURLE_OK; switch(status) { case CURLE_BAD_DOWNLOAD_RESUME: case CURLE_FTP_WEIRD_PASV_REPLY: case CURLE_FTP_PORT_FAILED: case CURLE_FTP_ACCEPT_FAILED: case CURLE_FTP_ACCEPT_TIMEOUT: case CURLE_FTP_COULDNT_SET_TYPE: case CURLE_FTP_COULDNT_RETR_FILE: case CURLE_PARTIAL_FILE: case CURLE_UPLOAD_FAILED: case CURLE_REMOTE_ACCESS_DENIED: case CURLE_FILESIZE_EXCEEDED: case CURLE_REMOTE_FILE_NOT_FOUND: case CURLE_WRITE_ERROR: /* the connection stays alive fine even though this happened */ /* fall-through */ case CURLE_OK: /* doesn't affect the control connection's status */ if(!premature) break; /* until we cope better with prematurely ended requests, let them * fallback as if in complete failure */ /* FALLTHROUGH */ default: /* by default, an error means the control connection is wedged and should not be used anymore */ ftpc->ctl_valid = FALSE; ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the current path, as this connection is going */ connclose(conn, "FTP ended with bad error code"); result = status; /* use the already set error code */ break; } /* now store a copy of the directory we are in */ free(ftpc->prevpath); if(data->state.wildcardmatch) { if(data->set.chunk_end && ftpc->file) { Curl_set_in_callback(data, true); data->set.chunk_end(data->wildcard.customptr); Curl_set_in_callback(data, false); } ftpc->known_filesize = -1; } if(!result) /* get the "raw" path */ result = Curl_urldecode(data, path_to_use, 0, &path, NULL, TRUE); if(result) { /* We can limp along anyway (and should try to since we may already be in * the error path) */ ftpc->ctl_valid = FALSE; /* mark control connection as bad */ connclose(conn, "FTP: out of memory!"); /* mark for connection closure */ ftpc->prevpath = NULL; /* no path remembering */ } else { size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */ size_t dlen = strlen(path)-flen; if(!ftpc->cwdfail) { ftpc->prevmethod = data->set.ftp_filemethod; if(dlen && (data->set.ftp_filemethod != FTPFILE_NOCWD)) { ftpc->prevpath = path; if(flen) /* if 'path' is not the whole string */ ftpc->prevpath[dlen] = 0; /* terminate */ } else { /* we never changed dir */ ftpc->prevpath = strdup(""); free(path); } if(ftpc->prevpath) infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath); } else { ftpc->prevpath = NULL; /* no path */ free(path); } } /* free the dir tree and file parts */ freedirs(ftpc); /* shut down the socket to inform the server we're done */ #ifdef _WIN32_WCE shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */ #endif if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) { if(!result && ftpc->dont_check && data->req.maxdownload > 0) { /* partial download completed */ result = Curl_pp_sendf(pp, "%s", "ABOR"); if(result) { failf(data, "Failure sending ABOR command: %s", curl_easy_strerror(result)); ftpc->ctl_valid = FALSE; /* mark control connection as bad */ connclose(conn, "ABOR command failed"); /* connection closure */ } } if(conn->ssl[SECONDARYSOCKET].use) { /* The secondary socket is using SSL so we must close down that part first before we close the socket for real */ Curl_ssl_close(conn, SECONDARYSOCKET); /* Note that we keep "use" set to TRUE since that (next) connection is still requested to use SSL */ } close_secondarysocket(conn); } if(!result && (ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid && pp->pending_resp && !premature) { /* * Let's see what the server says about the transfer we just performed, * but lower the timeout as sometimes this connection has died while the * data has been transferred. This happens when doing through NATs etc that * abandon old silent connections. */ long old_time = pp->response_time; pp->response_time = 60*1000; /* give it only a minute for now */ pp->response = Curl_now(); /* timeout relative now */ result = Curl_GetFTPResponse(&nread, conn, &ftpcode); pp->response_time = old_time; /* set this back to previous value */ if(!nread && (CURLE_OPERATION_TIMEDOUT == result)) { failf(data, "control connection looks dead"); ftpc->ctl_valid = FALSE; /* mark control connection as bad */ connclose(conn, "Timeout or similar in FTP DONE operation"); /* close */ } if(result) return result; if(ftpc->dont_check && data->req.maxdownload > 0) { /* we have just sent ABOR and there is no reliable way to check if it was * successful or not; we have to close the connection now */ infof(data, "partial download completed, closing connection\n"); connclose(conn, "Partial download with no ability to check"); return result; } if(!ftpc->dont_check) { /* 226 Transfer complete, 250 Requested file action okay, completed. */ if((ftpcode != 226) && (ftpcode != 250)) { failf(data, "server did not report OK, got %d", ftpcode); result = CURLE_PARTIAL_FILE; } } } if(result || premature) /* the response code from the transfer showed an error already so no use checking further */ ; else if(data->set.upload) { if((-1 != data->state.infilesize) && (data->state.infilesize != *ftp->bytecountp) && !data->set.crlf && (ftp->transfer == FTPTRANSFER_BODY)) { failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T " out of %" CURL_FORMAT_CURL_OFF_T " bytes)", *ftp->bytecountp, data->state.infilesize); result = CURLE_PARTIAL_FILE; } } else { if((-1 != data->req.size) && (data->req.size != *ftp->bytecountp) && #ifdef CURL_DO_LINEEND_CONV /* Most FTP servers don't adjust their file SIZE response for CRLFs, so * we'll check to see if the discrepancy can be explained by the number * of CRLFs we've changed to LFs. */ ((data->req.size + data->state.crlf_conversions) != *ftp->bytecountp) && #endif /* CURL_DO_LINEEND_CONV */ (data->req.maxdownload != *ftp->bytecountp)) { failf(data, "Received only partial file: %" CURL_FORMAT_CURL_OFF_T " bytes", *ftp->bytecountp); result = CURLE_PARTIAL_FILE; } else if(!ftpc->dont_check && !*ftp->bytecountp && (data->req.size>0)) { failf(data, "No data was received!"); result = CURLE_FTP_COULDNT_RETR_FILE; } } /* clear these for next connection */ ftp->transfer = FTPTRANSFER_BODY; ftpc->dont_check = FALSE; /* Send any post-transfer QUOTE strings? */ if(!status && !result && !premature && data->set.postquote) result = ftp_sendquote(conn, data->set.postquote); return result; }
pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) andb $0x1, %al movb %al, -0x15(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x1e8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x0, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq -0x20(%rbp), %rax movq 0x5098(%rax), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x1b4ba movl $0x0, -0x4(%rbp) jmp 0x1bb1b movl -0x14(%rbp), %eax movq %rax, -0x88(%rbp) subq $0x4e, %rax ja 0x1b4eb movq -0x88(%rbp), %rax leaq 0x60cf8(%rip), %rcx # 0x7c1d0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax testb $0x1, -0x15(%rbp) jne 0x1b4e9 jmp 0x1b515 jmp 0x1b4eb movq -0x30(%rbp), %rax movb $0x0, 0x91(%rax) movq -0x30(%rbp), %rax movb $0x1, 0x98(%rax) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3c850 movl -0x14(%rbp), %eax movl %eax, -0x48(%rbp) leaq 0x78534(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x30(%rbp), %rcx movq 0xa0(%rcx), %rdi callq *%rax movq -0x20(%rbp), %rax testb $0x1, 0x5079(%rax) je 0x1b595 movq -0x20(%rbp), %rax cmpq $0x0, 0xa00(%rax) je 0x1b586 movq -0x30(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x1b586 movq -0x20(%rbp), %rdi movl $0x1, %esi callq 0x42ce0 movq -0x20(%rbp), %rax movq 0xa00(%rax), %rax movq -0x20(%rbp), %rcx movq 0x5150(%rcx), %rdi callq *%rax movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x42ce0 movq -0x30(%rbp), %rax movq $-0x1, 0xd8(%rax) cmpl $0x0, -0x48(%rbp) jne 0x1b5bd movq -0x20(%rbp), %rdi movq -0x58(%rbp), %rsi xorl %eax, %eax movl %eax, %r8d leaq -0x50(%rbp), %rcx movl $0x1, %r9d movq %r8, %rdx callq 0x2c660 movl %eax, -0x48(%rbp) cmpl $0x0, -0x48(%rbp) je 0x1b5f0 movq -0x30(%rbp), %rax movb $0x0, 0x91(%rax) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3c850 movq -0x30(%rbp), %rax movq $0x0, 0xa0(%rax) jmp 0x1b71e movq -0x30(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x1b617 movq -0x30(%rbp), %rax movq 0x88(%rax), %rdi callq 0x93b0 movq %rax, -0x90(%rbp) jmp 0x1b622 xorl %eax, %eax movq %rax, -0x90(%rbp) jmp 0x1b622 movq -0x90(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x50(%rbp), %rdi callq 0x93b0 subq -0x60(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x30(%rbp), %rax testb $0x1, 0x98(%rax) jne 0x1b6fd movq -0x20(%rbp), %rax movl 0x778(%rax), %ecx movq -0x30(%rbp), %rax movl %ecx, 0xa8(%rax) cmpq $0x0, -0x68(%rbp) je 0x1b6a2 movq -0x20(%rbp), %rax cmpl $0x2, 0x778(%rax) je 0x1b6a2 movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0xa0(%rax) cmpq $0x0, -0x60(%rbp) je 0x1b6a0 movq -0x30(%rbp), %rax movq 0xa0(%rax), %rax movq -0x68(%rbp), %rcx movb $0x0, (%rax,%rcx) jmp 0x1b6d0 leaq 0x67e03(%rip), %rdi # 0x834ac leaq 0x783b0(%rip), %rax # 0x93a60 callq *(%rax) movq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, 0xa0(%rax) leaq 0x78389(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x50(%rbp), %rdi callq *%rax movq -0x30(%rbp), %rax cmpq $0x0, 0xa0(%rax) je 0x1b6fb movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rax movq 0xa0(%rax), %rdx leaq 0x61709(%rip), %rsi # 0x7cdfd movb $0x0, %al callq 0x19d00 jmp 0x1b71c movq -0x30(%rbp), %rax movq $0x0, 0xa0(%rax) leaq 0x7833d(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x50(%rbp), %rdi callq *%rax jmp 0x1b71e movq -0x30(%rbp), %rdi callq 0x216f0 movq -0x10(%rbp), %rax cmpl $-0x1, 0x25c(%rax) je 0x1b7e9 cmpl $0x0, -0x48(%rbp) jne 0x1b7c5 movq -0x30(%rbp), %rax testb $0x1, 0x90(%rax) je 0x1b7c5 movq -0x20(%rbp), %rax cmpq $0x0, 0xd0(%rax) jle 0x1b7c5 movq -0x38(%rbp), %rdi leaq 0x5ff43(%rip), %rsi # 0x7b6ab leaq 0x616ae(%rip), %rdx # 0x7ce1d movb $0x0, %al callq 0x550c0 movl %eax, -0x48(%rbp) cmpl $0x0, -0x48(%rbp) je 0x1b7c3 movq -0x20(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x48(%rbp), %edi callq 0x92f0 movq -0x98(%rbp), %rdi movq %rax, %rdx leaq 0x6167f(%rip), %rsi # 0x7ce22 movb $0x0, %al callq 0x19f90 movq -0x30(%rbp), %rax movb $0x0, 0x91(%rax) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3c850 jmp 0x1b7c5 movq -0x10(%rbp), %rax testb $0x1, 0x2a8(%rax) je 0x1b7e0 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x79310 movq -0x10(%rbp), %rdi callq 0x20b20 cmpl $0x0, -0x48(%rbp) jne 0x1b965 movq -0x28(%rbp), %rax cmpl $0x0, 0x18(%rax) jne 0x1b965 movq -0x30(%rbp), %rax testb $0x1, 0x91(%rax) je 0x1b965 movq -0x38(%rbp), %rax testb $0x1, 0x20(%rax) je 0x1b965 testb $0x1, -0x15(%rbp) jne 0x1b965 movq -0x38(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x70(%rbp) movq -0x38(%rbp), %rax movq $0xea60, 0x50(%rax) # imm = 0xEA60 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) callq 0xb150 movq %rax, %rcx movq -0xa0(%rbp), %rax movq %rcx, -0x80(%rbp) movl %edx, -0x78(%rbp) movq -0x80(%rbp), %rcx movq %rcx, 0x40(%rax) movq -0x78(%rbp), %rcx movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rsi leaq -0x40(%rbp), %rdi leaq -0x44(%rbp), %rdx callq 0x1c360 movl %eax, -0x48(%rbp) movq -0x70(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x50(%rax) cmpq $0x0, -0x40(%rbp) jne 0x1b8cf movl $0x1c, %eax cmpl -0x48(%rbp), %eax jne 0x1b8cf movq -0x20(%rbp), %rdi leaq 0x61594(%rip), %rsi # 0x7ce43 movb $0x0, %al callq 0x19f90 movq -0x30(%rbp), %rax movb $0x0, 0x91(%rax) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3c850 cmpl $0x0, -0x48(%rbp) je 0x1b8e0 movl -0x48(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bb1b movq -0x30(%rbp), %rax testb $0x1, 0x90(%rax) je 0x1b926 movq -0x20(%rbp), %rax cmpq $0x0, 0xd0(%rax) jle 0x1b926 movq -0x20(%rbp), %rdi leaq 0x6155b(%rip), %rsi # 0x7ce61 movb $0x0, %al callq 0x19d00 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3c850 movl -0x48(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bb1b movq -0x30(%rbp), %rax testb $0x1, 0x90(%rax) jne 0x1b963 cmpl $0xe2, -0x44(%rbp) je 0x1b961 cmpl $0xfa, -0x44(%rbp) je 0x1b961 movq -0x20(%rbp), %rdi movl -0x44(%rbp), %edx leaq 0x6153e(%rip), %rsi # 0x7ce91 movb $0x0, %al callq 0x19f90 movl $0x12, -0x48(%rbp) jmp 0x1b963 jmp 0x1b965 cmpl $0x0, -0x48(%rbp) jne 0x1b971 testb $0x1, -0x15(%rbp) je 0x1b976 jmp 0x1bac8 movq -0x20(%rbp), %rax testb $0x1, 0x7a2(%rax) je 0x1b9f8 movq -0x20(%rbp), %rcx movq $-0x1, %rax cmpq 0x50d0(%rcx), %rax je 0x1b9f3 movq -0x20(%rbp), %rax movq 0x50d0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq (%rcx), %rax je 0x1b9f3 movq -0x20(%rbp), %rax testb $0x1, 0x572(%rax) jne 0x1b9f3 movq -0x28(%rbp), %rax cmpl $0x0, 0x18(%rax) jne 0x1b9f3 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rax movq (%rax), %rax movq (%rax), %rdx movq -0x20(%rbp), %rax movq 0x50d0(%rax), %rcx leaq 0x614cd(%rip), %rsi # 0x7ceb2 movb $0x0, %al callq 0x19f90 movl $0x12, -0x48(%rbp) jmp 0x1bac6 movq -0x20(%rbp), %rcx movq $-0x1, %rax cmpq 0xc0(%rcx), %rax je 0x1ba81 movq -0x20(%rbp), %rax movq 0xc0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq (%rcx), %rax je 0x1ba81 movq -0x20(%rbp), %rax movq 0xc0(%rax), %rax movq -0x20(%rbp), %rcx addq 0x5088(%rcx), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq (%rcx), %rax je 0x1ba81 movq -0x20(%rbp), %rax movq 0xd0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq (%rcx), %rax je 0x1ba81 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rax movq (%rax), %rax movq (%rax), %rdx leaq 0x61475(%rip), %rsi # 0x7cee6 movb $0x0, %al callq 0x19f90 movl $0x12, -0x48(%rbp) jmp 0x1bac4 movq -0x30(%rbp), %rax testb $0x1, 0x90(%rax) jne 0x1bac2 movq -0x28(%rbp), %rax movq (%rax), %rax cmpq $0x0, (%rax) jne 0x1bac2 movq -0x20(%rbp), %rax cmpq $0x0, 0xc0(%rax) jle 0x1bac2 movq -0x20(%rbp), %rdi leaq 0x61458(%rip), %rsi # 0x7cf0c movb $0x0, %al callq 0x19f90 movl $0x13, -0x48(%rbp) jmp 0x1bac4 jmp 0x1bac6 jmp 0x1bac8 movq -0x28(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x30(%rbp), %rax movb $0x0, 0x90(%rax) cmpl $0x0, -0x14(%rbp) jne 0x1bb15 cmpl $0x0, -0x48(%rbp) jne 0x1bb15 testb $0x1, -0x15(%rbp) jne 0x1bb15 movq -0x20(%rbp), %rax cmpq $0x0, 0x580(%rax) je 0x1bb15 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x580(%rax), %rsi callq 0x217e0 movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopw (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_do_more
static CURLcode ftp_do_more(struct connectdata *conn, int *completep) { struct Curl_easy *data = conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = CURLE_OK; bool connected = FALSE; bool complete = FALSE; /* the ftp struct is inited in ftp_connect() */ struct FTP *ftp = data->req.protop; /* if the second connection isn't done yet, wait for it */ if(!conn->bits.tcpconnect[SECONDARYSOCKET]) { if(Curl_connect_ongoing(conn)) { /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port aren't used so we blank their arguments. TODO: make this nicer */ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); return result; } result = Curl_is_connected(conn, SECONDARYSOCKET, &connected); /* Ready to do more? */ if(connected) { DEBUGF(infof(data, "DO-MORE connected phase starts\n")); } else { if(result && (ftpc->count1 == 0)) { *completep = -1; /* go back to DOING please */ /* this is a EPSV connect failing, try PASV instead */ return ftp_epsv_disable(conn); } return result; } } result = Curl_proxy_connect(conn, SECONDARYSOCKET); if(result) return result; if(CONNECT_SECONDARYSOCKET_PROXY_SSL()) return result; if(conn->bits.tunnel_proxy && conn->bits.httpproxy && Curl_connect_ongoing(conn)) return result; if(ftpc->state) { /* already in a state so skip the initial commands. They are only done to kickstart the do_more state */ result = ftp_multi_statemach(conn, &complete); *completep = (int)complete; /* if we got an error or if we don't wait for a data connection return immediately */ if(result || (ftpc->wait_data_conn != TRUE)) return result; if(ftpc->wait_data_conn) /* if we reach the end of the FTP state machine here, *complete will be TRUE but so is ftpc->wait_data_conn, which says we need to wait for the data connection and therefore we're not actually complete */ *completep = 0; } if(ftp->transfer <= FTPTRANSFER_INFO) { /* a transfer is about to take place, or if not a file name was given so we'll do a SIZE on it later and then we need the right TYPE first */ if(ftpc->wait_data_conn == TRUE) { bool serv_conned; result = ReceivedServerConnect(conn, &serv_conned); if(result) return result; /* Failed to accept data connection */ if(serv_conned) { /* It looks data connection is established */ result = AcceptServerConnect(conn); ftpc->wait_data_conn = FALSE; if(!result) result = InitiateTransfer(conn); if(result) return result; *completep = 1; /* this state is now complete when the server has connected back to us */ } } else if(data->set.upload) { result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE); if(result) return result; result = ftp_multi_statemach(conn, &complete); if(ftpc->wait_data_conn) /* if we reach the end of the FTP state machine here, *complete will be TRUE but so is ftpc->wait_data_conn, which says we need to wait for the data connection and therefore we're not actually complete */ *completep = 0; else *completep = (int)complete; } else { /* download */ ftp->downloadsize = -1; /* unknown as of yet */ result = Curl_range(conn); if(result == CURLE_OK && data->req.maxdownload >= 0) { /* Don't check for successful transfer */ ftpc->dont_check = TRUE; } if(result) ; else if(data->set.ftp_list_only || !ftpc->file) { /* The specified path ends with a slash, and therefore we think this is a directory that is requested, use LIST. But before that we need to set ASCII transfer mode. */ /* But only if a body transfer was requested. */ if(ftp->transfer == FTPTRANSFER_BODY) { result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE); if(result) return result; } /* otherwise just fall through */ } else { result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_RETR_TYPE); if(result) return result; } result = ftp_multi_statemach(conn, &complete); *completep = (int)complete; } return result; } if(!result && (ftp->transfer != FTPTRANSFER_BODY)) /* no data to transfer. FIX: it feels like a kludge to have this here too! */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); if(!ftpc->wait_data_conn) { /* no waiting for the data connection so this is now complete */ *completep = 1; DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result)); } return result; }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movb $0x0, -0x2d(%rbp) movb $0x0, -0x2e(%rbp) movq -0x20(%rbp), %rax movq 0x1e8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax testb $0x1, 0x396(%rax) jne 0x1bc15 movq -0x10(%rbp), %rdi callq 0x57d50 testb $0x1, %al jne 0x1bb97 jmp 0x1bbb9 movq -0x10(%rbp), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx xorl %ecx, %ecx callq 0x57c80 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x10(%rbp), %rdi movl $0x1, %esi leaq -0x2d(%rbp), %rdx callq 0x3b410 movl %eax, -0x2c(%rbp) testb $0x1, -0x2d(%rbp) je 0x1bbda jmp 0x1bbd6 jmp 0x1bbd8 jmp 0x1bc13 cmpl $0x0, -0x2c(%rbp) je 0x1bc08 movq -0x28(%rbp), %rax cmpl $0x0, 0xb0(%rax) jne 0x1bc08 movq -0x18(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rdi callq 0x20e60 movl %eax, -0x4(%rbp) jmp 0x1bf4d movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d jmp 0x1bc15 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x57a20 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1bc37 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x10(%rbp), %rax cmpl $0x2, 0x178(%rax) jne 0x1bc5c movq -0x10(%rbp), %rax testb $0x1, 0x3aa(%rax) jne 0x1bc5c movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x10(%rbp), %rax testb $0x1, 0x399(%rax) je 0x1bc90 movq -0x10(%rbp), %rax testb $0x1, 0x38e(%rax) je 0x1bc90 movq -0x10(%rbp), %rdi callq 0x57d50 testb $0x1, %al jne 0x1bc85 jmp 0x1bc90 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x28(%rbp), %rax cmpl $0x0, 0xbc(%rax) je 0x1bcf9 movq -0x10(%rbp), %rdi leaq -0x2e(%rbp), %rsi callq 0x1c040 movl %eax, -0x2c(%rbp) movb -0x2e(%rbp), %al andb $0x1, %al movzbl %al, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) cmpl $0x0, -0x2c(%rbp) jne 0x1bcd5 movq -0x28(%rbp), %rax movb 0x99(%rax), %al andb $0x1, %al movzbl %al, %eax cmpl $0x1, %eax je 0x1bce0 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x28(%rbp), %rax testb $0x1, 0x99(%rax) je 0x1bcf7 movq -0x18(%rbp), %rax movl $0x0, (%rax) jmp 0x1bcf9 movq -0x38(%rbp), %rax cmpl $0x1, 0x18(%rax) ja 0x1bef4 movq -0x28(%rbp), %rax movb 0x99(%rax), %al andb $0x1, %al movzbl %al, %eax cmpl $0x1, %eax jne 0x1bd8b movq -0x10(%rbp), %rdi leaq -0x39(%rbp), %rsi callq 0x213b0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1bd3c movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d testb $0x1, -0x39(%rbp) je 0x1bd86 movq -0x10(%rbp), %rdi callq 0x21570 movl %eax, -0x2c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x99(%rax) cmpl $0x0, -0x2c(%rbp) jne 0x1bd6b movq -0x10(%rbp), %rdi callq 0x211b0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1bd7c movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x18(%rbp), %rax movl $0x1, (%rax) jmp 0x1beec movq -0x20(%rbp), %rax testb $0x1, 0x7a2(%rax) je 0x1be05 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movb 0x794(%rax), %al movl $0x16, %edx andb $0x1, %al movzbl %al, %esi callq 0x1f940 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1bdc9 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d movq -0x10(%rbp), %rdi leaq -0x2e(%rbp), %rsi callq 0x1c040 movl %eax, -0x2c(%rbp) movq -0x28(%rbp), %rax testb $0x1, 0x99(%rax) je 0x1bdf2 movq -0x18(%rbp), %rax movl $0x0, (%rax) jmp 0x1be00 movb -0x2e(%rbp), %al andb $0x1, %al movzbl %al, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) jmp 0x1beea movq -0x38(%rbp), %rax movq $-0x1, 0x20(%rax) movq -0x10(%rbp), %rdi callq 0x6d5c0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x1be3c movq -0x20(%rbp), %rax cmpq $0x0, 0xd0(%rax) jl 0x1be3c movq -0x28(%rbp), %rax movb $0x1, 0x90(%rax) cmpl $0x0, -0x2c(%rbp) je 0x1be47 jmp 0x1becc movq -0x20(%rbp), %rax testb $0x1, 0x796(%rax) jne 0x1be62 movq -0x28(%rbp), %rax cmpq $0x0, 0x88(%rax) jne 0x1be97 movq -0x38(%rbp), %rax cmpl $0x0, 0x18(%rax) jne 0x1be95 movq -0x10(%rbp), %rdi movl $0x1, %esi movl $0x14, %edx callq 0x1f940 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1be93 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d jmp 0x1be95 jmp 0x1beca movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movb 0x794(%rax), %al movl $0x15, %edx andb $0x1, %al movzbl %al, %esi callq 0x1f940 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x1bec8 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d jmp 0x1beca jmp 0x1becc movq -0x10(%rbp), %rdi leaq -0x2e(%rbp), %rsi callq 0x1c040 movl %eax, -0x2c(%rbp) movb -0x2e(%rbp), %al andb $0x1, %al movzbl %al, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) jmp 0x1beec movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1bf4d cmpl $0x0, -0x2c(%rbp) jne 0x1bf2c movq -0x38(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0x1bf2c movq -0x10(%rbp), %rdi movl $0xffffffff, %r9d # imm = 0xFFFFFFFF movq $-0x1, %rdx xorl %ecx, %ecx xorl %eax, %eax movl %eax, %r8d movl %r9d, %esi movq $0x0, (%rsp) callq 0x36260 movq -0x28(%rbp), %rax testb $0x1, 0x99(%rax) jne 0x1bf47 movq -0x18(%rbp), %rax movl $0x1, (%rax) jmp 0x1bf45 jmp 0x1bf47 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_connect
static CURLcode ftp_connect(struct connectdata *conn, bool *done) /* see description above */ { CURLcode result; struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; *done = FALSE; /* default to not done yet */ /* We always support persistent connections on ftp */ connkeep(conn, "FTP default"); pp->response_time = RESP_TIMEOUT; /* set default response time-out */ pp->statemach_act = ftp_statemach_act; pp->endofresp = ftp_endofresp; pp->conn = conn; if(conn->handler->flags & PROTOPT_SSL) { /* BLOCKING */ result = Curl_ssl_connect(conn, FIRSTSOCKET); if(result) return result; } Curl_pp_init(pp); /* init the generic pingpong data */ /* When we connect, we start in the state where we await the 220 response */ state(conn, FTP_WAIT220); result = ftp_multi_statemach(conn, done); return result; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x3c850 movq -0x30(%rbp), %rax movq $0x1b7740, 0x50(%rax) # imm = 0x1B7740 movq -0x30(%rbp), %rax leaq 0x801(%rip), %rcx # 0x1c7b0 movq %rcx, 0x60(%rax) movq -0x30(%rbp), %rax leaq 0x1542(%rip), %rcx # 0x1d500 movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x10(%rbp), %rax movq 0x3d0(%rax), %rax movl 0x84(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x1c005 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x78540 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1c003 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1c032 jmp 0x1c005 movq -0x30(%rbp), %rdi callq 0x54e40 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x1c780 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x1c040 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_multi_statemach
static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done) { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE); /* Check for the state outside of the Curl_socket_check() return code checks since at times we are in fact already in this state when this function gets called. */ *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE; return result; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x54bf0 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movl 0xbc(%rax), %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovel %ecx, %eax cmpl $0x0, %eax setne %cl movq -0x10(%rbp), %rax andb $0x1, %cl movb %cl, (%rax) movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_doing
static CURLcode ftp_doing(struct connectdata *conn, bool *dophase_done) { CURLcode result = ftp_multi_statemach(conn, dophase_done); if(result) DEBUGF(infof(conn->data, "DO phase failed\n")); else if(*dophase_done) { result = ftp_dophase_done(conn, FALSE /* not connected */); DEBUGF(infof(conn->data, "DO phase is complete2\n")); } return result; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x1c040 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1c0cc jmp 0x1c0c8 jmp 0x1c0ca jmp 0x1c0e9 movq -0x10(%rbp), %rax testb $0x1, (%rax) je 0x1c0e7 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x20f90 movl %eax, -0x14(%rbp) jmp 0x1c0e5 jmp 0x1c0e7 jmp 0x1c0e9 movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_domore_getsock
static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { struct ftp_conn *ftpc = &conn->proto.ftpc; if(!numsocks) return GETSOCK_BLANK; /* When in DO_MORE state, we could be either waiting for us to connect to a * remote site, or we could wait for that site to connect to us. Or just * handle ordinary commands. */ if(FTP_STOP == ftpc->state) { int bits = GETSOCK_READSOCK(0); /* if stopped and still in this state, then we're also waiting for a connect on the secondary connection */ socks[0] = conn->sock[FIRSTSOCKET]; if(!conn->data->set.ftp_use_port) { int s; int i; /* PORT is used to tell the server to connect to us, and during that we don't do happy eyeballs, but we do if we connect to the server */ for(s = 1, i = 0; i<2; i++) { if(conn->tempsock[i] != CURL_SOCKET_BAD) { socks[s] = conn->tempsock[i]; bits |= GETSOCK_WRITESOCK(s++); } } } else { socks[1] = conn->sock[SECONDARYSOCKET]; bits |= GETSOCK_WRITESOCK(1) | GETSOCK_READSOCK(1); } return bits; } return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x1c163 movl $0x0, -0x4(%rbp) jmp 0x1c244 movq -0x28(%rbp), %rcx xorl %eax, %eax cmpl 0xbc(%rcx), %eax jne 0x1c22a movl $0x1, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x258(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax testb $0x1, 0x797(%rax) jne 0x1c206 movl $0x1, -0x30(%rbp) movl $0x0, -0x34(%rbp) cmpl $0x2, -0x34(%rbp) jge 0x1c204 movq -0x10(%rbp), %rax movslq -0x34(%rbp), %rcx cmpl $-0x1, 0x260(%rax,%rcx,4) je 0x1c1f7 movq -0x10(%rbp), %rax movslq -0x34(%rbp), %rcx movl 0x260(%rax,%rcx,4), %edx movq -0x18(%rbp), %rax movslq -0x30(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x30(%rbp), %ecx movl %ecx, %eax addl $0x1, %eax movl %eax, -0x30(%rbp) addl $0x10, %ecx movl $0x1, %eax shll %cl, %eax orl -0x2c(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0x1c1f9 movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x1c1aa jmp 0x1c222 movq -0x10(%rbp), %rax movl 0x25c(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x2c(%rbp), %eax orl $0x20002, %eax # imm = 0x20002 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1c244 movq -0x10(%rbp), %rdi addq $0x628, %rdi # imm = 0x628 movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx callq 0x55630 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c
ftp_readresp
static CURLcode ftp_readresp(curl_socket_t sockfd, struct pingpong *pp, int *ftpcode, /* return the ftp-code if done */ size_t *size) /* size of the response */ { struct connectdata *conn = pp->conn; struct Curl_easy *data = conn->data; #ifdef HAVE_GSSAPI char * const buf = data->state.buffer; #endif CURLcode result = CURLE_OK; int code; result = Curl_pp_readresp(sockfd, pp, &code, size); #if defined(HAVE_GSSAPI) /* handle the security-oriented responses 6xx ***/ /* FIXME: some errorchecking perhaps... ***/ switch(code) { case 631: code = Curl_sec_read_msg(conn, buf, PROT_SAFE); break; case 632: code = Curl_sec_read_msg(conn, buf, PROT_PRIVATE); break; case 633: code = Curl_sec_read_msg(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!\n"); state(conn, FTP_STOP); return CURLE_OPERATION_TIMEDOUT; } return result; }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movl $0x0, -0x34(%rbp) movl -0x8(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rdx callq 0x55160 movl %eax, -0x34(%rbp) movl -0x38(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x5158(%rax) cmpq $0x0, -0x18(%rbp) je 0x1c5c9 movl -0x38(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) movl $0x1a5, %eax # imm = 0x1A5 cmpl -0x38(%rbp), %eax jne 0x1c5f9 movq -0x30(%rbp), %rdi leaq 0x5fe5b(%rip), %rsi # 0x7c439 movb $0x0, %al callq 0x19d00 movq -0x28(%rbp), %rdi xorl %esi, %esi callq 0x1c780 movl $0x1c, -0x4(%rbp) jmp 0x1c5ff movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/ftp.c
Curl_ftpsend
CURLcode Curl_ftpsend(struct connectdata *conn, const char *cmd) { ssize_t bytes_written; #define SBUF_SIZE 1024 char s[SBUF_SIZE]; size_t write_len; char *sptr = s; CURLcode result = CURLE_OK; #ifdef HAVE_GSSAPI enum protection_level data_sec = conn->data_prot; #endif write_len = strlen(cmd); if(write_len > (sizeof(s) -3)) return CURLE_BAD_FUNCTION_ARGUMENT; strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */ write_len += 2; bytes_written = 0; result = Curl_convert_to_network(conn->data, s, write_len); /* Curl_convert_to_network calls failf if unsuccessful */ if(result) return result; for(;;) { #ifdef HAVE_GSSAPI conn->data_prot = PROT_CMD; #endif result = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, &bytes_written); #ifdef HAVE_GSSAPI DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); conn->data_prot = data_sec; #endif if(result) break; if(conn->data->set.verbose) Curl_debug(conn->data, CURLINFO_HEADER_OUT, sptr, (size_t)bytes_written, conn); if(bytes_written != (ssize_t)write_len) { write_len -= bytes_written; sptr += bytes_written; } else break; } return result; }
pushq %rbp movq %rsp, %rbp subq $0x440, %rsp # imm = 0x440 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq -0x420(%rbp), %rax movq %rax, -0x430(%rbp) movl $0x0, -0x434(%rbp) movq -0x18(%rbp), %rdi callq 0x93b0 movq %rax, -0x428(%rbp) cmpq $0x3fd, -0x428(%rbp) # imm = 0x3FD jbe 0x1c664 movl $0x2b, -0x4(%rbp) jmp 0x1c767 leaq -0x420(%rbp), %rdi addq -0x428(%rbp), %rdi leaq 0x5f525(%rip), %rsi # 0x7bb9e callq 0x98f0 movq -0x428(%rbp), %rax addq $0x2, %rax movq %rax, -0x428(%rbp) movq $0x0, -0x20(%rbp) movl $0x0, -0x434(%rbp) cmpl $0x0, -0x434(%rbp) je 0x1c6b9 movl -0x434(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1c767 jmp 0x1c6bb movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x258(%rax), %esi movq -0x430(%rbp), %rdx movq -0x428(%rbp), %rcx leaq -0x20(%rbp), %r8 callq 0x1a280 movl %eax, -0x434(%rbp) cmpl $0x0, -0x434(%rbp) je 0x1c6f1 jmp 0x1c75e movq -0x10(%rbp), %rax movq (%rax), %rax testb $0x1, 0x7a8(%rax) je 0x1c721 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x430(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 movl $0x2, %esi callq 0x19e00 movq -0x20(%rbp), %rax cmpq -0x428(%rbp), %rax je 0x1c757 movq -0x20(%rbp), %rcx movq -0x428(%rbp), %rax subq %rcx, %rax movq %rax, -0x428(%rbp) movq -0x20(%rbp), %rax addq -0x430(%rbp), %rax movq %rax, -0x430(%rbp) jmp 0x1c759 jmp 0x1c75e jmp 0x1c6bb movl -0x434(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x440, %rsp # imm = 0x440 popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
state
static void _state(struct connectdata *conn, ftpstate newstate #ifdef DEBUGBUILD , int lineno #endif ) { struct ftp_conn *ftpc = &conn->proto.ftpc; #if defined(DEBUGBUILD) #if defined(CURL_DISABLE_VERBOSE_STRINGS) (void) lineno; #else if(ftpc->state != newstate) infof(conn->data, "FTP %p (line %d) state change from %s to %s\n", (void *)ftpc, lineno, ftp_state_names[ftpc->state], ftp_state_names[newstate]); #endif #endif ftpc->state = newstate; }
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x18(%rbp) movl -0xc(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xbc(%rax) popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_user_resp
static CURLcode ftp_state_user_resp(struct connectdata *conn, int ftpcode, ftpstate instate) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; (void)instate; /* no use for this yet */ /* some need password anyway, and others just return 2xx ignored */ if((ftpcode == 331) && (ftpc->state == FTP_USER)) { /* 331 Password required for ... (the server requires to send the user's password too) */ PPSENDF(&ftpc->pp, "PASS %s", ftp->passwd?ftp->passwd:""); state(conn, FTP_PASS); } else if(ftpcode/100 == 2) { /* 230 User ... logged in. (the user logged in with or without password) */ result = ftp_state_loggedin(conn); } else if(ftpcode == 332) { if(data->set.str[STRING_FTP_ACCOUNT]) { PPSENDF(&ftpc->pp, "ACCT %s", data->set.str[STRING_FTP_ACCOUNT]); state(conn, FTP_ACCT); } else { failf(data, "ACCT requested but none available"); result = CURLE_LOGIN_DENIED; } } else { /* All other response codes, like: 530 User ... access denied (the server denies to log the specified user) */ if(conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] && !conn->data->state.ftp_trying_alternative) { /* Ok, USER failed. Let's try the supplied command. */ PPSENDF(&conn->proto.ftpc.pp, "%s", conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]); conn->data->state.ftp_trying_alternative = TRUE; state(conn, FTP_USER); result = CURLE_OK; } else { failf(data, "Access denied: %03d", ftpcode); result = CURLE_LOGIN_DENIED; } } return result; }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x1e8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x38(%rbp) cmpl $0x14b, -0x14(%rbp) # imm = 0x14B jne 0x1d662 movq -0x38(%rbp), %rax cmpl $0x3, 0xbc(%rax) jne 0x1d662 movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x1d618 movq -0x30(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) jmp 0x1d625 leaq 0x65e8d(%rip), %rax # 0x834ac movq %rax, -0x48(%rbp) jmp 0x1d625 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rdx leaq 0x5efa2(%rip), %rsi # 0x7c5d6 movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1d64f movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1d79f movq -0x10(%rbp), %rdi movl $0x4, %esi callq 0x1c780 jmp 0x1d799 movl -0x14(%rbp), %eax movl $0x64, %ecx cltd idivl %ecx cmpl $0x2, %eax jne 0x1d683 movq -0x10(%rbp), %rdi callq 0x1f030 movl %eax, -0x1c(%rbp) jmp 0x1d797 cmpl $0x14c, -0x14(%rbp) # imm = 0x14C jne 0x1d6f9 movq -0x28(%rbp), %rax cmpq $0x0, 0x840(%rax) je 0x1d6db movq -0x38(%rbp), %rdi movq -0x28(%rbp), %rax movq 0x840(%rax), %rdx leaq 0x5ef2e(%rip), %rsi # 0x7c5de movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1d6cb movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1d79f movq -0x10(%rbp), %rdi movl $0x5, %esi callq 0x1c780 jmp 0x1d6f4 movq -0x28(%rbp), %rdi leaq 0x5ef00(%rip), %rsi # 0x7c5e6 movb $0x0, %al callq 0x19f90 movl $0x43, -0x1c(%rbp) jmp 0x1d795 movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x848(%rax) je 0x1d777 movq -0x10(%rbp), %rax movq (%rax), %rax testb $0x1, 0x5078(%rax) jne 0x1d777 movq -0x10(%rbp), %rdi addq $0x628, %rdi # imm = 0x628 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x848(%rax), %rdx leaq 0x5df71(%rip), %rsi # 0x7b6ab movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1d752 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1d79f movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x1, 0x5078(%rax) movq -0x10(%rbp), %rdi movl $0x3, %esi callq 0x1c780 movl $0x0, -0x1c(%rbp) jmp 0x1d793 movq -0x28(%rbp), %rdi movl -0x14(%rbp), %edx leaq 0x5ee83(%rip), %rsi # 0x7c608 movb $0x0, %al callq 0x19f90 movl $0x43, -0x1c(%rbp) jmp 0x1d795 jmp 0x1d797 jmp 0x1d799 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_user
static CURLcode ftp_state_user(struct connectdata *conn) { CURLcode result; struct FTP *ftp = conn->data->req.protop; /* send USER */ PPSENDF(&conn->proto.ftpc.pp, "USER %s", ftp->user?ftp->user:""); state(conn, FTP_USER); conn->data->state.ftp_trying_alternative = FALSE; return CURLE_OK; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x1e8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x1d7f5 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) jmp 0x1d802 leaq 0x65cb0(%rip), %rax # 0x834ac movq %rax, -0x30(%rbp) jmp 0x1d802 movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rdx leaq 0x5ee13(%rip), %rsi # 0x7c624 movb $0x0, %al callq 0x550c0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1d829 movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1d84c movq -0x10(%rbp), %rdi movl $0x3, %esi callq 0x1c780 movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x0, 0x5078(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_acct_resp
static CURLcode ftp_state_acct_resp(struct connectdata *conn, int ftpcode) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; if(ftpcode != 230) { failf(data, "ACCT rejected by server: %03d", ftpcode); result = CURLE_FTP_WEIRD_PASS_REPLY; /* FIX */ } else result = ftp_state_loggedin(conn); return result; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x0, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpl $0xe6, -0xc(%rbp) je 0x1d8a8 movq -0x18(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x5ed94(%rip), %rsi # 0x7c62c movb $0x0, %al callq 0x19f90 movl $0xb, -0x10(%rbp) jmp 0x1d8b4 movq -0x8(%rbp), %rdi callq 0x1f030 movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_quote
static CURLcode ftp_state_quote(struct connectdata *conn, bool init, ftpstate instate) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; bool quote = FALSE; struct curl_slist *item; switch(instate) { case FTP_QUOTE: default: item = data->set.quote; break; case FTP_RETR_PREQUOTE: case FTP_STOR_PREQUOTE: item = data->set.prequote; break; case FTP_POSTQUOTE: item = data->set.postquote; break; } /* * This state uses: * 'count1' to iterate over the commands to send * 'count2' to store whether to allow commands to fail */ if(init) ftpc->count1 = 0; else ftpc->count1++; if(item) { int i = 0; /* Skip count1 items in the linked list */ while((i< ftpc->count1) && item) { item = item->next; i++; } if(item) { char *cmd = item->data; if(cmd[0] == '*') { cmd++; ftpc->count2 = 1; /* the sent command is allowed to fail */ } else ftpc->count2 = 0; /* failure means cancel operation */ PPSENDF(&ftpc->pp, "%s", cmd); state(conn, instate); quote = TRUE; } } if(!quote) { /* No more quote to send, continue to ... */ switch(instate) { case FTP_QUOTE: default: result = ftp_state_cwd(conn); break; case FTP_RETR_PREQUOTE: if(ftp->transfer != FTPTRANSFER_BODY) state(conn, FTP_STOP); else { if(ftpc->known_filesize != -1) { Curl_pgrsSetDownloadSize(data, ftpc->known_filesize); result = ftp_state_retr(conn, ftpc->known_filesize); } else { if(data->set.ignorecl) { /* This code is to support download of growing files. It prevents the state machine from requesting the file size from the server. With an unknown file size the download continues until the server terminates it, otherwise the client stops if the received byte count exceeds the reported file size. Set option CURLOPT_IGNORE_CONTENT_LENGTH to 1 to enable this behavior.*/ PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); state(conn, FTP_RETR); } else { PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); state(conn, FTP_RETR_SIZE); } } } break; case FTP_STOR_PREQUOTE: result = ftp_state_ul_setup(conn, FALSE); break; case FTP_POSTQUOTE: break; } } return result; }
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) andb $0x1, %al movb %al, -0x11(%rbp) movl %edx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x1e8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x38(%rbp) movb $0x0, -0x39(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x5c(%rbp) subl $0xc, %eax je 0x1d98e jmp 0x1d977 movl -0x5c(%rbp), %eax addl $-0xd, %eax subl $0x2, %eax jb 0x1d9a1 jmp 0x1d984 movl -0x5c(%rbp), %eax subl $0xf, %eax je 0x1d9b2 jmp 0x1d990 jmp 0x1d990 movq -0x28(%rbp), %rax movq 0x578(%rax), %rax movq %rax, -0x48(%rbp) jmp 0x1d9c1 movq -0x28(%rbp), %rax movq 0x588(%rax), %rax movq %rax, -0x48(%rbp) jmp 0x1d9c1 movq -0x28(%rbp), %rax movq 0x580(%rax), %rax movq %rax, -0x48(%rbp) testb $0x1, -0x11(%rbp) je 0x1d9d7 movq -0x38(%rbp), %rax movl $0x0, 0xb0(%rax) jmp 0x1d9ea movq -0x38(%rbp), %rax movl 0xb0(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xb0(%rax) cmpq $0x0, -0x48(%rbp) je 0x1dabf movl $0x0, -0x4c(%rbp) movl -0x4c(%rbp), %ecx movq -0x38(%rbp), %rdx xorl %eax, %eax cmpl 0xb0(%rdx), %ecx movb %al, -0x5d(%rbp) jge 0x1da1b cmpq $0x0, -0x48(%rbp) setne %al movb %al, -0x5d(%rbp) movb -0x5d(%rbp), %al testb $0x1, %al jne 0x1da24 jmp 0x1da3b movq -0x48(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) movl -0x4c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4c(%rbp) jmp 0x1d9fc cmpq $0x0, -0x48(%rbp) je 0x1dabd movq -0x48(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movsbl (%rax), %eax cmpl $0x2a, %eax jne 0x1da75 movq -0x58(%rbp), %rax addq $0x1, %rax movq %rax, -0x58(%rbp) movq -0x38(%rbp), %rax movl $0x1, 0xb4(%rax) jmp 0x1da83 movq -0x38(%rbp), %rax movl $0x0, 0xb4(%rax) movq -0x38(%rbp), %rdi movq -0x58(%rbp), %rdx leaq 0x5dc19(%rip), %rsi # 0x7b6ab movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1daad movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1dc00 movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x1c780 movb $0x1, -0x39(%rbp) jmp 0x1dabf testb $0x1, -0x39(%rbp) jne 0x1dbfa movl -0x18(%rbp), %eax addl $-0xc, %eax movl %eax, %ecx movq %rcx, -0x68(%rbp) subl $0x3, %eax ja 0x1daf0 movq -0x68(%rbp), %rax leaq 0x5e8af(%rip), %rcx # 0x7c394 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x1daf0 movq -0x10(%rbp), %rdi callq 0x1f0b0 movl %eax, -0x1c(%rbp) jmp 0x1dbf8 movq -0x30(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0x1db1b movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x1c780 jmp 0x1dbe4 movq -0x38(%rbp), %rax cmpq $-0x1, 0xd8(%rax) je 0x1db59 movq -0x28(%rbp), %rdi movq -0x38(%rbp), %rax movq 0xd8(%rax), %rsi callq 0xda80 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rax movq 0xd8(%rax), %rsi callq 0x1f250 movl %eax, -0x1c(%rbp) jmp 0x1dbe2 movq -0x28(%rbp), %rax testb $0x1, 0x7bf(%rax) je 0x1dba4 movq -0x38(%rbp), %rdi movq -0x38(%rbp), %rax movq 0x88(%rax), %rdx leaq 0x5ebf6(%rip), %rsi # 0x7c772 movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1db94 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1dc00 movq -0x10(%rbp), %rdi movl $0x20, %esi callq 0x1c780 jmp 0x1dbe0 movq -0x38(%rbp), %rdi movq -0x38(%rbp), %rax movq 0x88(%rax), %rdx leaq 0x5ea94(%rip), %rsi # 0x7c64e movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1dbd2 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1dc00 movq -0x10(%rbp), %rdi movl $0x18, %esi callq 0x1c780 jmp 0x1dbe2 jmp 0x1dbe4 jmp 0x1dbf8 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x1f4f0 movl %eax, -0x1c(%rbp) jmp 0x1dbf8 jmp 0x1dbf8 jmp 0x1dbfa movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_mdtm
static CURLcode ftp_state_mdtm(struct connectdata *conn) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; /* Requested time of file or time-depended transfer? */ if((data->set.get_filetime || data->set.timecondition) && ftpc->file) { /* we have requested to get the modified-time of the file, this is a white spot as the MDTM is not mentioned in RFC959 */ PPSENDF(&ftpc->pp, "MDTM %s", ftpc->file); state(conn, FTP_MDTM); } else result = ftp_state_type(conn); return result; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax testb $0x1, 0x792(%rax) jne 0x1dc56 movq -0x20(%rbp), %rax cmpl $0x0, 0x5c0(%rax) je 0x1dca2 movq -0x28(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x1dca2 movq -0x28(%rbp), %rdi movq -0x28(%rbp), %rax movq 0x88(%rax), %rdx leaq 0x5eabc(%rip), %rsi # 0x7c736 movb $0x0, %al callq 0x550c0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1dc92 movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1dcb4 movq -0x10(%rbp), %rdi movl $0x12, %esi callq 0x1c780 jmp 0x1dcae movq -0x10(%rbp), %rdi callq 0x1f830 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_mdtm_resp
static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, int ftpcode) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; switch(ftpcode) { case 213: { /* we got a time. Format should be: "YYYYMMDDHHMMSS[.sss]" where the last .sss part is optional and means fractions of a second */ int year, month, day, hour, minute, second; if(6 == sscanf(&data->state.buffer[4], "%04d%02d%02d%02d%02d%02d", &year, &month, &day, &hour, &minute, &second)) { /* we have a time, reformat it */ char timebuf[24]; time_t secs = time(NULL); snprintf(timebuf, sizeof(timebuf), "%04d%02d%02d %02d:%02d:%02d GMT", year, month, day, hour, minute, second); /* now, convert this into a time() value: */ data->info.filetime = curl_getdate(timebuf, &secs); } #ifdef CURL_FTP_HTTPSTYLE_HEAD /* If we asked for a time of the file and we actually got one as well, we "emulate" a HTTP-style header in our output. */ if(data->set.opt_no_body && ftpc->file && data->set.get_filetime && (data->info.filetime >= 0) ) { char headerbuf[128]; time_t filetime = data->info.filetime; struct tm buffer; const struct tm *tm = &buffer; result = Curl_gmtime(filetime, &buffer); if(result) return result; /* format: "Tue, 15 Nov 1994 12:45:26" */ snprintf(headerbuf, sizeof(headerbuf), "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, Curl_month[tm->tm_mon], tm->tm_year + 1900, tm->tm_hour, tm->tm_min, tm->tm_sec); result = Curl_client_write(conn, CLIENTWRITE_BOTH, headerbuf, 0); if(result) return result; } /* end of a ridiculous amount of conditionals */ #endif } break; default: infof(data, "unsupported MDTM reply format\n"); break; case 550: /* "No such file or directory" */ failf(data, "Given file does not exist"); result = CURLE_FTP_COULDNT_RETR_FILE; break; } if(data->set.timecondition) { if((data->info.filetime > 0) && (data->set.timevalue > 0)) { switch(data->set.timecondition) { case CURL_TIMECOND_IFMODSINCE: default: if(data->info.filetime <= data->set.timevalue) { infof(data, "The requested document is not new enough\n"); ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ data->info.timecond = TRUE; state(conn, FTP_STOP); return CURLE_OK; } break; case CURL_TIMECOND_IFUNMODSINCE: if(data->info.filetime > data->set.timevalue) { infof(data, "The requested document is not old enough\n"); ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ data->info.timecond = TRUE; state(conn, FTP_STOP); return CURLE_OK; } break; } /* switch */ } else { infof(data, "Skipping time comparison\n"); } } if(!result) result = ftp_state_type(conn); return result; }
pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x178, %rsp # imm = 0x178 movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x1e8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x38(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x14c(%rbp) subl $0xd5, %eax je 0x1dd2a jmp 0x1dd14 movl -0x14c(%rbp), %eax subl $0x226, %eax # imm = 0x226 je 0x1df73 jmp 0x1df5f movq -0x28(%rbp), %rax movq 0xca0(%rax), %rdi addq $0x4, %rdi leaq 0x5eb5f(%rip), %rsi # 0x7c89f leaq -0x3c(%rbp), %rdx leaq -0x40(%rbp), %rcx leaq -0x44(%rbp), %r8 leaq -0x48(%rbp), %r9 leaq -0x4c(%rbp), %r10 leaq -0x50(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x9950 movl %eax, %ecx movl $0x6, %eax cmpl %ecx, %eax jne 0x1ddd5 xorl %eax, %eax movl %eax, %edi callq 0x98d0 movq %rax, -0x78(%rbp) leaq -0x70(%rbp), %rdi movl -0x3c(%rbp), %ecx movl -0x40(%rbp), %r8d movl -0x44(%rbp), %r9d movl -0x48(%rbp), %r11d movl -0x4c(%rbp), %r10d movl -0x50(%rbp), %eax movl $0x18, %esi leaq 0x5eb12(%rip), %rdx # 0x7c8b8 movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) movb $0x0, %al callq 0x9510 leaq -0x70(%rbp), %rdi leaq -0x78(%rbp), %rsi callq 0x9100 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x5168(%rax) movq -0x28(%rbp), %rax testb $0x1, 0x7a1(%rax) je 0x1df5d movq -0x38(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x1df5d movq -0x28(%rbp), %rax testb $0x1, 0x792(%rax) je 0x1df5d movq -0x28(%rbp), %rax cmpq $0x0, 0x5168(%rax) jl 0x1df5d movq -0x28(%rbp), %rax movq 0x5168(%rax), %rax movq %rax, -0x108(%rbp) leaq -0x140(%rbp), %rax movq %rax, -0x148(%rbp) movq -0x108(%rbp), %rdi leaq -0x140(%rbp), %rsi callq 0x46db0 movl %eax, -0x20(%rbp) cmpl $0x0, -0x20(%rbp) je 0x1de62 movl -0x20(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0x1e0c4 leaq -0x100(%rbp), %rax movq %rax, -0x158(%rbp) movq -0x148(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0x1de92 movq -0x148(%rbp), %rax movl 0x18(%rax), %eax subl $0x1, %eax movl %eax, -0x15c(%rbp) jmp 0x1de9f movl $0x6, %eax movl %eax, -0x15c(%rbp) jmp 0x1de9f movq -0x158(%rbp), %rdi movl -0x15c(%rbp), %eax movslq %eax, %rcx leaq 0x743da(%rip), %rax # 0x92290 movq (%rax,%rcx,8), %rcx movq -0x148(%rbp), %rax movl 0xc(%rax), %r8d movq -0x148(%rbp), %rax movslq 0x10(%rax), %rdx leaq 0x743f9(%rip), %rax # 0x922d0 movq (%rax,%rdx,8), %r9 movq -0x148(%rbp), %rax movl 0x14(%rax), %ebx addl $0x76c, %ebx # imm = 0x76C movq -0x148(%rbp), %rax movl 0x8(%rax), %r11d movq -0x148(%rbp), %rax movl 0x4(%rax), %r10d movq -0x148(%rbp), %rax movl (%rax), %eax movl $0x80, %esi leaq 0x5d12d(%rip), %rdx # 0x7b043 movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movl %r10d, 0x10(%rsp) movl %eax, 0x18(%rsp) movb $0x0, %al callq 0x9510 movq -0x18(%rbp), %rdi leaq -0x100(%rbp), %rdx movl $0x3, %esi xorl %eax, %eax movl %eax, %ecx callq 0x1a610 movl %eax, -0x20(%rbp) cmpl $0x0, -0x20(%rbp) je 0x1df5b movl -0x20(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0x1e0c4 jmp 0x1df5d jmp 0x1df8c movq -0x28(%rbp), %rdi leaq 0x5e96e(%rip), %rsi # 0x7c8d8 movb $0x0, %al callq 0x19d00 jmp 0x1df8c movq -0x28(%rbp), %rdi leaq 0x5e979(%rip), %rsi # 0x7c8f7 movb $0x0, %al callq 0x19f90 movl $0x13, -0x20(%rbp) movq -0x28(%rbp), %rax cmpl $0x0, 0x5c0(%rax) je 0x1e0ac movq -0x28(%rbp), %rax cmpq $0x0, 0x5168(%rax) jle 0x1e098 movq -0x28(%rbp), %rax cmpq $0x0, 0x5c8(%rax) jle 0x1e098 movq -0x28(%rbp), %rax movl 0x5c0(%rax), %eax movl %eax, -0x160(%rbp) subl $0x1, %eax je 0x1dfe5 jmp 0x1dfd8 movl -0x160(%rbp), %eax subl $0x2, %eax je 0x1e040 jmp 0x1dfe7 jmp 0x1dfe7 movq -0x28(%rbp), %rax movq 0x5168(%rax), %rax movq -0x28(%rbp), %rcx cmpq 0x5c8(%rcx), %rax jg 0x1e03e movq -0x28(%rbp), %rdi leaq 0x5e907(%rip), %rsi # 0x7c911 movb $0x0, %al callq 0x19d00 movq -0x30(%rbp), %rax movl $0x2, 0x18(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x5170(%rax) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x1c780 movl $0x0, -0xc(%rbp) jmp 0x1e0c4 jmp 0x1e096 movq -0x28(%rbp), %rax movq 0x5168(%rax), %rax movq -0x28(%rbp), %rcx cmpq 0x5c8(%rcx), %rax jle 0x1e094 movq -0x28(%rbp), %rdi leaq 0x5e8d8(%rip), %rsi # 0x7c93b movb $0x0, %al callq 0x19d00 movq -0x30(%rbp), %rax movl $0x2, 0x18(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x5170(%rax) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x1c780 movl $0x0, -0xc(%rbp) jmp 0x1e0c4 jmp 0x1e096 jmp 0x1e0aa movq -0x28(%rbp), %rdi leaq 0x5e8c2(%rip), %rsi # 0x7c965 movb $0x0, %al callq 0x19d00 jmp 0x1e0ac cmpl $0x0, -0x20(%rbp) jne 0x1e0be movq -0x18(%rbp), %rdi callq 0x1f830 movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x178, %rsp # imm = 0x178 popq %rbx popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_type_resp
static CURLcode ftp_state_type_resp(struct connectdata *conn, int ftpcode, ftpstate instate) { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; if(ftpcode/100 != 2) { /* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a successful 'TYPE I'. While that is not as RFC959 says, it is still a positive response code and we allow that. */ failf(data, "Couldn't set desired mode"); return CURLE_FTP_COULDNT_SET_TYPE; } if(ftpcode != 200) infof(data, "Got a %03d response code instead of the assumed 200\n", ftpcode); if(instate == FTP_TYPE) result = ftp_state_size(conn); else if(instate == FTP_LIST_TYPE) result = ftp_state_list(conn); else if(instate == FTP_RETR_TYPE) result = ftp_state_retr_prequote(conn); else if(instate == FTP_STOR_TYPE) result = ftp_state_stor_prequote(conn); return result; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl -0x14(%rbp), %eax movl $0x64, %ecx cltd idivl %ecx cmpl $0x2, %eax je 0x1e12f movq -0x28(%rbp), %rdi leaq 0x5e860(%rip), %rsi # 0x7c97f movb $0x0, %al callq 0x19f90 movl $0x11, -0x4(%rbp) jmp 0x1e1a7 cmpl $0xc8, -0x14(%rbp) je 0x1e14d movq -0x28(%rbp), %rdi movl -0x14(%rbp), %edx leaq 0x5e853(%rip), %rsi # 0x7c999 movb $0x0, %al callq 0x19d00 cmpl $0x13, -0x18(%rbp) jne 0x1e161 movq -0x10(%rbp), %rdi callq 0x1fa00 movl %eax, -0x1c(%rbp) jmp 0x1e1a1 cmpl $0x14, -0x18(%rbp) jne 0x1e175 movq -0x10(%rbp), %rdi callq 0x20b70 movl %eax, -0x1c(%rbp) jmp 0x1e19f cmpl $0x15, -0x18(%rbp) jne 0x1e189 movq -0x10(%rbp), %rdi callq 0x20d90 movl %eax, -0x1c(%rbp) jmp 0x1e19d cmpl $0x16, -0x18(%rbp) jne 0x1e19b movq -0x10(%rbp), %rdi callq 0x20dd0 movl %eax, -0x1c(%rbp) jmp 0x1e19d jmp 0x1e19f jmp 0x1e1a1 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
/macressler[P]curl/lib/ftp.c
ftp_state_rest_resp
static CURLcode ftp_state_rest_resp(struct connectdata *conn, int ftpcode, ftpstate instate) { CURLcode result = CURLE_OK; struct ftp_conn *ftpc = &conn->proto.ftpc; switch(instate) { case FTP_REST: default: #ifdef CURL_FTP_HTTPSTYLE_HEAD if(ftpcode == 350) { char buffer[24]= { "Accept-ranges: bytes\r\n" }; result = Curl_client_write(conn, CLIENTWRITE_BOTH, buffer, 0); if(result) return result; } #endif result = ftp_state_prepare_transfer(conn); break; case FTP_RETR_REST: if(ftpcode != 350) { failf(conn->data, "Couldn't use REST"); result = CURLE_FTP_COULDNT_USE_REST; } else { PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); state(conn, FTP_RETR); } break; } return result; }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x28(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x44(%rbp) subl $0x1a, %eax je 0x1e32e jmp 0x1e324 movl -0x44(%rbp), %eax subl $0x1b, %eax je 0x1e391 jmp 0x1e330 jmp 0x1e330 cmpl $0x15e, -0x14(%rbp) # imm = 0x15E jne 0x1e383 movq 0x5e0a0(%rip), %rax # 0x7c3e0 movq %rax, -0x40(%rbp) movq 0x5e09d(%rip), %rax # 0x7c3e8 movq %rax, -0x38(%rbp) movq 0x5e09a(%rip), %rax # 0x7c3f0 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi leaq -0x40(%rbp), %rdx movl $0x3, %esi xorl %eax, %eax movl %eax, %ecx callq 0x1a610 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1e381 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1e3fc jmp 0x1e383 movq -0x10(%rbp), %rdi callq 0x1fb60 movl %eax, -0x1c(%rbp) jmp 0x1e3f6 cmpl $0x15e, -0x14(%rbp) # imm = 0x15E je 0x1e3b8 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0x5e626(%rip), %rsi # 0x7c9ce movb $0x0, %al callq 0x19f90 movl $0x1f, -0x1c(%rbp) jmp 0x1e3f4 movq -0x28(%rbp), %rdi movq -0x28(%rbp), %rax movq 0x88(%rax), %rdx leaq 0x5e3a4(%rip), %rsi # 0x7c772 movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1e3e6 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1e3fc movq -0x10(%rbp), %rdi movl $0x20, %esi callq 0x1c780 jmp 0x1e3f6 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_use_pasv
static CURLcode ftp_state_use_pasv(struct connectdata *conn) { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = CURLE_OK; /* Here's the excecutive summary on what to do: PASV is RFC959, expect: 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2) LPSV is RFC1639, expect: 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2) EPSV is RFC2428, expect: 229 Entering Extended Passive Mode (|||port|) */ static const char mode[][5] = { "EPSV", "PASV" }; int modeoff; #ifdef PF_INET6 if(!conn->bits.ftp_use_epsv && conn->bits.ipv6) /* EPSV is disabled but we are connected to a IPv6 host, so we ignore the request and enable EPSV again! */ conn->bits.ftp_use_epsv = TRUE; #endif modeoff = conn->bits.ftp_use_epsv?0:1; PPSENDF(&ftpc->pp, "%s", mode[modeoff]); ftpc->count1 = modeoff; state(conn, FTP_PASV); infof(conn->data, "Connect data stream passively\n"); return result; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax testb $0x1, 0x39c(%rax) jne 0x1e456 movq -0x10(%rbp), %rax testb $0x1, 0x393(%rax) je 0x1e456 movq -0x10(%rbp), %rax movb $0x1, 0x39c(%rax) movq -0x10(%rbp), %rax movb 0x39c(%rax), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rdi movslq -0x20(%rbp), %rax leaq 0x5df79(%rip), %rdx # 0x7c3f8 imulq $0x5, %rax, %rax addq %rax, %rdx leaq 0x5d21e(%rip), %rsi # 0x7b6ab movb $0x0, %al callq 0x550c0 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1e4a5 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1e4db movl -0x20(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xb0(%rax) movq -0x10(%rbp), %rdi movl $0x1e, %esi callq 0x1c780 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0x5e512(%rip), %rsi # 0x7c9e0 movb $0x0, %al callq 0x19d00 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/macressler[P]curl/lib/ftp.c
ftp_state_pasv_resp
static CURLcode ftp_state_pasv_resp(struct connectdata *conn, int ftpcode) { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result; struct Curl_easy *data = conn->data; struct Curl_dns_entry *addr = NULL; int rc; unsigned short connectport; /* the local port connect() should use! */ char *str = &data->state.buffer[4]; /* start on the first letter */ /* if we come here again, make sure the former name is cleared */ Curl_safefree(ftpc->newhost); if((ftpc->count1 == 0) && (ftpcode == 229)) { /* positive EPSV response */ char *ptr = strchr(str, '('); if(ptr) { unsigned int num; char separator[4]; ptr++; if(5 == sscanf(ptr, "%c%c%c%u%c", &separator[0], &separator[1], &separator[2], &num, &separator[3])) { const char sep1 = separator[0]; int i; /* The four separators should be identical, or else this is an oddly formatted reply and we bail out immediately. */ for(i = 1; i<4; i++) { if(separator[i] != sep1) { ptr = NULL; /* set to NULL to signal error */ break; } } if(num > 0xffff) { failf(data, "Illegal port number in EPSV reply"); return CURLE_FTP_WEIRD_PASV_REPLY; } if(ptr) { ftpc->newport = (unsigned short)(num & 0xffff); ftpc->newhost = strdup(control_address(conn)); if(!ftpc->newhost) return CURLE_OUT_OF_MEMORY; } } else ptr = NULL; } if(!ptr) { failf(data, "Weirdly formatted EPSV reply"); return CURLE_FTP_WEIRD_PASV_REPLY; } } else if((ftpc->count1 == 1) && (ftpcode == 227)) { /* positive PASV response */ unsigned int ip[4]; unsigned int port[2]; /* * Scan for a sequence of six comma-separated numbers and use them as * IP+port indicators. * * Found reply-strings include: * "227 Entering Passive Mode (127,0,0,1,4,51)" * "227 Data transfer will passively listen to 127,0,0,1,4,51" * "227 Entering passive mode. 127,0,0,1,4,51" */ while(*str) { if(6 == sscanf(str, "%u,%u,%u,%u,%u,%u", &ip[0], &ip[1], &ip[2], &ip[3], &port[0], &port[1])) break; str++; } if(!*str || (ip[0] > 255) || (ip[1] > 255) || (ip[2] > 255) || (ip[3] > 255) || (port[0] > 255) || (port[1] > 255) ) { failf(data, "Couldn't interpret the 227-response"); return CURLE_FTP_WEIRD_227_FORMAT; } /* we got OK from server */ if(data->set.ftp_skip_ip) { /* told to ignore the remotely given IP but instead use the host we used for the control connection */ infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n", ip[0], ip[1], ip[2], ip[3], conn->host.name); ftpc->newhost = strdup(control_address(conn)); } else ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); if(!ftpc->newhost) return CURLE_OUT_OF_MEMORY; ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff); } else if(ftpc->count1 == 0) { /* EPSV failed, move on to PASV */ return ftp_epsv_disable(conn); } else { failf(data, "Bad PASV/EPSV response: %03d", ftpcode); return CURLE_FTP_WEIRD_PASV_REPLY; } if(conn->bits.proxy) { /* * This connection uses a proxy and we need to connect to the proxy again * here. We don't want to rely on a former host lookup that might've * expired now, instead we remake the lookup here and now! */ const char * const host_name = conn->bits.socksproxy ? conn->socks_proxy.host.name : conn->http_proxy.host.name; rc = Curl_resolv(conn, host_name, (int)conn->port, &addr); if(rc == CURLRESOLV_PENDING) /* BLOCKING, ignores the return code but 'addr' will be NULL in case of failure */ (void)Curl_resolver_wait_resolv(conn, &addr); connectport = (unsigned short)conn->port; /* we connect to the proxy's port */ if(!addr) { failf(data, "Can't resolve proxy host %s:%hu", host_name, connectport); return CURLE_COULDNT_RESOLVE_PROXY; } } else { /* normal, direct, ftp connection */ rc = Curl_resolv(conn, ftpc->newhost, ftpc->newport, &addr); if(rc == CURLRESOLV_PENDING) /* BLOCKING */ (void)Curl_resolver_wait_resolv(conn, &addr); connectport = ftpc->newport; /* we connect to the remote port */ if(!addr) { failf(data, "Can't resolve new host %s:%hu", ftpc->newhost, connectport); return CURLE_FTP_CANT_GET_HOST; } } conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; result = Curl_connecthost(conn, addr); if(result) { Curl_resolv_unlock(data, addr); /* we're done using this address */ if(ftpc->count1 == 0 && ftpcode == 229) return ftp_epsv_disable(conn); return result; } /* * When this is used from the multi interface, this might've returned with * the 'connected' set to FALSE and thus we are now awaiting a non-blocking * connect to connect. */ if(data->set.verbose) /* this just dumps information about this second connection */ ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport); Curl_resolv_unlock(data, addr); /* we're done using this address */ Curl_safefree(conn->secondaryhostname); conn->secondary_port = ftpc->newport; conn->secondaryhostname = strdup(ftpc->newhost); if(!conn->secondaryhostname) return CURLE_OUT_OF_MEMORY; conn->bits.do_more = TRUE; state(conn, FTP_STOP); /* this phase is completed */ return result; }
pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax addq $0x628, %rax # imm = 0x628 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x30(%rbp), %rax movq 0xca0(%rax), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) leaq 0x75513(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x20(%rbp), %rcx movq 0xe0(%rcx), %rdi callq *%rax movq -0x20(%rbp), %rax movq $0x0, 0xe0(%rax) movq -0x20(%rbp), %rax cmpl $0x0, 0xb0(%rax) jne 0x1e6ed cmpl $0xe5, -0x14(%rbp) jne 0x1e6ed movq -0x48(%rbp), %rdi movl $0x28, %esi callq 0x9300 movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) je 0x1e6c3 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rdi leaq -0x58(%rbp), %rdx leaq -0x58(%rbp), %rcx addq $0x1, %rcx leaq -0x58(%rbp), %r8 addq $0x2, %r8 leaq -0x58(%rbp), %rax addq $0x3, %rax leaq 0x5e435(%rip), %rsi # 0x7c9ff leaq -0x54(%rbp), %r9 movq %rax, (%rsp) movb $0x0, %al callq 0x9950 movl %eax, %ecx movl $0x5, %eax cmpl %ecx, %eax jne 0x1e6b9 movb -0x58(%rbp), %al movb %al, -0x59(%rbp) movl $0x1, -0x60(%rbp) cmpl $0x4, -0x60(%rbp) jge 0x1e623 movslq -0x60(%rbp), %rax movsbl -0x58(%rbp,%rax), %eax movsbl -0x59(%rbp), %ecx cmpl %ecx, %eax je 0x1e616 movq $0x0, -0x50(%rbp) jmp 0x1e623 jmp 0x1e618 movl -0x60(%rbp), %eax addl $0x1, %eax movl %eax, -0x60(%rbp) jmp 0x1e5f5 cmpl $0xffff, -0x54(%rbp) # imm = 0xFFFF jbe 0x1e64a movq -0x30(%rbp), %rdi leaq 0x5e3d3(%rip), %rsi # 0x7ca0a movb $0x0, %al callq 0x19f90 movl $0xd, -0x4(%rbp) jmp 0x1eb51 cmpq $0x0, -0x50(%rbp) je 0x1e6b7 movl -0x54(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, 0xe8(%rax) leaq 0x753f2(%rip), %rax # 0x93a60 movq (%rax), %rax movq %rax, -0x88(%rbp) movq -0x10(%rbp), %rdi callq 0x20e10 movq %rax, %rdi movq -0x88(%rbp), %rax callq *%rax movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0xe0(%rax) movq -0x20(%rbp), %rax cmpq $0x0, 0xe0(%rax) jne 0x1e6b5 movl $0x1b, -0x4(%rbp) jmp 0x1eb51 jmp 0x1e6b7 jmp 0x1e6c1 movq $0x0, -0x50(%rbp) jmp 0x1e6c3 cmpq $0x0, -0x50(%rbp) jne 0x1e6e8 movq -0x30(%rbp), %rdi leaq 0x5e357(%rip), %rsi # 0x7ca2c movb $0x0, %al callq 0x19f90 movl $0xd, -0x4(%rbp) jmp 0x1eb51 jmp 0x1e8e5 movq -0x20(%rbp), %rax cmpl $0x1, 0xb0(%rax) jne 0x1e8a4 cmpl $0xe3, -0x14(%rbp) jne 0x1e8a4 jmp 0x1e70d movq -0x48(%rbp), %rax cmpb $0x0, (%rax) je 0x1e774 movq -0x48(%rbp), %rdi leaq -0x70(%rbp), %rdx leaq -0x70(%rbp), %rcx addq $0x4, %rcx leaq -0x70(%rbp), %r8 addq $0x8, %r8 leaq -0x70(%rbp), %r9 addq $0xc, %r9 leaq -0x78(%rbp), %r10 leaq -0x78(%rbp), %rax addq $0x4, %rax leaq 0x5e300(%rip), %rsi # 0x7ca49 movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x9950 movl %eax, %ecx movl $0x6, %eax cmpl %ecx, %eax jne 0x1e766 jmp 0x1e774 movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x1e70d movq -0x48(%rbp), %rax cmpb $0x0, (%rax) je 0x1e7b3 cmpl $0xff, -0x70(%rbp) ja 0x1e7b3 cmpl $0xff, -0x6c(%rbp) ja 0x1e7b3 cmpl $0xff, -0x68(%rbp) ja 0x1e7b3 cmpl $0xff, -0x64(%rbp) ja 0x1e7b3 cmpl $0xff, -0x78(%rbp) ja 0x1e7b3 cmpl $0xff, -0x74(%rbp) jbe 0x1e7d1 movq -0x30(%rbp), %rdi leaq 0x5e29d(%rip), %rsi # 0x7ca5b movb $0x0, %al callq 0x19f90 movl $0xe, -0x4(%rbp) jmp 0x1eb51 movq -0x30(%rbp), %rax testb $0x1, 0x7c0(%rax) je 0x1e843 movq -0x30(%rbp), %rdi movl -0x70(%rbp), %edx movl -0x6c(%rbp), %ecx movl -0x68(%rbp), %r8d movl -0x64(%rbp), %r9d movq -0x10(%rbp), %rax movq 0xd8(%rax), %rax leaq 0x5e27d(%rip), %rsi # 0x7ca7f movq %rax, (%rsp) movb $0x0, %al callq 0x19d00 leaq 0x7524c(%rip), %rax # 0x93a60 movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rdi callq 0x20e10 movq %rax, %rdi movq -0x90(%rbp), %rax callq *%rax movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0xe0(%rax) jmp 0x1e86c movl -0x70(%rbp), %esi movl -0x6c(%rbp), %edx movl -0x68(%rbp), %ecx movl -0x64(%rbp), %r8d leaq 0x5e261(%rip), %rdi # 0x7cab8 movb $0x0, %al callq 0x9810 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0xe0(%rax) movq -0x20(%rbp), %rax cmpq $0x0, 0xe0(%rax) jne 0x1e886 movl $0x1b, -0x4(%rbp) jmp 0x1eb51 movl -0x78(%rbp), %eax shll $0x8, %eax addl -0x74(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, 0xe8(%rax) jmp 0x1e8e3 movq -0x20(%rbp), %rax cmpl $0x0, 0xb0(%rax) jne 0x1e8c2 movq -0x10(%rbp), %rdi callq 0x20e60 movl %eax, -0x4(%rbp) jmp 0x1eb51 movq -0x30(%rbp), %rdi movl -0x14(%rbp), %edx leaq 0x5e1f4(%rip), %rsi # 0x7cac4 movb $0x0, %al callq 0x19f90 movl $0xd, -0x4(%rbp) jmp 0x1eb51 jmp 0x1e8e5 movq -0x10(%rbp), %rax testb $0x1, 0x38d(%rax) je 0x1e9a6 movq -0x10(%rbp), %rax testb $0x1, 0x38f(%rax) je 0x1e917 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq %rax, -0x98(%rbp) jmp 0x1e929 movq -0x10(%rbp), %rax movq 0x160(%rax), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x190(%rax), %rax movl %eax, %edx leaq -0x38(%rbp), %rcx callq 0xc270 movl %eax, -0x3c(%rbp) cmpl $0x1, -0x3c(%rbp) jne 0x1e968 movq -0x10(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x590f0 movq -0x10(%rbp), %rax movq 0x190(%rax), %rax movw %ax, -0x3e(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1e9a4 movq -0x30(%rbp), %rdi movq -0x80(%rbp), %rdx movzwl -0x3e(%rbp), %ecx leaq 0x5e150(%rip), %rsi # 0x7cae1 movb $0x0, %al callq 0x19f90 movl $0x5, -0x4(%rbp) jmp 0x1eb51 jmp 0x1ea24 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movq 0xe0(%rax), %rsi movq -0x20(%rbp), %rax movzwl 0xe8(%rax), %edx leaq -0x38(%rbp), %rcx callq 0xc270 movl %eax, -0x3c(%rbp) cmpl $0x1, -0x3c(%rbp) jne 0x1e9df movq -0x10(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x590f0 movq -0x20(%rbp), %rax movw 0xe8(%rax), %ax movw %ax, -0x3e(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1ea22 movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rax movq 0xe0(%rax), %rdx movzwl -0x3e(%rbp), %ecx leaq 0x5e0f2(%rip), %rsi # 0x7cb01 movb $0x0, %al callq 0x19f90 movl $0xf, -0x4(%rbp) jmp 0x1eb51 jmp 0x1ea24 movq -0x10(%rbp), %rax movb $0x0, 0x396(%rax) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x3bda0 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1ea84 movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0xc510 movq -0x20(%rbp), %rax cmpl $0x0, 0xb0(%rax) jne 0x1ea79 cmpl $0xe5, -0x14(%rbp) jne 0x1ea79 movq -0x10(%rbp), %rdi callq 0x20e60 movl %eax, -0x4(%rbp) jmp 0x1eb51 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1eb51 movq -0x30(%rbp), %rax testb $0x1, 0x7a8(%rax) je 0x1eab0 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rax movq 0xe0(%rax), %rdx movzwl -0x3e(%rbp), %ecx callq 0x20f30 movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0xc510 leaq 0x74f8c(%rip), %rax # 0x93a50 movq (%rax), %rax movq -0x10(%rbp), %rcx movq 0xe8(%rcx), %rdi callq *%rax movq -0x10(%rbp), %rax movq $0x0, 0xe8(%rax) movq -0x20(%rbp), %rax movw 0xe8(%rax), %cx movq -0x10(%rbp), %rax movw %cx, 0x1a0(%rax) leaq 0x74f60(%rip), %rax # 0x93a60 movq (%rax), %rax movq -0x20(%rbp), %rcx movq 0xe0(%rcx), %rdi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xe8(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0xe8(%rax) jne 0x1eb35 movl $0x1b, -0x4(%rbp) jmp 0x1eb51 movq -0x10(%rbp), %rax movb $0x1, 0x394(%rax) movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x1c780 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq nopl (%rax)
/macressler[P]curl/lib/ftp.c