name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
jpge::jpeg_encoder::jpg_open(int, int, int)
bool jpeg_encoder::jpg_open(int p_x_res, int p_y_res, int src_channels) { m_num_components = 3; switch (m_params.m_subsampling) { case Y_ONLY: { m_num_components = 1; m_comp_h_samp[0] = 1; m_comp_v_samp[0] = 1; m_mcu_x = 8; m_mcu_y = 8; break; } case H1V1:...
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb $0x3, 0x14(%rdi) movl 0xc(%rdi), %eax cmpq $0x3, %rax ja 0x14e9a leaq 0x4ada(%rip), %rdi # 0x19910 movslq (%rdi,%rax,4), %rax addq %rdi, %rax jmpq *%rax movw $0x101, 0x14(%rbx) # imm = 0x101 movb $0x1, 0x18(%rbx) jmp 0x14e8b movb $0x2...
/shuai132[P]usbcam/jpge.cpp
jpge::jpeg_encoder::load_block_8_8(int, int, int)
void jpeg_encoder::load_block_8_8(int x, int y, int c) { uint8 *pSrc; sample_array_t *pDst = m_sample_array; x = (x * (8 * 3)) + c; y <<= 3; for (int i = 0; i < 8; i++, pDst += 8) { pSrc = m_mcu_lines[y + i] + x; pDst[0] = pSrc[0 * 3] - 128; pDst[1] = pSrc[1 * 3] - 128; pDst[2] = pSrc[2 * 3] - 128; ...
leal (%rsi,%rsi,2), %eax leal (%rcx,%rax,8), %eax shll $0x3, %edx cltq movslq %edx, %rcx leaq (%rdi,%rcx,8), %rcx addq $0x48, %rcx xorl %edx, %edx movq (%rcx,%rdx), %rsi movzbl (%rsi,%rax), %r8d addl $-0x80, %r8d movl %r8d, 0xcc(%rdi,%rdx,4) movzbl 0x3(%rsi,%rax), %r8d addl $-0x80, %r8d movl %r8d, 0xd0(%rdi,%rdx,4) mov...
/shuai132[P]usbcam/jpge.cpp
jpge::jpeg_encoder::load_quantized_coefficients(int)
void jpeg_encoder::load_quantized_coefficients(int component_num) { int32 *q = m_quantization_tables[component_num > 0]; int16 *pDst = m_coefficient_array; for (int i = 0; i < 64; i++) { sample_array_t j = m_sample_array[s_zag[i]]; if (j < 0) { if ((j = -j + (*q >> 1)) < *q) *pDst++ = ...
xorl %eax, %eax testl %esi, %esi setg %al shll $0x8, %eax leaq (%rdi,%rax), %rcx addq $0x24c, %rcx # imm = 0x24C xorl %esi, %esi leaq 0x455c(%rip), %r8 # 0x19aa0 movzbl (%rsi,%r8), %eax movl 0xcc(%rdi,%rax,4), %edx movl (%rcx,%rsi,4), %r9d movl %r9d, %eax sarl %eax testl %edx, %edx js 0x1556a addl %edx...
/shuai132[P]usbcam/jpge.cpp
jpge::jpeg_encoder::code_coefficients_pass_two(int)
void jpeg_encoder::code_coefficients_pass_two(int component_num) { int i, j, run_len, nbits, temp1, temp2; int16 *pSrc = m_coefficient_array; uint *codes[2]; uint8 *code_sizes[2]; if (component_num == 0) { codes[0] = m_huff_codes[0 + 0]; codes[1] = m_huff_codes[2 + 0]; code_sizes[0] = m_huff_code_s...
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r15d, %r15d testl %esi, %esi setne %r15b movl %r15d, %r14d shll $0xa, %r14d leaq 0x44c(%r14), %rax shll $0x8, %r15d leaq 0x144c(%r15), %rcx movswl 0x1cc(%rdi), %r12d movslq %esi, %rdx movl 0x2c90(%rdi,%rdx,4), %esi movl %...
/shuai132[P]usbcam/jpge.cpp
jpge::jpeg_encoder::process_end_of_image()
bool jpeg_encoder::process_end_of_image() { if (m_mcu_y_ofs) { if (m_mcu_y_ofs < 16) // check here just to shut up static analysis { for (int i = m_mcu_y_ofs; i < m_mcu_y; i++) memcpy(m_mcu_lines[i], m_mcu_lines[m_mcu_y_ofs - 1], m_image_bpl_mcu); } process_mcu_row(); } if (m_pas...
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movzbl 0xc8(%rdi), %eax testl %eax, %eax je 0x15fd4 cmpb $0xf, %al ja 0x15fcc cmpl %eax, 0x44(%rbx) jle 0x15fcc movl %eax, %r14d movq 0x48(%rbx,%r14,8), %rdi movzbl 0xc8(%rbx), %eax movq 0x40(%rbx,%rax,8), %rsi movslq 0x38(%rbx), %rdx callq 0x71d0 incq %r14 movslq 0x44(%...
/shuai132[P]usbcam/jpge.cpp
jpge::cfile_stream::open(char const*)
bool open(const char *pFilename) { close(); m_pFile = fopen(pFilename, "wb"); m_bStatus = (m_pFile != NULL); return m_bStatus; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %rdi testq %rdi, %rdi je 0x1685f callq 0x7250 cmpl $-0x1, %eax jne 0x16857 movb $0x0, 0x10(%rbx) movq $0x0, 0x8(%rbx) leaq 0x34a7(%rip), %rsi # 0x19d0d movq %r14, %rdi callq 0x7280 movq %rax, 0x8(%rbx) testq %rax, %rax setne %al setne...
/shuai132[P]usbcam/jpge.cpp
jpge::memory_stream::put_buf(void const*, int)
virtual bool put_buf(const void* pBuf, int len) { uint buf_remaining = m_buf_size - m_buf_ofs; if ((uint)len > buf_remaining) return false; memcpy(m_pBuf + m_buf_ofs, pBuf, len); m_buf_ofs += len; return true; }
pushq %rbp pushq %r14 pushq %rbx movl %edx, %ebx movq %rdi, %r14 movl 0x10(%rdi), %ebp movl 0x14(%rdi), %edi subl %edi, %ebp cmpl %edx, %ebp jb 0x16949 addq 0x8(%r14), %rdi movslq %ebx, %rdx callq 0x71d0 addl %ebx, 0x14(%r14) cmpl %ebx, %ebp setae %al popq %rbx popq %r14 popq %rbp retq nop
/shuai132[P]usbcam/jpge.cpp
main
int main(int argc, char** argv) { Webcam usbcam("/dev/video0", 3264, 2448); if(!usbcam.isOpen) { return 0; } //测试单帧拍摄模式 //ImgClass img = usbcam.snap(); //测试流模式 usbcam.start(); //开启后台线程处理 sleep(10); //后台线程运行10s(用于测试帧率) ImgClass img = usbcam.getImg()...
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x480, %rsp # imm = 0x480 leaq 0x33bc(%rip), %rsi # 0x19d27 leaq 0xb(%rsp), %rbx movq %rbx, %rdi movl $0xcc0, %edx # imm = 0xCC0 movl $0x990, %ecx # imm = 0x990 callq 0x177c8 cmpb $0x1, (%rbx) jne 0x17049 leaq 0xb(%rsp), ...
/shuai132[P]usbcam/main.cpp
ImgClass::~ImgClass()
~ImgClass() { delete []data; data = NULL; }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x170dd callq 0x72b0 movq $0x0, (%rbx) movq 0x18(%rbx), %rdi addq $0x28, %rbx cmpq %rbx, %rdi je 0x170f7 popq %rbx jmp 0x7220 popq %rbx retq nopl (%rax)
/shuai132[P]usbcam/usbcam.h
Webcam::Webcam(char const*, unsigned int, unsigned int)
Webcam::Webcam(const char *devName, unsigned int width, unsigned int height) { dev_name = (char *)devName; if(!open_device()) { isOpen = false; return; } isOpen = true; init_device (width, height); //此处 若不适配的分辨率会自动被更正 start_capturing (); for(int i=0; i<2; i++) ...
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x210, %rsp # imm = 0x210 movl %ecx, %ebx movl %edx, %ebp movq %rsi, %rax movq %rdi, %r14 movb $0x0, (%rdi) movq %rsi, 0x7a7d(%rip) # 0x1f268 leaq 0x80(%rsp), %rsi movq %rax, %rdi callq 0x7200 cmpl $-0x1, %eax je 0x17b91 movl $0xf000, %eax ...
/shuai132[P]usbcam/usbcam.cpp
Webcam::~Webcam()
Webcam::~Webcam() { if(isOpen) { stop(); stop_capturing (); uninit_device (); close_device (); } }
pushq %r14 pushq %rbx pushq %rax cmpb $0x1, (%rdi) jne 0x17cde movb 0x765e(%rip), %al # 0x1f2a1 testb $0x1, %al je 0x17c5b xorl %eax, %eax xchgb %al, 0x7652(%rip) # 0x1f2a1 leaq 0x760a(%rip), %rdi # 0x1f260 callq 0x73a0 leaq 0x4(%rsp), %rdx movl $0x1, (%rdx) movl 0x75c4(%rip), %edi # 0x1f230 movl ...
/shuai132[P]usbcam/usbcam.cpp
main
int main(int argc, char **argv) { MC_SET_DEBUG(1); /* * Check that replacing an existing object keeps the key valid, * and that it keeps the order the same. */ json_object *my_object = json_object_new_object(); json_object_object_add(my_object, "foo1", json_object_new_string("bar1")); json_object_object_add...
pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movl $0x0, -0x4(%rbp) movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) callq 0x10a0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0xc8(%rbp) leaq 0xe25(%rip), %rdi # 0x2009 callq 0x1030 movq -0xc8(%rbp), %rdi movq %rax, %rdx leaq 0xe0a(%rip), %rsi # 0x2004...
/json-c[P]json-c/tests/testReplaceExisting.c
jaegertracing::Config_testDefaultSamplingProbability_Test::TestBody()
TEST(Config, testDefaultSamplingProbability) { ASSERT_EQ(samplers::Config::kDefaultSamplingProbability, Config().sampler().param()); }
pushq %rbp movq %rsp, %rbp subq $0x4f0, %rsp # imm = 0x4F0 movq %rdi, -0x8(%rbp) leaq -0x239(%rbp), %rdi movq %rdi, -0x470(%rbp) callq 0x16c1a0 movq -0x470(%rbp), %rdx leaq 0xe9496(%rip), %rsi # 0x25f476 leaq -0x238(%rbp), %rdi callq 0x16beb0 jmp 0x175fee leaq -0x271(%rbp), %rdi movq %rdi, -0x478(%rbp) c...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/ConfigTest.cpp
jaegertracing::Config_testZeroSamplingParam_Test::TestBody()
TEST(Config, testZeroSamplingParam) { { constexpr auto kConfigYAML = R"cfg( sampler: param: 0 )cfg"; const auto config = Config::parse(YAML::Load(kConfigYAML)); ASSERT_EQ(0, config.sampler().param()); } }
pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %rdi, -0x8(%rbp) leaq 0xe87d0(%rip), %rsi # 0x25f526 movq %rsi, -0x10(%rbp) leaq -0x1d0(%rbp), %rdi movq %rdi, -0x220(%rbp) callq 0x16bcd0 movq -0x220(%rbp), %rsi leaq -0x1b0(%rbp), %rdi callq 0x17a640 jmp 0x176d82 leaq -0x1d0(%rbp), %rdi ca...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/ConfigTest.cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> jaegertracing::utils::yaml::findOrDefault<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char [5], char [1]>(YAML::Node const&, char const (&) [5], char const (&) [1])
ValueType findOrDefault(const YAML::Node& node, const KeyType& key, const DefaultValueType& defaultValue) { const auto valueNode = node[key]; if (!valueNode.IsDefined()) { return defaultValue; } return valueNode.template as<ValueType>(); }
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x70(%rbp) movq %rdi, %rax movq %rax, -0x68(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x40(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x17db40 movq -0x60(%rbp)...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/utils/YAML.h
jaegertracing::SpanContext_testFromStream_Test::~SpanContext_testFromStream_Test()
TEST(SpanContext, testFromStream) { const FromStreamTestCase testCases[] = { { "", false }, { "abcd", false }, { "ABCD", false }, { "x:1:1:1", false }, { "1:x:1:1", false }, { "1:1:x:1", false }, { "1:1:1:x", false }, { "0123456789012345678901234567890...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x1941e0 movq -0x10(%rbp), %rdi callq 0x16b9a0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/SpanContextTest.cpp
jaegertracing::Tag_testThriftConversion_Test::~Tag_testThriftConversion_Test()
TEST(Tag, testThriftConversion) { const Tag tags[] = { { "testBool", true }, { "testDouble", 0.0 }, { "testInt64", 0LL }, { "testUint64", 0ULL }, { "testStr", std::string{ "test" } }, { "test...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x16b410 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/TagTest.cpp
jaegertracing::Tracer_testTracerSpanSelfRefWithOtherRefs_Test::~Tracer_testTracerSpanSelfRefWithOtherRefs_Test()
TEST(Tracer, testTracerSpanSelfRefWithOtherRefs) { const auto handle = testutils::TracerUtil::installGlobalTracer(); const auto tracer = std::static_pointer_cast<Tracer>(opentracing::Tracer::Global()); { const jaegertracing::SpanContext spanSelfContext { {1, 2}, 3, 0, 0, jaegertracing::SpanContext::...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x16b410 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/TracerTest.cpp
void jaegertracing::baggage::BaggageSetter::setBaggage<void (*)(__gnu_cxx::__normal_iterator<jaegertracing::Tag const*, std::vector<jaegertracing::Tag, std::allocator<jaegertracing::Tag>>>, __gnu_cxx::__normal_iterator<jaegertracing::Tag const*, std::vector<jaegertracing::Tag, std::allocator<jaegertracing::Tag>>>)>(jae...
void setBaggage(Span& span, SpanContext::StrMap& baggage, const std::string& key, std::string value, LoggingFunction logFn) const { auto truncated = false; const auto restriction = _restrictionManager.getRest...
pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movq %r8, -0x110(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x108(%rbp) movb $0x0, -0x31(%rbp) movq (%rax), %rax movq ...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/baggage/BaggageSetter.h
jaegertracing::baggage::Baggage_testRemoteRestrictionManagerFunctionality_Test::~Baggage_testRemoteRestrictionManagerFunctionality_Test()
TEST(Baggage, testRemoteRestrictionManagerFunctionality) { auto logger = logging::consoleLogger(); TestStatsReporter testReporter; auto metrics = metrics::Metrics::fromStatsReporter(testReporter); auto mockAgent = testutils::MockAgent::make(); mockAgent->start(); RemoteRestrictionManager manag...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x1c9110 movq -0x10(%rbp), %rdi callq 0x16b9a0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/baggage/BaggageTest.cpp
jaegertracing::net::URI::authority[abi:cxx11]() const
std::string authority() const { if (_port != 0) { return _host + ':' + std::to_string(_port); } return _host; }
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x78(%rbp) movq %rdi, %rax movq %rax, -0x70(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) cmpl $0x0, 0x40(%rax) je 0x1de4b9 movq -0x68(%rbp), %rsi addq $0x20, %rsi leaq -0x30(%rbp), %rdi movl $0x3a, %edx callq 0x1...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/net/URI.h
jaegertracing::propagation::BinaryPropagator::inject(jaegertracing::SpanContext const&, std::ostream&) const
void inject(const SpanContext& ctx, std::ostream& out) const override { writeBinary(out, ctx.traceID().high()); writeBinary(out, ctx.traceID().low()); writeBinary(out, ctx.spanID()); writeBinary(out, ctx.parentID()); // `flags` is a single byte, so endianness is not an issue....
pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rdi callq 0x1af620 movq %rax, %rdi callq 0x1b05c0 movq -0x78(%rbp), %rdi movq %rax, %rsi callq 0x211a20 movq -0x18(%rbp), %rax movq %rax, -0x70...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/propagation/Propagator.h
jaegertracing::reporters::Reporter_testRemoteReporter_Test::TestBody()
TEST(Reporter, testRemoteReporter) { std::vector<Span> spans; std::mutex mutex; auto logger = logging::nullLogger(); auto metrics = metrics::Metrics::makeNullMetrics(); constexpr auto kFixedQueueSize = 10; RemoteReporter reporter( std::chrono::milliseconds(1), kFixedQueueSize, ...
pushq %rbp movq %rsp, %rbp subq $0x1f0, %rsp # imm = 0x1F0 movq %rdi, -0x8(%rbp) leaq -0x20(%rbp), %rdi callq 0x21e390 leaq -0x48(%rbp), %rdi callq 0x18fbb0 leaq -0x50(%rbp), %rdi callq 0x16c4d0 jmp 0x21d46c leaq -0x68(%rbp), %rdi callq 0x16bc00 jmp 0x21d477 movl $0xa, -0x6c(%rbp) movl $0x1, -0x174(%rbp) lea...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/reporters/ReporterTest.cpp
jaegertracing::reporters::Reporter_testRemoteReporter_Test::~Reporter_testRemoteReporter_Test()
TEST(Reporter, testRemoteReporter) { std::vector<Span> spans; std::mutex mutex; auto logger = logging::nullLogger(); auto metrics = metrics::Metrics::makeNullMetrics(); constexpr auto kFixedQueueSize = 10; RemoteReporter reporter( std::chrono::milliseconds(1), kFixedQueueSize, ...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x16b410 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/reporters/ReporterTest.cpp
jaegertracing::reporters::Reporter_testInMemoryReporter_Test::~Reporter_testInMemoryReporter_Test()
TEST(Reporter, testInMemoryReporter) { InMemoryReporter reporter; constexpr auto kNumReports = 100; for (auto i = 0; i < kNumReports; ++i) { reporter.report(span); } ASSERT_EQ(kNumReports, reporter.spansSubmitted()); reporter.reset(); ASSERT_EQ(0, reporter.spansSubmitted()); repo...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x21ed90 movq -0x10(%rbp), %rdi callq 0x16b9a0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/reporters/ReporterTest.cpp
jaegertracing::reporters::Reporter_testCompositeReporter_Test::~Reporter_testCompositeReporter_Test()
TEST(Reporter, testCompositeReporter) { std::vector<std::shared_ptr<Reporter>> reporters; reporters.push_back(std::make_shared<InMemoryReporter>()); reporters.push_back(std::make_shared<InMemoryReporter>()); CompositeReporter reporter(reporters); reporter.report(span); ASSERT_EQ(1, ...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x21ede0 movq -0x10(%rbp), %rdi callq 0x16b9a0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/reporters/ReporterTest.cpp
jaegertracing::samplers::RateLimitingSampler::RateLimitingSampler(double)
explicit RateLimitingSampler(double maxTracesPerSecond) : _maxTracesPerSecond(maxTracesPerSecond) , _rateLimiter(_maxTracesPerSecond, std::max(_maxTracesPerSecond, 1.0)) , _tags({ { kSamplerTypeTagKey, kSamplerTypeRateLimiting }, { kSamplerParamTagKey, maxTracesPerSecond } }) ...
pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x8(%rbp) movsd %xmm0, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x138(%rbp) callq 0x22cc90 movq -0x138(%rbp), %rax leaq 0xb2386(%rip), %rcx # 0x2dcba8 movq %rcx, (%rax) movq %rax, %rdi addq $0x8, %rdi movsd -0x10(%rbp), %xmm0 mov...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/samplers/RateLimitingSampler.h
jaegertracing::samplers::Sampler_testProbabilisticSamplerInvalidRate_Test::~Sampler_testProbabilisticSamplerInvalidRate_Test()
TEST(Sampler, testProbabilisticSamplerInvalidRate) { Config samplerConfig1(kSamplerTypeProbabilistic, 1.1, "", 0, samplers::Config::Clock::duration()); Config samplerConfig2(kSamplerTypeProbabilistic, ...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x16b410 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/samplers/SamplerTest.cpp
jaegertracing::testutils::MockAgent_testSpanServer_Test::~MockAgent_testSpanServer_Test()
TEST(MockAgent, testSpanServer) { std::shared_ptr<MockAgent> mockAgent = MockAgent::make(); mockAgent->start(); auto client = mockAgent->spanServerClient(); constexpr auto kBiggestBatch = 5; for (auto i = 1; i < kBiggestBatch; ++i) { thrift::Batch batch; batch.spans.resize(i); ...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x16b410 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/testutils/MockAgentTest.cpp
jaegertracing::utils::RateLimiter<jaegertracing::utils::(anonymous namespace)::MockClock>::checkCredit(double)
bool checkCredit(double itemCost) { std::lock_guard<std::mutex> lock(_mutex); const auto currentTime = Clock::now(); const auto elapsedTime = std::chrono::duration<double>(currentTime - _lastTick); _lastTick = currentTime; _balance += elapsedTime.count() * _credi...
pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movsd %xmm0, -0x18(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x58(%rbp) addq $0x20, %rsi leaq -0x20(%rbp), %rdi callq 0x1900e0 callq 0x25b510 movq -0x58(%rbp), %rsi movq %rax, -0x28(%rbp) addq $0x18, %rsi leaq -0x28(%rbp), %rdi callq 0x22c690 movq %rax, ...
/jaegertracing[P]jaeger-client-cpp/src/jaegertracing/utils/RateLimiter.h
help
void help(void) { /* * Help message is an extended version of the usage message. So * start with that, plus a version heading. */ printf("PuTTYgen: key generator and converter for the PuTTY tools\n" "%s\n", ver); usage(false); printf(" -t specify key type when generating:\n...
pushq %rbp movq %rsp, %rbp leaq 0x57d0f(%rip), %rdi # 0x603da leaq 0x6233e(%rip), %rsi # 0x6aa10 movb $0x0, %al callq 0x81d0 xorl %edi, %edi callq 0x8650 leaq 0x57d31(%rip), %rdi # 0x60418 movb $0x0, %al callq 0x81d0 popq %rbp retq
/codexns[P]putty/cmdgen.c
move
static bool move(char *from, char *to) { int ret; ret = rename(from, to); if (ret) { /* * This OS may require us to remove the original file first. */ remove(to); ret = rename(from, to); } if (ret) { perror("puttygen: cannot move new file on to old ...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x8450 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0xc5ef movq -0x18(%rbp), %rdi callq 0x80a0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x8450 movl %eax, -0x1c(%rb...
/codexns[P]putty/cmdgen.c
noise_get_heavy
void noise_get_heavy(void (*func) (void *, int)) { char buf[512]; FILE *fp; int ret; bool got_dev_urandom = false; if (read_dev_urandom(buf, 32)) { got_dev_urandom = true; func(buf, 32); } fp = popen("ps -axu 2>/dev/null", "r"); if (fp) { while ( (ret = fread(bu...
pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %rdi, -0x8(%rbp) movb $0x0, -0x21d(%rbp) leaq -0x210(%rbp), %rdi movl $0x20, %esi callq 0xcbd0 testb $0x1, %al jne 0xca2d jmp 0xca46 movb $0x1, -0x21d(%rbp) movq -0x8(%rbp), %rax leaq -0x210(%rbp), %rdi movl $0x20, %esi callq *%rax leaq 0x550d2(...
/codexns[P]putty/unix/noise.c
noise_regular
void noise_regular(void) { int fd; int ret; char buf[512]; struct rusage rusage; if ((fd = open("/proc/meminfo", O_RDONLY)) >= 0) { while ( (ret = read(fd, buf, sizeof(buf))) > 0) random_add_noise(NOISE_SOURCE_MEMINFO, buf, ret); close(fd); } if ((fd = open("/pro...
pushq %rbp movq %rsp, %rbp subq $0x2a0, %rsp # imm = 0x2A0 leaq 0x54efd(%rip), %rdi # 0x61b7f xorl %esi, %esi movb $0x0, %al callq 0x83f0 movl %eax, -0x4(%rbp) cmpl $0x0, %eax jl 0xcccf jmp 0xcc95 movl -0x4(%rbp), %edi leaq -0x210(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x82a0 movl %...
/codexns[P]putty/unix/noise.c
make_filename
static char *make_filename(int index, const char *subname) { char *env, *tmp, *ret; /* * Allow override of the PuTTY configuration location, and of * specific subparts of it, by means of environment variables. */ if (index == INDEX_DIR) { struct passwd *pwd; char *xdg_dir, *o...
pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) cmpl $0x0, -0xc(%rbp) jne 0xd228 leaq 0x54f5e(%rip), %rdi # 0x61f11 callq 0x8030 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0xcfd5 movq -0x20(%rbp), %rdi callq 0x57200 movq %rax, -0x8(%rbp) jmp 0xd50d leaq 0x54f49(%rip), ...
/codexns[P]putty/unix/storage.c
provide_xrm_string
void provide_xrm_string(const char *string, const char *progname) { const char *p, *q; char *key; struct skeyval *xrms, *ret; p = q = strchr(string, ':'); if (!q) { fprintf(stderr, "%s: expected a colon in resource string" " \"%s\"\n", progname, string); return; ...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movl $0x3a, %esi callq 0x81c0 movq %rax, -0x20(%rbp) movq %rax, -0x18(%rbp) cmpq $0x0, -0x20(%rbp) jne 0xd622 movq 0x709f4(%rip), %rax # 0x7dff8 movq (%rax), %rdi movq -0x10(%rbp), %rdx movq -0x8(%rbp), %r...
/codexns[P]putty/unix/storage.c
get_setting
static const char *get_setting(const char *key) { struct skeyval tmp, *ret; tmp.key = key; if (xrmtree) { ret = find234(xrmtree, &tmp, NULL); if (ret) return ret->value; } return x_get_default(key); }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, 0x7096c(%rip) # 0x7e398 je 0xda5d movq 0x70963(%rip), %rdi # 0x7e398 leaq -0x20(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x5cbe0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0...
/codexns[P]putty/unix/storage.c
read_setting_fontspec
FontSpec *read_setting_fontspec(settings_r *handle, const char *name) { /* * In GTK1-only PuTTY, we used to store font names simply as a * valid X font description string (logical or alias), under a * bare key such as "Font". * * In GTK2 PuTTY, we have a prefix system where "client:" *...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x54197(%rip), %rsi # 0x61ce2 xorl %eax, %eax movl %eax, %edx movb $0x0, %al callq 0x56de0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xd960 movq %rax, -0x28(%rbp) cm...
/codexns[P]putty/unix/storage.c
host_ca_load
host_ca *host_ca_load(const char *name) { char *filename = make_filename(INDEX_HOSTCA, name); FILE *fp = fopen(filename, "r"); sfree(filename); if (!fp) return NULL; host_ca *hca = host_ca_new(); hca->name = dupstr(name); char *line; CertExprBuilder *eb = NULL; while ( (li...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rsi movl $0x7, %edi callq 0xcf90 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x5dea9(%rip), %rsi # 0x6c002 callq 0x8420 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x58c80 cmpq $0x0, -0x20(%rbp) jne 0xe17f movq $0x0...
/codexns[P]putty/unix/storage.c
store_host_key
void store_host_key(const char *hostname, int port, const char *keytype, const char *key) { FILE *rfp, *wfp; char *newtext, *line; int headerlen; char *filename, *tmpfilename; /* * Open both the old file and a new file. */ tmpfilename = make_filename(INDEX_HOSTKEYS...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x2, %edi xorl %eax, %eax movl %eax, %esi callq 0xcf90 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi leaq 0x53817(%rip), %rsi # 0x6216e callq 0x8420 movq %rax, -0x30(%rbp) cmpq...
/codexns[P]putty/unix/storage.c
read_random_seed
void read_random_seed(noise_consumer_t consumer) { int fd; char *fname; fname = make_filename(INDEX_RANDSEED, NULL); fd = open(fname, O_RDONLY); sfree(fname); if (fd >= 0) { char buf[512]; int ret; while ( (ret = read(fd, buf, sizeof(buf))) > 0) consumer(buf,...
pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %rdi, -0x8(%rbp) movl $0x3, %edi xorl %eax, %eax movl %eax, %esi callq 0xcf90 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi movb $0x0, %al callq 0x83f0 movl %eax, -0xc(%rbp) movq -0x18(%rbp), %rdi callq 0x58c80 cmpl $0x0, -0xc(%r...
/codexns[P]putty/unix/storage.c
write_random_seed
void write_random_seed(void *data, int len) { int fd; char *fname; fname = make_filename(INDEX_RANDSEED, NULL); /* * Don't truncate the random seed file if it already exists; if * something goes wrong half way through writing it, it would * be better to leave the old data there than to l...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x3, %edi xorl %eax, %eax movl %eax, %esi callq 0xcf90 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi movl $0x41, %esi movl $0x180, %edx # imm = 0x180 movb $0x0, %al callq 0x83f0 movl %eax, -0x10(%rbp) cmpl $0x0, -0x...
/codexns[P]putty/unix/storage.c
decode_session_filename
static void decode_session_filename(const char *in, strbuf *out) { while (*in) { if (*in == '%' && in[1] && in[2]) { int i, j; i = in[1] - '0'; i -= (i > 9 ? 7 : 0); j = in[2] - '0'; j -= (j > 9 ? 7 : 0); put_byte(out, (i << 4) + j); ...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, (%rax) je 0xeff2 movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x25, %eax jne 0xefce movq -0x8(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x0, %eax je 0xefce movq -0x8(%rbp), %rax movsbl 0x2(%rax), ...
/codexns[P]putty/unix/storage.c
lf_load
LoadFileStatus lf_load(LoadedFile *lf, const Filename *filename) { FILE *fp = f_open(filename, "rb", false); if (!fp) return LF_ERROR; LoadFileStatus status = lf_load_fp(lf, fp); fclose(fp); return status; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x52e07(%rip), %rsi # 0x62082 xorl %edx, %edx callq 0x5ead0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0xf296 movl $0x2, -0x4(%rbp) jmp 0xf2b5 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi ca...
/codexns[P]putty/sshpubk.c
ppk_encrypted_f
bool ppk_encrypted_f(const Filename *filename, char **commentptr) { LoadedFile *lf = lf_load_keyfile(filename, NULL); if (!lf) { if (commentptr) *commentptr = NULL; return false; } bool toret = ppk_encrypted_s(BinarySource_UPCAST(lf), commentptr); lf_free(lf); return...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xf2c0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x12700 cmpq $0x0, -0x18(%rbp) je 0x126fa movq -0x18(%rbp), %rax movq $0x0, (%rax) movb $0x0, -0x1(%rbp) jmp 0x1...
/codexns[P]putty/sshpubk.c
ppk_save_sb
strbuf *ppk_save_sb(ssh2_userkey *key, const char *passphrase, const ppk_save_parameters *params_orig) { strbuf *pub_blob, *priv_blob, *cipher_mac_keys_blob; unsigned char *priv_blob_encrypted; int priv_encrypted_len; int cipherblk; int i; const char *cipherstr; ptrlen ci...
pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) callq 0x5a580 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi addq $0x18, %rsi callq 0x12fb0 callq 0x5a670 movq %rax, -0x30(%rbp) m...
/codexns[P]putty/sshpubk.c
ssh2_pubkey_openssh_str
char *ssh2_pubkey_openssh_str(ssh2_userkey *key) { strbuf *blob; char *ret; blob = strbuf_new(); ssh_key_public_blob(key->key, BinarySink_UPCAST(blob)); ret = ssh2_pubkey_openssh_str_internal( key->comment, blob->s, blob->len); strbuf_free(blob); return ret; }
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) callq 0x5a580 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi addq $0x18, %rsi callq 0x12fb0 movq -0x8(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax),...
/codexns[P]putty/sshpubk.c
import_ssh1
int import_ssh1(const Filename *filename, int type, RSAKey *key, char *passphrase, const char **errmsg_p) { LoadedFile *lf = lf_load_keyfile(filename, errmsg_p); if (!lf) return false; int toret = import_ssh1_s(BinarySource_UPCAST(lf), type, key, passph...
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 %r8, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xf2c0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1496c movl $0x0, -0x4(%rbp) jmp 0x1499a movq -0x38(...
/codexns[P]putty/import.c
openssh_pem_read
static ssh2_userkey *openssh_pem_read( BinarySource *filesrc, const char *passphrase, const char **errmsg_p) { struct openssh_pem_key *key = load_openssh_pem_key(filesrc, errmsg_p); ssh2_userkey *retkey; const ssh_keyalg *alg; BinarySource src[1]; int i, num_integers; ssh2_userkey *retval = ...
pushq %rbp movq %rsp, %rbp subq $0x2a0, %rsp # imm = 0x2A0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x175b0 movq %rax, -0x28(%rbp) movq $0x0, -0x70(%rbp) callq 0x5a670 movq %rax, -0x80(%rbp) movl $0x0, -0x84(%rbp) cmpq $0x0, -0x2...
/codexns[P]putty/import.c
GET_32BIT_MSB_FIRST
static inline uint32_t GET_32BIT_MSB_FIRST(const void *vp) { const uint8_t *p = (const uint8_t *)vp; return (((uint32_t)p[3] ) | ((uint32_t)p[2] << 8) | ((uint32_t)p[1] << 16) | ((uint32_t)p[0] << 24)); }
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x10(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x10(%rbp), %rcx mo...
/codexns[P]putty/misc.h
provableprime_generate_inner
static mp_int *provableprime_generate_inner( ProvablePrimeContext *ppc, PrimeCandidateSource *pcs, ProgressReceiver *prog, double progress_origin, double progress_scale) { unsigned bits = pcs_get_bits(pcs); assert(bits > 1); if (bits <= 32) { debug_f("ppgi(%u) -> small", bits); retu...
pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movsd %xmm0, -0x28(%rbp) movsd %xmm1, -0x30(%rbp) movq -0x18(%rbp), %rdi callq 0x1c8a0 movl %eax, -0x34(%rbp) cmpl $0x1, -0x34(%rbp) jbe 0x1ae15 jmp 0x1ae34 leaq 0x48b98(%rip), %rdi...
/codexns[P]putty/keygen/prime.c
init_smallprimes
void init_smallprimes(void) { if (smallprimes_array[0]) return; /* already done */ bool A[65536]; for (size_t i = 2; i < lenof(A); i++) A[i] = true; for (size_t i = 2; i < lenof(A); i++) { if (!A[i]) continue; for (size_t j = 2*i; j <...
pushq %rbp movq %rsp, %rbp subq $0x10030, %rsp # imm = 0x10030 cmpw $0x0, 0x60f4d(%rip) # 0x7e3d0 je 0x1d48a jmp 0x1d621 movq $0x2, -0x10008(%rbp) cmpq $0x10000, -0x10008(%rbp) # imm = 0x10000 jae 0x1d4c5 movq -0x10008(%rbp), %rax movb $0x1, -0x10000(%rbp,%rax) movq -0x10008(%rbp), %rax addq $0x1, %rax mov...
/codexns[P]putty/keygen/smallprimes.c
pockle_release
void pockle_release(Pockle *pockle, size_t mark) { while (pockle->nlist > mark) { PocklePrimeRecord *pr = pockle->list[--pockle->nlist]; del234(pockle->tree, pr); mp_free(pr->prime); if (pr->witness) mp_free(pr->witness); sfree(pr->factors); sfree(pr); ...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x10(%rbp), %rax jbe 0x1dece movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rdx movq 0x10(%rdx), %rcx movq %rcx, %rsi addq $-0x1, %rsi movq %rsi, 0x10(%rdx) movq -0x8(...
/codexns[P]putty/keygen/pockle.c
console_print_error_msg
void console_print_error_msg(const char *prefix, const char *msg) { struct termios cf; premsg(&cf); fputs(prefix, stderr); fputs(": ", stderr); fputs(msg, stderr); fputc('\n', stderr); fflush(stderr); postmsg(&cf); }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0x4c(%rbp), %rdi callq 0x1ef90 movq -0x8(%rbp), %rdi movq 0x5efb4(%rip), %rax # 0x7dff8 movq (%rax), %rsi callq 0x8210 movq 0x5efa5(%rip), %rax # 0x7dff8 movq (%rax), %rsi leaq 0x433fa(%rip), %rdi # 0x62457 callq ...
/codexns[P]putty/unix/console.c
old_keyfile_warning
void old_keyfile_warning(void) { static const char message[] = "You are loading an SSH-2 private key which has an\n" "old version of the file format. This means your key\n" "file is not fully tamperproof. Future versions of\n" "PuTTY may stop supporting this private key format,\n" ...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp leaq -0x3c(%rbp), %rdi callq 0x1ef90 movq 0x5e360(%rip), %rax # 0x7dff8 movq (%rax), %rsi leaq 0x4494e(%rip), %rdi # 0x645f0 callq 0x8210 leaq -0x3c(%rbp), %rdi callq 0x1efd0 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
/codexns[P]putty/unix/console.c
aes_select
static ssh_cipher *aes_select(const ssh_cipheralg *alg) { const ssh_cipheralg *const *real_algs = (const ssh_cipheralg **)alg->extra; for (size_t i = 0; real_algs[i]; i++) { const ssh_cipheralg *alg = real_algs[i]; const struct aes_extra *alg_extra = (const struct aes_extra *)alg->e...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x20559 movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, ...
/codexns[P]putty/crypto/aes-select.c
aes_sliced_key_setup
static void aes_sliced_key_setup( aes_sliced_key *sk, const void *vkey, size_t keybits) { const unsigned char *key = (const unsigned char *)vkey; size_t key_words = keybits / 32; sk->rounds = key_words + 6; size_t sched_words = (sk->rounds + 1) * 4; unsigned rconpos = 0; uint16_t *outslic...
pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax shrq $0x5, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x6, %rax movl %eax, %ecx movq -0x8(%rbp), %r...
/codexns[P]putty/crypto/aes-sw.c
aes_cbc_sw_decrypt
static inline void aes_cbc_sw_decrypt( ssh_cipher *ciph, void *vblk, int blklen) { aes_sw_context *ctx = container_of(ciph, aes_sw_context, ciph); uint8_t *blk = (uint8_t *)vblk; /* * CBC decryption can run in parallel, because all the * _ciphertext_ blocks are already available. */ ...
pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax addq $-0x510, %rax # imm = 0xFAF0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl -0x14(%rbp), %eax movl $0x10, %ecx cltd idivl %ecx cltq movq %rax, -...
/codexns[P]putty/crypto/aes-sw.c
aes_sdctr_sw
static inline void aes_sdctr_sw( ssh_cipher *ciph, void *vblk, int blklen) { aes_sw_context *ctx = container_of(ciph, aes_sw_context, ciph); /* * SDCTR encrypt/decrypt loops round one block at a time XORing * the keystream into the user's data, and periodically has to run * a parallel encryp...
pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax addq $-0x510, %rax # imm = 0xFAF0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x4b8, %rax # imm = 0x4B8 addq $0x10, %rax addq $0x40, %rax movq %rax, -0x28(%r...
/codexns[P]putty/crypto/aes-sw.c
argon2_internal
static void argon2_internal(uint32_t p, uint32_t T, uint32_t m, uint32_t t, uint32_t y, ptrlen P, ptrlen S, ptrlen K, ptrlen X, uint8_t *out) { /* * Start by hashing all the input data together: the four string arguments * (password P, salt S, option...
pushq %rbp movq %rsp, %rbp subq $0x1160, %rsp # imm = 0x1160 leaq 0x40(%rbp), %rax movq %rax, -0x1128(%rbp) leaq 0x30(%rbp), %rax movq %rax, -0x1130(%rbp) leaq 0x20(%rbp), %rax movq %rax, -0x1138(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x1140(%rbp) movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movl %edx, -0xc(%...
/codexns[P]putty/crypto/argon2.c
blake2b_new_inner
static ssh_hash *blake2b_new_inner(unsigned hashlen) { assert(hashlen <= ssh_blake2b.hlen); blake2b *s = snew(blake2b); s->hash.vt = &ssh_blake2b; s->hashlen = hashlen; BinarySink_INIT(s, blake2b_write); BinarySink_DELEGATE_INIT(&s->hash, s); return &s->hash; }
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax cmpq $0x40, %rax ja 0x30cb6 jmp 0x30cd5 leaq 0x34087(%rip), %rdi # 0x64d44 leaq 0x3409c(%rip), %rsi # 0x64d60 movl $0x78, %edx leaq 0x340e2(%rip), %rcx # 0x64db2 callq 0x8200 movl $0x1, %edi movl $0x108, %esi ...
/codexns[P]putty/crypto/blake2.c
blake2b_reset
static void blake2b_reset(ssh_hash *hash) { blake2b *s = container_of(hash, blake2b, hash); /* Initialise the hash to the standard IV */ memcpy(s->h, iv, sizeof(s->h)); /* XOR in the parameters: secret key length (here always 0) in * byte 1, and hash length in byte 0. */ s->h[0] ^= 0x01010000...
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $-0xf8, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq 0x33feb(%rip), %rsi # 0x64de0 movl $0x40, %edx callq 0x8300 movq -0x10(%rbp), %rax movl 0x40(%rax), %eax xorl $0x1010000, %eax # imm = 0x1010000 movl %e...
/codexns[P]putty/crypto/blake2.c
blake2b_write
static void blake2b_write(BinarySink *bs, const void *vp, size_t len) { blake2b *s = BinarySink_DOWNCAST(bs, blake2b); const uint8_t *p = vp; while (len > 0) { if (s->used == sizeof(s->block)) { f_outer(s->h, s->block, s->lenhi, s->lenlo, 0); s->used = 0; } ...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax addq $-0xe0, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x18(%rbp) jbe 0x3113d movq -0x20(%rbp), %rax cmpq $0x80, 0xc8(%rax) jne 0x3107f movq -...
/codexns[P]putty/crypto/blake2.c
blowfish_decrypt
static void blowfish_decrypt(uint32_t xL, uint32_t xR, uint32_t *output, BlowfishContext * ctx) { uint32_t *S0 = ctx->S0; uint32_t *S1 = ctx->S1; uint32_t *S2 = ctx->S2; uint32_t *S3 = ctx->S3; uint32_t *P = ctx->P; uint32_t t; ROUND(17); ROUND(16); ROUN...
pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movq %rdx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x400, %rax # imm = 0x400 movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax addq $0x800, %rax # imm = 0x800 mo...
/codexns[P]putty/crypto/blowfish.c
eddsa_new_pub
static ssh_key *eddsa_new_pub(const ssh_keyalg *alg, ptrlen data) { const struct ecsign_extra *extra = (const struct ecsign_extra *)alg->extra; struct ec_curve *curve = extra->curve(); assert(curve->type == EC_EDWARDS); BinarySource src[1]; BinarySource_BARE_INIT_PL(src, data); get_stri...
pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax callq *(%rax) movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpl $0x2, (%rax) jne 0x34f1b jmp 0x34f3a leaq 0x31669(%...
/codexns[P]putty/crypto/ecc-ssh.c
eddsa_openssh_blob
static void eddsa_openssh_blob(ssh_key *key, BinarySink *bs) { struct eddsa_key *ek = container_of(key, struct eddsa_key, sshk); assert(ek->curve->type == EC_EDWARDS); /* Encode the public and private points as strings */ strbuf *pub_sb = strbuf_new(); put_epoint(pub_sb, ek->publicKey, ek->curve, f...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq $-0x18, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax cmpl $0x2, (%rax) jne 0x35ada jmp 0x35af9 leaq 0x30aa6(%rip), %rdi # 0x66587 leaq 0x30752(%rip), %rsi # 0x6623a movl $0...
/codexns[P]putty/crypto/ecc-ssh.c
eddsa_cache_str
static char *eddsa_cache_str(ssh_key *key) { struct eddsa_key *ek = container_of(key, struct eddsa_key, sshk); mp_int *x, *y; ecc_edwards_get_affine(ek->publicKey, &x, &y); char *toret = ecc_cache_str_shared(ek->curve->name, x, y); mp_free(x); mp_free(y); return toret; }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $-0x18, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi leaq -0x18(%rbp), %rsi leaq -0x20(%rbp), %rdx callq 0x54db0 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rdi movq -0x18(%rbp), %rsi mo...
/codexns[P]putty/crypto/ecc-ssh.c
ecdsa_freekey
static void ecdsa_freekey(ssh_key *key) { struct ecdsa_key *ek = container_of(key, struct ecdsa_key, sshk); if (ek->publicKey) ecc_weierstrass_point_free(ek->publicKey); if (ek->privateKey) mp_free(ek->privateKey); sfree(ek); }
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $-0x18, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x360e0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x52600 movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x360f8 movq -0x10(%rbp), %rax...
/codexns[P]putty/crypto/ecc-ssh.c
ecdsa_verify
static bool ecdsa_verify(ssh_key *key, ptrlen sig, ptrlen data) { struct ecdsa_key *ek = container_of(key, struct ecdsa_key, sshk); const struct ecsign_extra *extra = (const struct ecsign_extra *)ek->sshk.vt->extra; BinarySource src[1]; BinarySource_BARE_INIT_PL(src, sig); /* Check the sig...
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x20(%rbp) movq %rdi, -0x30(%rbp) movq -0x30(%rbp), %rax addq $-0x18, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq 0xb8(%rax), %rax movq %rax, -0x40(%rbp) leaq -0x...
/codexns[P]putty/crypto/ecc-ssh.c
ecdsa_components
static key_components *ecdsa_components(ssh_key *key) { struct ecdsa_key *ek = container_of(key, struct ecdsa_key, sshk); key_components *kc = key_components_new(); key_components_add_text(kc, "key_type", "ECDSA"); key_components_add_text(kc, "curve_name", ek->curve->textname); mp_int *x, *y; ...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $-0x18, %rax movq %rax, -0x10(%rbp) callq 0x57400 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x2f874(%rip), %rsi # 0x66180 leaq 0x2a88e(%rip), %rdx # 0x611a1 callq 0x57450 movq -0x18(%rbp), %rdi movq -0x10(%rbp)...
/codexns[P]putty/crypto/ecc-ssh.c
ec_nist_alg_and_curve_by_bits
bool ec_nist_alg_and_curve_by_bits( int bits, const struct ec_curve **curve, const ssh_keyalg **alg) { switch (bits) { case 256: *alg = &ssh_ecdsa_nistp256; break; case 384: *alg = &ssh_ecdsa_nistp384; break; case 521: *alg = &ssh_ecdsa_nistp521; break; default: return false; } *...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl -0x8(%rbp), %eax movl %eax, -0x1c(%rbp) subl $0x100, %eax # imm = 0x100 je 0x36d6a jmp 0x36d52 movl -0x1c(%rbp), %eax subl $0x180, %eax # imm = 0x180 je 0x36d7a jmp 0x36d5e movl -0x...
/codexns[P]putty/crypto/ecc-ssh.c
eddsa_decode
static EdwardsPoint *eddsa_decode(ptrlen encoded, const struct ec_curve *curve) { assert(curve->type == EC_EDWARDS); mp_int *y = mp_from_bytes_le(encoded); /* The topmost bit of the encoding isn't part of y, so it stores * the bottom bit of x. Extract it, and zero that bit in y. */ unsigned desir...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax cmpl $0x2, (%rax) jne 0x36f1f jmp 0x36f3e leaq 0x2f665(%rip), %rdi # 0x6658b leaq 0x2f30d(%rip), %rsi # 0x6623a movl $0x213, %edx # imm = 0x213 leaq 0x2f4df(%rip), %...
/codexns[P]putty/crypto/ecc-ssh.c
initialise_ecurve
static void initialise_ecurve( struct ec_curve *curve, mp_int *p, mp_int *d, mp_int *a, mp_int *nonsquare, mp_int *G_x, mp_int *G_y, mp_int *G_order, unsigned log2_cofactor) { /* Ensure curve->fieldBytes is long enough to store an extra bit * for a compressed point */ initialise_common(curve, E...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl 0x20(%rbp), %eax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movl $0x2, %esi movl $0x1, %ec...
/codexns[P]putty/crypto/ecc-ssh.c
ec_p384
static struct ec_curve *ec_p384(void) { static struct ec_curve curve = { 0 }; static bool initialised = false; if (!initialised) { mp_int *p = MP_LITERAL(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff); mp_int *a = MP_LITERAL(0xfffffff...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp testb $0x1, 0x49a31(%rip) # 0x81890 jne 0x37f66 leaq 0x2ee70(%rip), %rdi # 0x66cdc callq 0x374d0 movq %rax, -0x8(%rbp) leaq 0x2eec3(%rip), %rdi # 0x66d3f callq 0x374d0 movq %rax, -0x10(%rbp) leaq 0x2ef16(%rip), %rdi # 0x66da2 callq 0x374d0 movq %rax, -0x18(%rb...
/codexns[P]putty/crypto/ecc-ssh.c
ssh_ecdhkex_m_getpublic
static void ssh_ecdhkex_m_getpublic(ecdh_key *dh, BinarySink *bs) { ecdh_key_m *dhm = container_of(dh, ecdh_key_m, ek); mp_int *x; ecc_montgomery_get_affine(dhm->m_public, &x); for (size_t i = 0; i < dhm->curve->fieldBytes; ++i) put_byte(bs, mp_get_byte(x, i)); mp_free(x); }
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq $-0x20, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rdi leaq -0x20(%rbp), %rsi callq 0x54010 movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %...
/codexns[P]putty/crypto/ecc-ssh.c
ssh_ecdhkex_w_getkey
static bool ssh_ecdhkex_w_getkey(ecdh_key *dh, ptrlen remoteKey, BinarySink *bs) { ecdh_key_w *dhw = container_of(dh, ecdh_key_w, ek); WeierstrassPoint *remote_p = ecdsa_decode(remoteKey, dhw->curve); if (!remote_p) return false; if (ecc_weierstrass_is_identity...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $-0x20, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rdx movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x377e0 movq %rax, -0x38...
/codexns[P]putty/crypto/ecc-ssh.c
mp_make_sized
mp_int *mp_make_sized(size_t nw) { mp_int *x = snew_plus(mp_int, nw * sizeof(BignumInt)); assert(nw); /* we outlaw the zero-word mp_int */ x->nw = nw; x->w = snew_plus_get_aux(x); mp_clear(x); return x; }
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdx shlq $0x3, %rdx movl $0x1, %edi movl $0x10, %esi callq 0x58b40 movq %rax, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0x39c90 jmp 0x39caf leaq 0x2de2b(%rip), %rdi # 0x67ac2 leaq 0x2dda2(%rip), %rsi # 0x67a40 movl $0x48, %edx leaq 0...
/codexns[P]putty/crypto/mpint.c
mp_from_decimal_pl
mp_int *mp_from_decimal_pl(ptrlen decimal) { /* 196/59 is an upper bound (and also a continued-fraction * convergent) for log2(10), so this conservatively estimates the * number of bits that will be needed to store any number that can * be written in this many decimal digits. */ assert(decimal.le...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x8(%rbp) movabsq $0x14e5e0a72f05397, %rax # imm = 0x14E5E0A72F05397 cmpq %rax, -0x8(%rbp) jae 0x3a402 jmp 0x3a421 leaq 0x2d6f0(%rip), %rdi # 0x67af9 leaq 0x2d630(%rip), %rsi # 0x67a40 movl $0xe7, %edx leaq 0x2d6fe(%rip), %rcx # ...
/codexns[P]putty/crypto/mpint.c
mp_rshift_fixed_into
void mp_rshift_fixed_into(mp_int *r, mp_int *a, size_t bits) { size_t words = bits / BIGNUM_INT_BITS; size_t bitoff = bits % BIGNUM_INT_BITS; for (size_t i = 0; i < r->nw; i++) { r->w[i] = mp_word(a, i + words); if (bitoff != 0) { r->w[i] >>= bitoff; r->w[i] |= mp_wo...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax andq $0x3f, %rax movq %rax, -0x28(%rbp) movq $0x0, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x8(%rbp), %rcx cmpq (%rcx), %r...
/codexns[P]putty/crypto/mpint.c
trim_leading_zeroes
static void trim_leading_zeroes(char *buf, size_t bufsize, size_t maxtrim) { size_t trim = maxtrim; /* * Look for the first character not equal to '0', to find the * shift count. */ if (trim > 0) { for (size_t pos = trim; pos-- > 0 ;) { uint8_t diff = buf[pos] ^ '0'; ...
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jbe 0x3b1b4 movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x28(%rbp) cmpq $0x0, %rax jbe...
/codexns[P]putty/crypto/mpint.c
mp_lshift_fixed_into
void mp_lshift_fixed_into(mp_int *r, mp_int *a, size_t bits) { size_t words = bits / BIGNUM_INT_BITS; size_t bitoff = bits % BIGNUM_INT_BITS; for (size_t i = r->nw; i-- > 0 ;) { if (i < words) { r->w[i] = 0; } else { r->w[i] = mp_word(a, i - words); if (b...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax andq $0x3f, %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %r...
/codexns[P]putty/crypto/mpint.c
monty_new
MontyContext *monty_new(mp_int *modulus) { MontyContext *mc = snew(MontyContext); mc->rw = modulus->nw; mc->rbits = mc->rw * BIGNUM_INT_BITS; mc->pw = mc->rw * 2 + 1; mc->m = mp_copy(modulus); mc->minus_minv_mod_r = mp_invert_mod_2to(mc->m, mc->rbits); mp_neg_into(mc->minus_minv_mod_r, mc...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x1, %edi movl $0x48, %esi xorl %eax, %eax movl %eax, %edx callq 0x58b40 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx shlq $0x6, %rcx movq -...
/codexns[P]putty/crypto/mpint.c
mp_modpow
mp_int *mp_modpow(mp_int *base, mp_int *exponent, mp_int *modulus) { assert(modulus->nw > 0); assert(modulus->w[0] & 1); MontyContext *mc = monty_new(modulus); mp_int *m_base = monty_import(mc, base); mp_int *m_out = monty_pow(mc, m_base, exponent); mp_int *out = monty_export(mc, m_out); mp...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, (%rax) jbe 0x3da70 jmp 0x3da8f leaq 0x2a313(%rip), %rdi # 0x67d8a leaq 0x29fc2(%rip), %rsi # 0x67a40 movl $0x67e, %edx # imm = 0x67E leaq 0x2a310(%rip), %r...
/codexns[P]putty/crypto/mpint.c
modsqrt_free
void modsqrt_free(ModsqrtContext *sc) { monty_free(sc->mc); mp_free(sc->p); mp_free(sc->z); mp_free(sc->k); mp_free(sc->km1o2); if (sc->zk) mp_free(sc->zk); sfree(sc); }
pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rdi callq 0x3d210 movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0x39e00 movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi callq 0x39e00 movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x39e00 movq -0x8(%rbp), %rax movq ...
/codexns[P]putty/crypto/mpint.c
prng_generate
static inline void prng_generate(prng_impl *pi, void *outbuf) { ssh_hash *h = ssh_hash_copy(pi->generator); prngdebug("prng_generate\n"); put_byte(h, 'G'); for (unsigned i = 0; i < 128; i += 8) put_byte(h, pi->counter[i/BIGNUM_INT_BITS] >> (i%BIGNUM_INT_BITS)); BignumCarry c = 1; for (u...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi callq 0x42e80 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rdi movl $0x47, %esi callq 0x57b20 movl $0x0, -0x1c(%rbp) cmpl $0x80, -0x1c(%rbp) jae 0x42b2a movq -0x18(%rbp)...
/codexns[P]putty/crypto/prng.c
des3_pubkey_cipher
static ssh_cipher *des3_pubkey_cipher(const void *vkey) { ssh_cipher *c = ssh_cipher_new(&ssh_3des_ssh1); uint8_t keys3[24], iv[8]; memcpy(keys3, vkey, 16); memcpy(keys3 + 16, vkey, 8); ssh_cipher_setkey(c, keys3); smemclr(keys3, sizeof(keys3)); memset(iv, 0, 8); ssh_cipher_setiv(c, iv...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) leaq 0x3a97d(%rip), %rdi # 0x7dce0 callq 0x434c0 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x30(%rbp) movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x...
/codexns[P]putty/crypto/pubkey-ssh1.c
BinarySource_get_rsa_ssh1_pub
void BinarySource_get_rsa_ssh1_pub( BinarySource *src, RSAKey *rsa, RsaSsh1Order order) { unsigned bits; mp_int *e, *m; bits = get_uint32(src); if (order == RSA_SSH1_EXPONENT_FIRST) { e = get_mp_ssh1(src); m = get_mp_ssh1(src); } else { m = get_mp_ssh1(src); e = ...
pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rdi callq 0x58320 movl %eax, -0x18(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x4358d movq -0x8(%rbp), %rax movq 0x20(%rax), %rdi callq 0x3b520 movq %rax, -0x20(%rbp) movq -0x8(%...
/codexns[P]putty/crypto/rsa.c
rsa2_invalid
static char *rsa2_invalid(ssh_key *key, unsigned flags) { RSAKey *rsa = container_of(key, RSAKey, sshk); size_t bits = mp_get_nbits(rsa->modulus), nbytes = (bits + 7) / 8; const char *sign_alg_name; const ssh_hashalg *halg = rsa2_hash_alg_for_flags(flags, &sign_alg_name); if (nbytes < rsa_pkcs1_leng...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax addq $-0x40, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rdi callq 0x3aaa0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x7, %rax shrq $0x3, %rax movq %rax, -0x30(%rbp) movl -0...
/codexns[P]putty/crypto/rsa.c
rsa2_verify
static bool rsa2_verify(ssh_key *key, ptrlen sig, ptrlen data) { RSAKey *rsa = container_of(key, RSAKey, sshk); BinarySource src[1]; ptrlen type, in_pl; mp_int *in, *out; const struct ssh2_rsa_extra *extra = (const struct ssh2_rsa_extra *)key->vt->extra; const ssh_hashalg *halg = rsa2_...
pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x20(%rbp) movq %rdi, -0x30(%rbp) movq -0x30(%rbp), %rax addq $-0x40, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq 0xb8(%rax), %rax movq %rax, -0x98(%rbp) movq -0x98(%...
/codexns[P]putty/crypto/rsa.c
sha256_block_write
static inline bool sha256_block_write( sha256_block *blk, const void **vdata, size_t *len) { size_t blkleft = sizeof(blk->block) - blk->used; size_t chunk = *len < blkleft ? *len : blkleft; const uint8_t *p = *vdata; memcpy(blk->block + blk->used, p, chunk); *vdata = p + chunk; *len -= chun...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rcx movl $0x40, %eax subq 0x40(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jae 0x460cf movq -0x20(%rbp), %rax movq (%rax), %rax movq ...
/codexns[P]putty/crypto/sha256.h
sha512_block_write
static inline bool sha512_block_write( sha512_block *blk, const void **vdata, size_t *len) { size_t blkleft = sizeof(blk->block) - blk->used; size_t chunk = *len < blkleft ? *len : blkleft; const uint8_t *p = *vdata; memcpy(blk->block + blk->used, p, chunk); *vdata = p + chunk; *len -= chun...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rcx movl $0x80, %eax subq 0x80(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jae 0x46f02 movq -0x20(%rbp), %rax movq (%rax), %rax movq ...
/codexns[P]putty/crypto/sha512.h
GET_64BIT_LSB_FIRST
static inline uint64_t GET_64BIT_LSB_FIRST(const void *vp) { const uint8_t *p = (const uint8_t *)vp; return (((uint64_t)p[0] ) | ((uint64_t)p[1] << 8) | ((uint64_t)p[2] << 16) | ((uint64_t)p[3] << 24) | ((uint64_t)p[4] << 32) | ((uint64_t)p[5] << 40) | ((uint64_t)p[6] <...
pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax movq -0x10(%rbp), %rcx movzbl 0x1(%rcx), %ecx shlq $0x8, %rcx orq %rcx, %rax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx shlq $0x10, %rcx orq %rcx, %rax movq -0x10(%rbp), %rcx movzb...
/codexns[P]putty/misc.h
sha1_select
static ssh_hash *sha1_select(const ssh_hashalg *alg) { static const ssh_hashalg *const real_algs[] = { #if HAVE_SHA_NI &ssh_sha1_ni, #endif #if HAVE_NEON_CRYPTO &ssh_sha1_neon, #endif &ssh_sha1_sw, NULL, }; for (size_t i = 0; real_algs[i]; i++) { const ssh_hashalg *a...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq $0x0, -0x10(%rbp) movq -0x10(%rbp), %rcx leaq 0x34f51(%rip), %rax # 0x7d6e0 cmpq $0x0, (%rax,%rcx,8) je 0x487e3 movq -0x10(%rbp), %rcx leaq 0x34f3f(%rip), %rax # 0x7d6e0 movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax ...
/codexns[P]putty/crypto/sha1-select.c
aes_ni_key_expand
static void aes_ni_key_expand( const unsigned char *key, size_t key_words, __m128i *keysched_e, __m128i *keysched_d) { size_t rounds = key_words + 6; size_t sched_words = (rounds + 1) * 4; /* * Store the key schedule as 32-bit integers during expansion, so * that it's easy to refer back t...
pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %rdi, -0xa8(%rbp) movq %rsi, -0xb0(%rbp) movq %rdx, -0xb8(%rbp) movq %rcx, -0xc0(%rbp) movq -0xb0(%rbp), %rax addq $0x6, %rax movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rax addq $0x1, %rax shlq $0x2, %rax movq %rax, -0xd0(%rbp) movl $0x0, -0x1c4(...
/codexns[P]putty/crypto/aes-ni.c
sha256_ni_new
static ssh_hash *sha256_ni_new(const ssh_hashalg *alg) { const struct sha256_extra *extra = (const struct sha256_extra *)alg->extra; if (!check_availability(extra)) return NULL; sha256_ni *s = sha256_ni_alloc(); s->hash.vt = alg; BinarySink_INIT(s, sha256_ni_write); BinarySink_DELEGATE...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x4c800 testb $0x1, %al jne 0x4c25f movq $0x0, -0x8(%rbp) jmp 0x4c2c9 callq 0x4c850 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx movq -0x20(%rbp), %rax mov...
/codexns[P]putty/crypto/sha256-ni.c
sha256_ni_alloc
static sha256_ni *sha256_ni_alloc(void) { /* * The __m128i variables in the context structure need to be * 16-byte aligned, but not all malloc implementations that this * code has to work with will guarantee to return a 16-byte * aligned pointer. So we over-allocate, manually realign the * ...
pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0xaf, %edi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x58b40 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax addq $0xf, %rax andq $-0x10, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq...
/codexns[P]putty/crypto/sha256-ni.c
sha256_ni_available
static bool sha256_ni_available(void) { unsigned int CPUInfo[4]; GET_CPU_ID_0(CPUInfo); if (CPUInfo[0] < 7) return false; GET_CPU_ID_7(CPUInfo); return CPUInfo[1] & (1 << 29); /* Check SHA */ }
pushq %rbp movq %rsp, %rbp xorl %eax, %eax xchgq %rbx, %rsi cpuid xchgq %rbx, %rsi movl %esi, -0x24(%rbp) movl %eax, %esi movl -0x24(%rbp), %eax movl %esi, -0x20(%rbp) movl %eax, -0x1c(%rbp) movl %ecx, -0x18(%rbp) movl %edx, -0x14(%rbp) cmpl $0x7, -0x20(%rbp) jae 0x4e82e movb $0x0, -0x1(%rbp) jmp 0x4e864 movl $0x7, %ea...
/codexns[P]putty/crypto/sha256-ni.c
sha1_ni_reset
static void sha1_ni_reset(ssh_hash *hash) { sha1_ni *s = container_of(hash, sha1_ni, hash); /* Initialise the core vectors in their storage order */ s->core[0] = _mm_set_epi64x( 0x67452301efcdab89ULL, 0x98badcfe10325476ULL); s->core[1] = _mm_set_epi32(0xc3d2e1f0, 0, 0, 0); sha1_block_setup...
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x48(%rbp) movq -0x48(%rbp), %rax addq $-0x90, %rax movq %rax, -0x50(%rbp) movabsq $0x67452301efcdab89, %rax # imm = 0x67452301EFCDAB89 movq %rax, -0x28(%rbp) movabsq $-0x67452301efcdab8a, %rax # imm = 0x98BADCFE10325476 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %x...
/codexns[P]putty/crypto/sha1-ni.c
sha1_ni_digest
static void sha1_ni_digest(ssh_hash *hash, uint8_t *digest) { sha1_ni *s = container_of(hash, sha1_ni, hash); sha1_block_pad(&s->blk, BinarySink_UPCAST(s)); /* Rearrange the first vector into its output order */ __m128i abcd = _mm_shuffle_epi32(s->core[0], 0x1B); /* Byte-swap it into the output e...
pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdi, -0xa8(%rbp) movq %rsi, -0xb0(%rbp) movq -0xa8(%rbp), %rax addq $-0x90, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rsi movq %rsi, %rdi addq $0x20, %rdi addq $0x78, %rsi callq 0x50520 movq -0xb8(%rbp), %rax m...
/codexns[P]putty/crypto/sha1-ni.c
sha1_block_write
static inline bool sha1_block_write( sha1_block *blk, const void **vdata, size_t *len) { size_t blkleft = sizeof(blk->block) - blk->used; size_t chunk = *len < blkleft ? *len : blkleft; const uint8_t *p = *vdata; memcpy(blk->block + blk->used, p, chunk); *vdata = p + chunk; *len -= chunk; ...
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rcx movl $0x40, %eax subq 0x40(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jae 0x4ee8f movq -0x20(%rbp), %rax movq (%rax), %rax movq ...
/codexns[P]putty/crypto/sha1.h