name string | code string | asm string | file string |
|---|---|---|---|
bip32_key_init_alloc | int bip32_key_init_alloc(uint32_t version, uint32_t depth, uint32_t child_num,
const unsigned char *chain_code, size_t chain_code_len,
const unsigned char *pub_key, size_t pub_key_len,
const unsigned char *priv_key, size_t priv_key_len,
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x78(%rsp)
je 0x59c5a
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movl %edi, %r13d
movl $0xc0, %edi
callq 0xbd3b
movq 0x78(%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x59c61
movl %r13d, %edi... | /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_init | int bip32_key_init(uint32_t version, uint32_t depth, uint32_t child_num,
const unsigned char *chain_code, size_t chain_code_len,
const unsigned char *pub_key, size_t pub_key_len,
const unsigned char *priv_key, size_t priv_key_len,
const unsigne... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x78(%rsp), %rbx
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rbx, %rbx
je 0x59f0f
movq %r9, %r14
movq %rcx, %r12
movl %esi, %r13d
movl %edi, %r15d
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
cmpl $0x488ade... | /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_get_fingerprint | int bip32_key_get_fingerprint(struct ext_key *hdkey,
unsigned char *bytes_out, size_t len)
{
/* Validate our arguments and then the input key */
if (!hdkey ||
!key_is_valid(hdkey) ||
!bytes_out || len != BIP32_KEY_FINGERPRINT_LEN)
return WALLY_EINVAL;
/... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x5a0a4
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5927e
cmpq $0x4, %r15
jne 0x5a0a4
testq %rbx, %rbx
je 0x5a0a4
testb %al, %al
je 0x5a0a4
leaq 0x64(%r14), %r15
cmpb $0x0, 0x64(%r14)
j... | /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
scan_flux_gcr(TrackData&) | void scan_flux_gcr(TrackData& trackdata)
{
int bitcell_ns;
// C64 GCR disks are zoned, with variable rate depending on cylinder
if (trackdata.cylhead.cyl < 17)
bitcell_ns = 3200;
else if (trackdata.cylhead.cyl < 24)
bitcell_ns = 3500;
else if (trackdata.cylhead.cyl < 30)
bit... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
movl $0xc80, %ebp # imm = 0xC80
cmpl $0x11, %eax
jl 0x39ed1
movl $0xdac, %ebp # imm = 0xDAC
cmpl $0x18, %eax
jl 0x39ed1
cmpl $0x1e, %eax
movl $0xea6, %eax # imm = 0xEA6
movl $0xfa0, %ebp ... | /simonowen[P]samdisk/src/BitstreamDecoder.cpp |
scan_bitstream_mfm_fm(TrackData&) | void scan_bitstream_mfm_fm(TrackData& trackdata)
{
Track track;
uint32_t sync_mask = opt.a1sync ? 0xffdfffdf : 0xffffffff;
auto& bitbuf = trackdata.bitstream();
bitbuf.seek(0);
track.tracklen = bitbuf.track_bitsize();
CRC16 crc;
std::vector<std::pair<int, Encoding>> data_fields;
uint3... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdi, %rbx
leaq 0x118(%rsp), %rdi
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x713b8
leaq 0xa4e58(%rip), %rax # 0xdf740
cmpl $0x1, 0x118(%rax)
sbbl %r13d, %r13d
movq %rbx, 0xe0(%rsp)
movq %rbx, %rdi
callq ... | /simonowen[P]samdisk/src/BitstreamDecoder.cpp |
scan_bitstream_ace(TrackData&) | void scan_bitstream_ace(TrackData& trackdata)
{
auto& bitbuf = trackdata.bitstream();
bitbuf.seek(0);
Track track;
track.tracklen = bitbuf.track_bitsize();
uint32_t word = 0;
enum State { stateWant255, stateWant42, stateData };
State state = stateWant255;
Data block;
int idle = 0;... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
callq 0x74e48
movq %rax, %r14
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
callq 0x3807c
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x713b8
movq %r14, %rdi
callq 0x387b0
movl %eax, 0x48(%rsp)
xorps %xmm0, %xmm0
leaq... | /simonowen[P]samdisk/src/BitstreamDecoder.cpp |
scan_bitstream_mx(TrackData&) | void scan_bitstream_mx(TrackData& trackdata)
{
Track track;
Data block;
uint64_t dword = 0;
uint16_t stored_cksum = 0, cksum = 0, stored_track = 0, extra = 0;
bool zero_cksum = false;
auto& bitbuf = trackdata.bitstream();
bitbuf.seek(0);
bitbuf.encoding = Encoding::FM;
track.trackle... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x713b8
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
callq 0x74e48
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
cal... | /simonowen[P]samdisk/src/BitstreamDecoder.cpp |
void Message<char const*, unsigned char&, unsigned char&, unsigned char&, int&, char const*>(MsgType, char const*, char const*&&, unsigned char&, unsigned char&, unsigned char&, int&, char const*&&) | void Message(MsgType type, const char* pcsz_, Args&& ...args)
{
std::string msg = util::fmt(pcsz_, std::forward<Args>(args)...);
if (type == msgError)
throw util::exception(msg);
if (type != msgStatus)
{
if (seen_messages.find(msg) != seen_messages.end())
return;
s... | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %rax
movq (%rdx), %rdx
movzbl (%rcx), %ecx
movzbl (%r8), %r8d
movzbl (%r9), %r9d
movl (%rax), %r11d
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
pushq (%r10)
pushq %r11
callq 0x784cc
addq $0x10, %rsp
testl %ebx, %ebx
je 0x3f8dc
cmpl $... | /simonowen[P]samdisk/include/Util.h |
util::LogHelper& util::operator<<<char [45]>(util::LogHelper&, char const (&) [45]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x407f5
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [33]>(util::LogHelper&, char const (&) [33]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x408c7
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [43]>(util::LogHelper&, char const (&) [43]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x40f7c
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [53]>(util::LogHelper&, char const (&) [53]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x40fe5
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x417fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x416f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x9a4ae(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [7]>(util::LogHelper&, char const (&) [7]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x4174d
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [8]>(util::LogHelper&, char const (&) [8]) | LogHelper& operator<<(LogHelper& h, const T& t)
{
if (h.clearline)
{
h.clearline = false;
h << ttycmd::clearline;
}
*h.screen << t;
if (h.file && !h.statusmsg) *h.file << t;
return h;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x11(%rdi)
jne 0x417b6
movb $0x0, 0x11(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7897a
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x9b739(%rip), %rsi # 0xdcf78
l... | /simonowen[P]samdisk/include/utils.h |
generate_special(TrackData&) | bool generate_special(TrackData& trackdata)
{
auto track{ trackdata.track() };
int weak_offset{ 0 }, weak_size{ 0 };
// Special formats have special conversions
if (IsEmptyTrack(track))
trackdata.add(GenerateEmptyTrack(trackdata.cylhead, track));
else if (IsKBI19Track(track))
trackd... | pushq %rbp
pushq %r14
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %r14
callq 0x74e16
movq (%rax), %rcx
leaq 0x10(%rsp), %rbx
movq %rcx, -0x8(%rbx)
leaq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x42ec8
xorl %eax, %eax
movl %eax, 0x4(%rsp)
movl %eax, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x6c9d0
testb %al, %al
je 0x4221a
leaq 0x28(%... | /simonowen[P]samdisk/src/BitstreamEncoder.cpp |
generate_bitstream(TrackData&) | void generate_bitstream(TrackData& trackdata)
{
assert(trackdata.has_track());
// Special formats have special conversions (unless disabled)
if (!opt.nospecial && generate_special(trackdata))
{
// Fail if we've encountered a flux-only special format, as converting
// it to bitstream is ... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x74dee
testb %al, %al
je 0x42937
leaq 0x9ce4c(%rip), %r14 # 0xdf740
cmpl $0x0, 0xb4(%r14)
jne 0x4291e
movq %rbx, %rdi
callq 0x421b4
testb %al, %al
je 0x4291e
movq %rbx, %rdi
callq 0x74df4
testb %al, %al
je 0x4298b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl ... | /simonowen[P]samdisk/src/BitstreamEncoder.cpp |
generate_flux(TrackData&) | void generate_flux(TrackData& trackdata)
{
uint8_t last_bit{ 0 }, curr_bit{ 0 };
auto& bitbuf = trackdata.bitstream();
auto ns_per_bitcell = bitcell_ns(bitbuf.datarate);
bitbuf.seek(0);
uint32_t flux_time{ 0 };
FluxData flux_data{};
std::vector<uint32_t> flux_times{};
flux_times.reserve... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
callq 0x74e48
movq %rax, %r14
movl (%rax), %eax
cmpl $0x7a11f, %eax # imm = 0x7A11F
jg 0x429fa
cmpl $0x3d090, %eax # imm = 0x3D090
je 0x42a13
cmpl $0x493e0, %eax # imm = 0x493E0
jne 0x42a0... | /simonowen[P]samdisk/src/BitstreamEncoder.cpp |
util::exception::exception<char const (&) [49], CylHead&>(char const (&) [49], CylHead&) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x43512
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42e41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x98d60(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [44], Encoding const&, char const (&) [9]>(char const (&) [44], Encoding const&, char const (&) [9]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x35760
movq %r12, %rdi
callq 0x35210
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x356a0
movl (%r15), %... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [36], CylHead&>(char const (&) [36], CylHead&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x35760
movq %r15, %rdi
callq 0x35210
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movl (%r14), %edx
movl 0x4(%r14), %ecx
le... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [49], CylHead&>(char const (&) [49], CylHead&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x35760
movq %r15, %rdi
callq 0x35210
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movl (%r14), %edx
movl 0x4(%r14), %ecx
le... | /simonowen[P]samdisk/include/utils.h |
BlockDevice::Unlock() | void BlockDevice::Unlock()
{
#ifdef _WIN32
DWORD dwRet;
// Anything to unlock?
if (lLockHandles.size())
{
for (auto p : lLockHandles)
{
if (p.first != INVALID_HANDLE_VALUE)
CloseHandle(p.first);
}
lLockHandles.clear();
// Refresh the... | retq
nop
| /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | bool BlockDevice::Open(const std::string& path, bool uncached)
{
auto flags = O_BINARY | (uncached ? O_DIRECT : 0);
// Open as read-write, falling back on read-only
if ((h = open(path.c_str(), O_RDWR | flags)) == -1 &&
(h = open(path.c_str(), O_RDONLY | flags)) == -1)
{
// Win32 has a se... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
shll $0xe, %r15d
movq (%rsi), %rdi
leal 0x2(%r15), %esi
xorl %eax, %eax
callq 0x35a70
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
jne 0x43b6a
movq (%r14), %rdi
xorl %ebp, %ebp
movl %r15d, %esi
xorl %eax, %eax
callq 0x35a70... | /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::ReadIdentifyData(void*, IDENTIFYDEVICE&) | bool BlockDevice::ReadIdentifyData(HANDLE h_, IDENTIFYDEVICE& identify_)
{
#ifdef _WIN32
DWORD dwRet = 0;
// Input is the identify command (0xEC)
DWORD dwInSize = sizeof(SENDCMDINPARAMS) - 1;
MEMORY memIn(dwInSize);
SENDCMDINPARAMS* pIn = reinterpret_cast<SENDCMDINPARAMS*>(memIn.pb);
pIn->irDri... | pushq %rbx
movq %rdx, %rbx
movl 0x8(%rdi), %edi
leaq 0x9b3c0(%rip), %rdx # 0xdf030
movl $0x30d, %esi # imm = 0x30D
xorl %eax, %eax
callq 0x357f0
testl %eax, %eax
jne 0x43c9e
movl $0x200, (%rbx) # imm = 0x200
addq $0x4, %rbx
leaq 0x9b39f(%rip), %rsi # 0xdf030
movl $0x200, %edx # im... | /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::ReadMakeModelRevisionSerial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | bool BlockDevice::ReadMakeModelRevisionSerial(const std::string& path)
{
#ifdef _WIN32
(void)path; // unused
MEMORY mem(512);
PSTORAGE_DEVICE_DESCRIPTOR pDevDesc = reinterpret_cast<PSTORAGE_DEVICE_DESCRIPTOR>(mem.pb);
pDevDesc->Size = static_cast<DWORD>(mem.size);
STORAGE_PROPERTY_QUERY spq;
sp... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %edi
leaq 0x9b572(%rip), %rdx # 0xdf230
movl $0x30d, %esi # imm = 0x30D
xorl %eax, %eax
callq 0x357f0
testl %eax, %eax
je 0x43ec3
movl 0x8(%rbx), %esi
movl $0x1, (%rsp)
leaq 0x68351(%rip), %rdx # 0... | /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::Lock() | bool BlockDevice::Lock()
{
#ifdef _WIN32
DWORD dwRet;
std::vector<std::string> lVolumes = GetVolumeList();
// Logic from: http://www.techtalkz.com/microsoft-device-drivers/250612-lock-entire-disk-physicaldrive-fsctl_lock_volume.html#post983810
// Open and lock all volumes
for (auto sVolume : ... | movb $0x1, %al
retq
nop
| /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::GetVolumeList[abi:cxx11]() const | std::vector<std::string> BlockDevice::GetVolumeList() const
{
std::vector<std::string> lVolumes;
#ifdef _WIN32
STORAGE_DEVICE_NUMBER sdn;
DWORD dwRet;
if (DeviceIoControl(hdev, IOCTL_STORAGE_GET_DEVICE_NUMBER, nullptr, 0, &sdn, sizeof(sdn), &dwRet, nullptr))
{
DWORD dwDrives = GetLogicalDr... | movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
retq
| /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::IsFileHDD(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | bool BlockDevice::IsFileHDD(const std::string& path)
{
if (!IsFile(path))
return false;
// Reject files under max image size, and those not an exact sector multiple
if (FileSize(path) <= MAX_IMAGE_SIZE || (FileSize(path) & (SECTOR_SIZE - 1)))
return false;
// Appears valid
return t... | pushq %rbx
movq %rdi, %rbx
callq 0x76fdd
testb %al, %al
je 0x44193
movq %rbx, %rdi
callq 0x76f95
cmpq $0x10000001, %rax # imm = 0x10000001
jge 0x44197
xorl %eax, %eax
jmp 0x441a6
movq %rbx, %rdi
callq 0x76f95
shlq $0x37, %rax
sete %al
popq %rbx
retq
| /simonowen[P]samdisk/src/BlockDevice.cpp |
BlockDevice::GetDeviceList[abi:cxx11]() | std::vector<std::string> BlockDevice::GetDeviceList()
{
std::vector<std::string> vDevices;
#ifdef _WIN32
for (int i = 0; i < 20; ++i)
{
std::string str = util::fmt(R"(\\.\PhysicalDrive%d)", i);
HANDLE h = CreateFile(str.c_str(), 0, 0, nullptr, OPEN_EXISTING, 0, nullptr);
if (h != I... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x61, %ebp
leaq 0x67e54(%rip), %r14 # 0xac02a
leaq 0x20(%rsp), %r15
leaq 0x48(%rsp), %r12
movq %rsp, %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)... | /simonowen[P]samdisk/src/BlockDevice.cpp |
FormatImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Range) | bool FormatImage(const std::string& path, Range range)
{
auto disk = std::make_shared<Disk>();
if (!ReadImage(path, disk))
return false;
ValidateRange(range, MAX_TRACKS, MAX_SIDES, 1, disk->cyls(), disk->heads());
// Start with MGT or ProDos format, but with automatic gap3.
Format fmt{ !op... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r15
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rbx
leaq 0x4c(%rsp), %rdx
movq %rbx, %rsi
callq 0x4747e
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x60f68
test... | /simonowen[P]samdisk/src/cmd_format.cpp |
UnformatImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Range) | bool UnformatImage(const std::string& path, Range range)
{
auto disk = std::make_shared<Disk>();
if (!ReadImage(path, disk))
return false;
ValidateRange(range, MAX_TRACKS, MAX_SIDES, 1, disk->cyls(), disk->heads());
range.each([&](const CylHead& cylhead) {
Message(msgStatus, "Unformatt... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %r14
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0x4747e
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x60f68
testb %al, %al
je 0x4c8a1
movq (%rsp)... | /simonowen[P]samdisk/src/cmd_format.cpp |
util::exception::exception<char const (&) [32]>(char const (&) [32]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x53371
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53339
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x88868(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [32]>(char const (&) [32]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x89bbe(%rip... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [34]>(char const (&) [34]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x89b29(%rip... | /simonowen[P]samdisk/include/utils.h |
CRC16::init_crc_table() | void CRC16::init_crc_table()
{
if (!s_crc_lookup[0])
{
for (uint16_t i = 0; i < 256; ++i)
{
uint16_t crc = i << 8;
for (int j = 0; j < 8; ++j)
crc = (crc << 1) ^ ((crc & 0x8000) ? POLYNOMIAL : 0);
s_crc_lookup[i] = crc;
}
}
} | cmpw $0x0, 0x8bfd0(%rip) # 0xdf4a2
jne 0x5350b
xorl %eax, %eax
leaq 0x8bfc5(%rip), %rcx # 0xdf4a2
movl %eax, %edx
shll $0x8, %edx
movl $0x8, %esi
leal (%rdx,%rdx), %edi
movswl %dx, %edx
shrl $0xf, %edx
andl $0x1021, %edx # imm = 0x1021
xorl %edi, %edx
decl %esi
jne 0x534e7
movw %dx, (%rcx,%rax,2)
incq... | /simonowen[P]samdisk/src/CRC16.cpp |
CRC16::CRC16(void const*, unsigned long, unsigned short) | CRC16::CRC16(const void* buf, size_t len, uint16_t init_)
{
std::call_once(flag, init_crc_table);
init(init_);
add(buf, len);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movw $0xffff, (%rdi) # imm = 0xFFFF
leaq 0x8c176(%rip), %rdi # 0xdf6a4
leaq -0x6b(%rip), %rsi # 0x534ca
callq 0x53613
movw %bp, (%r15)
testq %rbx, %rbx
je 0x5356c
xorl %eax, %eax
leaq... | /simonowen[P]samdisk/src/CRC16.cpp |
DemandDisk::read(CylHead const&, bool) | const TrackData& DemandDisk::read(const CylHead& cylhead, bool uncached)
{
if (uncached || !m_loaded[cylhead])
{
// Quick first read, plus sector-based conversion
auto trackdata = load(cylhead, true);
auto& track = trackdata.track();
// If the disk supports sector-level retries ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
jne 0x536de
movq %rbx, %rdi
callq 0x60728
cltq
movq %rax, %rcx
shrq $0x6, %rcx
movq 0xf0(%r14,%rcx,8), %rcx
btq %rax, %rcx
jb 0x53a3e
movq (%r14), %rax
leaq 0x18(... | /simonowen[P]samdisk/src/DemandDisk.cpp |
util::exception::exception<char const (&) [50]>(char const (&) [50]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x545dd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53f99
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x87c08(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [50]>(char const (&) [50]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x88952(%rip... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [24]>(char const (&) [24]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x5d513
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d4db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x7e6c6(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
FluxDecoder::FluxDecoder(std::vector<std::vector<unsigned int, std::allocator<unsigned int>>, std::allocator<std::vector<unsigned int, std::allocator<unsigned int>>>> const&, int, int, int) | FluxDecoder::FluxDecoder(const FluxData& flux_revs, int bitcell_ns, int flux_scale_percent, int pll_adjust)
: m_flux_revs(flux_revs), m_clock(bitcell_ns), m_clock_centre(bitcell_ns),
m_clock_min(bitcell_ns* (100 - pll_adjust) / 100),
m_clock_max(bitcell_ns* (100 + pll_adjust) / 100),
m_flux_scale_percen... | movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movl %edx, 0x18(%rdi)
movl %edx, 0x1c(%rdi)
movl $0x64, %eax
subl %r8d, %eax
imull %edx, %eax
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %r9
shrq $0x3f, %r9
sarq $0x25, %rax
addl %r9d, %eax
movl %eax, 0x20(%rdi)
leal 0x64(%r8), %eax
imul... | /simonowen[P]samdisk/src/FluxDecoder.cpp |
FluxDecoder::flux_count() const | int FluxDecoder::flux_count() const
{
auto count = 0;
for (const auto& vec : m_flux_revs)
count += static_cast<int>(vec.size());
return count;
} | movq (%rdi), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x5d734
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
shrq $0x2, %rsi
addl %esi, %eax
addq $0x18, %rcx
jmp 0x5d71c
retq
nop
| /simonowen[P]samdisk/src/FluxDecoder.cpp |
FluxDecoder::next_bit() | int FluxDecoder::next_bit()
{
int new_flux;
while (m_flux < m_clock / 2)
{
if ((new_flux = next_flux()) == -1)
return -1;
if (m_flux_scale_percent != 100)
new_flux = new_flux * m_flux_scale_percent / 100;
m_flux += new_flux;
m_clocked_zeros = 0;
... | pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %ecx
movl 0x28(%rdi), %eax
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
cmpl %edx, %eax
jge 0x5d79e
movq %rbx, %rdi
callq 0x5d874
cmpl $-0x1, %eax
je 0x5d7df
movl 0x30(%rbx), %ecx
cmpl $0x64, %ecx
je 0x5d78c
imull %eax, %ecx
movslq %ecx, %rax
imulq $0x51eb851f, ... | /simonowen[P]samdisk/src/FluxDecoder.cpp |
FluxTrackBuilder::FluxTrackBuilder(CylHead const&, DataRate, Encoding) | FluxTrackBuilder::FluxTrackBuilder(const CylHead& cylhead, DataRate datarate, Encoding encoding)
: TrackBuilder(datarate, encoding),
m_cylhead(cylhead), m_bitcell_ns(bitcell_ns(datarate)),
m_flux_time(0U - m_bitcell_ns)
{
// We start with a negative cell time to absorb the first zero m_cur_bit.
// T... | pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
movl %ecx, %edx
callq 0x73520
leaq 0x7e948(%rip), %rax # 0xdc220
movq %rax, (%rbx)
movq (%r14), %rax
movq %rax, 0x14(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
cmpl $0x7a11f, %ebp #... | /simonowen[P]samdisk/src/FluxTrackBuilder.cpp |
FluxTrackBuilder::addRawBit(bool) | void FluxTrackBuilder::addRawBit(bool next_bit)
{
m_flux_time += m_bitcell_ns;
if (m_curr_bit)
{
if (m_cylhead.cyl < 40)
{
m_flux_times.push_back(m_flux_time);
m_flux_time = 0;
}
else
{
// Move adjacent transitions further apart, t... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3c(%rdi), %eax
addl 0x38(%rdi), %eax
movl %esi, %ebp
movl %eax, 0x3c(%rdi)
cmpb $0x1, 0x41(%rdi)
jne 0x5d9e3
leaq 0x3c(%rbx), %r14
cmpl $0x27, 0x14(%rbx)
jg 0x5d985
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x5d9be
movl %eax, (%rsi)
addq... | /simonowen[P]samdisk/src/FluxTrackBuilder.cpp |
FluxTrackBuilder::addWeakBlock(int) | void FluxTrackBuilder::addWeakBlock(int length)
{
// Flush out previous constant block.
addRawBit(1);
addRawBit(1);
// Approximately 11 ambigious reversals per weak byte.
length = length * 21 / 2;
while (length-- > 0)
m_flux_times.push_back(m_bitcell_ns * 3 / 2);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5d94a
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5d94a
testl %r14d, %r14d
jle 0x5da6a
leal (%r14,%r14,4), %eax
leal (%r14,%rax,4), %ebp
shrl %ebp
leaq 0x20(%rbx), %r14
incl %ebp
leaq 0x4(%rsp), %r15
movl 0x38(%r... | /simonowen[P]samdisk/src/FluxTrackBuilder.cpp |
FluxTrackBuilder::buffer() | std::vector<uint32_t>& FluxTrackBuilder::buffer()
{
// Flush any buffered time with a transition.
if (m_flux_time)
{
m_flux_times.push_back(m_flux_time);
m_flux_time = 0;
}
return m_flux_times;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3c(%rdi), %eax
testl %eax, %eax
je 0x5dab1
leaq 0x3c(%rbx), %r14
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x5da9e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rbx)
jmp 0x5daaa
leaq 0x20(%rbx), %rdi
movq %r14, %rdx
callq 0x411b8
movl $0x0, (%r14)
addq $... | /simonowen[P]samdisk/src/FluxTrackBuilder.cpp |
Format::get_ids(CylHead const&) const | std::vector<int> Format::get_ids(const CylHead& cylhead) const
{
std::vector<bool> used(sectors);
std::vector<int> ids(sectors);
auto base_id = base;
for (auto s = 0; s < sectors; ++s)
{
// Calculate the expected sector index using the interleave and skew
auto index = (offset + s *... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq 0x14(%rsi), %rsi
leaq 0x6(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rcx
callq 0x5eba4
movslq 0x14(%r15), %rsi
leaq 0x6(%rsp), %rdx
movq %rbx, 0x8(%rsp)
mov... | /simonowen[P]samdisk/src/Format.cpp |
Format::FromSize(long, Format&) | bool Format::FromSize(int64_t size, Format& fmt)
{
switch (size)
{
case 143360: // Apple ][
fmt = RegularFormat::DO;
break;
case 163840: // 5.25" SSSD (160K)
fmt = RegularFormat::PC320;
fmt.heads = 1;
break;
case 184320: // 5.25" SSSD (180K)
... | xorl %eax, %eax
cmpq $0x133fff, %rdi # imm = 0x133FFF
jle 0x5e3ad
cmpq $0x1b3bff, %rdi # imm = 0x1B3BFF
jg 0x5e404
cmpq $0x18ffff, %rdi # imm = 0x18FFFF
jle 0x5e51f
cmpq $0x190000, %rdi # imm = 0x190000
je 0x5e71b
cmpq $0x1a4000, %rdi # imm = 0x1A4000
je 0x5e678
cmpq $0x1ae800, %... | /simonowen[P]samdisk/src/Format.cpp |
Format::Override(bool) | void Format::Override(bool full_control/*=false*/)
{
if (full_control)
{
if (opt.range.cyls()) cyls = opt.range.cyls();
if (opt.range.heads()) heads = opt.range.heads();
if (opt.sectors != -1) sectors = opt.sectors;
if (opt.size >= 0 && opt.size <= 7) size = opt.size;
if... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x5ea23
leaq 0x80d8c(%rip), %rdi # 0xdf740
callq 0x65908
testl %eax, %eax
je 0x5e9cb
leaq 0x80d7c(%rip), %rdi # 0xdf740
callq 0x65908
movl %eax, (%rbx)
leaq 0x80d6e(%rip), %r14 # 0xdf740
movq %r14, %rdi
callq 0x6590e
testl %eax, %eax
je 0x... | /simonowen[P]samdisk/src/Format.cpp |
HDD::Reset() | void HDD::Reset()
{
h = -1;
cyls = heads = sectors = 0;
total_sectors = total_bytes = 0;
sector_size = data_offset = 0;
memset(&sIdentify, 0, sizeof(sIdentify));
strMakeModel = strSerialNumber = strFirmwareRevision = "";
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, 0x8(%rdi) # imm = 0xFFFFFFFF
addq $0x90, %rdi
movl $0x204, %edx # imm = 0x204
xorl %esi, %esi
callq 0x352d0
leaq 0x70(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rbx)
movups %xmm0, 0x1c(%rbx)
movl $0x0, 0x2c(%rbx)
movq 0x78(%rbx), %rdx... | /simonowen[P]samdisk/src/HDD.cpp |
HDD::Tell() const | int64_t HDD::Tell() const
{
#ifdef _WIN32
int64_t llOffset = _telli64(h) - data_offset;
#else
off_t llOffset = lseek(h, 0L, SEEK_CUR) - data_offset;
#endif
return llOffset / sector_size;
} | pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x354e0
movslq 0x1c(%rbx), %rcx
subq %rcx, %rax
movslq 0x18(%rbx), %rcx
cqto
idivq %rcx
popq %rbx
retq
nop
| /simonowen[P]samdisk/src/HDD.cpp |
HDD::CreateDisk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long, IDENTIFYDEVICE const*, bool) | std::shared_ptr<HDD> HDD::CreateDisk(const std::string& path, int64_t llTotalBytes_, const IDENTIFYDEVICE* pIdentify_, bool fOverwrite_)
{
std::shared_ptr<HDD> hdd;
if (IsHddImage(path))
hdd = std::shared_ptr<HDD>(new HDFHDD());
if (hdd && !hdd->Create(path, llTotalBytes_, pIdentify_, fOverwrite_)... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
callq 0x77075
testb %al, %al
je 0x5f038
movl $0x298, %edi # imm = 0x298
callq 0x355b0
movq... | /simonowen[P]samdisk/src/HDD.cpp |
HDD::SetIdentifyData(IDENTIFYDEVICE const*) | void HDD::SetIdentifyData(const IDENTIFYDEVICE* pIdentify_)
{
// Use any supplied identify data
if (pIdentify_)
{
// Copy the supplied data
memcpy(&sIdentify, pIdentify_, sizeof(sIdentify));
// Update CHS from the identify data
cyls = sIdentify.word[1];
heads = sIden... | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5f1e1
leaq 0x90(%rbx), %r14
movl $0x204, %edx # imm = 0x204
movq %r14, %rdi
callq 0x354c0
movzwl 0x96(%rbx), %eax
movl %eax, 0xc(%rbx)
movzwl 0x9a(%rbx), %eax
movl %eax, 0x10(%rbx)
movzwl 0xa0(%rbx), %eax
movl %eax, 0x14(... | /simonowen[P]samdisk/src/HDD.cpp |
HDD::GetIdentifyString[abi:cxx11](void*, unsigned long) | std::string HDD::GetIdentifyString(void* p, size_t n)
{
// Buffer length must be even
n &= ~1;
auto pcsz = reinterpret_cast<const char*>(p);
std::string s(pcsz, n);
// Copy the string, up to the size of the buffer
for (size_t i = 0; i < n; i += 2)
std::swap(s[i], s[i + 1]);
// Tri... | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdi, %rbx
andq $-0x2, %r14
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq (%rdx,%r14), %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x445b8
testq %r14, %r14
je 0x5f60a
xorl %eax, %eax
movq (%rbx), %rcx
movb (%rcx,%rax), %dl
movb 0x1(%rcx,%rax), %sil
mo... | /simonowen[P]samdisk/src/HDD.cpp |
HDD::Copy(HDD*, long, long, long, long, char const*) | bool HDD::Copy(HDD* phSrc_, int64_t uSectors_, int64_t uSrcOffset_/*=0*/, int64_t uDstOffset_/*=0*/, int64_t uTotal_/*=0*/, const char* pcszAction_)
{
MEMORY mem(SECTOR_BLOCK * sector_size);
if (!uTotal_) uTotal_ = uSectors_;
for (int64_t uPos = 0;;)
{
// Sync source and destinations
i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, 0x30(%rsp)
movq %rdx, %rbp
movq %rsi, 0x20(%rsp)
movq %rdi, %r12
movq 0x80(%rsp), %rbx
movl 0x18(%rdi), %edi
shll $0xb, %edi
callq 0x77560
testq %r14, %r14
cmoveq %rbp, %r14
movq %r14, 0x40(%rsp)
... | /simonowen[P]samdisk/src/HDD.cpp |
void Message<char const*, int>(MsgType, char const*, char const*&&, int&&) | void Message(MsgType type, const char* pcsz_, Args&& ...args)
{
std::string msg = util::fmt(pcsz_, std::forward<Args>(args)...);
if (type == msgError)
throw util::exception(msg);
if (type != msgStatus)
{
if (seen_messages.find(msg) != seen_messages.end())
return;
s... | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
movq (%rdx), %rdx
movl (%rcx), %ecx
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x784cc
testl %ebx, %ebx
je 0x5fab5
cmpl $0x4, %ebx
je 0x5fb12
leaq 0x8040d(%rip), %r14 # 0xdfdf8
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x418a4
addq $0x8, %r14
cmpq %r14, %rax
j... | /simonowen[P]samdisk/include/Util.h |
HDFHDD::IsRecognised(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | bool HDFHDD::IsRecognised(const std::string& path)
{
int h = -1;
RS_IDE sHeader = {};
// Open as read-write, falling back on read-only
if ((h = open(path.c_str(), O_RDWR | O_BINARY)) == -1 &&
(h = open(path.c_str(), O_RDONLY | O_BINARY)) == -1)
return false;
// Read the file header... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0xe(%rsp)
movq (%rdi), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x35a70
cmpl $-0x1, %eax
jne 0x5fd32
movq (%r14), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
xorl %eax, %eax
callq 0x35a70
cmpl $-0x1, %eax
je ... | /simonowen[P]samdisk/src/HDFHDD.cpp |
HDFHDD::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | bool HDFHDD::Open(const std::string& path, bool /*uncached*/)
{
// Open as read-write, falling back on read-only
if ((h = open(path.c_str(), O_RDWR | O_BINARY)) == -1 &&
(h = open(path.c_str(), O_RDONLY | O_BINARY)) == -1)
return false;
RS_IDE sHeader = {};
// Read the header and check... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x35a70
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
jne 0x5fdb9
movq (%r14), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
xorl %eax, %eax
callq 0x35a70
movl %eax, 0x8(%rbx)
cmpl $-0x1, ... | /simonowen[P]samdisk/src/HDFHDD.cpp |
HDFHDD::Create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, IDENTIFYDEVICE const*, bool) | bool HDFHDD::Create(const std::string& path, uint64_t total_bytes_, const IDENTIFYDEVICE* pIdentify_, bool fOverwrite_/*=false*/)
{
bool fRet = true;
if ((h = open(path.c_str(), O_CREAT | O_RDWR | O_SEQUENTIAL | O_BINARY | (fOverwrite_ ? 0 : O_EXCL), S_IREAD | S_IWRITE)) == -1)
return false;
// Se... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
xorb $0x1, %r8b
movzbl %r8b, %esi
shll $0x7, %esi
orl $0x42, %esi
xorl %ebp, %ebp
movl $0x180, %edx # imm = 0x180
xorl %eax, %eax
callq 0x35a70
movl %eax, ... | /simonowen[P]samdisk/src/HDFHDD.cpp |
GetFormatGap(int, DataRate, Encoding, int, int) | int GetFormatGap(int drive_speed, DataRate datarate, Encoding encoding, int sectors, int size_)
{
if (!sectors) return 0;
// Check for common formats that use specific gap sizes
for (auto& fg : standard_gaps)
{
// If the format matches exactly, return the known gap
if (fg.drivespeed == ... | testl %ecx, %ecx
je 0x60a47
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %ebx
movl %edx, %ebp
movl $0x14, %ecx
xorl %edx, %edx
leaq 0x4e326(%rip), %r8 # 0xaecc0
movb $0x1, %r9b
cmpl %edi, -0x14(%rcx,%r8)
jne 0x609c7
cmpl %esi, -0x10(%rcx,%r8)
jne 0x609c7
cmpl %ebp, -0xc(%rcx,%... | /simonowen[P]samdisk/src/IBMPC.cpp |
ReadImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<Disk>&, bool) | bool ReadImage(const std::string& path, std::shared_ptr<Disk>& disk, bool normalise)
{
MemFile file;
bool f = false;
if (path.empty())
throw util::exception("invalid empty path");
// Try devices first as the path may use a custom syntax
for (auto p = aDeviceTypes; !f && p->pszType; ++p)
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %edx, 0x4(%rsp)
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
xorps %xmm0, %xmm0
movups %xmm0,... | /simonowen[P]samdisk/src/Image.cpp |
util::exception::exception<char const (&) [25]>(char const (&) [25]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x61dbf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x61719
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x7a488(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::format<char const*, char const (&) [29]>(char const*, char const (&) [29]) | std::string format(T arg, Args&&... args)
{
using namespace std; // pull in to_string for other types
std::string s = to_string(arg) + format(std::forward<Args>(args)...);
return s;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x5b424
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x41ad6
leaq 0x8(%rsp), %r... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x61c07
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6193b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x7a266(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [45]>(char const (&) [45]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x61fd7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x619ed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x7a1b4(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x7b32f(%rip), %rsi # 0xdcf78
l... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [19]>(char const (&) [19]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x7b29a(%rip... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [25]>(char const (&) [25]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x7b170(%rip... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::format<char const*>(char const*) | std::string format(T arg, Args&&... args)
{
using namespace std; // pull in to_string for other types
std::string s = to_string(arg) + format(std::forward<Args>(args)...);
return s;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x5b424
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x41ad6
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
... | /simonowen[P]samdisk/include/utils.h |
GetDeepThoughtDataOffset(Data const&) | int GetDeepThoughtDataOffset(const Data& data)
{
for (auto i = 0; i < data.size(); ++i)
{
// Check for 255 sync byte
if (data[i] != 255)
continue;
// If 255 is followed by 42 we've found the data start
if ((i + 2) < data.size() && data[i + 1] == 42)
retur... | movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
testl %edx, %edx
jle 0x620a0
movl %edx, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
xorl %eax, %eax
cmpb $-0x1, (%rcx,%rax)
jne 0x62098
leal 0x2(%rax), %edi
cmpl %edx, %edi
jge 0x62098
cmpb $0x2a, 0x1(%rcx,%rax)
je 0x620a3
incq %rax
cmpq %rax, %rsi
jne 0x6... | /simonowen[P]samdisk/src/JupiterAce.cpp |
GetDeepThoughtData[abi:cxx11](Data const&) | std::string GetDeepThoughtData(const Data& data)
{
std::string str;
auto offset = GetDeepThoughtDataOffset(data);
if (offset != 0)
str = std::string(reinterpret_cast<const char*>(data.data() + offset), data.size() - offset);
return str;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x6206c
testl %eax, %eax
je 0x62127
movq (%r14), %rcx
movslq %eax, %rsi
addq %rcx, %rsi
movl 0x8(%r14), %edx
subl %ecx, %e... | /simonowen[P]samdisk/src/JupiterAce.cpp |
IsDeepThoughtDisk(Disk&, Sector const*&) | bool IsDeepThoughtDisk(Disk& disk, const Sector*& sector)
{
// Try the primary catalogue location on cyl 0
if (!disk.find(Header(0, 0, 0, SizeToCode(4096)), sector))
{
// Try the backup location on cyl 1
if (!disk.find(Header(1, 0, 0, SizeToCode(4096)), sector))
return false;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1000, %edi # imm = 0x1000
callq 0x77ea2
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %eax, %r8d
callq 0x60752
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq ... | /simonowen[P]samdisk/src/JupiterAce.cpp |
IsValidDeepThoughtData(Data const&) | bool IsValidDeepThoughtData(const Data& data)
{
auto offset = GetDeepThoughtDataOffset(data);
if (!offset || offset == data.size())
return false;
uint8_t sum = 0;
for (auto i = offset; i < data.size() - 1; ++i)
sum += data[i];
return sum == data[data.size() - 1];
} | pushq %rbx
movq %rdi, %rbx
callq 0x6206c
testl %eax, %eax
je 0x62242
movl 0x8(%rbx), %edx
movq (%rbx), %rcx
subl %ecx, %edx
cmpl %edx, %eax
jne 0x62246
xorl %eax, %eax
jmp 0x6226d
movslq %edx, %rdx
decq %rdx
cmpl %edx, %eax
jge 0x62265
movslq %eax, %rsi
movslq %edx, %rdi
xorl %eax, %eax
addb (%rcx,%rsi), %al
incq %rsi
... | /simonowen[P]samdisk/src/JupiterAce.cpp |
KryoFlux::UploadFirmware() | void KryoFlux::UploadFirmware()
{
// Set interactive then non-interactive mode, to check for boot responses
// https://sourceforge.net/p/lejos/wiki-nxt/SAM-BA%20Protocol/
SamBaCommand("T#", ">");
SamBaCommand("N#", "\n\r");
auto fwpath = util::resource_dir() + KF_FW_FILE;
std::ifstream fwfile(f... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp # imm = 0x298
movq %rdi, %rbx
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4cbb8(%rip), %rsi # 0xaee5c
leaq 0x4cbb3(%rip), %rdx # 0xaee5e
leaq 0x90(%rsp), %rdi
callq 0x445b8
leaq 0x10(%rsp), %r15
movq %r15, -0x... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SamBaCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | void KryoFlux::SamBaCommand(const std::string& cmd, const std::string& end)
{
std::string s;
uint8_t buf[512];
try
{
Write(cmd.c_str(), static_cast<int>(cmd.length()));
if (!end.empty())
{
for (;;)
{
auto len = Read(buf, sizeof(buf));
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rsi), %rax
movl 0x8(%rsi), %edx
movq (%rdi), %rcx
movq %rax, %rsi
callq *0x28(%rcx)
cmp... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::Reset() | int KryoFlux::Reset()
{
return ResponseCode(Control(REQ_RESET));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x5, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62ada
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SelectDevice(int) | int KryoFlux::SelectDevice(int device)
{
return ResponseCode(Control(REQ_DEVICE, device));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x6, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62b2a
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::EnableMotor(int) | int KryoFlux::EnableMotor(int enable)
{
return ResponseCode(Control(REQ_MOTOR, enable));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x7, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62b7a
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::Seek(int) | int KryoFlux::Seek(int cyl)
{
return ResponseCode(Control(REQ_TRACK, cyl));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0xa, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62bca
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SelectDensity(bool) | int KryoFlux::SelectDensity(bool density)
{
return ResponseCode(Control(REQ_DENSITY, density));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62c1a
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SelectSide(int) | int KryoFlux::SelectSide(int head)
{
return ResponseCode(Control(REQ_SIDE, head));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x9, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62c6a
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SetMinTrack(int) | int KryoFlux::SetMinTrack(int cyl)
{
return ResponseCode(Control(REQ_MIN_TRACK, cyl));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0xc, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62cba
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::SetMaxTrack(int) | int KryoFlux::SetMaxTrack(int cyl)
{
return ResponseCode(Control(REQ_MAX_TRACK, cyl));
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0xd, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %r14, %rdi
callq 0x62a6a
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62d0a
movq 0x18(%rsp), %rsi
incq %rsi... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::GetInfo(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | int KryoFlux::GetInfo(int index, std::string& info)
{
info = Control(REQ_INFO | REQ_GET, index);
auto ret = ResponseCode(info);
info.erase(0, info.find(' ') + 1); // remove time code
info.erase(0, info.find(' ') + 1); // remove info response
return ret;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movl %esi, %ecx
movq %rdi, %rsi
movq (%rdi), %rax
movq %rsp, %r14
movq %r14, %rdi
movl $0x81, %edx
xorl %r8d, %r8d
callq *0x18(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35700
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x62d5d
movq 0x1... | /simonowen[P]samdisk/src/KryoFlux.cpp |
KryoFlux::DecodeStream(Data const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) | FluxData KryoFlux::DecodeStream(const Data& data, std::vector<std::string>& warnings)
{
FluxData flux_revs;
std::vector<uint32_t> flux_times, flux_counts;
flux_times.reserve(data.size());
flux_counts.resize(data.size());
uint32_t time = 0, stream_pos = 0;
uint32_t ps_per_tick = PS_PER_TICK(SAMP... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdx, 0x28(%rsp)
movq %rsi, %r14
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, 0x98(%rsp)
movups %xmm0, (%rdi)
leaq 0x40(%rsp), %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq %ra... | /simonowen[P]samdisk/src/KryoFlux.cpp |
to_string[abi:cxx11](Compress const&) | std::string to_string(const Compress& compression)
{
switch (compression)
{
default:
case Compress::None: return "none";
case Compress::Zip: return "zip";
case Compress::Gzip: return "gzip";
case Compress::Bzip2: return "bzip2";
case Compress::Xz: return "xz";
}
} | pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
decl %eax
cmpl $0x3, %eax
ja 0x63f3c
leaq 0x4b14d(%rip), %rcx # 0xaf040
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4bba7(%rip), %rsi # 0xafaaa
leaq 0x4bba3(%rip), %rdx # 0xafaad
jmp 0x63f4a
leaq 0x4b149(%r... | /simonowen[P]samdisk/src/MemFile.cpp |
MemFile::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | bool MemFile::open(const std::string& path_, bool uncompress)
{
std::string filename;
MEMORY mem(MAX_IMAGE_SIZE + 1);
size_t uRead = 0;
// Check if zlib is available
#ifndef HAVE_ZLIB
bool have_zlib = false;
#else
bool have_zlib = zlibVersion()[0] == ZLIB_VERSION[0];
// Read start of file ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp # imm = 0x528
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x10000001, %edi # imm = 0x10000001
callq 0x77560
movq %rax,... | /simonowen[P]samdisk/src/MemFile.cpp |
MemFile::open(void const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | bool MemFile::open(const void* buf, int len, const std::string& path_, const std::string& filename_)
{
auto pb = reinterpret_cast<const uint8_t*>(buf);
m_data.clear();
m_it = m_data.insert(m_data.begin(), pb, pb + len);
m_path = path_;
m_filename = filename_;
// If a filename wasn't supplied f... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rcx, %rbx
movl %edx, %eax
movq %rsi, %rdx
movq %rdi, %r14
addq $0x40, %rdi
movq 0x40(%r14), %rsi
cmpq %rsi, 0x48(%r14)
je 0x64a56
movq %rsi, 0x48(%r14)
movslq %eax, %rcx
addq %rdx, %rcx
callq 0x65410
movq 0x40(%r14),... | /simonowen[P]samdisk/src/MemFile.cpp |
MemFile::read(int) | std::vector<uint8_t> MemFile::read(int len)
{
auto avail_bytes = std::min(len, remaining());
std::vector<uint8_t> data(m_it, m_it + avail_bytes);
m_it += avail_bytes;
return data;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x48(%rsi), %eax
movq 0x58(%rsi), %rsi
subl %esi, %eax
cmpl %edx, %eax
cmovgel %edx, %eax
movslq %eax, %r15
leaq (%rsi,%r15), %rdx
leaq 0xf(%rsp), %rcx
callq 0x6504c
addq %r15, 0x58(%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
po... | /simonowen[P]samdisk/src/MemFile.cpp |
MemFile::read(void*, int, int) | int MemFile::read(void* buf, int len, int count)
{
if (!len) return count; // can read as many zero-length units as requested!
auto avail_items = std::min(count, remaining() / len);
read(buf, avail_items * len);
return avail_items;
} | pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ebx
testl %edx, %edx
je 0x64da9
movl %edx, %ecx
movq %rdi, %r14
movl 0x48(%rdi), %edi
movq 0x58(%r14), %r8
subl %r8d, %edi
movl %edi, %eax
cltd
idivl %ecx
cmpl %ebx, %eax
cmovll %eax, %ebx
imull %ebx, %ecx
cmpl %ecx, %edi
cmovll %edi, %ecx
setl %al
testl %ecx, %ecx
sete %dl
... | /simonowen[P]samdisk/src/MemFile.cpp |
util::exception::exception<char const (&) [24], int&, char const (&) [2]>(char const (&) [24], int&, char const (&) [2]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6508d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64e3b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x76d66(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [48]>(char const (&) [48]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x65155
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64eb1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x76cf0(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [28], int&, char const (&) [2]>(char const (&) [28], int&, char const (&) [2]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x651ea
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64f27
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x76c7a(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [26], lzma_ret&, char const (&) [2]>(char const (&) [26], lzma_ret&, char const (&) [2]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x652b2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64f9d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x76c04(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [18]>(char const (&) [18]) | explicit exception(Args&& ... args)
: std::runtime_error(make_string(std::forward<Args>(args)...)) {} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6537a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65013
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x76b8e(%rip), %rax # 0xdbba8
movq %rax, ... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [48]>(char const (&) [48]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35760
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x77dda(%rip... | /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [26], lzma_ret&, char const (&) [2]>(char const (&) [26], lzma_ret&, char const (&) [2]) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x35760
movq %r12, %rdi
callq 0x35210
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x356a0
movl (%r15), %e... | /simonowen[P]samdisk/include/utils.h |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.