name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [18]>(char const (&) [18]) | 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 0x77bb5(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x653e9
movq %rax, %rbx
movq 0x77b85(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
to_string[abi:cxx11](Range const&) | std::string to_string(const Range& range)
{
std::ostringstream ss;
auto separator = ", ";
if (range.empty())
return "All Tracks";
if (range.cyls() == 1)
ss << "Cyl " << CylStr(range.cyl_begin);
else if (range.cyl_begin == 0)
{
ss << std::setw(2) << range.cyl_end << " Cyls";
separator = " ";
}
else
ss << "Cyls " << CylStr(range.cyl_begin) << '-' << CylStr(range.cyl_end - 1);
if (range.heads() == 1)
ss << " Head " << range.head_begin;
else if (range.head_begin == 0)
ss << separator << range.head_end << " Heads";
else
ss << " Heads " << range.head_begin << '-' << (range.head_end - 1);
return ss.str();
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35760
movl (%r14), %eax
movl 0x4(%r14), %esi
movl %esi, %ecx
subl %eax, %ecx
jle 0x656b0
movl 0x8(%r14), %edx
cmpl %edx, 0xc(%r14)
jle 0x656b0
cmpl $0x1, %ecx
jne 0x656d2
leaq 0x49adb(%rip), %rsi # 0xaf16c
leaq 0x10(%rsp), %r15
movl $0x4, %edx
movq %r15, %rdi
callq 0x356a0
movl (%r14), %edi
callq 0x7692b
jmp 0x65791
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x49aa3(%rip), %rsi # 0xaf161
leaq 0x49aa6(%rip), %rdx # 0xaf16b
movq %rbx, %rdi
callq 0x445b8
jmp 0x6585d
testl %eax, %eax
je 0x65716
leaq 0x49a9a(%rip), %rsi # 0xaf177
leaq 0x10(%rsp), %rdi
movl $0x5, %edx
callq 0x356a0
movl (%r14), %edi
callq 0x7692b
movq %rax, %r15
testq %rax, %rax
je 0x65750
movq %r15, %rdi
callq 0x35210
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x6576c
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x20(%rsp,%rax)
callq 0x35a80
leaq 0x49a3a(%rip), %rsi # 0xaf171
movl $0x5, %edx
movq %rax, %rdi
callq 0x356a0
leaq 0x47923(%rip), %r15 # 0xad06e
jmp 0x657d0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x35a00
leaq 0xf(%rsp), %rsi
movb $0x2d, (%rsi)
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0x356a0
movq %rax, %r15
movl 0x4(%r14), %edi
decl %edi
callq 0x7692b
movq %rax, %r12
testq %rax, %rax
je 0x657b1
movq %r12, %rdi
callq 0x35210
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x657c9
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x35a00
leaq 0x47844(%rip), %r15 # 0xad014
movl 0x8(%r14), %eax
movl 0xc(%r14), %ecx
subl %eax, %ecx
cmpl $0x1, %ecx
jne 0x657fe
leaq 0x49997(%rip), %rsi # 0xaf17d
leaq 0x10(%rsp), %r15
movl $0x6, %edx
movq %r15, %rdi
callq 0x356a0
movl 0x8(%r14), %esi
jmp 0x65848
testl %eax, %eax
je 0x6588d
leaq 0x4997e(%rip), %rsi # 0xaf18b
leaq 0x10(%rsp), %rdi
movl $0x7, %edx
callq 0x356a0
movl 0x8(%r14), %esi
leaq 0x10(%rsp), %rdi
callq 0x35a80
leaq 0xf(%rsp), %rsi
movb $0x2d, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x356a0
movq %rax, %r15
movl 0xc(%r14), %esi
decl %esi
movq %r15, %rdi
callq 0x35a80
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x77714(%rip), %rsi # 0xdcf78
leaq 0x10(%rsp), %rdi
callq 0x352b0
leaq 0x80(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x35210
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movl 0xc(%r14), %esi
leaq 0x10(%rsp), %rdi
callq 0x35a80
leaq 0x498ca(%rip), %rsi # 0xaf184
movl $0x6, %edx
movq %rax, %rdi
callq 0x356a0
jmp 0x65850
jmp 0x658cb
movq %rax, %rbx
movq 0x776a3(%rip), %rsi # 0xdcf78
leaq 0x10(%rsp), %rdi
callq 0x352b0
leaq 0x80(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/Range.cpp |
Range::each(std::function<void (CylHead const&)> const&, bool) const | void Range::each(const std::function<void(const CylHead & cylhead)>& func, bool cyls_first/*=false*/) const
{
if (cyls_first && heads() > 1)
{
for (auto head = head_begin; head < head_end; ++head)
for (auto cyl = cyl_begin; cyl < cyl_end; ++cyl)
func(CylHead(cyl, head));
}
else
{
for (auto cyl = cyl_begin; cyl < cyl_end; ++cyl)
for (auto head = head_begin; head < head_end; ++head)
func(CylHead(cyl, head));
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x65a07
movl 0x8(%r14), %ebp
movl 0xc(%r14), %eax
subl %ebp, %eax
cmpl $0x2, %eax
jl 0x65a07
cmpl 0xc(%r14), %ebp
jge 0x65a49
leaq 0x8(%rsp), %r15
movl (%r14), %r12d
cmpl 0x4(%r14), %r12d
jge 0x659fd
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x46fa2
cmpq $0x0, 0x10(%rbx)
je 0x65a56
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rbx)
incl %r12d
jmp 0x659d5
incl %ebp
cmpl 0xc(%r14), %ebp
jl 0x659d2
jmp 0x65a49
movl (%r14), %ebp
cmpl 0x4(%r14), %ebp
jge 0x65a49
leaq 0x8(%rsp), %r15
movl 0x8(%r14), %r12d
cmpl 0xc(%r14), %r12d
jge 0x65a41
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x46fa2
cmpq $0x0, 0x10(%rbx)
je 0x65a56
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rbx)
incl %r12d
jmp 0x65a19
incl %ebp
cmpl 0x4(%r14), %ebp
jl 0x65a15
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x351d0
nop
| /simonowen[P]samdisk/src/Range.cpp |
GetDiskInfo(unsigned char const*, MGT_DISK_INFO&) | MGT_DISK_INFO* GetDiskInfo(const uint8_t* p, MGT_DISK_INFO& di)
{
auto dir = reinterpret_cast<const MGT_DIR*>(p);
// Assume 4 directory tracks until we discover otherwise
di.dir_tracks = MGT_DIR_TRACKS;
// Determine the disk/DOS type, as each has different capabilities
if (!memcmp(dir->abBDOS, "BDOS", 4))
di.dos_type = SamDosType::BDOS;
else if (dir->abLabel[0] != 0x00 && dir->abLabel[0] != 0xff)
di.dos_type = SamDosType::MasterDOS;
else
di.dos_type = SamDosType::SAMDOS;
// Extract the remaining disk information from type-specific locations
switch (di.dos_type)
{
case SamDosType::SAMDOS:
// Nothing more to do for SAMDOS
break;
case SamDosType::MasterDOS:
// Add on any extra directory tracks
di.dir_tracks += dir->extra.bExtraDirTracks;
// Ensure the track count is legal for MasterDOS
if (di.dir_tracks < MGT_DIR_TRACKS)
di.dir_tracks = MGT_DIR_TRACKS;
else if (di.dir_tracks > 39)
di.dir_tracks = 39;
// 16-bit random value used as a disk serial number
di.serial_number = (dir->extra.abSerial[0] << 8) | dir->extra.abSerial[1];
// MasterDOS uses '*' for 'no label'
if (dir->abLabel[0] != '*')
{
di.disk_label = std::string(reinterpret_cast<const char*>(dir->abLabel), sizeof(dir->abLabel));
di.disk_label = util::trim(di.disk_label);
}
break;
case SamDosType::BDOS:
// BDOS uses a null for 'no label'
if (dir->abLabel[0])
{
di.disk_label = std::string(reinterpret_cast<const char*>(&dir->abLabel), sizeof(dir->abLabel));
di.disk_label += std::string(reinterpret_cast<const char*>(&dir->extra.bDirTag), sizeof(dir->szLabelExtra));
di.disk_label = util::trim(di.disk_label);
}
break;
}
return &di;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, 0x4(%rsi)
cmpl $0x534f4442, 0xe8(%rdi) # imm = 0x534F4442
je 0x65a95
movb 0xd2(%r14), %cl
decb %cl
xorl %eax, %eax
cmpb $-0x2, %cl
setb %al
jmp 0x65a9a
movl $0x2, %eax
movl %eax, (%rbx)
cmpl $0x2, %eax
je 0x65b6c
cmpl $0x1, %eax
jne 0x65c4c
movzbl 0xff(%r14), %eax
cmpb $0x23, %al
movl $0x23, %ecx
cmovbl %eax, %ecx
addb $0x4, %cl
movzbl %cl, %eax
movl %eax, 0x4(%rbx)
movzwl 0xfc(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x28(%rbx)
cmpb $0x2a, 0xd2(%r14)
je 0x65c4c
addq $0xd2, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rax
movq %rax, (%r12)
movzwl 0x8(%r14), %eax
movw %ax, 0x8(%r12)
movq $0xa, -0x8(%r12)
movb $0x0, 0xa(%r12)
leaq 0x8(%rbx), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x35700
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x65b42
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x78744
movq %r14, %rdi
movq %r15, %rsi
callq 0x35700
movq (%r15), %rdi
cmpq %r12, %rdi
jne 0x65c3f
jmp 0x65c4c
cmpb $0x0, 0xd2(%r14)
je 0x65c4c
leaq 0xd2(%r14), %rax
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rcx
movq %rcx, (%r15)
movzwl 0x8(%rax), %eax
movw %ax, 0x8(%r15)
movq $0xa, -0x8(%r15)
movb $0x0, 0xa(%r15)
leaq 0x8(%rbx), %r12
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x35700
movq (%r13), %rdi
cmpq %r15, %rdi
je 0x65bce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %r15, (%rsp)
movl 0xfa(%r14), %eax
movl %eax, 0x10(%rsp)
movzwl 0xfe(%r14), %eax
movw %ax, 0x14(%rsp)
movq $0x6, 0x8(%rsp)
movb $0x0, 0x16(%rsp)
movl $0x6, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x35150
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x65c1e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x78744
movq %r12, %rdi
movq %r14, %rsi
callq 0x35700
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x65c4c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x65c76
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SAMCoupe.cpp |
SetDiskInfo(unsigned char, MGT_DISK_INFO&) | bool SetDiskInfo(uint8_t pb_, MGT_DISK_INFO& di)
{
auto p = reinterpret_cast<MGT_DIR*>(pb_);
auto modified = false;
// Extract the remaining disk information from type-specific locations
switch (di.dos_type)
{
case SamDosType::MasterDOS:
// Set serial number
p->extra.abSerial[0] = static_cast<uint8_t>(di.serial_number >> 8);
p->extra.abSerial[1] = static_cast<uint8_t>(di.serial_number);
// No label?
if (di.disk_label.empty())
{
p->abLabel[0] = '*';
memset(p->abLabel + 1, ' ', sizeof(p->abLabel) - 1);
}
else
{
std::string strPaddedLabel = di.disk_label + std::string(sizeof(p->abLabel), ' ');
memcpy(p->abLabel, strPaddedLabel.data(), sizeof(p->abLabel));
}
break;
case SamDosType::SAMDOS:
// Leave as SAMDOS format if there's no label, or we're not allowed to write a BDOS signature
if (di.disk_label.empty() || opt.fix == 0 || opt.nosig)
break;
// Convert to BDOS format
memcpy(p->abBDOS, "BDOS", 4);
di.dos_type = SamDosType::BDOS;
modified = true;
// fall through...
case SamDosType::BDOS:
{
// Form space-padded version of the label
std::string strPaddedLabel = di.disk_label + std::string(BDOS_LABEL_SIZE, ' ');
// Split across the two locations used
memcpy(p->abLabel, strPaddedLabel.data(), sizeof(p->abLabel));
memcpy(&p->extra.bDirTag, strPaddedLabel.data() + sizeof(p->abLabel), 6); // last 6 characters
break;
}
}
return modified;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movl %edi, %r15d
movl (%rsi), %eax
xorl %ebx, %ebx
testl %eax, %eax
je 0x65d30
cmpl $0x2, %eax
je 0x65d6d
cmpl $0x1, %eax
jne 0x65ed1
movb 0x29(%r14), %al
movb %al, 0xfc(%r15)
movb 0x28(%r14), %al
movb %al, 0xfd(%r15)
cmpq $0x0, 0x10(%r14)
je 0x65e4a
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %rdi
movl $0xa, %esi
movl $0x20, %edx
callq 0x356c0
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35690
leaq 0x38(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x65e6d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x65e73
cmpq $0x0, 0x10(%r14)
je 0x65ed1
leaq 0x799fe(%rip), %rax # 0xdf740
cmpl $0x0, 0x5c(%rax)
je 0x65ed1
cmpl $0x0, 0xa4(%rax)
jne 0x65ed1
movl $0x534f4442, 0xe8(%r15) # imm = 0x534F4442
movl $0x2, (%r14)
movb $0x1, %bl
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %rdi
movl $0x10, %esi
movl $0x20, %edx
callq 0x356c0
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35690
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x65dc8
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x65dcf
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x65dfe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x28(%rsp), %rdi
movzwl 0x8(%rdi), %eax
movw %ax, 0xda(%r15)
movq (%rdi), %rax
movq %rax, 0xd2(%r15)
movzwl 0xe(%rdi), %eax
movw %ax, 0xfe(%r15)
movl 0xa(%rdi), %eax
movl %eax, 0xfa(%r15)
cmpq %r14, %rdi
je 0x65ed1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x65ed1
movb $0x2a, 0xd2(%r15)
movabsq $0x2020202020202020, %rax # imm = 0x2020202020202020
movq %rax, 0xd3(%r15)
movb $0x20, 0xdb(%r15)
jmp 0x65ecf
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x65ea2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x28(%rsp), %rdi
movzwl 0x8(%rdi), %eax
movw %ax, 0xda(%r15)
movq (%rdi), %rax
movq %rax, 0xd2(%r15)
cmpq %rbx, %rdi
je 0x65ecf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x355d0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x65ee3
jmp 0x65eff
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x65f02
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x65f02
movq %rax, %rbx
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SAMCoupe.cpp |
GetFileTime(MGT_DIR const*, tm*) | bool GetFileTime(const MGT_DIR* p, struct tm* ptm_)
{
memset(ptm_, 0, sizeof(*ptm_));
// Check for a packed BDOS 1.4+ date
if (p->bMonth & 0x80)
{
ptm_->tm_sec = (p->bMinute & 0x1f) << 1;
ptm_->tm_min = ((p->bMinute & 0xe0) >> 2) | (p->bHour & 0x07);
ptm_->tm_hour = (p->bHour & 0xf8) >> 3;
// ptm_->tm_wday = p->bMonth & 0x07; // mktime does this for us
ptm_->tm_mday = p->bDay;
ptm_->tm_mon = (p->bMonth & 0x71) >> 3;
ptm_->tm_year = p->bYear;
}
// Normal format
else
{
ptm_->tm_min = p->bMinute;
ptm_->tm_hour = p->bHour;
ptm_->tm_mday = p->bDay;
ptm_->tm_mon = p->bMonth - 1;
ptm_->tm_year = p->bYear;
}
// Base smaller year values from 2000 (BDOS considers <80 to be invalid)
if (ptm_->tm_year < 80)
ptm_->tm_year += 100;
// Fetch the current year, if not already cached
static int nYear = 0;
if (!nYear)
{
time_t ttNow = time(nullptr);
struct tm* tmNow = localtime(&ttNow);
nYear = 1900 + tmNow->tm_year;
}
// Reject obviously invalid date components
if (1900 + ptm_->tm_year > nYear ||
ptm_->tm_mon < 0 || ptm_->tm_mon >= 12 ||
ptm_->tm_mday == 0 || ptm_->tm_mday > 31 ||
ptm_->tm_hour > 23 || ptm_->tm_min > 60 || ptm_->tm_sec > 60)
return false;
// All dates are taken to be in the local timezone, not UCT/GMT
ptm_->tm_isdst = -1;
// Validate the date components
return mktime(ptm_) != -1;
} | pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movq $0x0, 0x30(%rsi)
movzbl 0xf6(%rdi), %eax
movzbl 0xf9(%rdi), %ecx
testb %al, %al
js 0x65f55
movl %ecx, 0x4(%rbx)
movzbl 0xf8(%rdi), %ecx
movl %ecx, 0x8(%rbx)
movzbl 0xf5(%rdi), %ecx
movl %ecx, 0xc(%rbx)
decl %eax
jmp 0x65f88
leal (%rcx,%rcx), %edx
andl $0x3e, %edx
movl %edx, (%rbx)
shrl $0x5, %ecx
movzbl 0xf8(%rdi), %edx
movl %edx, %esi
andl $0x7, %esi
leal (%rsi,%rcx,8), %ecx
movl %ecx, 0x4(%rbx)
shrl $0x3, %edx
movl %edx, 0x8(%rbx)
movzbl 0xf5(%rdi), %ecx
movl %ecx, 0xc(%rbx)
shrl $0x3, %eax
andl $0xe, %eax
movl %eax, 0x10(%rbx)
movzbl 0xf7(%rdi), %eax
movl %eax, 0x14(%rbx)
cmpl $0x4f, %eax
ja 0x65fa0
addl $0x64, %eax
movl %eax, 0x14(%rbx)
cmpl $0x0, 0x79789(%rip) # 0xdf730
jne 0x65fcb
xorl %edi, %edi
callq 0x35550
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x35460
movl $0x76c, %ecx # imm = 0x76C
addl 0x14(%rax), %ecx
movl %ecx, 0x79765(%rip) # 0xdf730
movl $0x76c, %eax # imm = 0x76C
addl 0x14(%rbx), %eax
cmpl 0x79757(%rip), %eax # 0xdf730
jg 0x66004
cmpl $0xb, 0x10(%rbx)
ja 0x66004
movl 0xc(%rbx), %eax
testl %eax, %eax
sete %cl
cmpl $0x20, %eax
setge %al
orb %cl, %al
jne 0x66004
cmpl $0x17, 0x8(%rbx)
jg 0x66004
cmpl $0x3c, 0x4(%rbx)
jg 0x66004
cmpl $0x3c, (%rbx)
jle 0x6600c
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movl $0xffffffff, 0x20(%rbx) # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x353a0
cmpq $-0x1, %rax
setne %al
jmp 0x66006
| /simonowen[P]samdisk/src/SAMCoupe.cpp |
IsProDOSDisk(HDD const&, PRODOS_CAPS&) | bool IsProDOSDisk(const HDD& hdd, PRODOS_CAPS& pdc)
{
/*
Sector 0 - MS-DOS BOOT sector
Sector 1 - MS-DOS FAT
Sector 2 - MS-DOS ROOT directory
Sector 3 - Small "READ-ME.TXT" file visible to Windows/MS-DOS Etc.
Sector 4-67 - Pro-DOS system code (if the card was formatted as "bootable")
Sector 68 - CP/M "Disk" ONE start
Sector 2116 - CP/M "Disk" TWO start
Sector 4164 - CP/M "Disk" THREE start ... and so on.
*/
// Sector size must be 512 bytes for PRODOS
if (hdd.sector_size != PRODOS_SECTOR_SIZE)
return false;
pdc.base_sectors = PRODOS_BASE_SECTORS;
pdc.records = static_cast<int>((hdd.total_sectors - pdc.base_sectors) / PRODOS_RECORD_SECTORS);
pdc.bootable = false;
return CheckSig(hdd, 1, 16, "\x00\x03\x08\x06\x08\x13\x00\x0B\x1E\x11\x04\x00\x0B\x08\x13\x18", 16);
} | cmpl $0x200, 0x18(%rdi) # imm = 0x200
jne 0x66088
movl $0x44, (%rsi)
movq 0x20(%rdi), %rax
leaq -0x44(%rax), %rcx
addq $0x7bb, %rax # imm = 0x7BB
testq %rcx, %rcx
cmovnsq %rcx, %rax
shrq $0xb, %rax
movl %eax, 0x4(%rsi)
movb $0x0, 0x8(%rsi)
leaq 0x49238(%rip), %rcx # 0xaf2ab
movl $0x1, %esi
movl $0x10, %edx
movl $0x10, %r8d
jmp 0x77f03
xorl %eax, %eax
retq
| /simonowen[P]samdisk/src/SAMCoupe.cpp |
IsBDOSDisk(HDD const&, BDOS_CAPS&) | bool IsBDOSDisk(const HDD& hdd, BDOS_CAPS& bdc)
{
bool f = false;
// Sector size must be 512 bytes for BDOS
if (hdd.sector_size != BDOS_SECTOR_SIZE)
return false;
MEMORY mem(hdd.sector_size);
// Determine BDOS parameters from the CHS geometry (as BDOS does)
GetBDOSCaps(hdd.cyls * hdd.heads * hdd.sectors, bdc);
// Read the first sector in record 1 to check for a BDOS signature
if (ReadSector(hdd, bdc.base_sectors, mem))
{
f = bdc.need_byteswap = !memcmp(mem + 232, "DBSO", 4);
if (!f) f = !memcmp(mem + 232, "BDOS", 4);
}
// If that didn't work, try record 1 using LBA sector count
if (!f)
{
// Determine the BDOS parameters from the LBA sector count (as Trinity does, and SAMdisk used to)
BDOS_CAPS bdcLBA;
GetBDOSCaps(hdd.total_sectors, bdcLBA);
// Only check the base sector if it differs from the CHS position
if (bdcLBA.base_sectors != bdc.base_sectors && ReadSector(hdd, bdcLBA.base_sectors, mem))
{
f = bdcLBA.need_byteswap = !memcmp(mem + 232, "DBSO", 4);
if (!f) f = !memcmp(mem + 232, "BDOS", 4);
bdcLBA.lba = f;
// If the disk is relying on the LBA sector count, use the new details
if (f)
bdc = bdcLBA;
}
}
// If we're still not sure, check for a BDOS boot sector
if (!f && ReadSector(hdd, 0, mem))
{
// Clear bits 7 and 5 (case) for the boot signature check
for (int i = 0; i < 4; ++i) { mem[i + 0x000] &= ~0xa0; mem[i + 0x100] &= ~0xa0; }
// Check for the boot sector signatures at the appropriate offsets for Atom and Atom Lite
bdc.need_byteswap = !memcmp(mem + 0x000, "OBTO", 4);
bdc.bootable = bdc.need_byteswap || !memcmp(mem + 0x100, "BOOT", 4);
f = bdc.bootable;
}
return f;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl 0x18(%rdi), %edi
cmpl $0x200, %edi # imm = 0x200
jne 0x6611d
movq %rsi, %rbx
leaq 0x7636f(%rip), %rax # 0xdc420
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movl %edi, 0x8(%r15)
callq 0x77560
movq %rax, 0x10(%r15)
movslq 0xc(%r14), %rax
movslq 0x10(%r14), %rcx
imulq %rax, %rcx
movslq 0x14(%r14), %rdi
imulq %rcx, %rdi
movq %rbx, %rsi
callq 0x662cd
movl 0x4(%rbx), %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x77ec9
testb %al, %al
je 0x66124
movq 0x20(%rsp), %rax
cmpl $0x4f534244, 0xe8(%rax) # imm = 0x4F534244
sete %bpl
sete 0x10(%rbx)
je 0x66126
cmpl $0x534f4442, 0xe8(%rax) # imm = 0x534F4442
sete %bpl
jmp 0x66126
xorl %ebp, %ebp
jmp 0x6628f
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x66218
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x661a7
movl $0x64001c2, %ecx # imm = 0x64001C2
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %rax
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2e, %rcx
leal (%rcx,%rdx), %esi
leal (%rcx,%rdx), %edi
incl %edi
movl %edi, 0xc(%rsp)
leal (%rcx,%rdx), %r15d
addl $0x2, %r15d
movl %eax, %ecx
subl %r15d, %ecx
movslq %ecx, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x29, %rcx
addl %edx, %ecx
imull $0xfffff9c0, %ecx, %edx # imm = 0xFFFFF9C0
subl %esi, %eax
leal (%rax,%rdx), %r12d
addl $-0x2, %r12d
xorl %r13d, %r13d
cmpl $0x32, %r12d
setge %r13b
addl %ecx, %r13d
jmp 0x661b8
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %r12d, %r12d
movl $0x0, 0xc(%rsp)
cmpl 0x4(%rbx), %r15d
je 0x66218
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x77ec9
testb %al, %al
je 0x66218
movq 0x20(%rsp), %rcx
cmpl $0x4f534244, 0xe8(%rcx) # imm = 0x4F534244
sete %al
movl %eax, %ebp
je 0x661f6
cmpl $0x534f4442, 0xe8(%rcx) # imm = 0x534F4442
sete %bpl
testb %bpl, %bpl
je 0x66218
movl 0xc(%rsp), %ecx
movl %ecx, (%rbx)
movl %r15d, 0x4(%rbx)
movl %r13d, 0x8(%rbx)
movl %r12d, 0xc(%rbx)
movb %al, 0x10(%rbx)
movb $0x0, 0x11(%rbx)
movb %bpl, 0x12(%rbx)
testb %bpl, %bpl
jne 0x66279
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x77ec9
testb %al, %al
je 0x66279
xorl %eax, %eax
movq 0x20(%rsp), %rcx
andb $0x5f, (%rcx,%rax)
movq 0x20(%rsp), %rcx
andb $0x5f, 0x100(%rcx,%rax)
incq %rax
cmpq $0x4, %rax
jne 0x66232
movq 0x20(%rsp), %rax
cmpl $0x4f54424f, (%rax) # imm = 0x4F54424F
sete 0x10(%rbx)
je 0x66272
cmpl $0x544f4f42, 0x100(%rax) # imm = 0x544F4F42
sete %bpl
jmp 0x66275
movb $0x1, %bpl
movb %bpl, 0x11(%rbx)
leaq 0x761a0(%rip), %rax # 0xdc420
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x775ea
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x662a4
jmp 0x662c5
movq %rax, %rbx
leaq 0x76172(%rip), %rax # 0xdc420
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x775ea
movq %rbx, %rdi
callq 0x35aa0
movq %rax, %rdi
callq 0x410ac
| /simonowen[P]samdisk/src/SAMCoupe.cpp |
ReportBuildOptions() | void ReportBuildOptions()
{
static const std::vector<const char*> options{
#ifdef HAVE_ZLIB
"zlib",
#endif
#ifdef HAVE_BZIP2
"bzip2",
#endif
#ifdef HAVE_LZMA
"lzma",
#endif
#ifdef HAVE_WINUSB
"WinUSB",
#endif
#ifdef HAVE_LIBUSB1
"libusb1",
#endif
#ifdef HAVE_FTDI
"FTDI",
#endif
#ifdef HAVE_FTD2XX
"FTD2XX",
#endif
#ifdef HAVE_CAPSIMAGE
"CAPSimage",
#endif
#ifdef HAVE_FDRAWCMD_H
"fdrawcmd.sys",
#endif
};
if (options.size())
{
util::cout << "\nBuild features:\n";
for (const auto& o : options)
util::cout << ' ' << o;
util::cout << "\n";
}
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb 0x79233(%rip), %al # 0xdfce0
testb %al, %al
je 0x66b3a
movq 0x79214(%rip), %rax # 0xdfcd0
cmpq 0x79205(%rip), %rax # 0xdfcc8
je 0x66b2e
leaq 0x797e4(%rip), %rdi # 0xe02b0
leaq 0x48e32(%rip), %rsi # 0xaf905
callq 0x3fbbb
movq 0x791e9(%rip), %rbx # 0xdfcc8
movq 0x791ea(%rip), %r12 # 0xdfcd0
cmpq %r12, %rbx
je 0x66b1b
leaq 0x797be(%rip), %r14 # 0xe02b0
leaq 0x8(%rsp), %r15
movb $0x20, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x409e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4dc96
addq $0x8, %rbx
cmpq %r12, %rbx
jne 0x66af7
leaq 0x7978e(%rip), %rdi # 0xe02b0
leaq 0x46905(%rip), %rsi # 0xad42e
callq 0x38d1e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x7919f(%rip), %rdi # 0xdfce0
callq 0x35af0
testl %eax, %eax
je 0x66ab5
leaq 0x48da6(%rip), %rax # 0xaf8fb
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x48d9c(%rip), %rax # 0xaf900
movq %rax, 0x8(%rsi)
leaq 0x79159(%rip), %rdi # 0xdfcc8
leaq 0x7(%rsp), %rcx
movl $0x2, %edx
callq 0x69872
leaq 0x2d33(%rip), %rdi # 0x698b8
leaq 0x7913c(%rip), %rsi # 0xdfcc8
leaq 0x76a65(%rip), %rdx # 0xdd5f8
callq 0x35510
leaq 0x79141(%rip), %rdi # 0xdfce0
callq 0x35360
jmp 0x66ab5
movq %rax, %rbx
leaq 0x7912d(%rip), %rdi # 0xdfce0
callq 0x35350
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SAMdisk.cpp |
ParseCommandLine(int, char**) | bool ParseCommandLine(int argc_, char* argv_[])
{
int arg;
opterr = 1;
while ((arg = getopt_long(argc_, argv_, short_options, long_options, nullptr)) != -1)
{
switch (arg)
{
case 'c':
util::str_range(optarg, opt.range.cyl_begin, opt.range.cyl_end);
// -c0 is shorthand for -c0-0
if (opt.range.cyls() == 0)
opt.range.cyl_end = 1;
break;
case 'h':
{
auto heads = util::str_value<int>(optarg);
if (heads > MAX_DISK_HEADS)
throw util::exception("invalid head count/select '", optarg, "', expected 0-", MAX_DISK_HEADS);
opt.range.head_begin = (heads == 1) ? 1 : 0;
opt.range.head_end = (heads == 0) ? 1 : 2;
break;
}
case 's':
opt.sectors = util::str_value<long>(optarg);
break;
case 'H':
opt.hardsectors = util::str_value<int>(optarg);
if (opt.hardsectors <= 1)
throw util::exception("invalid hard-sector count '", optarg, "'");
break;
case 'r':
opt.retries = util::str_value<int>(optarg);
break;
case 'R':
opt.rescans = util::str_value<int>(optarg);
break;
case 'n': opt.noformat = 1; break;
case 'm': opt.minimal = 1; break;
case 'b': opt.base = util::str_value<int>(optarg); break;
case 'z': opt.size = util::str_value<int>(optarg); break;
case 'g': opt.gap3 = util::str_value<int>(optarg); break;
case 'i': opt.interleave = util::str_value<int>(optarg); break;
case 'k': opt.skew = util::str_value<int>(optarg); break;
case 'D': opt.datacopy = util::str_value<int>(optarg); break;
case 'F':
opt.fill = util::str_value<int>(optarg);
if (opt.fill > 255)
throw util::exception("invalid fill value '", optarg, "', expected 0-255");
break;
case '0':
opt.head0 = util::str_value<int>(optarg);
if (opt.head0 > 1)
throw util::exception("invalid head0 value '", optarg, "', expected 0 or 1");
break;
case '1':
opt.head1 = util::str_value<int>(optarg);
if (opt.head1 > 1)
throw util::exception("invalid head1 value '", optarg, "', expected 0 or 1");
break;
case 't':
opt.datarate = datarate_from_string(optarg);
if (opt.datarate == DataRate::Unknown)
throw util::exception("invalid data rate '", optarg, "'");
break;
case 'e':
opt.encoding = encoding_from_string(optarg);
if (opt.encoding == Encoding::Unknown)
throw util::exception("invalid encoding '", optarg, "'");
break;
case 'd': opt.step = 2; break;
case 'f': ++opt.force; break;
case 'v': ++opt.verbose; break;
case 'x': opt.hex = 1; break;
case 'L': opt.label = optarg; break;
case OPT_LOG:
util::log.open(optarg ? optarg : "samdisk.log");
if (util::log.bad())
throw util::exception("failed to open log file for writing");
util::cout.file = &util::log;
break;
case OPT_ORDER:
{
auto str = util::lowercase(optarg);
if (str == std::string("cylinders").substr(0, str.length()))
opt.cylsfirst = 1;
else if (str == std::string("heads").substr(0, str.length()))
opt.cylsfirst = 0;
else
throw util::exception("invalid order type '", optarg, "', expected 'cylinders' or 'heads'");
break;
}
case OPT_PREFER:
{
auto str = util::lowercase(optarg);
if (str == std::string("track").substr(0, str.length()))
opt.prefer = PreferredData::Track;
else if (str == std::string("bitstream").substr(0, str.length()))
opt.prefer = PreferredData::Bitstream;
else if (str == std::string("flux").substr(0, str.length()))
opt.prefer = PreferredData::Flux;
else
throw util::exception("invalid data type '", optarg, "', expected track/bitstream/flux");
break;
}
case OPT_ACE: opt.encoding = Encoding::Ace; break;
case OPT_MX: opt.encoding = Encoding::MX; break;
case OPT_AGAT: opt.encoding = Encoding::Agat; break;
case OPT_NOFM: opt.encoding = Encoding::MFM; break;
case OPT_GAPMASK:
opt.gapmask = util::str_value<int>(optarg);
break;
case OPT_MAXCOPIES:
opt.maxcopies = util::str_value<int>(optarg);
if (!opt.maxcopies)
throw util::exception("invalid data copy count '", optarg, "', expected >= 1");
break;
case OPT_MAXSPLICE:
opt.maxsplice = util::str_value<int>(optarg);
break;
case OPT_CHECK8K:
opt.check8k = !optarg ? 1 : util::str_value<int>(optarg);
break;
case OPT_RPM:
opt.rpm = util::str_value<int>(optarg);
if (opt.rpm != 300 && opt.rpm != 360)
throw util::exception("invalid rpm '", optarg, "', expected 300 or 360");
break;
case OPT_HDF:
opt.hdf = util::str_value<int>(optarg);
if (opt.hdf != 10 && opt.hdf != 11)
throw util::exception("invalid HDF version '", optarg, "', expected 10 or 11");
break;
case OPT_SCALE:
opt.scale = util::str_value<int>(optarg);
break;
case OPT_PLLADJUST:
opt.plladjust = util::str_value<int>(optarg);
if (opt.plladjust <= 0 || opt.plladjust > MAX_PLL_ADJUST)
throw util::exception("invalid pll adjustment '", optarg, "', expected 1-", MAX_PLL_ADJUST);
break;
case OPT_PLLPHASE:
opt.pllphase = util::str_value<int>(optarg);
if (opt.pllphase <= 0 || opt.pllphase > MAX_PLL_PHASE)
throw util::exception("invalid pll phase '", optarg, "', expected 1-", MAX_PLL_PHASE);
break;
case OPT_STEPRATE:
opt.steprate = util::str_value<int>(optarg);
if (opt.steprate > 15)
throw util::exception("invalid step rate '", optarg, "', expected 0-15");
break;
case OPT_BYTES:
util::str_range(optarg, opt.bytes_begin, opt.bytes_end);
break;
case OPT_DEBUG:
opt.debug = util::str_value<int>(optarg);
if (opt.debug < 0)
throw util::exception("invalid debug level, expected >= 0");
break;
case OPT_VERSION:
LongVersion();
return false;
case ':':
case '?': // error
util::cout << '\n';
return false;
// long option return
case 0:
break;
#ifdef _DEBUG
default:
return false;
#endif
}
}
// Fail if there are no non-option arguments
if (optind >= argc_)
{
if (!opt.verbose)
Usage();
// Allow -v to show the --version details
LongVersion();
return false;
}
// The command is the first argument
char* pszCommand = argv_[optind];
// Match against known commands
for (int i = 0; i < cmdEnd; ++i)
{
if (!strcasecmp(pszCommand, aszCommands[i]))
{
// Fail if a command has already been set
if (opt.command)
Usage();
// Set the command and advance to the next argument position
opt.command = i;
++optind;
break;
}
}
if (opt.absoffsets) opt.offsets = 1;
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x7b89e(%rip), %rax # 0xe24ec
movl $0x1, (%rax)
leaq 0x10(%rsp), %r14
movq %rsp, %r12
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x77de8(%rip), %rdx # 0xdea50
leaq 0x771c1(%rip), %rcx # 0xdde30
xorl %r8d, %r8d
callq 0xa7a0c
cmpl $0x3e, %eax
jg 0x66cd4
cmpl $0x30, %eax
jg 0x66d1a
jne 0x66deb
leaq 0x7b866(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78ad8(%rip) # 0xdf788
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66cc6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x2, 0x78abb(%rip) # 0xdf788
jl 0x66c5c
jmp 0x67ac4
leal -0x44(%rax), %ecx
cmpl $0x36, %ecx
ja 0x66d70
leaq 0x485dd(%rip), %rdx # 0xaf2c4
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
leaq 0x7b801(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78b1b(%rip) # 0xdf830
jmp 0x675cc
cmpl $0x31, %eax
jne 0x66df9
leaq 0x7b7ce(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78a44(%rip) # 0xdf78c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66d5e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x2, 0x78a27(%rip) # 0xdf78c
jl 0x66c5c
jmp 0x67a98
leal -0x100(%rax), %ecx
cmpl $0x15, %ecx
ja 0x67714
leaq 0x4861a(%rip), %rdx # 0xaf3a0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
leaq 0x7b762(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78a98(%rip) # 0xdf84c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66dca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movl 0x78a7c(%rip), %eax # 0xdf84c
cmpl $0x12c, %eax # imm = 0x12C
je 0x66c5c
cmpl $0x168, %eax # imm = 0x168
je 0x66c5c
jmp 0x67da9
cmpl $-0x1, %eax
jne 0x66c5c
jmp 0x679ff
cmpl $0x3a, %eax
jne 0x66c5c
jmp 0x679eb
leaq 0x7b6ea(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78a30(%rip) # 0xdf85c
jmp 0x675cc
movl $0x1, 0x789e9(%rip) # 0xdf824
jmp 0x66c5c
leaq 0x7b6b1(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, %r13d
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66e78
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x3, %r13d
jge 0x67b30
xorl %eax, %eax
cmpl $0x1, %r13d
sete %al
movl %eax, 0x788b7(%rip) # 0xdf748
movl $0x2, %eax
sbbl $0x0, %eax
movl %eax, 0x788ad(%rip) # 0xdf74c
jmp 0x66c5c
leaq 0x7b64d(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78977(%rip) # 0xdf840
jmp 0x675cc
leaq 0x7b623(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x7886d(%rip) # 0xdf760
jmp 0x675cc
incl 0x788c2(%rip) # 0xdf7c0
jmp 0x66c5c
leaq 0x7b5ee(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78880(%rip) # 0xdf7a8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66f3e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x1, 0x78863(%rip) # 0xdf7a8
jg 0x66c5c
jmp 0x67b92
movl $0x1, 0x788a6(%rip) # 0xdf800
jmp 0x66c5c
leaq 0x7b592(%rip), %rax # 0xe24f8
movq (%rax), %r13
movq 0x78920(%rip), %r14 # 0xdf890
movq %r13, %rdi
callq 0x35210
leaq 0x78909(%rip), %rdi # 0xdf888
xorl %esi, %esi
movq %r14, %rdx
leaq 0x10(%rsp), %r14
movq %r13, %rcx
movq %rax, %r8
callq 0x358f0
jmp 0x66c5c
movl $0x2, 0x787ad(%rip) # 0xdf750
jmp 0x66c5c
leaq 0x7b549(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x7879b(%rip) # 0xdf768
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66fe3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x100, 0x7877b(%rip) # imm = 0x100
jl 0x66c5c
jmp 0x67bc1
leaq 0x7b4f9(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69d9f
movq %rax, 0x78862(%rip) # 0xdf880
jmp 0x675cc
movl $0x1, 0x78783(%rip) # 0xdf7b0
jmp 0x66c5c
leaq 0x7b4bf(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x786fd(%rip) # 0xdf754
jmp 0x675cc
leaq 0x7b495(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x786d7(%rip) # 0xdf758
jmp 0x675cc
leaq 0x7b46b(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x786b9(%rip) # 0xdf764
jmp 0x675cc
leaq 0x7b441(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
leaq 0x7866f(%rip), %rsi # 0xdf740
leaq 0x7866c(%rip), %rdx # 0xdf744
callq 0x69986
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x670f3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x78646(%rip), %rdi # 0xdf740
callq 0x65908
testl %eax, %eax
jne 0x66c5c
movl $0x1, 0x78633(%rip) # 0xdf744
jmp 0x66c5c
leaq 0x7b3db(%rip), %rax # 0xe24f8
movq (%rax), %rsi
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
movq %r12, %rdx
callq 0x5b424
movq %r15, %rdi
callq 0x602d7
movl %eax, 0x78737(%rip) # 0xdf878
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x67166
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x0, 0x7870b(%rip) # 0xdf878
jne 0x66c5c
jmp 0x67b04
leaq 0x7b379(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x785bf(%rip) # 0xdf75c
jmp 0x675cc
leaq 0x7b34f(%rip), %rax # 0xe24f8
movq (%rax), %rsi
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %r12, %rdx
callq 0x5b424
movq %r15, %rdi
callq 0x605c8
movl %eax, 0x786a7(%rip) # 0xdf874
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x671f2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x0, 0x7867b(%rip) # 0xdf874
jne 0x66c5c
jmp 0x67b63
incl 0x785ae(%rip) # 0xdf7b8
jmp 0x66c5c
leaq 0x7b2e2(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78580(%rip) # 0xdf7b4
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x6724a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x0, 0x78563(%rip) # 0xdf7b4
jns 0x66c5c
jmp 0x67bf0
movl $0x7, 0x7860e(%rip) # 0xdf874
jmp 0x66c5c
leaq 0x7b286(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78514(%rip) # 0xdf7a4
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x672a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movl 0x784f8(%rip), %eax # 0xdf7a4
addl $-0x33, %eax
cmpl $-0x33, %eax
ja 0x66c5c
jmp 0x67c94
leaq 0x7b234(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78582(%rip) # 0xdf864
jmp 0x675cc
leaq 0x7b20a(%rip), %rax # 0xe24f8
movq (%rax), %rsi
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x40(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
movq %r14, %rsi
callq 0x78866
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6732a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r15
movq %r15, %rdi
leaq 0x4969d(%rip), %rsi # 0xb09e0
leaq 0x4969b(%rip), %rdx # 0xb09e5
callq 0x445b8
movq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x35600
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0x676f5
testq %rdx, %rdx
je 0x67722
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x355f0
testl %eax, %eax
sete %r14b
jmp 0x67725
leaq 0x7b15e(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78460(%rip) # 0xdf818
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x673ce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movl 0x78444(%rip), %eax # 0xdf818
addl $-0xc, %eax
cmpl $-0x3, %eax
ja 0x66c5c
jmp 0x67ce8
leaq 0x7b10c(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78372(%rip) # 0xdf77c
jmp 0x675cc
leaq 0x7b0e2(%rip), %rax # 0xe24f8
movq (%rax), %rsi
testq %rsi, %rsi
leaq 0x4884a(%rip), %rax # 0xafc6d
cmoveq %rax, %rsi
leaq 0x78c82(%rip), %r13 # 0xe00b0
movq %r13, %rdi
movl $0x10, %edx
callq 0x35060
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x1, 0x20(%r13,%rax)
jne 0x67d46
leaq 0x78e5a(%rip), %rax # 0xe02b0
movq %r13, 0x8(%rax)
jmp 0x66c5c
leaq 0x7b092(%rip), %rax # 0xe24f8
movq (%rax), %r13
testq %r13, %r13
je 0x67702
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0x67(%rsp), %rdx
callq 0x5b424
movq %r15, %rdi
callq 0x69b5b
movl %eax, 0x782ff(%rip) # 0xdf794
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x6770c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x6770c
leaq 0x7b037(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
leaq 0x78391(%rip), %rsi # 0xdf86c
leaq 0x7838e(%rip), %rdx # 0xdf870
callq 0x69986
jmp 0x675cc
movl $0x6, 0x7837e(%rip) # 0xdf874
jmp 0x66c5c
leaq 0x7aff6(%rip), %rax # 0xe24f8
movq (%rax), %rsi
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x40(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
movq %r14, %rsi
callq 0x78866
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6753e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r15
movq %r15, %rdi
leaq 0x48746(%rip), %rsi # 0xafc9d
leaq 0x48748(%rip), %rdx # 0xafca6
callq 0x445b8
movq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x35600
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0x676fa
testq %rdx, %rdx
je 0x677da
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x355f0
testl %eax, %eax
sete %r14b
jmp 0x677dd
leaq 0x7af4a(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x781b4(%rip) # 0xdf780
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x66c5c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x66c5c
leaq 0x7af06(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x78250(%rip) # 0xdf860
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x67626
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x0, 0x78233(%rip) # 0xdf860
jne 0x66c5c
jmp 0x67d17
leaq 0x7aeb9(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x7820b(%rip) # 0xdf868
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x67673
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movl 0x781ef(%rip), %eax # 0xdf868
addl $-0x5b, %eax
cmpl $-0x5b, %eax
ja 0x66c5c
jmp 0x67c40
movl $0x1, 0x781e0(%rip) # 0xdf874
jmp 0x66c5c
movl $0x8, 0x781d1(%rip) # 0xdf874
jmp 0x66c5c
leaq 0x7ae49(%rip), %rax # 0xe24f8
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x20(%rsp), %rdx
callq 0x5b424
movq %r12, %rdi
callq 0x69b5b
movl %eax, 0x780c3(%rip) # 0xdf790
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x676e3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl $0x10, 0x780a6(%rip) # 0xdf790
jl 0x66c5c
jmp 0x67c11
xorl %r14d, %r14d
jmp 0x67725
xorl %r14d, %r14d
jmp 0x677dd
movl $0x1, 0x78088(%rip) # 0xdf794
testq %r13, %r13
jmp 0x66c5c
cmpl $0x3f, %eax
jne 0x66c5c
jmp 0x679eb
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x67741
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6775d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
movl $0x1, %eax
testb %r14b, %r14b
jne 0x679d7
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0x49e0b(%rip), %rsi # 0xb158f
leaq 0x49e0d(%rip), %rdx # 0xb1598
callq 0x445b8
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x35600
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0x677d2
testq %rdx, %rdx
je 0x67892
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x355f0
testl %eax, %eax
sete %r14b
jmp 0x67895
xorl %r14d, %r14d
jmp 0x67895
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x677f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x67815
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
movl $0x1, %eax
testb %r14b, %r14b
jne 0x67986
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0x470b7(%rip), %rsi # 0xae8f3
leaq 0x470b5(%rip), %rdx # 0xae8f8
callq 0x445b8
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x35600
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0x6788a
testq %rdx, %rdx
je 0x67940
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x355f0
testl %eax, %eax
sete %r14b
jmp 0x67943
xorl %r14d, %r14d
jmp 0x67943
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x678b1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x678cd
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
movl $0x2, %eax
testb %r14b, %r14b
jne 0x679d7
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0x49cd2(%rip), %rsi # 0xb15c6
leaq 0x49ccf(%rip), %rdx # 0xb15ca
callq 0x445b8
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x35600
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0x6793b
testq %rdx, %rdx
je 0x6798e
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x355f0
testl %eax, %eax
sete %r14b
jmp 0x67991
xorl %r14d, %r14d
jmp 0x67991
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6795f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6797b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
xorl %eax, %eax
testb %r14b, %r14b
je 0x67d67
movl %eax, 0x77df8(%rip) # 0xdf784
jmp 0x679dd
movb $0x1, %r14b
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x679ad
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x679c9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
movl $0x3, %eax
testb %r14b, %r14b
je 0x67ddd
movl %eax, 0x77e9f(%rip) # 0xdf87c
movq (%rsp), %rdi
leaq 0x10(%rsp), %r14
jmp 0x675d0
movq %rsp, %rsi
movb $0xa, (%rsi)
leaq 0x788b8(%rip), %rdi # 0xe02b0
callq 0x409e0
jmp 0x67a56
leaq 0x7aae2(%rip), %r14 # 0xe24e8
movslq (%r14), %rax
cmpl %ebp, %eax
jge 0x67a3a
movq (%rbx,%rax,8), %rbx
leaq 0x74a28(%rip), %r12 # 0xdc440
xorl %r15d, %r15d
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x35640
testl %eax, %eax
je 0x67a6a
incq %r15
addq $0x8, %r12
cmpq $0xc, %r15
jne 0x67a1b
jmp 0x67a81
cmpl $0x0, 0x77d77(%rip) # 0xdf7b8
je 0x67dd8
callq 0x66620
callq 0x668eb
callq 0x66a9c
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x77d3b(%rip) # 0xdf7ac
jne 0x67dd8
movl %r15d, 0x77d2e(%rip) # 0xdf7ac
incl (%r14)
movb $0x1, %al
cmpl $0x0, 0x77da2(%rip) # 0xdf82c
je 0x67a58
movl $0x1, 0x77d02(%rip) # 0xdf798
jmp 0x67a58
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x48184(%rip), %rsi # 0xafc30
leaq 0x7aa45(%rip), %rdx # 0xe24f8
leaq 0x48163(%rip), %rcx # 0xafc1d
movq %rax, %rdi
callq 0x6a052
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x4812f(%rip), %rsi # 0xafc07
leaq 0x7aa19(%rip), %rdx # 0xe24f8
leaq 0x48137(%rip), %rcx # 0xafc1d
movq %rax, %rdi
callq 0x6a052
leaq 0x7408b(%rip), %rsi # 0xdbb80
movq 0x75484(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x4812e(%rip), %rsi # 0xafc46
leaq 0x7a9d9(%rip), %rdx # 0xe24f8
leaq 0x48339(%rip), %rcx # 0xafe5f
movq %rax, %rdi
callq 0x6a0c8
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x48055(%rip), %rsi # 0xafb99
leaq 0x7a9ad(%rip), %rdx # 0xe24f8
leaq 0x48063(%rip), %rcx # 0xafbb5
leaq 0x478cf(%rip), %r8 # 0xaf428
movq %rax, %rdi
callq 0x69d2a
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x480e3(%rip), %rsi # 0xafc5a
leaq 0x7a97a(%rip), %rdx # 0xe24f8
leaq 0x482da(%rip), %rcx # 0xafe5f
movq %rax, %rdi
callq 0x6a13e
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x4801e(%rip), %rsi # 0xafbc4
leaq 0x7a94b(%rip), %rdx # 0xe24f8
leaq 0x482ab(%rip), %rcx # 0xafe5f
movq %rax, %rdi
callq 0x69f66
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x4800b(%rip), %rsi # 0xafbe0
leaq 0x7a91c(%rip), %rdx # 0xe24f8
leaq 0x48012(%rip), %rcx # 0xafbf5
movq %rax, %rdi
callq 0x69fdc
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x481ec(%rip), %rsi # 0xafdf0
movq %rax, %rdi
callq 0x6a5da
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x481a6(%rip), %rsi # 0xafdcb
leaq 0x7a8cc(%rip), %rdx # 0xe24f8
leaq 0x481ac(%rip), %rcx # 0xafddf
movq %rax, %rdi
callq 0x6a564
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
movq %rsp, %r8
movl $0x5a, (%r8)
movb $0x1, %bpl
leaq 0x48156(%rip), %rsi # 0xafdb7
leaq 0x7a890(%rip), %rdx # 0xe24f8
leaq 0x48139(%rip), %rcx # 0xafda8
movq %rax, %rdi
callq 0x6a4ee
xorl %ebp, %ebp
leaq 0x73f00(%rip), %rsi # 0xdbb80
movq 0x752f9(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x67e1d
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
movq %rsp, %r8
movl $0x32, (%r8)
movb $0x1, %bpl
leaq 0x480da(%rip), %rsi # 0xafd8f
leaq 0x7a83c(%rip), %rdx # 0xe24f8
leaq 0x480e5(%rip), %rcx # 0xafda8
movq %rax, %rdi
callq 0x6a478
xorl %ebp, %ebp
leaq 0x73eac(%rip), %rsi # 0xdbb80
movq 0x752a5(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x67e1d
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x48068(%rip), %rsi # 0xafd64
leaq 0x7a7f5(%rip), %rdx # 0xe24f8
leaq 0x48070(%rip), %rcx # 0xafd7a
movq %rax, %rdi
callq 0x6a402
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x47fe9(%rip), %rsi # 0xafd14
leaq 0x7a7c6(%rip), %rdx # 0xe24f8
leaq 0x47ff5(%rip), %rcx # 0xafd2e
movq %rax, %rdi
callq 0x6a316
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x47f1f(%rip), %rsi # 0xafc79
movq %rax, %rdi
callq 0x6a1b4
jmp 0x67aee
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x47f2c(%rip), %rsi # 0xafca7
leaq 0x7a776(%rip), %rdx # 0xe24f8
leaq 0x47f33(%rip), %rcx # 0xafcbc
movq %rax, %rdi
callq 0x6a22a
leaq 0x73de8(%rip), %rsi # 0xdbb80
movq 0x751e1(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x67e1d
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x47f82(%rip), %rsi # 0xafd3f
leaq 0x7a734(%rip), %rdx # 0xe24f8
leaq 0x47f82(%rip), %rcx # 0xafd4d
movq %rax, %rdi
callq 0x6a38c
jmp 0x67aee
callq 0x66680
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x47eee(%rip), %rsi # 0xafcdf
leaq 0x7a700(%rip), %rdx # 0xe24f8
leaq 0x47ef4(%rip), %rcx # 0xafcf3
movq %rax, %rdi
callq 0x6a2a0
leaq 0x73d72(%rip), %rsi # 0xdbb80
movq 0x7516b(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x67f56
jmp 0x67e2e
jmp 0x68038
jmp 0x67f56
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x67f59
jmp 0x67f35
jmp 0x67f56
jmp 0x68038
jmp 0x68038
jmp 0x68038
jmp 0x68038
jmp 0x68038
jmp 0x67f35
jmp 0x67f56
jmp 0x67f35
jmp 0x67f56
jmp 0x68038
jmp 0x68038
jmp 0x68038
jmp 0x68038
jmp 0x68038
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x68067
movq 0x78(%rsp), %rsi
jmp 0x6805f
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x67f35
jmp 0x67f56
jmp 0x67f70
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x67f10
jmp 0x6804e
jmp 0x68049
movq %rax, %rbx
testb %bpl, %bpl
jne 0x6803b
jmp 0x68067
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x67f59
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x67f59
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x6805a
jmp 0x68067
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x68067
movq 0x30(%rsp), %rsi
jmp 0x6805f
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x68067
movq 0x98(%rsp), %rsi
jmp 0x6805f
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x6804e
jmp 0x68049
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x68067
movq 0xb8(%rsp), %rsi
jmp 0x6805f
jmp 0x68049
jmp 0x6804e
jmp 0x68049
jmp 0x68038
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x68067
jmp 0x68049
jmp 0x6804e
movq %rax, %rbx
jmp 0x68067
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x68067
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SAMdisk.cpp |
main | int main(int argc_, char* argv_[])
{
auto start_time = std::chrono::system_clock::now();
#ifdef _WIN32
#ifdef _DEBUG
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
#endif
SetUnhandledExceptionFilter(CrashDumpUnhandledExceptionFilter);
#ifndef _DEBUG
// Check if we've been run from GUI mode with no arguments
if (!IsConsoleWindow() && util::is_stdout_a_tty() && argc_ == 1)
{
FreeConsole();
char szPath[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), szPath, ARRAYSIZE(szPath));
auto strCommand = std::string("/k \"") + szPath + "\" --help";
GetEnvironmentVariable("COMSPEC", szPath, ARRAYSIZE(szPath));
auto ret = static_cast<int>(reinterpret_cast<ULONG_PTR>(
ShellExecute(NULL, "open", szPath, strCommand.c_str(), NULL, SW_NORMAL)));
// Fall back on the old message if it failed
if (ret < 32)
MessageBox(nullptr, "I'm a console-mode utility, please run me from a Command Prompt!", "SAMdisk", MB_OK | MB_ICONSTOP);
return 0;
}
#endif // _DEBUG
#endif // _WIN32
bool f = false;
try
{
if (!ParseCommandLine(argc_, argv_))
return 1;
// Read at most two non-option command-line arguments
if (optind < argc_) strncpy(opt.szSource, argv_[optind++], arraysize(opt.szSource) - 1);
if (optind < argc_) strncpy(opt.szTarget, argv_[optind++], arraysize(opt.szTarget) - 1);
if (optind < argc_) Usage();
int nSource = GetArgType(opt.szSource);
int nTarget = GetArgType(opt.szTarget);
switch (opt.command)
{
case cmdCopy:
{
if (nSource == argNone || nTarget == argNone)
Usage();
if (nSource == argDisk && IsTrinity(opt.szTarget))
f = Image2Trinity(opt.szSource, opt.szTarget); // file/image -> Trinity
else if ((nSource == argBlock || nSource == argDisk) && (nTarget == argDisk || nTarget == argHDD /*for .raw*/))
f = ImageToImage(opt.szSource, opt.szTarget); // image -> image
else if ((nSource == argHDD || nSource == argBlock) && nTarget == argHDD)
f = Hdd2Hdd(opt.szSource, opt.szTarget); // hdd -> hdd
else if (nSource == argBootSector && nTarget == argDisk)
f = Hdd2Boot(opt.szSource, opt.szTarget); // boot -> file
else if (nSource == argDisk && nTarget == argBootSector)
f = Boot2Hdd(opt.szSource, opt.szTarget); // file -> boot
else if (nSource == argBootSector && nTarget == argBootSector)
f = Boot2Boot(opt.szSource, opt.szTarget); // boot -> boot
else
Usage();
break;
}
case cmdList:
{
if (nTarget != argNone)
Usage();
if (nSource == argNone)
f = ListDrives(opt.verbose);
else if (nSource == argHDD || nSource == argBlock)
f = ListRecords(opt.szSource);
else if (nSource == argDisk)
f = DirImage(opt.szSource);
else
Usage();
break;
}
case cmdDir:
{
if (nSource == argNone || nTarget != argNone)
Usage();
#if 0
if (nSource == argFloppy)
f = DirFloppy(opt.szSource);
else
#endif
if (nSource == argHDD)
f = ListRecords(opt.szSource);
else if (nSource == argDisk)
f = DirImage(opt.szSource);
else
Usage();
break;
}
case cmdScan:
{
if (nSource == argNone || nTarget != argNone)
Usage();
if (nSource == argBlock || nSource == argDisk)
f = ScanImage(opt.szSource, opt.range);
else
Usage();
break;
}
case cmdUnformat:
{
if (nSource == argNone || nTarget != argNone)
Usage();
// Don't write disk signatures during any formatting
opt.nosig = true;
if (nSource == argHDD)
f = FormatHdd(opt.szSource);
else if (IsRecord(opt.szSource))
f = FormatRecord(opt.szSource);
else if (nSource == argDisk)
f = UnformatImage(opt.szSource, opt.range);
else
Usage();
break;
}
case cmdFormat:
{
if (nSource == argNone || nTarget != argNone)
Usage();
if (nSource == argHDD)
FormatHdd(opt.szSource);
else if (nSource == argBootSector)
FormatBoot(opt.szSource);
else if (nSource == argDisk)
FormatImage(opt.szSource, opt.range);
else
Usage();
break;
}
case cmdVerify:
throw std::logic_error("verify command not yet implemented");
case cmdCreate:
{
if (nSource == argNone)
Usage();
if (nSource == argHDD && IsHddImage(opt.szSource) && (nTarget != argNone || opt.sectors != -1))
f = CreateHddImage(opt.szSource, util::str_value<int>(opt.szTarget));
else if (nSource == argDisk && nTarget == argNone)
f = CreateImage(opt.szSource, opt.range);
else
Usage();
break;
}
case cmdInfo:
{
if (nSource == argNone || nTarget != argNone)
Usage();
if (nSource == argHDD || nSource == argBlock)
f = HddInfo(opt.szSource, opt.verbose);
else if (nSource == argDisk)
f = ImageInfo(opt.szSource);
else
Usage();
break;
}
case cmdView:
{
if (nSource == argNone || nTarget != argNone)
Usage();
if (nSource == argHDD || nSource == argBlock)
f = ViewHdd(opt.szSource, opt.range);
else if (nSource == argBootSector)
f = ViewBoot(opt.szSource, opt.range);
else if (nSource == argDisk)
f = ViewImage(opt.szSource, opt.range);
else
Usage();
break;
}
case cmdRpm:
{
if (nSource == argNone || nTarget != argNone)
Usage();
if (nSource == argDisk)
f = DiskRpm(opt.szSource);
else
Usage();
break;
}
case cmdVersion:
{
if (nSource != argNone || nTarget != argNone)
Usage();
LongVersion();
f = true;
break;
}
default:
Usage();
break;
}
}
catch (std::string & e)
{
util::cout << "Error: " << colour::RED << e << colour::none << '\n';
}
catch (util::exception & e)
{
util::cout << colour::RED << "Error: " << e.what() << colour::none << '\n';
}
catch (std::system_error & e)
{
util::cout << colour::RED << "Error: " << e.what() << colour::none << '\n';
}
catch (std::logic_error & e)
{
util::cout << colour::RED << "Error: " << e.what() << colour::none << '\n';
}
#ifndef _WIN32
catch (std::exception & e)
{
util::cout << colour::RED << "Error: " << e.what() << colour::none << '\n';
}
#endif
if (opt.time)
{
auto end_time = std::chrono::system_clock::now();
auto elapsed_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time).count();
util::cout << "Elapsed time: " << elapsed_ms << "ms\n";
}
util::cout << colour::none << "";
util::log.close();
return f ? 0 : 1;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movl %edi, %r14d
callq 0x35070
movq %rax, %r12
movl %r14d, %edi
movq %r15, %rsi
callq 0x66c31
movl $0x1, %ebp
testb %al, %al
je 0x68c8e
leaq 0x7a3d2(%rip), %rbx # 0xe24e8
movslq (%rbx), %rax
cmpl %r14d, %eax
jge 0x68138
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%r15,%rax,8), %rsi
leaq 0x7779a(%rip), %rdi # 0xdf8c8
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35290
movslq (%rbx), %rax
cmpl %r14d, %eax
jge 0x6815a
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%r15,%rax,8), %rsi
leaq 0x77978(%rip), %rdi # 0xdfac8
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35290
movq %r12, (%rsp)
cmpl %r14d, (%rbx)
jl 0x68e6c
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x77751(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq 0x775ba(%rip), %rbx # 0xdf740
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x6806f
movl %eax, %r14d
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x681c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
leaq 0x778f7(%rip), %r12 # 0xdfac8
movq %r12, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
movq %r15, %rdi
movq %r12, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x6806f
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x68212
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movl 0x77594(%rip), %eax # 0xdf7ac
cmpq $0xb, %rax
ja 0x68e67
leaq 0x471cf(%rip), %rcx # 0xaf3f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
je 0x68e67
cmpl $0x4, %r14d
jne 0x687af
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
leaq 0x7786c(%rip), %r12 # 0xdfac8
movq %r12, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
movq %r15, %rdi
movq %r12, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x77406
movl %eax, %r15d
jmp 0x687b2
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
leal -0x1(%r14), %eax
cmpl $0x1, %eax
ja 0x686ba
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x7760f(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x77462(%rip), %rsi # 0xdf740
movq 0x77463(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x520a0
jmp 0x68bdf
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
cmpl $0x4, %r14d
je 0x68a13
cmpl $0x3, %r14d
je 0x689da
cmpl $0x2, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77596(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4c8ff
jmp 0x68a58
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
movl $0x1, 0x7746a(%rip) # 0xdf7e4
cmpl $0x2, %r14d
jne 0x68718
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77535(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4c8ff
jmp 0x68bdf
testl %ebp, %ebp
jne 0x68e67
testl %r14d, %r14d
je 0x689c4
cmpl $0x2, %r14d
ja 0x68a76
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x774de(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4f88b
jmp 0x68bdf
cmpl $0x4, %r14d
jne 0x68e67
testl %ebp, %ebp
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77490(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x500a8
jmp 0x68bdf
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
cmpl $0x4, %r14d
je 0x68486
cmpl $0x1, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77433(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x77286(%rip), %rsi # 0xdf740
movq 0x77287(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x50b45
jmp 0x68bdf
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
leal -0x1(%r14), %eax
cmpl $0x1, %eax
ja 0x6884d
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x773cb(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movl 0x77297(%rip), %esi # 0xdf7b8
leaq 0x8(%rsp), %rdi
callq 0x4db41
jmp 0x68bdf
testl %r14d, %r14d
je 0x68e67
testl %ebp, %ebp
jne 0x68e67
cmpl $0x4, %r14d
je 0x68893
cmpl $0x2, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77364(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4f88b
jmp 0x68bdf
testl %r14d, %r14d
je 0x68e67
cmpl $0x2, %r14d
jne 0x68615
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
leaq 0x77319(%rip), %r12 # 0xdf8c8
movq %r12, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r15, %rdi
movq %r12, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x77075
testb %al, %al
je 0x68615
testl %ebp, %ebp
setne %al
cmpq $-0x1, 0x77298(%rip) # 0xdf880
setne %r15b
orb %al, %r15b
jmp 0x68618
orl %r14d, %ebp
jne 0x68e67
movq (%rsp), %rbx
callq 0x66620
callq 0x668eb
movb $0x1, %bpl
callq 0x66a9c
jmp 0x68bfc
xorl %r15d, %r15d
cmpl $0x2, %r14d
jne 0x68635
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x68635
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
testb %r15b, %r15b
je 0x68962
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x77279(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x77449(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x48(%rsp), %rdi
callq 0x69b5b
leaq 0x28(%rsp), %rdi
movl %eax, %esi
callq 0x48c08
jmp 0x68e2a
cmpl $0x4, %r14d
je 0x68b49
cmpl $0x3, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x771eb(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x7703e(%rip), %rsi # 0xdf740
movq 0x7703f(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x523f8
jmp 0x68bdf
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
leaq 0x771a1(%rip), %r12 # 0xdf8c8
movq %r12, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r15, %rdi
movq %r12, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x77358
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6876a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
testb %bpl, %bpl
je 0x68b90
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77146(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4cd36
jmp 0x68bdf
xorl %r15d, %r15d
cmpl $0x4, %r14d
jne 0x687cf
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x687cf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
testb %r15b, %r15b
je 0x688cf
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x770df(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x772af(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x454a1
jmp 0x68e2a
cmpl $0x4, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77062(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4d558
jmp 0x68bdf
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x77026(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4bdb5
jmp 0x68bdf
cmpl $0x4, %r14d
je 0x688df
cmpl $0x1, %r14d
jne 0x68abc
cmpl $0x4, %ebp
je 0x688ed
cmpl $0x2, %ebp
jne 0x68abc
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76fca(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7719a(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x4512c
jmp 0x68e2a
cmpl $0x4, %r14d
jne 0x68e67
testl %ebp, %ebp
jne 0x68e67
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76f43(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
movq 0x76d94(%rip), %rsi # 0xdf740
movq 0x76d95(%rip), %rdx # 0xdf748
leaq 0x28(%rsp), %rdi
callq 0x48880
movl %eax, %ebp
jmp 0x68e43
movl 0x76dee(%rip), %edi # 0xdf7b8
movq (%rsp), %rbx
callq 0x4f72c
movl %eax, %ebp
jmp 0x68bfc
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x76edf(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4cbe5
jmp 0x68a58
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x76ea6(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x76cf9(%rip), %rsi # 0xdf740
movq 0x76cfa(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x4c4ac
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x68a6f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
xorl %ebp, %ebp
jmp 0x68bf8
cmpl $0x4, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x76e39(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
leaq 0x8(%rsp), %rdi
callq 0x4bdb5
jmp 0x68bdf
leal -0x1(%r14), %eax
cmpl $0x2, %eax
setae %al
cmpl $0x2, %ebp
setne %cl
orb %al, %cl
jne 0x68c9f
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76de3(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x76fb3(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x45a28
jmp 0x68e2a
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x76d70(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x76bc3(%rip), %rsi # 0xdf740
movq 0x76bc4(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x51f42
jmp 0x68bdf
cmpl $0x4, %r14d
jne 0x68e67
leaq 0x8(%rsp), %r14
movq %r13, (%r14)
leaq 0x76d1f(%rip), %r15 # 0xdf8c8
movq %r15, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
movq %r14, %rdi
movq %r15, %rsi
callq 0x445b8
movq 0x76b72(%rip), %rsi # 0xdf740
movq 0x76b73(%rip), %rdx # 0xdf748
leaq 0x8(%rsp), %rdi
callq 0x4c7c8
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x68bf8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq (%rsp), %rbx
xorb $0x1, %bpl
movzbl %bpl, %ebp
cmpl $0x0, 0x76c49(%rip) # 0xdf854
je 0x68c65
callq 0x35070
subq %rbx, %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
leaq 0x28(%rsp), %rbx
movq %rdx, (%rbx)
leaq 0x77671(%rip), %rdi # 0xe02b0
leaq 0x471f8(%rip), %rsi # 0xafe3e
callq 0x4034f
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4fd7a
leaq 0x471f0(%rip), %rsi # 0xafe4d
movq %rax, %rdi
callq 0x4c08f
leaq 0x77644(%rip), %rdi # 0xe02b0
xorl %esi, %esi
callq 0x788ea
leaq 0x44407(%rip), %rsi # 0xad081
movq %rax, %rdi
callq 0x6a64f
leaq 0x77427(%rip), %rdi # 0xe00b0
callq 0x35820
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %eax
xorl $0x3, %eax
movl %ebp, %ecx
xorl $0x4, %ecx
orl %eax, %ecx
jne 0x68d23
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76c09(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x76dd9(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x45f01
jmp 0x68e2a
movl %r14d, %eax
xorl $0x4, %eax
movl %ebp, %ecx
xorl $0x3, %ecx
orl %eax, %ecx
jne 0x68da7
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76b85(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x76d55(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x4608c
jmp 0x68e2a
cmpl $0x3, %r14d
jne 0x68e67
cmpl $0x3, %ebp
jne 0x68e67
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x76afd(%rip), %r14 # 0xdf8c8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x188, %rdx # imm = 0x188
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x76ccd(%rip), %r14 # 0xdfac8
movq %r14, %rdi
callq 0x35210
leaq (%rax,%rbx), %rdx
addq $0x388, %rdx # imm = 0x388
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x445b8
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x46364
movl %eax, %ebp
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x68e43
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
movq (%rsp), %rbx
je 0x68bfc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x68bfc
callq 0x66680
movq (%rsp), %r12
callq 0x66680
movl $0x10, %edi
callq 0x35260
movq %rax, %r12
leaq 0x46f8a(%rip), %rsi # 0xafe13
movq %rax, %rdi
callq 0x35850
movq 0x74138(%rip), %rsi # 0xdcfd0
movq 0x740f1(%rip), %rdx # 0xdcf90
movq %r12, %rdi
callq 0x35a50
jmp 0x68f9d
jmp 0x68f56
jmp 0x68f9d
jmp 0x68ffe
jmp 0x68f56
jmp 0x68ffe
jmp 0x68f9d
jmp 0x68f56
jmp 0x68ffe
jmp 0x68f9d
jmp 0x68f56
jmp 0x68ffe
jmp 0x68f9d
jmp 0x68f56
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68f56
jmp 0x68f9d
jmp 0x68ffe
jmp 0x68f56
jmp 0x68fd7
movq %rdx, %r15
movq %rax, %r14
jmp 0x68fba
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68ffe
movq %rdx, %r15
movq %rax, %r14
movq %r12, %rdi
callq 0x35430
jmp 0x69004
movq %rdx, %r15
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x68fba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x69004
movq 0x38(%rsp), %rsi
jmp 0x68fec
jmp 0x68fd7
jmp 0x68fd7
jmp 0x68ffe
jmp 0x68ffe
jmp 0x68fd7
jmp 0x68ffe
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x69004
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x69004
jmp 0x68ffe
jmp 0x68ffe
movq %r12, (%rsp)
movq %rdx, %r15
movq %rax, %r14
cmpl $0x5, %r15d
jne 0x6905f
movq %r14, %rdi
callq 0x35200
movq %rax, %r14
leaq 0x77294(%rip), %rdi # 0xe02b0
leaq 0x46e13(%rip), %rsi # 0xafe36
callq 0x41794
movq %rax, %rdi
movl $0x9f, %esi
callq 0x788ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x3f60b
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x28(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x6920b
cmpl $0x4, %r15d
jne 0x690cb
movq %r14, %rdi
callq 0x35200
movq %rax, %r14
leaq 0x77239(%rip), %rdi # 0xe02b0
movl $0x9f, %esi
callq 0x788ea
leaq 0x46dae(%rip), %rsi # 0xafe36
movq %rax, %rdi
callq 0x41794
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x4dc96
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x48(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x6920b
cmpl $0x3, %r15d
jne 0x69137
movq %r14, %rdi
callq 0x35200
movq %rax, %r14
leaq 0x771cd(%rip), %rdi # 0xe02b0
movl $0x9f, %esi
callq 0x788ea
leaq 0x46d42(%rip), %rsi # 0xafe36
movq %rax, %rdi
callq 0x41794
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x4dc96
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x48(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x6920b
cmpl $0x2, %r15d
jne 0x691a0
movq %r14, %rdi
callq 0x35200
movq %rax, %r14
leaq 0x77161(%rip), %rdi # 0xe02b0
movl $0x9f, %esi
callq 0x788ea
leaq 0x46cd6(%rip), %rsi # 0xafe36
movq %rax, %rdi
callq 0x41794
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x4dc96
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x48(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x6920b
cmpl $0x1, %r15d
jne 0x69260
movq %r14, %rdi
callq 0x35200
movq %rax, %r14
leaq 0x770f4(%rip), %rdi # 0xe02b0
movl $0x9f, %esi
callq 0x788ea
leaq 0x46c69(%rip), %rsi # 0xafe36
movq %rax, %rdi
callq 0x41794
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x4dc96
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x48(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
callq 0x359a0
movl $0x1, %ebp
movq (%rsp), %rbx
jmp 0x68c04
jmp 0x69224
jmp 0x69230
jmp 0x69224
movq %rax, %r14
callq 0x359a0
jmp 0x69260
jmp 0x69230
movq %rax, %r14
callq 0x359a0
jmp 0x69260
jmp 0x6923e
jmp 0x6923e
movq %rax, %r14
callq 0x359a0
jmp 0x69260
jmp 0x6924e
jmp 0x69258
jmp 0x6924e
movq %rax, %r14
callq 0x359a0
jmp 0x69260
movq %rax, %r14
callq 0x359a0
movq %r14, %rdi
callq 0x35aa0
movq %rax, %rdi
callq 0x410ac
| /simonowen[P]samdisk/src/SAMdisk.cpp |
util::LogHelper& util::operator<<<char [32]>(util::LogHelper&, char const (&) [32]) | 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 0x692d5
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 0x69313
cmpb $0x0, 0x10(%rbx)
jne 0x69313
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [76]>(util::LogHelper&, char const (&) [76]) | 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 0x6954b
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 0x69589
cmpb $0x0, 0x10(%rbx)
jne 0x69589
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [19], char*&, char const (&) [2]>(char const (&) [19], char*&, 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 0x6afb2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a17b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x71a26(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a1ab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [22], char*&, char const (&) [21]>(char const (&) [22], char*&, char const (&) [21]) | 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 0x6b524
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a43f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x71762(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a46f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [25], char*&, char const (&) [15], int>(char const (&) [25], char*&, char const (&) [15], int&&) | 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 0x6b61d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a4b5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x716ec(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a4e5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [20], char*&, char const (&) [15], int>(char const (&) [20], char*&, char const (&) [15], int&&) | 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 0x6b718
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a52b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x71676(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a55b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [35]>(char const (&) [35]) | 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 0x6b90c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a617
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x7158a(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a647
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [1]>(util::LogHelper&, char const (&) [1]) | 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 0x6a671
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 0x6a6af
cmpb $0x0, 0x10(%rbx)
jne 0x6a6af
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::format<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2]>(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2]) | 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 %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x70(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
callq 0x5b424
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x41ad6
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x41ad6
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
callq 0x6a8d5
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x6a754
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6a773
leaq 0x20(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x6a76e
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6a784
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x35150
jmp 0x6a792
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35690
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x6a7b1
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x6a7b7
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a7ee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a805
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x6a81c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a83d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a874
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x6a874
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a890
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x6a890
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x6a8ac
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x6a8ac
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a8cd
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [28], char*&, char const (&) [15], int const&>(char const (&) [28], char*&, char const (&) [15], int const&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0x35760
movq %r13, %rdi
callq 0x35210
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x356a0
movq (%r12), %r12
testq %r12, %r12
je 0x6ab35
movq %r12, %rdi
callq 0x35210
movq %rsp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x6ab4c
movq (%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x35a00
movq %r15, %rdi
callq 0x35210
movq %rsp, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movl (%r14), %esi
movq %rsp, %rdi
callq 0x35a80
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x723f7(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6abaa
movq %rax, %rbx
movq 0x723c4(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /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*&, char const (&) [2]>(char const (&) [19], char*&, 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
movq (%r15), %r15
testq %r15, %r15
je 0x6b013
movq %r15, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x6b02f
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x8, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x35a00
movq %r14, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x71f1d(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6b085
movq %rax, %rbx
movq 0x71ee9(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [21], char*&, char const (&) [35]>(char const (&) [21], char*&, char const (&) [35]) | 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
movq (%r15), %r15
testq %r15, %r15
je 0x6b1a1
movq %r15, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x6b1bd
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x8, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x35a00
movq %r14, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x71d8f(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6b213
movq %rax, %rbx
movq 0x71d5b(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [14], char*&, char const (&) [23]>(char const (&) [14], char*&, char const (&) [23]) | 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
movq (%r15), %r15
testq %r15, %r15
je 0x6b48c
movq %r15, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
jmp 0x6b4a8
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x8, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x35a00
movq %r14, %rdi
callq 0x35210
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x71aa4(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6b4fe
movq %rax, %rbx
movq 0x71a70(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
SuperCardProUSB::Open() | std::unique_ptr<SuperCardPro> SuperCardProUSB::Open()
{
std::string path;
#ifdef _WIN32
path = SuperCardProWin32::GetDevicePath();
#elif defined(__linux__)
path = "/dev/ttyUSB0";
#elif defined(__APPLE__)
path = "/dev/cu.usbserial-SCP-JIM";
#endif
if (!path.empty())
{
int fd = open(path.c_str(), O_RDWR | O_BINARY);
if (fd > 0)
{
#ifdef _WIN32
DCB dcb = { sizeof(dcb) };
if (BuildCommDCB("baud=9600 parity=N data=8 stop=1", &dcb))
{
HANDLE h = reinterpret_cast<HANDLE>(_get_osfhandle(fd));
SetCommState(h, &dcb);
}
#endif
return std::unique_ptr<SuperCardPro>(new SuperCardProUSB(fd));
}
}
return std::unique_ptr<SuperCardPro>();
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x4450b(%rip), %rcx # 0xafed6
movq %rsp, %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x358f0
cmpq $0x0, 0x8(%rsp)
je 0x6ba1f
movq (%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x35a70
movl %eax, %ebp
testl %eax, %eax
jle 0x6ba1f
movl $0x18, %edi
callq 0x355b0
movb $0x0, 0x8(%rax)
leaq 0x70ab8(%rip), %rcx # 0xdc4c8
movq %rcx, (%rax)
movl %ebp, 0xc(%rax)
movl $0x0, 0x10(%rax)
jmp 0x6ba28
movq $0x0, (%rbx)
xorl %eax, %eax
movq %rax, (%rbx)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x6ba41
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x6ba4f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x6ba68
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SCP_USB.cpp |
Sector::operator==(Sector const&) const | bool Sector::operator== (const Sector& sector) const
{
// Headers must match
if (sector.header != header)
return false;
// If neither has data it's a match
if (sector.m_data.size() == 0 && m_data.size() == 0)
return true;
// Both sectors must have some data
if (sector.copies() == 0 || copies() == 0)
return false;
// Both first sectors must have at least the natural size to compare
if (sector.data_size() < sector.size() || data_size() < size())
return false;
// The natural data contents must match
return std::equal(data_copy().begin(), data_copy().begin() + size(), sector.data_copy().begin());
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x6079e
testb %al, %al
jne 0x6bc68
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
jne 0x6bbee
movq 0x30(%r14), %rcx
cmpq 0x28(%r14), %rcx
je 0x6bca4
movq 0x30(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
testl %ecx, %ecx
je 0x6bc68
movq 0x30(%r14), %rdx
subq 0x28(%r14), %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
xorl %r15d, %r15d
testl %edx, %edx
je 0x6bc68
testl %ecx, %ecx
je 0x6bc2f
movl 0x8(%rax), %r15d
subl (%rax), %r15d
movq %rbx, %rdi
callq 0x607f2
xorl %ebp, %ebp
cmpl %eax, %r15d
jl 0x6bc6a
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
testl %ecx, %ecx
je 0x6bc5c
movl 0x8(%rax), %ebp
subl (%rax), %ebp
movq %r14, %rdi
callq 0x607f2
cmpl %eax, %ebp
jge 0x6bc77
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%r14), %rax
movq (%rax), %r15
movq %r14, %rdi
callq 0x607f2
testl %eax, %eax
je 0x6bca4
movslq %eax, %rdx
movq 0x28(%rbx), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x355f0
testl %eax, %eax
sete %bpl
jmp 0x6bc6a
movb $0x1, %bpl
jmp 0x6bc6a
nop
| /simonowen[P]samdisk/src/Sector.cpp |
Sector::add(Data&&, bool, unsigned char) | Sector::Merge Sector::add(Data&& new_data, bool bad_crc, uint8_t new_dam)
{
Merge ret = Merge::NewData;
// If the sector has a bad header CRC, it can't have any data
if (has_badidcrc())
return Merge::Unchanged;
#ifdef _DEBUG
// If there's enough data, check the CRC
if ((encoding == Encoding::MFM || encoding == Encoding::FM) &&
static_cast<int>(new_data.size()) >= (size() + 2))
{
CRC16 crc;
if (encoding == Encoding::MFM) crc.init(CRC16::A1A1A1);
crc.add(new_dam);
auto bad_data_crc = crc.add(new_data.data(), size() + 2) != 0;
assert(bad_crc == bad_data_crc);
}
#endif
// If the exising sector has good data, ignore supplied data if it's bad
if (bad_crc && has_good_data())
return Merge::Unchanged;
// If the existing sector is bad, new good data will replace it all
if (!bad_crc && has_baddatacrc())
{
remove_data();
ret = Merge::Improved;
}
// 8K sectors always have a CRC error, but may include a secondary checksum
if (is_8k_sector())
{
// Attempt to identify the 8K checksum method used by the new data
// If it's recognised, replace any existing data with it
if (!ChecksumMethods(new_data.data(), new_data.size()).empty())
{
remove_data();
ret = Merge::Improved;
}
// Do we already have a copy?
else if (copies() == 1)
{
// Can we identify the method used by the existing copy?
if (!ChecksumMethods(m_data[0].data(), m_data[0].size()).empty())
{
// Keep the existing, ignoring the new data
return Merge::Unchanged;
}
}
}
// DD 8K sectors are considered complete at 6K, everything else at natural size
auto complete_size = is_8k_sector() ? 0x1800 : new_data.size();
// Compare existing data with the new data, to avoid storing redundant copies.
for (auto it = m_data.begin(); it != m_data.end(); )
{
auto& data = *it;
if (data.size() >= complete_size && new_data.size() >= complete_size)
{
// If the complete area of the data matches, ignore the new copy.
if (!std::memcmp(data.data(), new_data.data(), complete_size))
return Merge::Unchanged;
}
// Existing data is the same size or larger?
if (data.size() >= new_data.size())
{
// Compare the prefix of each.
if (std::equal(new_data.begin(), new_data.end(), data.begin()))
{
// If identical, or new is shorter than complete size, ignore it.
if (data.size() == new_data.size() || new_data.size() < complete_size)
return Merge::Unchanged;
// The new shorter copy replaces the existing data.
it = m_data.erase(it);
ret = Merge::Improved;
continue;
}
}
else // existing is shorter
{
// Compare the prefix of each.
if (std::equal(data.begin(), data.end(), new_data.begin()))
{
// If the existing data is at least complete size, ignore the new data.
if (data.size() >= complete_size)
return Merge::Unchanged;
// The new longer copy replaces the existing data.
it = m_data.erase(it);
ret = Merge::Improved;
continue;
}
}
++it;
}
// Will we now have multiple copies?
if (copies() > 0)
{
// Damage can cause us to see different DAM values for a sector.
// Favour normal over deleted, and deleted over anything else.
if (dam != new_dam &&
(dam == 0xfb || (dam == 0xf8 && new_dam != 0xfb)))
{
return Merge::Unchanged;
}
// Multiple good copies mean a difference in the gap data after
// a good sector, perhaps due to a splice. We just ignore it.
if (!has_baddatacrc())
return Merge::Unchanged;
// Keep multiple copies the same size, whichever is shortest
auto new_size = std::min(new_data.size(), m_data[0].size());
new_data.resize(new_size);
// Resize any existing copies to match
for (auto& d : m_data)
d.resize(new_size);
}
// Insert the new data copy.
m_data.emplace_back(std::move(new_data));
limit_copies(opt.maxcopies);
// Update the data CRC state and DAM
m_bad_data_crc = bad_crc;
dam = new_dam;
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
xorl %r15d, %r15d
cmpb $0x0, 0x21(%rdi)
jne 0x6c107
movl %ecx, %ebp
movl %edx, %r12d
movq %rdi, %rbx
testb %r12b, %r12b
je 0x6bdb3
movq %rbx, %rdi
callq 0x6c11e
testb %al, %al
jne 0x6c107
movl $0x2, %eax
testb %r12b, %r12b
jne 0x6bdd8
movl $0x2, %eax
cmpb $0x1, 0x22(%rbx)
jne 0x6bdd8
leaq 0x28(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x6c842
movb $0x0, 0x22(%rbx)
movb $-0x5, 0x20(%rbx)
movl $0x1, %eax
cmpl $0x3d090, 0x10(%rbx) # imm = 0x3D090
movq %rbx, 0x8(%rsp)
movl %eax, 0x14(%rsp)
jne 0x6beb9
cmpl $0x1, 0x14(%rbx)
jne 0x6beb9
cmpl $0x6, 0xc(%rbx)
jne 0x6beb9
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
je 0x6beb9
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
subl %esi, %edx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x58731
movq 0x28(%rbx), %r14
movq %rbx, %rdi
callq 0x41342
testq %r14, %r14
je 0x6be6b
movq 0x8(%rsp), %rbx
leaq 0x28(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x6c842
movb $0x0, 0x22(%rbx)
movb $-0x5, 0x20(%rbx)
movl $0x1, 0x14(%rsp)
jmp 0x6beb9
movq 0x8(%rsp), %rbx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl $0x1, %ecx
jne 0x6beb9
movq (%rax), %rsi
movl 0x8(%rax), %edx
subl %esi, %edx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x58731
movq 0x28(%rbx), %r14
movq %rbx, %rdi
movq 0x8(%rsp), %rbx
callq 0x41342
testq %r14, %r14
jne 0x6c107
movl %ebp, 0x2c(%rsp)
cmpl $0x3d090, 0x10(%rbx) # imm = 0x3D090
jne 0x6bef0
cmpl $0x1, 0x14(%rbx)
jne 0x6bef0
cmpl $0x6, 0xc(%rbx)
jne 0x6bef0
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
movl $0x1800, 0x4(%rsp) # imm = 0x1800
testl %eax, %eax
jne 0x6befe
movq 0x18(%rsp), %rax
movl 0x8(%rax), %ecx
subl (%rax), %ecx
movl %ecx, 0x4(%rsp)
leaq 0x28(%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rbx), %rbp
cmpq 0x30(%rbx), %rbp
sete %r15b
movl %r12d, 0x28(%rsp)
je 0x6c00f
movslq 0x4(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rbp), %r13
movq 0x8(%rbp), %r14
movq %r14, %r12
subq %r13, %r12
cmpl %r12d, 0x4(%rsp)
jg 0x6bf65
movq 0x18(%rsp), %rcx
movl 0x8(%rcx), %eax
movq (%rcx), %rsi
subl %esi, %eax
cmpl %eax, 0x4(%rsp)
jg 0x6bf65
movq %r13, %rdi
movq 0x30(%rsp), %rdx
callq 0x355f0
testl %eax, %eax
je 0x6c008
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
movq %rax, %rbx
subq %rsi, %rbx
cmpl %ebx, %r12d
jge 0x6bf9e
cmpq %r13, %r14
je 0x6bf90
movq %r13, %rdi
movq %r12, %rdx
callq 0x355f0
testl %eax, %eax
jne 0x6bfb5
movl $0x1, %eax
cmpl %r12d, 0x4(%rsp)
jg 0x6bfcd
jmp 0x6bfea
cmpq %rsi, %rax
je 0x6bfbd
movq %rsi, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x355f0
testl %eax, %eax
je 0x6bfbd
addq $0x18, %rbp
xorl %eax, %eax
jmp 0x6bfea
movl $0x1, %eax
cmpl %ebx, %r12d
je 0x6bfea
cmpl %ebx, 0x4(%rsp)
jg 0x6bfea
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x6c618
movq %rax, %rbp
movl $0x1, 0x14(%rsp)
movl $0x3, %eax
movq 0x8(%rsp), %rbx
cmpl $0x3, %eax
je 0x6bff8
testl %eax, %eax
jne 0x6c00f
cmpq 0x30(%rbx), %rbp
sete %r15b
jne 0x6bf28
jmp 0x6c00f
movl $0x1, %eax
jmp 0x6bfef
testb $0x1, %r15b
je 0x6c093
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
testl %ecx, %ecx
movl 0x2c(%rsp), %ebp
movl $0x0, %r15d
jle 0x6c098
movq 0x8(%rsp), %rsi
movb 0x20(%rsi), %cl
cmpb %bpl, %cl
jne 0x6c0ed
cmpb $0x1, 0x22(%rsi)
jne 0x6c107
movq 0x18(%rsp), %rdi
movl 0x8(%rdi), %ecx
subl (%rdi), %ecx
movl 0x8(%rax), %edx
subl (%rax), %edx
cmpl %ecx, %edx
cmovgel %ecx, %edx
movq %rsi, %r14
movslq %edx, %rbx
movq %rbx, %rsi
callq 0x38b2c
movq 0x28(%r14), %r12
movq 0x30(%r14), %r14
cmpq %r14, %r12
je 0x6c098
movq %r12, %rdi
movq %rbx, %rsi
callq 0x38b2c
addq $0x18, %r12
jmp 0x6c07d
xorl %r15d, %r15d
jmp 0x6c107
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq 0x6c58e
leaq 0x7368f(%rip), %rax # 0xdf740
movq 0x8(%rsp), %rbx
movq 0x30(%rbx), %rcx
subq 0x28(%rbx), %rcx
movslq 0x120(%rax), %rsi
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %eax # imm = 0xAAAAAAAB
cmpl %eax, %esi
jge 0x6c0db
movq %r14, %rdi
callq 0x6c5dc
movl 0x28(%rsp), %eax
movb %al, 0x22(%rbx)
movb %bpl, 0x20(%rbx)
movl 0x14(%rsp), %r15d
jmp 0x6c107
cmpb $-0x5, %cl
je 0x6c107
cmpb $-0x8, %cl
sete %cl
cmpb $-0x5, %bpl
setne %dl
testb %cl, %dl
je 0x6c049
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| /simonowen[P]samdisk/src/Sector.cpp |
Sector::merge(Sector&&) | Sector::Merge Sector::merge(Sector&& sector)
{
Merge ret = Merge::Unchanged;
// If the new header CRC is bad there's nothing we can use
if (sector.has_badidcrc())
return Merge::Unchanged;
// Something is wrong if the new details don't match the existing one
assert(sector.header == header);
assert(sector.datarate == datarate);
assert(sector.encoding == encoding);
// If the existing header is bad, repair it
if (has_badidcrc())
{
header = sector.header;
set_badidcrc(false);
ret = Merge::Improved;
}
// We can't repair good data with bad
if (!has_baddatacrc() && sector.has_baddatacrc())
return ret;
// Add the new data snapshots
for (Data& data : sector.m_data)
{
// Move the data into place, passing on the existing data CRC status and DAM
auto add_ret = add(std::move(data), sector.has_baddatacrc(), sector.dam);
if (add_ret == Merge::Improved || (ret == Merge::Unchanged))
ret = add_ret;
}
sector.m_data.clear();
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpb $0x0, 0x21(%rsi)
jne 0x6c26f
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x60772
testb %al, %al
je 0x6c280
movl 0x10(%rbx), %eax
cmpl 0x10(%r14), %eax
jne 0x6c29f
movl 0x14(%rbx), %eax
cmpl 0x14(%r14), %eax
jne 0x6c2be
xorl %ebp, %ebp
cmpb $0x1, 0x21(%r14)
jne 0x6c222
movups (%rbx), %xmm0
movups %xmm0, (%r14)
movb $0x0, 0x21(%r14)
movl $0x1, %ebp
cmpb $0x0, 0x22(%r14)
jne 0x6c22f
cmpb $0x0, 0x22(%rbx)
jne 0x6c26f
leaq 0x28(%rbx), %r15
movq 0x28(%rbx), %r12
movq 0x30(%rbx), %r13
cmpq %r13, %r12
je 0x6c264
movzbl 0x22(%rbx), %edx
movzbl 0x20(%rbx), %ecx
movq %r14, %rdi
movq %r12, %rsi
callq 0x6bd6c
testl %ebp, %ebp
cmovel %eax, %ebp
cmpl $0x1, %eax
cmovel %eax, %ebp
addq $0x18, %r12
jmp 0x6c23b
movq (%r15), %rsi
movq %r15, %rdi
callq 0x6c842
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x43cef(%rip), %rdi # 0xaff76
leaq 0x43c76(%rip), %rsi # 0xaff04
leaq 0x43cf9(%rip), %rcx # 0xaff8e
movl $0xda, %edx
callq 0x35380
leaq 0x43d0f(%rip), %rdi # 0xaffb5
leaq 0x43c57(%rip), %rsi # 0xaff04
leaq 0x43cda(%rip), %rcx # 0xaff8e
movl $0xdb, %edx
callq 0x35380
leaq 0x43d0c(%rip), %rdi # 0xaffd1
leaq 0x43c38(%rip), %rsi # 0xaff04
leaq 0x43cbb(%rip), %rcx # 0xaff8e
movl $0xdc, %edx
callq 0x35380
nop
| /simonowen[P]samdisk/src/Sector.cpp |
Sector::set_baddatacrc(bool) | void Sector::set_baddatacrc(bool bad)
{
m_bad_data_crc = bad;
if (!bad)
{
auto fill_byte = static_cast<uint8_t>((opt.fill >= 0) ? opt.fill : 0);
if (!has_data())
m_data.push_back(Data(size(), fill_byte));
else if (copies() > 1)
{
m_data.resize(1);
if (data_size() < size())
{
auto pad{ Data(size() - data_size(), fill_byte) };
m_data[0].insert(m_data[0].begin(), pad.begin(), pad.end());
}
}
}
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movb %sil, 0x22(%rdi)
testl %esi, %esi
jne 0x6c4c5
movq %rdi, %r14
leaq 0x7338c(%rip), %rax # 0xdf740
movl 0x28(%rax), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
movb %cl, 0x6(%rsp)
leaq 0x28(%rdi), %rbx
movq 0x30(%rdi), %rcx
subq 0x28(%rdi), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
testl %eax, %eax
je 0x6c41a
cmpl $0x2, %eax
jl 0x6c4c5
movl $0x1, %esi
movq %rbx, %rdi
callq 0x6c5dc
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
testl %ecx, %ecx
je 0x6c448
movl 0x8(%rax), %ebp
subl (%rax), %ebp
jmp 0x6c44a
movq %r14, %rdi
callq 0x607f2
movslq %eax, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x5bf6a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6c58e
jmp 0x6c4ae
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x607f2
cmpl %eax, %ebp
jge 0x6c4c5
movq %r14, %rdi
callq 0x607f2
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
testl %edx, %edx
je 0x6c47e
movl (%rcx), %edx
subl 0x8(%rcx), %edx
jmp 0x6c480
xorl %edx, %edx
addl %eax, %edx
movslq %edx, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x5bf6a
movq (%rbx), %rdi
movq (%rdi), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0x5c4b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6c4c5
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x6c4d2
jmp 0x6c4ee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6c4f1
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6c4f1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/src/Sector.cpp |
Sector::remove_gapdata(bool) | void Sector::remove_gapdata(bool keep_crc/*=false*/)
{
if (!has_gapdata())
return;
for (auto& data : m_data)
{
// If requested, attempt to preserve CRC bytes on bad sectors.
if (keep_crc && has_baddatacrc() && data.size() >= (size() + 2))
data.resize(size() + 2);
else
data.resize(size());
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x6c31a
testb %al, %al
je 0x6c564
movq 0x28(%r14), %r15
movq 0x30(%r14), %r12
cmpq %r12, %r15
je 0x6c564
testb %bl, %bl
je 0x6c53e
cmpb $0x1, 0x22(%r14)
jne 0x6c53e
movl 0x8(%r15), %ebp
subl (%r15), %ebp
movq %r14, %rdi
callq 0x607f2
addl $0x2, %eax
cmpl %ebp, %eax
jle 0x6c557
movq %r14, %rdi
callq 0x607f2
movslq %eax, %rsi
movq %r15, %rdi
callq 0x38b2c
addq $0x18, %r15
jmp 0x6c518
movq %r14, %rdi
callq 0x607f2
addl $0x2, %eax
jmp 0x6c546
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| /simonowen[P]samdisk/src/Sector.cpp |
GenerateEmptyTrack(CylHead const&, Track const&) | TrackData GenerateEmptyTrack(const CylHead& cylhead, const Track& track)
{
assert(IsEmptyTrack(track));
(void)track;
// Generate a DD track full of gap filler. It shouldn't really matter
// which datarate and encoding as long as there are no sync marks.
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addBlock(0x4e, 6250);
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x713fc
testl %eax, %eax
jne 0x6ca91
movq %rsp, %r15
movq %r15, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r15, %rdi
movl $0x4e, %esi
movl $0x186a, %edx # imm = 0x186A
callq 0x73748
movq %rsp, %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x6ca53
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6ca6a
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6ca81
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x43555(%rip), %rdi # 0xaffed
leaq 0x43562(%rip), %rsi # 0xb0001
leaq 0x435b7(%rip), %rcx # 0xb005d
movl $0x15, %edx
callq 0x35380
movq %rax, %rbx
movq %rsp, %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsKBI19Track(Track const&) | bool IsKBI19Track(const Track& track)
{
static const uint8_t ids[]{ 0,1,4,7,10,13,16,2,5,8,11,14,17,3,6,9,12,15,18,19 };
// CPC version has 19 sectors, PC version has 20 (with bad sector 19).
if (track.size() != arraysize(ids) && track.size() != arraysize(ids) - 1)
return false;
int idx = 0;
for (auto& s : track.sectors())
{
if (s.datarate != DataRate::_250K || s.encoding != Encoding::MFM ||
s.header.sector != ids[idx++] || s.size() != 512 ||
(!s.has_good_data() && s.header.sector != 19))
return false;
}
if (opt.debug) util::cout << "detected KBI-19 track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x713fc
cmpl $0x14, %eax
je 0x6cae9
movq %rbx, %rdi
callq 0x713fc
cmpl $0x13, %eax
jne 0x6cb83
movq %rbx, %rdi
callq 0x7140a
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
sete %bl
je 0x6cb61
xorl %ebp, %ebp
leaq 0x43977(%rip), %r12 # 0xb0480
xorl %ecx, %ecx
cmpl $0x3d090, 0x10(%r14) # imm = 0x3D090
jne 0x6cb51
cmpl $0x1, 0x14(%r14)
jne 0x6cb51
movslq %ebp, %rax
incl %ebp
movzbl (%rax,%r12), %eax
cmpl %eax, 0x8(%r14)
jne 0x6cb4f
movq %r14, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6cb4f
movq %r14, %rdi
callq 0x6c11e
cmpl $0x13, 0x8(%r14)
sete %cl
orb %al, %cl
jmp 0x6cb51
xorl %ecx, %ecx
testb %cl, %cl
je 0x6cb85
addq $0x40, %r14
cmpq %r15, %r14
sete %bl
jne 0x6cb09
leaq 0x72bd8(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x6cb85
leaq 0x7373b(%rip), %rdi # 0xe02b0
leaq 0x4351e(%rip), %rsi # 0xb009a
callq 0x6931c
jmp 0x6cb85
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsSystem24Track(Track const&) | bool IsSystem24Track(const Track& track)
{
static const uint8_t sizes[] = { 4,4,4,4,4,3,1 };
auto i = 0;
if (track.size() != arraysize(sizes))
return false;
for (auto& s : track)
{
if (s.datarate != DataRate::_500K || s.encoding != Encoding::MFM ||
s.header.size != sizes[i++] || !s.has_data())
return false;
}
if (opt.debug) util::cout << "detected System-24 track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x713fc
cmpl $0x7, %eax
jne 0x6d098
movq 0x8(%r14), %rbx
movq 0x10(%r14), %r14
cmpq %r14, %rbx
je 0x6d074
xorl %ebp, %ebp
leaq 0x43459(%rip), %r15 # 0xb0494
xorl %eax, %eax
cmpl $0x7a120, 0x10(%rbx) # imm = 0x7A120
jne 0x6d067
cmpl $0x1, 0x14(%rbx)
jne 0x6d067
movslq %ebp, %rax
incl %ebp
movzbl (%rax,%r15), %eax
cmpl %eax, 0xc(%rbx)
jne 0x6d065
movq %rbx, %rdi
callq 0x6c302
jmp 0x6d067
xorl %eax, %eax
testb %al, %al
je 0x6d098
addq $0x40, %rbx
cmpq %r14, %rbx
jne 0x6d03b
leaq 0x726c5(%rip), %rax # 0xdf740
movb $0x1, %bl
cmpl $0x0, 0x74(%rax)
je 0x6d09a
leaq 0x73226(%rip), %rdi # 0xe02b0
leaq 0x43071(%rip), %rsi # 0xb0102
callq 0x40b27
jmp 0x6d09a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateSystem24Track(CylHead const&, Track const&) | TrackData GenerateSystem24Track(const CylHead& cylhead, const Track& track)
{
assert(IsSystem24Track(track));
BitstreamTrackBuilder bitbuf(DataRate::_500K, Encoding::MFM);
for (auto& s : track)
{
auto gap3{ (s.header.sector < 6) ? 52 : 41 };
bitbuf.addSector(s, gap3);
}
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6d011
testb %al, %al
je 0x6d188
movq %rsp, %rdi
movl $0x7a120, %esi # imm = 0x7A120
movl $0x1, %edx
callq 0x43910
movq 0x8(%r12), %r15
movq 0x10(%r12), %r13
cmpq %r13, %r15
je 0x6d119
movq %rsp, %r12
cmpl $0x6, 0x8(%r15)
movl $0x34, %edx
jl 0x6d105
movl $0x29, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x73e18
addq $0x40, %r15
cmpq %r13, %r15
jne 0x6d0f4
movq %rsp, %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x6d146
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6d15d
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6d174
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x42f8d(%rip), %rdi # 0xb011c
leaq 0x42e6b(%rip), %rsi # 0xb0001
leaq 0x42f96(%rip), %rcx # 0xb0133
movl $0x92, %edx
callq 0x35380
jmp 0x6d1a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateSpectrumSpeedlockTrack(CylHead const&, Track const&, int, int) | TrackData GenerateSpectrumSpeedlockTrack(const CylHead& cylhead, const Track& track, int weak_offset, int weak_size)
{
#ifdef _DEBUG
int temp_offset, temp_size;
assert(IsSpectrumSpeedlockTrack(track, temp_offset, temp_size));
assert(weak_offset == temp_offset && weak_size == temp_size);
#endif
FluxTrackBuilder fluxbuf(cylhead, DataRate::_250K, Encoding::MFM);
fluxbuf.addTrackStart();
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
for (auto& sector : track)
{
auto& data_copy = sector.data_copy();
auto is_weak{ §or == &track[1] };
if (!is_weak)
fluxbuf.addSector(sector.header, data_copy, 0x54, sector.dam);
else
{
fluxbuf.addSectorUpToData(sector.header, sector.dam);
fluxbuf.addBlock(Data(data_copy.begin(), data_copy.begin() + weak_offset));
fluxbuf.addWeakBlock(weak_size);
fluxbuf.addBlock(Data(
data_copy.begin() + weak_offset + weak_size,
data_copy.begin() + sector.size()));
}
bitbuf.addSector(sector.header, data_copy, 0x2e, sector.dam, is_weak);
// Add duplicate weak sector half way around track.
if (§or == &track[5])
{
auto& sector1{ track[1] };
auto data1{ sector1.data_copy() };
std::fill(data1.begin() + weak_offset, data1.begin() + weak_offset + weak_size, uint8_t(0xee));
bitbuf.addSector(sector1.header, data1, 0x2e, sector1.dam, true);
}
}
TrackData trackdata(cylhead);
trackdata.add(std::move(bitbuf.buffer()));
//trackdata.add(FluxData({ fluxbuf.buffer() }));
return trackdata;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movl %r8d, 0x4(%rsp)
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, 0x20(%rsp)
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x38(%rsp)
movl $0x3d090, %edx # imm = 0x3D090
movl $0x1, %ecx
callq 0x5d8bc
movq %r14, %rdi
xorl %esi, %esi
callq 0x73aa6
leaq 0x50(%rsp), %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x73aa6
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
movq %rax, 0x48(%rsp)
cmpq %rax, %r12
je 0x6d5b4
movslq %ebx, %rax
movq %rax, 0x28(%rsp)
movslq 0x4(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xd0(%rsp), %rbx
movq %r15, 0x40(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %rbp
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
movq %rax, %r13
movzbl 0x20(%r12), %r8d
cmpq %rax, %r12
je 0x6d436
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x54, %ecx
xorl %r9d, %r9d
callq 0x7424a
jmp 0x6d4ea
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
callq 0x74304
movq (%rbp), %rsi
movq 0x28(%rsp), %rax
leaq (%rsi,%rax), %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6d485
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x5d9f8
movq (%rbp), %r14
movq %r12, %rdi
callq 0x6bce0
movq 0x28(%rsp), %rcx
leaq (%r14,%rcx), %rsi
addq 0x30(%rsp), %rsi
movslq %eax, %rdx
addq %r14, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6d4e5
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x40(%rsp), %r15
xorl %r9d, %r9d
cmpq %r13, %r12
sete %r9b
movzbl 0x20(%r12), %r8d
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x2e, %ecx
callq 0x7424a
movq %r15, %rdi
movl $0x5, %esi
callq 0x71416
cmpq %rax, %r12
jne 0x6d5a5
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x6bce6
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x43192
cmpl $0x0, 0x4(%rsp)
je 0x6d56c
movq 0x8(%rsp), %rdi
addq 0x28(%rsp), %rdi
movl $0xee, %esi
movq 0x30(%rsp), %rdx
callq 0x352d0
movzbl 0x20(%r13), %r8d
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
movl $0x2e, %ecx
movl $0x1, %r9d
callq 0x7424a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6d5a5
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
addq $0x40, %r12
cmpq 0x48(%rsp), %r12
jne 0x6d3f3
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x74a78
leaq 0x50(%rsp), %rdi
callq 0x43a4c
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x74cc0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x6d5f7
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x6d614
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x6d62e
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6d64b
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6d664
movq %rax, %rbx
jmp 0x6d6b3
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0x42c00
jmp 0x6d6a9
jmp 0x6d6a6
jmp 0x6d6a6
jmp 0x6d6a6
jmp 0x6d6a6
jmp 0x6d6a6
jmp 0x6d686
jmp 0x6d686
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6d6a9
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6d6a9
jmp 0x6d6a6
jmp 0x6d6a6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x42d48
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6d6d0
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsCpcSpeedlockTrack(Track const&, int&, int&) | bool IsCpcSpeedlockTrack(const Track& track, int& weak_offset, int& weak_size)
{
if (track.size() != 9)
return false;
auto& sector0 = track[0];
auto& sector7 = track[7];
if (sector0.encoding != Encoding::MFM || sector7.encoding != Encoding::MFM ||
sector0.datarate != DataRate::_250K || sector7.datarate != DataRate::_250K ||
sector0.size() != 512 || sector7.size() != 512 ||
sector0.data_size() < 512 || sector7.data_size() < 512 ||
!sector7.has_baddatacrc()) // weak sector
return false;
auto& data0 = sector0.data_copy();
auto& data7 = sector7.data_copy();
// Check for signature in the boot sector
if (memcmp(data0.data() + 257, "SPEEDLOCK", 9) && memcmp(data0.data() + 129, "SPEEDLOCK", 9))
{
// If that's missing, look for a code signature
if (memcmp(data0.data() + 208, "\x4a\x00\x09\x46\x00\x00\x00\x42\x02\x47\x2a\xff", 12) ||
CRC16(data0.data() + 49, 220 - 49) != 0x62c2)
return false;
}
// If there's no common block at the start, assume fully random
// Buggy Boy has only 255, so don't check the full first half!
if (memcmp(data7.data(), data7.data() + 1, (sector7.size() / 2) - 1))
{
// -512
weak_offset = 0;
weak_size = 512;
}
else if (data0[129] == 'S')
{
// =256 -256
weak_offset = 256;
weak_size = 256;
}
else
{
// =256 -33 +47 -176
weak_offset = 336;
weak_size = 32;
}
if (opt.debug) util::cout << "detected CPC Speedlock track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x713fc
cmpl $0x9, %eax
jne 0x6d8db
xorl %ebp, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x71416
movq %rax, %r12
movq %r15, %rdi
movl $0x7, %esi
callq 0x71416
cmpl $0x1, 0x14(%r12)
jne 0x6d8dd
movq %rax, %r15
cmpl $0x1, 0x14(%rax)
jne 0x6d8dd
cmpl $0x3d090, 0x10(%r12) # imm = 0x3D090
jne 0x6d8dd
cmpl $0x3d090, 0x10(%r15) # imm = 0x3D090
jne 0x6d8dd
movq %r12, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6d8db
movq %r15, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6d8db
movq %r12, %rdi
callq 0x6bcbe
cmpl $0x200, %eax # imm = 0x200
jl 0x6d8db
movq %r15, %rdi
callq 0x6bcbe
cmpl $0x200, %eax # imm = 0x200
jl 0x6d8db
movq %r15, %rdi
callq 0x6c14a
testb %al, %al
je 0x6d8db
movabsq $0x434f4c4445455053, %rbp # imm = 0x434F4C4445455053
movq %r12, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %r12
movq %r15, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %r13
movq (%r12), %rsi
movq 0x101(%rsi), %rax
xorq %rbp, %rax
movzbl 0x109(%rsi), %ecx
xorq $0x4b, %rcx
orq %rax, %rcx
je 0x6d85a
xorq 0x81(%rsi), %rbp
movzbl 0x89(%rsi), %eax
xorq $0x4b, %rax
orq %rbp, %rax
je 0x6d85a
movabsq $0x420000004609004a, %rax # imm = 0x420000004609004A
xorq 0xd0(%rsi), %rax
movl 0xd8(%rsi), %ecx
movl $0xff2a4702, %edx # imm = 0xFF2A4702
xorq %rcx, %rdx
orq %rax, %rdx
jne 0x6d8db
addq $0x31, %rsi
leaq 0x6(%rsp), %rbp
movl $0xab, %edx
movq %rbp, %rdi
movl $0xffff, %ecx # imm = 0xFFFF
callq 0x53510
movq %rbp, %rdi
callq 0x535b4
movzwl %ax, %eax
cmpl $0x62c2, %eax # imm = 0x62C2
jne 0x6d8db
movq (%r13), %r13
leaq 0x1(%r13), %rbp
movq %r15, %rdi
callq 0x6bce0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
decl %ecx
movslq %ecx, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x355f0
movl $0x200, %ecx # imm = 0x200
testl %eax, %eax
movl $0x0, %edx
jne 0x6d8b1
movq (%r12), %rax
cmpb $0x53, 0x81(%rax)
movl $0x100, %eax # imm = 0x100
movl $0x150, %edx # imm = 0x150
cmovel %eax, %edx
movl $0x20, %ecx
cmovel %eax, %ecx
movl %edx, (%r14)
movl %ecx, (%rbx)
leaq 0x71e83(%rip), %rax # 0xdf740
movb $0x1, %bpl
cmpl $0x0, 0x74(%rax)
je 0x6d8dd
leaq 0x729e3(%rip), %rdi # 0xe02b0
leaq 0x428cc(%rip), %rsi # 0xb01a0
callq 0x6f27b
jmp 0x6d8dd
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateCpcSpeedlockTrack(CylHead const&, Track const&, int, int) | TrackData GenerateCpcSpeedlockTrack(const CylHead& cylhead, const Track& track, int weak_offset, int weak_size)
{
#ifdef _DEBUG
int temp_offset, temp_size;
assert(IsCpcSpeedlockTrack(track, temp_offset, temp_size));
assert(weak_offset == temp_offset && weak_size == temp_size);
#endif
FluxTrackBuilder fluxbuf(cylhead, DataRate::_250K, Encoding::MFM);
fluxbuf.addTrackStart();
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
for (auto& sector : track)
{
auto& data_copy = sector.data_copy();
auto is_weak{ §or == &track[7] };
if (!is_weak)
fluxbuf.addSector(sector.header, data_copy, 0x54, sector.dam);
else
{
fluxbuf.addSectorUpToData(sector.header, sector.dam);
fluxbuf.addBlock(Data(data_copy.begin(), data_copy.begin() + weak_offset));
fluxbuf.addWeakBlock(weak_size);
fluxbuf.addBlock(Data(
data_copy.begin() + weak_offset + weak_size,
data_copy.begin() + sector.size()));
}
bitbuf.addSector(sector.header, data_copy, 0x2e, sector.dam, is_weak);
// Add duplicate weak sector half way around track.
if (§or == &track[1])
{
auto& sector7{ track[7] };
auto data7{ sector7.data_copy() };
std::fill(data7.begin() + weak_offset, data7.begin() + weak_offset + weak_size, uint8_t(0xee));
bitbuf.addSector(sector7.header, data7, 0x2e, sector7.dam, true);
}
}
TrackData trackdata(cylhead);
trackdata.add(std::move(bitbuf.buffer()));
//trackdata.add(FluxData({ fluxbuf.buffer() }));
return trackdata;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movl %r8d, 0x4(%rsp)
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, 0x20(%rsp)
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x38(%rsp)
movl $0x3d090, %edx # imm = 0x3D090
movl $0x1, %ecx
callq 0x5d8bc
movq %r14, %rdi
xorl %esi, %esi
callq 0x73aa6
leaq 0x50(%rsp), %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x73aa6
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
movq %rax, 0x48(%rsp)
cmpq %rax, %r12
je 0x6db4d
movslq %ebx, %rax
movq %rax, 0x28(%rsp)
movslq 0x4(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xd0(%rsp), %rbx
movq %r15, 0x40(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %rbp
movq %r15, %rdi
movl $0x7, %esi
callq 0x71416
movq %rax, %r13
movzbl 0x20(%r12), %r8d
cmpq %rax, %r12
je 0x6d9cf
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x54, %ecx
xorl %r9d, %r9d
callq 0x7424a
jmp 0x6da83
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
callq 0x74304
movq (%rbp), %rsi
movq 0x28(%rsp), %rax
leaq (%rsi,%rax), %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6da1e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x5d9f8
movq (%rbp), %r14
movq %r12, %rdi
callq 0x6bce0
movq 0x28(%rsp), %rcx
leaq (%r14,%rcx), %rsi
addq 0x30(%rsp), %rsi
movslq %eax, %rdx
addq %r14, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6da7e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x40(%rsp), %r15
xorl %r9d, %r9d
cmpq %r13, %r12
sete %r9b
movzbl 0x20(%r12), %r8d
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x2e, %ecx
callq 0x7424a
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
cmpq %rax, %r12
jne 0x6db3e
movq %r15, %rdi
movl $0x7, %esi
callq 0x71416
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x6bce6
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x43192
cmpl $0x0, 0x4(%rsp)
je 0x6db05
movq 0x8(%rsp), %rdi
addq 0x28(%rsp), %rdi
movl $0xee, %esi
movq 0x30(%rsp), %rdx
callq 0x352d0
movzbl 0x20(%r13), %r8d
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
movl $0x2e, %ecx
movl $0x1, %r9d
callq 0x7424a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6db3e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
addq $0x40, %r12
cmpq 0x48(%rsp), %r12
jne 0x6d98c
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x74a78
leaq 0x50(%rsp), %rdi
callq 0x43a4c
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x74cc0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x6db90
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x6dbad
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x6dbc7
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6dbe4
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6dbfd
movq %rax, %rbx
jmp 0x6dc4c
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0x42c00
jmp 0x6dc42
jmp 0x6dc3f
jmp 0x6dc3f
jmp 0x6dc3f
jmp 0x6dc3f
jmp 0x6dc3f
jmp 0x6dc1f
jmp 0x6dc1f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6dc42
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6dc42
jmp 0x6dc3f
jmp 0x6dc3f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x42d48
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6dc69
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsRainbowArtsTrack(Track const&, int&, int&) | bool IsRainbowArtsTrack(const Track& track, int& weak_offset, int& weak_size)
{
if (track.size() != 9)
return false;
auto& sector1 = track[1];
auto& sector3 = track[3];
if (sector1.encoding != Encoding::MFM || sector3.encoding != Encoding::MFM ||
sector1.datarate != DataRate::_250K || sector3.datarate != DataRate::_250K ||
sector1.size() != 512 || sector3.size() != 512 ||
sector1.data_size() < 512 || sector3.data_size() < 512 ||
sector1.header.sector != 198 || !sector1.has_baddatacrc()) // weak sector 198
return false;
auto& data3 = sector3.data_copy();
// Check for code signature at the start of the 4th sector
if (memcmp(data3.data(), "\x2a\x6d\xa7\x01\x30\x01\xaf\xed\x42\x4d\x44\x21\x70\x01", 14))
return false;
// The first 100 bytes are constant
weak_offset = 100; // =100 -258 +151 -3
weak_size = 256;
if (opt.debug) util::cout << "detected Rainbow Arts weak sector track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x713fc
cmpl $0x9, %eax
jne 0x6dcfe
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
movq %rax, %r12
movq %r15, %rdi
movl $0x3, %esi
callq 0x71416
xorl %ebp, %ebp
cmpl $0x1, 0x14(%r12)
jne 0x6dd00
movq %rax, %r15
cmpl $0x1, 0x14(%rax)
jne 0x6dd00
cmpl $0x3d090, 0x10(%r12) # imm = 0x3D090
jne 0x6dd00
cmpl $0x3d090, 0x10(%r15) # imm = 0x3D090
jne 0x6dd00
movq %r12, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6dcfe
movq %r15, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6dcfe
movq %r12, %rdi
callq 0x6bcbe
cmpl $0x200, %eax # imm = 0x200
jge 0x6dd0b
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x6bcbe
xorl %ebp, %ebp
cmpl $0x200, %eax # imm = 0x200
jl 0x6dd00
cmpl $0xc6, 0x8(%r12)
jne 0x6dd00
movq %r12, %rdi
callq 0x6c14a
testb %al, %al
je 0x6dcfe
movq %r15, %rdi
xorl %esi, %esi
callq 0x6bce6
movq (%rax), %rax
movabsq $-0x1250fecffe5892d6, %rcx # imm = 0xEDAF013001A76D2A
xorq (%rax), %rcx
movabsq $0x17021444d42edaf, %rdx # imm = 0x17021444D42EDAF
xorq 0x6(%rax), %rdx
orq %rcx, %rdx
sete %bpl
jne 0x6dd00
movl $0x64, (%r14)
movl $0x100, (%rbx) # imm = 0x100
leaq 0x719c8(%rip), %rax # 0xdf740
movb $0x1, %bpl
cmpl $0x0, 0x74(%rax)
je 0x6dd00
leaq 0x72524(%rip), %rdi # 0xe02b0
leaq 0x4243a(%rip), %rsi # 0xb01cd
callq 0x6f2e4
jmp 0x6dd00
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateRainbowArtsTrack(CylHead const&, Track const&, int, int) | TrackData GenerateRainbowArtsTrack(const CylHead& cylhead, const Track& track, int weak_offset, int weak_size)
{
#ifdef _DEBUG
int temp_offset, temp_size;
assert(IsRainbowArtsTrack(track, temp_offset, temp_size));
assert(weak_offset == temp_offset && weak_size == temp_size);
#endif
FluxTrackBuilder fluxbuf(cylhead, DataRate::_250K, Encoding::MFM);
fluxbuf.addTrackStart();
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
for (auto& sector : track)
{
auto& data_copy = sector.data_copy();
auto is_weak{ §or == &track[1] };
if (!is_weak)
fluxbuf.addSector(sector.header, data_copy, 0x54, sector.dam);
else
{
fluxbuf.addSectorUpToData(sector.header, sector.dam);
fluxbuf.addBlock(Data(data_copy.begin(), data_copy.begin() + weak_offset));
fluxbuf.addWeakBlock(weak_size);
fluxbuf.addBlock(Data(
data_copy.begin() + weak_offset + weak_size,
data_copy.begin() + sector.size()));
}
bitbuf.addSector(sector.header, data_copy, 0x2e, sector.dam, is_weak);
// Add duplicate weak sector half way around track.
if (§or == &track[5])
{
// Add a duplicate of the weak sector, with different data from the weak position
auto& sector1{ track[1] };
auto data1{ sector1.data_copy() };
std::fill(data1.begin() + weak_offset, data1.begin() + weak_offset + weak_size, uint8_t(0xee));
bitbuf.addSector(sector1.header, data1, 0x2e, sector1.dam, true);
}
}
TrackData trackdata(cylhead);
trackdata.add(std::move(bitbuf.buffer()));
//trackdata.add(FluxData({ fluxbuf.buffer() }));
return trackdata;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movl %r8d, 0x4(%rsp)
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, 0x20(%rsp)
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x38(%rsp)
movl $0x3d090, %edx # imm = 0x3D090
movl $0x1, %ecx
callq 0x5d8bc
movq %r14, %rdi
xorl %esi, %esi
callq 0x73aa6
leaq 0x50(%rsp), %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x73aa6
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
movq %rax, 0x48(%rsp)
cmpq %rax, %r12
je 0x6dffc
movslq %ebx, %rax
movq %rax, 0x28(%rsp)
movslq 0x4(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xd0(%rsp), %rbx
movq %r15, 0x40(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %rbp
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
movq %rax, %r13
movzbl 0x20(%r12), %r8d
cmpq %rax, %r12
je 0x6de7e
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x54, %ecx
xorl %r9d, %r9d
callq 0x7424a
jmp 0x6df32
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
callq 0x74304
movq (%rbp), %rsi
movq 0x28(%rsp), %rax
leaq (%rsi,%rax), %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6decd
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x5d9f8
movq (%rbp), %r14
movq %r12, %rdi
callq 0x6bce0
movq 0x28(%rsp), %rcx
leaq (%r14,%rcx), %rsi
addq 0x30(%rsp), %rsi
movslq %eax, %rdx
addq %r14, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0x3(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6df2d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x40(%rsp), %r15
xorl %r9d, %r9d
cmpq %r13, %r12
sete %r9b
movzbl 0x20(%r12), %r8d
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x2e, %ecx
callq 0x7424a
movq %r15, %rdi
movl $0x5, %esi
callq 0x71416
cmpq %rax, %r12
jne 0x6dfed
movq %r15, %rdi
movl $0x1, %esi
callq 0x71416
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x6bce6
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x43192
cmpl $0x0, 0x4(%rsp)
je 0x6dfb4
movq 0x8(%rsp), %rdi
addq 0x28(%rsp), %rdi
movl $0xee, %esi
movq 0x30(%rsp), %rdx
callq 0x352d0
movzbl 0x20(%r13), %r8d
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
movl $0x2e, %ecx
movl $0x1, %r9d
callq 0x7424a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6dfed
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
addq $0x40, %r12
cmpq 0x48(%rsp), %r12
jne 0x6de3b
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x74a78
leaq 0x50(%rsp), %rdi
callq 0x43a4c
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x74cc0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x6e03f
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x6e05c
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x6e076
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6e093
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e0ac
movq %rax, %rbx
jmp 0x6e0fb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0x42c00
jmp 0x6e0f1
jmp 0x6e0ee
jmp 0x6e0ee
jmp 0x6e0ee
jmp 0x6e0ee
jmp 0x6e0ee
jmp 0x6e0ce
jmp 0x6e0ce
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e0f1
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6e0f1
jmp 0x6e0ee
jmp 0x6e0ee
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x42d48
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x6e118
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsKBIWeakSectorTrack(Track const&, int&, int&) | bool IsKBIWeakSectorTrack(const Track& track, int& weak_offset, int& weak_size)
{
auto sectors = track.size();
// Most titles use the 10-sector version, but some have 3x2K sectors.
int size_code;
if (sectors == 3)
size_code = 4;
else if (sectors == 10)
size_code = 2;
else
return false;
// Weak sector is always last on track and 256 bytes
auto& sectorW = track[sectors - 1];
if (sectorW.encoding != Encoding::MFM ||
sectorW.datarate != DataRate::_250K ||
sectorW.header.size != 1 ||
sectorW.data_size() < 256 ||
!sectorW.has_baddatacrc())
{
return false;
}
// The remaining sector must be the correct type and size code.
for (int i = 0; i < sectors - 1; ++i)
{
auto& sector = track[i];
if (sector.encoding != Encoding::MFM ||
sector.datarate != DataRate::_250K ||
sector.header.size != size_code ||
sector.data_size() < Sector::SizeCodeToLength(size_code))
{
return false;
}
}
auto& dataW = sectorW.data_copy();
// The first character of the weak sector is 'K', and the next two are alphabetic.
if (dataW[0] != 'K' ||
!std::isalpha(static_cast<uint8_t>(dataW[1])) ||
!std::isalpha(static_cast<uint8_t>(dataW[2])))
{
return false;
}
// =4 -4 =124 -4 =120
weak_offset = 4;
weak_size = 4;
if (opt.debug) util::cout << "detected KBI weak sector track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x713fc
movl %eax, %r14d
cmpl $0x3, %eax
je 0x6e15f
cmpl $0xa, %r14d
jne 0x6e284
movq %r12, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl $0x2, %ebp
jmp 0x6e16e
movq %r12, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl $0x4, %ebp
leal -0x1(%r14), %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x71416
xorl %r12d, %r12d
cmpl $0x1, 0x14(%rax)
jne 0x6e287
movq %rax, %rbx
cmpl $0x3d090, 0x10(%rax) # imm = 0x3D090
jne 0x6e287
cmpl $0x1, 0xc(%rbx)
jne 0x6e287
movq %rbx, %rdi
callq 0x6bcbe
cmpl $0x100, %eax # imm = 0x100
jl 0x6e284
movq %rbx, %rdi
callq 0x6c14a
testb %al, %al
je 0x6e284
cmpl $0x2, %r14d
jl 0x6e21d
xorl %r14d, %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0x71416
xorl %r12d, %r12d
cmpl $0x1, 0x14(%rax)
jne 0x6e287
cmpl $0x3d090, 0x10(%rax) # imm = 0x3D090
jne 0x6e287
cmpl %ebp, 0xc(%rax)
jne 0x6e287
movq %rax, %rdi
callq 0x6bcbe
movl %eax, %r12d
movl %ebp, %edi
callq 0x6c57a
cmpl %eax, %r12d
jl 0x6e284
incl %r14d
cmpl %r14d, %r13d
jne 0x6e1d0
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6bce6
movq (%rax), %rbx
cmpb $0x4b, (%rbx)
jne 0x6e287
movzbl 0x1(%rbx), %edi
callq 0x35950
testl %eax, %eax
je 0x6e284
movzbl 0x2(%rbx), %edi
callq 0x35950
testl %eax, %eax
je 0x6e284
movl $0x4, %eax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x714da(%rip), %rax # 0xdf740
movb $0x1, %r12b
cmpl $0x0, 0x74(%rax)
je 0x6e287
leaq 0x7203a(%rip), %rdi # 0xe02b0
leaq 0x41f79(%rip), %rsi # 0xb01f6
callq 0x692b3
jmp 0x6e287
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateKBIWeakSectorTrack(CylHead const&, Track const&, int, int) | TrackData GenerateKBIWeakSectorTrack(const CylHead& cylhead, const Track& track, int weak_offset, int weak_size)
{
#ifdef _DEBUG
int temp_offset, temp_size;
assert(IsKBIWeakSectorTrack(track, temp_offset, temp_size));
assert(weak_offset == temp_offset && weak_size == temp_size);
#endif
FluxTrackBuilder fluxbuf(cylhead, DataRate::_250K, Encoding::MFM);
fluxbuf.addTrackStart();
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
auto sectors = track.size();
for (auto& sector : track)
{
auto& data_copy = sector.data_copy();
auto is_weak = sector.header.size == 1;
if (!is_weak)
fluxbuf.addSector(sector.header, data_copy, 0x54, sector.dam);
else
{
fluxbuf.addSectorUpToData(sector.header, sector.dam);
fluxbuf.addBlock(Data(data_copy.begin(), data_copy.begin() + weak_offset));
fluxbuf.addWeakBlock(weak_size);
fluxbuf.addBlock(Data(
data_copy.begin() + weak_offset + weak_size,
data_copy.begin() + sector.size()));
}
bitbuf.addSector(sector.header, data_copy, 1, sector.dam, is_weak);
// Insert the duplicate sector earlier on the track.
if (§or == &track[((sectors - 1) / 2) - 1])
{
auto& sectorW = track[sectors - 1];
auto dataW{ sectorW.data_copy() };
std::fill(dataW.begin() + weak_offset, dataW.begin() + weak_offset + weak_size, uint8_t(0xee));
bitbuf.addSector(sectorW.header, dataW, 1, sectorW.dam, true);
}
}
TrackData trackdata(cylhead);
trackdata.add(std::move(bitbuf.buffer()));
//trackdata.add(FluxData({ fluxbuf.buffer() }));
return trackdata;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movl %r8d, 0xc(%rsp)
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, 0x10(%rsp)
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x58(%rsp)
movl $0x3d090, %edx # imm = 0x3D090
movl $0x1, %ecx
callq 0x5d8bc
movq %r14, %rdi
xorl %esi, %esi
callq 0x73aa6
leaq 0x60(%rsp), %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x73aa6
movq %r15, %rdi
callq 0x713fc
movq 0x8(%r15), %r13
movq %r15, 0x50(%rsp)
movq 0x10(%r15), %r12
cmpq %r12, %r13
je 0x6e50e
movslq %ebx, %rcx
movq %rcx, 0x30(%rsp)
movslq 0xc(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movl %eax, %ecx
decl %ecx
movl %ecx, 0x3c(%rsp)
shrl $0x1f, %ecx
addl %ecx, %eax
decl %eax
sarl %eax
decl %eax
movl %eax, 0x40(%rsp)
leaq 0xe0(%rsp), %r15
leaq 0x18(%rsp), %r14
leaq 0x60(%rsp), %rbx
movq %r13, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rax, %rbp
movl 0xc(%r13), %eax
movzbl 0x20(%r13), %r8d
movl %eax, 0x44(%rsp)
cmpl $0x1, %eax
jne 0x6e439
movq %r15, %rdi
movq %r13, %rsi
movl %r8d, %edx
callq 0x74304
movq (%rbp), %rsi
movq 0x30(%rsp), %rax
leaq (%rsi,%rax), %rdx
movq %r14, %rdi
leaq 0xb(%rsp), %rcx
callq 0x6f45a
movq %r15, %rdi
movq %r14, %rsi
callq 0x7379a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6e3c8
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %r15, %rdi
movl 0xc(%rsp), %esi
callq 0x5d9f8
movq %r15, %rbx
movq %r12, %r15
movq (%rbp), %r12
movq %r13, %rdi
callq 0x6bce0
movq 0x30(%rsp), %rcx
leaq (%r12,%rcx), %rsi
addq 0x48(%rsp), %rsi
movslq %eax, %rdx
addq %r12, %rdx
movq %r14, %r12
movq %r14, %rdi
leaq 0xb(%rsp), %rcx
callq 0x6f45a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7379a
movq %r15, %r12
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6e42f
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %r15
leaq 0x60(%rsp), %rbx
jmp 0x6e44f
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x54, %ecx
xorl %r9d, %r9d
callq 0x7424a
xorl %r9d, %r9d
cmpl $0x1, 0x44(%rsp)
sete %r9b
movzbl 0x20(%r13), %r8d
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x7424a
movq 0x50(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x71416
cmpq %rax, %r13
jne 0x6e501
movq 0x50(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x71416
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %r14, %rdi
movq %rax, %rsi
callq 0x43192
cmpl $0x0, 0xc(%rsp)
je 0x6e4cc
movq 0x18(%rsp), %rdi
addq 0x30(%rsp), %rdi
movl $0xee, %esi
movq 0x48(%rsp), %rdx
callq 0x352d0
movzbl 0x20(%rbp), %r8d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x7424a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6e501
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
addq $0x40, %r13
cmpq %r12, %r13
jne 0x6e35b
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x74a78
leaq 0x60(%rsp), %rdi
callq 0x43a4c
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x74cc0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x6e551
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x6e56e
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x6e58b
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x6e5a8
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x10(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e605
jmp 0x6e5c3
movq %rax, %rbx
jmp 0x6e612
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x42c00
jmp 0x6e608
jmp 0x6e605
jmp 0x6e605
jmp 0x6e5e5
jmp 0x6e5e5
jmp 0x6e605
jmp 0x6e605
jmp 0x6e605
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6e608
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6e608
jmp 0x6e605
jmp 0x6e605
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x42d48
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x6e62f
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsLogoProfTrack(Track const&) | bool IsLogoProfTrack(const Track& track)
{
// Accept track with or without placeholder sector
if (track.size() != 10 && track.size() != 11)
return false;
// First non-placeholder sector id.
int id = 2;
for (auto& s : track)
{
// Check for placeholder sector, present in old EDSK images.
if (track.size() == 11 && s.header.sector == 1)
{
// It must have a bad ID header CRC.
if (s.has_badidcrc())
continue;
else
return false;
}
// Ensure each sector is double-density MFM, 512-bytes, with good data
if (s.datarate != DataRate::_250K || s.encoding != Encoding::MFM ||
s.header.sector != id++ || s.size() != 512 || !s.has_good_data())
return false;
}
// If there's no placeholder, the first sector must begin late
if (track.size() == 10)
{
// Determine an offset considered late
auto min_offset = Sector::SizeCodeToLength(1) + GetSectorOverhead(Encoding::MFM);
// Reject if first sector doesn't start late on the track
if (track[0].offset < (min_offset * 16))
return false;
}
if (opt.debug) util::cout << "detected Logo Professor track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x713fc
cmpl $0xa, %eax
je 0x6e660
movq %rbx, %rdi
callq 0x713fc
cmpl $0xb, %eax
jne 0x6e756
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r15
cmpq %r15, %r14
je 0x6e6f2
movl $0x2, %r12d
movq %rbx, %rdi
callq 0x713fc
movl 0x8(%r14), %ecx
cmpl $0xb, %eax
jne 0x6e6a1
cmpl $0x1, %ecx
jne 0x6e6a1
movq %r14, %rdi
callq 0x6c11a
movzbl %al, %eax
leal 0x1(,%rax,2), %ebp
jmp 0x6e6e0
cmpl $0x3d090, 0x10(%r14) # imm = 0x3D090
movl $0x1, %ebp
jne 0x6e6e0
cmpl $0x1, 0x14(%r14)
jne 0x6e6e0
leal 0x1(%r12), %r13d
cmpl %r12d, %ecx
jne 0x6e6dd
movq %r14, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6e6dd
movq %r14, %rdi
callq 0x6c11e
xorb $0x1, %al
movzbl %al, %ebp
movl %r13d, %r12d
cmpl $0x3, %ebp
je 0x6e6e9
testl %ebp, %ebp
jne 0x6e756
addq $0x40, %r14
cmpq %r15, %r14
jne 0x6e677
movq %rbx, %rdi
callq 0x713fc
cmpl $0xa, %eax
jne 0x6e731
movl $0x1, %edi
callq 0x6c57a
movl %eax, %ebp
movl $0x1, %edi
callq 0x60857
movl %eax, %r14d
addl %ebp, %r14d
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x71416
shll $0x4, %r14d
cmpl %r14d, 0x18(%rax)
jl 0x6e758
leaq 0x71008(%rip), %rax # 0xdf740
movb $0x1, %bpl
cmpl $0x0, 0x74(%rax)
je 0x6e758
leaq 0x71b68(%rip), %rdi # 0xe02b0
leaq 0x41ac7(%rip), %rsi # 0xb0216
callq 0x4fdc8
jmp 0x6e758
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateLogoProfTrack(CylHead const&, Track const&) | TrackData GenerateLogoProfTrack(const CylHead& cylhead, const Track& track)
{
assert(IsLogoProfTrack(track));
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
bitbuf.addGap(600);
for (auto& sector : track)
{
if (sector.header.sector != 1)
bitbuf.addSector(sector, 0x20);
}
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6e637
testb %al, %al
je 0x6e863
movq %rsp, %r12
movq %r12, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r12, %rdi
xorl %esi, %esi
callq 0x73aa6
movq %rsp, %rdi
movl $0x258, %esi # imm = 0x258
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x73868
movq 0x8(%r15), %r12
movq 0x10(%r15), %r13
cmpq %r13, %r12
je 0x6e7f4
movq %rsp, %r15
cmpl $0x1, 0x8(%r12)
je 0x6e7eb
movq %r15, %rdi
movq %r12, %rsi
movl $0x20, %edx
callq 0x73e18
addq $0x40, %r12
cmpq %r13, %r12
jne 0x6e7d3
movq %rsp, %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x6e821
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6e838
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6e84f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x419cb(%rip), %rdi # 0xb0235
leaq 0x41790(%rip), %rsi # 0xb0001
leaq 0x419d4(%rip), %rcx # 0xb024c
movl $0x251, %edx # imm = 0x251
callq 0x35380
jmp 0x6e884
movq %rax, %rbx
movq %rsp, %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsOperaSoftTrack(Track const&) | bool IsOperaSoftTrack(const Track& track)
{
uint32_t sector_mask = 0;
int i = 0;
if (track.size() != 9)
return false;
for (auto& s : track)
{
if (s.datarate != DataRate::_250K || s.encoding != Encoding::MFM)
return false;
static const uint8_t sizes[] = { 1,1,1,1,1,1,1,1,8 };
if (s.header.size != sizes[i++])
return false;
sector_mask |= (1 << s.header.sector);
}
// Sectors must be numbered 0 to 8
if (sector_mask != ((1 << 9) - 1))
return false;
if (opt.debug) util::cout << "detected OperaSoft track with 32K sector\n";
return true;
} | pushq %rbx
movq %rdi, %rbx
callq 0x713fc
cmpl $0x9, %eax
jne 0x6e942
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
sete %sil
je 0x6e942
leaq 0x41be1(%rip), %rdi # 0xb04a8
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpl $0x3d090, 0x10(%rcx) # imm = 0x3D090
jne 0x6e8fd
cmpl $0x1, 0x14(%rcx)
jne 0x6e8fd
movslq %r8d, %r9
incl %r8d
movzbl (%r9,%rdi), %r9d
cmpl %r9d, 0xc(%rcx)
jne 0x6e8fa
movb 0x8(%rcx), %r9b
btsl %r9d, %eax
movb $0x1, %r9b
jmp 0x6e8fd
xorl %r9d, %r9d
testb %r9b, %r9b
je 0x6e90f
addq $0x40, %rcx
cmpq %rdx, %rcx
sete %sil
jne 0x6e8ca
xorl %ebx, %ebx
testb $0x1, %sil
je 0x6e944
cmpl $0x1ff, %eax # imm = 0x1FF
jne 0x6e944
leaq 0x70e1b(%rip), %rax # 0xdf740
movb $0x1, %bl
cmpl $0x0, 0x74(%rax)
je 0x6e944
leaq 0x7197c(%rip), %rdi # 0xe02b0
leaq 0x41951(%rip), %rsi # 0xb028c
callq 0x3feb9
jmp 0x6e944
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GenerateOperaSoftTrack(CylHead const&, Track const&) | TrackData GenerateOperaSoftTrack(const CylHead& cylhead, const Track& track)
{
assert(IsOperaSoftTrack(track));
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
for (auto& sector : track)
{
if (sector.header.sector != 8)
bitbuf.addSector(sector, 0xf0);
else
{
auto& sector7 = track[7];
auto& sector8 = track[8];
bitbuf.addSectorUpToData(sector8.header, sector8.dam);
bitbuf.addBlock(Data(256, 0x55));
bitbuf.addCrc(4 + 256);
bitbuf.addBlock(Data(0x512 - 256 - 2, 0x4e));
bitbuf.addBlock(sector7.data_copy());
}
}
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6e897
testb %al, %al
je 0x6eb7c
movq %r14, 0x18(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r14, %rdi
xorl %esi, %esi
callq 0x73aa6
movq %rbx, 0x20(%rsp)
movq 0x8(%r15), %r12
movq 0x10(%r15), %rbx
cmpq %rbx, %r12
je 0x6eb00
leaq 0x28(%rsp), %r13
cmpl $0x8, 0x8(%r12)
jne 0x6eae3
movq %r15, %rdi
movl $0x7, %esi
callq 0x71416
movq %rax, %r14
movq %r15, %rdi
movl $0x8, %esi
callq 0x71416
movzbl 0x20(%rax), %edx
movq %r13, %rdi
movq %rax, %rsi
callq 0x74304
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x100, %edi # imm = 0x100
callq 0x355b0
movq %rax, (%rsp)
movq %rax, 0x8(%rsp)
movq %rax, %rbp
addq $0x100, %rbp # imm = 0x100
movq %rbp, 0x10(%rsp)
movl $0x100, %edx # imm = 0x100
movq %rax, %rdi
movl $0x55, %esi
callq 0x352d0
movq %rbp, 0x8(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x7379a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6ea55
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %r13, %rdi
movl $0x104, %esi # imm = 0x104
callq 0x43972
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x410, %edi # imm = 0x410
callq 0x355b0
movq %rax, (%rsp)
movq %rax, 0x8(%rsp)
movq %rax, %rbp
addq $0x410, %rbp # imm = 0x410
movq %rbp, 0x10(%rsp)
movl $0x410, %edx # imm = 0x410
movq %rax, %rdi
movl $0x4e, %esi
callq 0x352d0
movq %rbp, 0x8(%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x7379a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6eacc
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %r14, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %r13, %rdi
movq %rax, %rsi
callq 0x7379a
jmp 0x6eaf3
movq %r13, %rdi
movq %r12, %rsi
movl $0xf0, %edx
callq 0x73e18
addq $0x40, %r12
cmpq %rbx, %r12
jne 0x6e9b3
leaq 0x28(%rsp), %rdi
callq 0x43a4c
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x6eb39
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x6eb50
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x6eb67
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41733(%rip), %rdi # 0xb02b6
leaq 0x41477(%rip), %rsi # 0xb0001
leaq 0x4173d(%rip), %rcx # 0xb02ce
movl $0x281, %edx # imm = 0x281
callq 0x35380
jmp 0x6ebc2
jmp 0x6ebc2
jmp 0x6eba1
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6ebc5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
jmp 0x6ebc5
jmp 0x6ebc2
jmp 0x6ebc2
jmp 0x6ebc2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
Is8KSectorTrack(Track const&) | bool Is8KSectorTrack(const Track& track)
{
// There must only be 1 sector.
if (track.size() != 1)
return false;
auto& sector{ track[0] };
if (sector.datarate != DataRate::_250K || sector.encoding != Encoding::MFM ||
sector.size() != 8192 || !sector.has_data())
return false;
if (opt.debug) util::cout << "detected 8K sector track\n";
return true;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x713fc
cmpl $0x1, %eax
jne 0x6ec45
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x71416
cmpl $0x3d090, 0x10(%rax) # imm = 0x3D090
jne 0x6ec47
movq %rax, %r14
cmpl $0x1, 0x14(%rax)
jne 0x6ec47
movq %r14, %rdi
callq 0x6bce0
cmpl $0x2000, %eax # imm = 0x2000
jne 0x6ec45
movq %r14, %rdi
callq 0x6c302
testb %al, %al
je 0x6ec45
leaq 0x70b18(%rip), %rax # 0xdf740
movb $0x1, %bl
cmpl $0x0, 0x74(%rax)
je 0x6ec47
leaq 0x71679(%rip), %rdi # 0xe02b0
leaq 0x416d1(%rip), %rsi # 0xb030f
callq 0x40b27
jmp 0x6ec47
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
Generate8KSectorTrack(CylHead const&, Track const&) | TrackData Generate8KSectorTrack(const CylHead& cylhead, const Track& track)
{
assert(Is8KSectorTrack(track));
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addGap(16); // gap 4a
bitbuf.addIAM();
bitbuf.addGap(16); // gap 1
auto& sector{ track[0] };
bitbuf.addSectorUpToData(sector.header, sector.dam);
// Maximum size of long-track version used by Coin-Op Hits
static constexpr auto max_size{ 0x18a3 };
auto data = sector.data_copy();
if (data.size() > max_size)
data.resize(max_size);
bitbuf.addBlock(data);
bitbuf.addGap(max_size - data.size());
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6ebd7
testb %al, %al
je 0x6edbb
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r12, %rdi
movl $0x10, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x73868
leaq 0x18(%rsp), %rdi
callq 0x7398e
leaq 0x18(%rsp), %rdi
movl $0x10, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x73868
movq %r15, %rdi
xorl %esi, %esi
callq 0x71416
movq %rax, %r15
movzbl 0x20(%rax), %edx
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x74304
movq %r15, %rdi
xorl %esi, %esi
callq 0x6bce6
movq %rsp, %rdi
movq %rax, %rsi
callq 0x43192
movl 0x8(%rsp), %eax
subl (%rsp), %eax
cmpl $0x18a4, %eax # imm = 0x18A4
jl 0x6ed0d
movq %rsp, %rdi
movl $0x18a3, %esi # imm = 0x18A3
callq 0x38b2c
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x7379a
movl (%rsp), %esi
subl 0x8(%rsp), %esi
addl $0x18a3, %esi # imm = 0x18A3
leaq 0x18(%rsp), %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x73868
leaq 0x18(%rsp), %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74c12
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6ed64
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x6ed7b
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x6ed92
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6eda9
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x41567(%rip), %rdi # 0xb0329
leaq 0x41238(%rip), %rsi # 0xb0001
leaq 0x41570(%rip), %rcx # 0xb0340
movl $0x2ae, %edx # imm = 0x2AE
callq 0x35380
jmp 0x6edde
jmp 0x6edde
movq %rax, %rbx
jmp 0x6edfc
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6edfc
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
leaq 0x18(%rsp), %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
IsPrehistorikTrack(Track const&) | bool IsPrehistorikTrack(const Track& track)
{
bool found_12{ false };
for (auto& s : track.sectors())
{
if (s.datarate != DataRate::_250K || s.encoding != Encoding::MFM ||
s.header.size != (s.has_baddatacrc() ? 5 : 2))
return false;
// The 4K sector 12 contains the protection signature.
if (s.header.sector == 12 && s.header.size == 5)
{
found_12 = true;
auto& data12 = s.data_copy();
if (memcmp(data12.data() + 0x1b, "Titus", 5))
return false;
}
}
if (!found_12)
return false;
if (opt.debug) util::cout << "detected Prehistorik track\n";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x7140a
movq (%rax), %r14
movq 0x8(%rax), %r15
cmpq %r15, %r14
sete %bl
je 0x6eeac
xorl %r12d, %r12d
movl $0x75746954, %ebp # imm = 0x75746954
xorl %eax, %eax
cmpl $0x3d090, 0x10(%r14) # imm = 0x3D090
jne 0x6ee97
cmpl $0x1, 0x14(%r14)
jne 0x6ee97
movl 0xc(%r14), %r13d
movq %r14, %rdi
callq 0x6c14a
movzbl %al, %eax
leal (%rax,%rax,2), %eax
addl $0x2, %eax
cmpl %eax, %r13d
jne 0x6ee95
cmpl $0xc, 0x8(%r14)
movb $0x1, %al
jne 0x6ee97
cmpl $0x5, 0xc(%r14)
jne 0x6ee97
movq %r14, %rdi
xorl %esi, %esi
callq 0x6bce6
movq (%rax), %rax
movl 0x1b(%rax), %ecx
xorl %ebp, %ecx
movzbl 0x1f(%rax), %eax
xorl $0x73, %eax
orl %ecx, %eax
sete %al
movb $0x1, %r12b
jmp 0x6ee97
xorl %eax, %eax
testb %al, %al
je 0x6eea7
addq $0x40, %r14
cmpq %r15, %r14
sete %bl
jne 0x6ee35
andb %r12b, %bl
jmp 0x6eeae
xorl %ebx, %ebx
testb $0x1, %bl
je 0x6eed3
leaq 0x70886(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x6eed3
leaq 0x713e9(%rip), %rdi # 0xe02b0
leaq 0x414b8(%rip), %rsi # 0xb0386
callq 0x6f34d
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
GeneratePrehistorikTrack(CylHead const&, Track const&) | TrackData GeneratePrehistorikTrack(const CylHead& cylhead, const Track& track)
{
assert(IsPrehistorikTrack(track));
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart();
auto gap3 = (track.size() == 11) ? 106 : 30;
for (auto& sector : track)
{
if (sector.header.sector != 12)
bitbuf.addSector(sector, gap3);
else
{
bitbuf.addSector(sector.header, sector.data_copy(), gap3, sector.dam, true);
break;
}
}
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x6ee0e
testb %al, %al
je 0x6f025
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r15, %rdi
xorl %esi, %esi
callq 0x73aa6
movq %rbx, (%rsp)
movq %r12, %rdi
callq 0x713fc
movq %r14, %rbx
cmpl $0xb, %eax
movl $0x6a, %eax
movl $0x1e, %ebp
cmovel %eax, %ebp
movq 0x8(%r12), %r15
movq 0x10(%r12), %r13
cmpq %r13, %r15
je 0x6efb2
leaq 0x8(%rsp), %r12
movl 0x8(%r15), %r14d
cmpl $0xc, %r14d
jne 0x6ef96
movq %r15, %rdi
xorl %esi, %esi
callq 0x6bce6
movzbl 0x20(%r15), %r8d
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
movl $0x1, %r9d
callq 0x7424a
jmp 0x6efa3
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x73e18
cmpl $0xc, %r14d
je 0x6efb2
addq $0x40, %r15
cmpq %r13, %r15
jne 0x6ef65
leaq 0x8(%rsp), %rdi
callq 0x43a4c
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x6efe2
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x6eff9
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6f010
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41376(%rip), %rdi # 0xb03a2
leaq 0x40fce(%rip), %rsi # 0xb0001
leaq 0x41382(%rip), %rcx # 0xb03bc
movl $0x2e6, %edx # imm = 0x2E6
callq 0x35380
jmp 0x6f048
jmp 0x6f048
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
Is11SectorTrack(Track const&) | bool Is11SectorTrack(const Track& track)
{
if (track.size() != 11)
return false;
for (auto& s : track)
{
if (s.datarate != DataRate::_250K || s.encoding != Encoding::MFM ||
s.size() != 512 || !s.has_good_data())
{
return false;
}
}
if (opt.debug) util::cout << "detected 11-sector tight track\n";
return true;
} | pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x713fc
cmpl $0xb, %eax
jne 0x6f0d9
movq 0x8(%r14), %rbx
movq 0x10(%r14), %r14
cmpq %r14, %rbx
sete %bpl
je 0x6f0b5
cmpl $0x3d090, 0x10(%rbx) # imm = 0x3D090
jne 0x6f0af
cmpl $0x1, 0x14(%rbx)
jne 0x6f0af
movq %rbx, %rdi
callq 0x6bce0
cmpl $0x200, %eax # imm = 0x200
jne 0x6f0af
movq %rbx, %rdi
callq 0x6c11e
testb %al, %al
je 0x6f0af
addq $0x40, %rbx
jmp 0x6f076
testb $0x1, %bpl
je 0x6f0d9
leaq 0x70684(%rip), %rax # 0xdf740
movb $0x1, %bl
cmpl $0x0, 0x74(%rax)
je 0x6f0db
leaq 0x711e5(%rip), %rdi # 0xe02b0
leaq 0x4132d(%rip), %rsi # 0xb03ff
callq 0x692b3
jmp 0x6f0db
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
Generate11SectorTrack(CylHead const&, Track const&) | TrackData Generate11SectorTrack(const CylHead& cylhead, const Track& track)
{
assert(Is11SectorTrack(track));
BitstreamTrackBuilder bitbuf(DataRate::_250K, Encoding::MFM);
bitbuf.addTrackStart(true);
for (auto& sector : track)
bitbuf.addSector(sector, 1);
return TrackData(cylhead, std::move(bitbuf.buffer()));
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x6f05d
testb %al, %al
je 0x6f1c5
movq %rsp, %r12
movq %r12, %rdi
movl $0x3d090, %esi # imm = 0x3D090
movl $0x1, %edx
callq 0x43910
movq %r12, %rdi
movl $0x1, %esi
callq 0x73aa6
movq 0x8(%r15), %r12
movq 0x10(%r15), %r13
cmpq %r13, %r12
je 0x6f156
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x73e18
addq $0x40, %r12
cmpq %r13, %r12
jne 0x6f13d
movq %rsp, %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74c12
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x6f183
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6f19a
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6f1b1
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x41253(%rip), %rdi # 0xb041f
leaq 0x40e2e(%rip), %rsi # 0xb0001
leaq 0x4125c(%rip), %rcx # 0xb0436
movl $0x310, %edx # imm = 0x310
callq 0x35380
jmp 0x6f1e6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x42d48
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/src/SpecialFormat.cpp |
util::LogHelper& util::operator<<<char [35]>(util::LogHelper&, char const (&) [35]) | 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 0x6f234
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 0x6f272
cmpb $0x0, 0x10(%rbx)
jne 0x6f272
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [30]>(util::LogHelper&, char const (&) [30]) | 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 0x6f29d
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 0x6f2db
cmpb $0x0, 0x10(%rbx)
jne 0x6f2db
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
util::LogHelper& util::operator<<<char [28]>(util::LogHelper&, char const (&) [28]) | 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 0x6f36f
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 0x6f3ad
cmpb $0x0, 0x10(%rbx)
jne 0x6f3ad
movq %r14, %rdi
callq 0x35210
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/include/utils.h |
MatchBlock(unsigned char const*, unsigned char const*, char const*) | static bool MatchBlock(const uint8_t* pbInput_, const uint8_t* pbMatch_, const char* psczRules_)
{
while (*psczRules_)
{
switch (*psczRules_++)
{
// Character must match
case 'y':
if (*pbInput_++ != *pbMatch_++)
return false;
break;
// Character not expected to match
case 'n':
++pbInput_;
++pbMatch_;
break;
// Skip optional input if matched
case 'o':
if (*pbInput_ == *pbMatch_++)
++pbInput_;
break;
}
}
// Fully matched
return true;
} | movb (%rdx), %cl
testb %cl, %cl
sete %al
je 0x6ff31
incq %rdx
cmpb $0x6e, %cl
je 0x6ff0d
movzbl %cl, %ecx
cmpl $0x6f, %ecx
je 0x6ff15
cmpl $0x79, %ecx
jne 0x6ff25
movb (%rdi), %cl
cmpb (%rsi), %cl
jne 0x6ff31
incq %rdi
incq %rsi
jmp 0x6ff25
movb (%rdi), %al
xorl %ecx, %ecx
cmpb (%rsi), %al
leaq 0x1(%rsi), %rsi
sete %cl
addq %rcx, %rdi
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
sete %al
jne 0x6fef5
andb $0x1, %al
retq
| /simonowen[P]samdisk/src/SpectrumPlus3.cpp |
SuperCardPro::Open() | std::unique_ptr<SuperCardPro> SuperCardPro::Open()
{
std::unique_ptr<SuperCardPro> p;
#ifdef HAVE_FTD2XX
if (!p)
p = SuperCardProFTD2XX::Open();
#endif
#ifdef HAVE_FTDI
if (!p)
p = SuperCardProFTDI::Open();
#endif
if (!p)
p = SuperCardProUSB::Open();
#ifdef _WIN32
if (!p)
p = SuperCardProWin32::Open();
#endif
return p;
} | pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $0x0, (%rdi)
leaq 0x8(%rsp), %rdi
callq 0x6b9a4
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rsp)
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
movq $0x0, (%rbx)
movq %rax, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SuperCardPro.cpp |
SuperCardPro::ReadExact(void*, int) | bool SuperCardPro::ReadExact(void* buf, int len)
{
uint8_t* p = reinterpret_cast<uint8_t*>(buf);
auto bytes_read = 0;
while (len > 0)
{
if (!Read(p, len, &bytes_read))
return false;
p += bytes_read;
len -= bytes_read;
}
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
testl %edx, %edx
setle %bpl
jle 0x70231
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
leaq 0xc(%rsp), %rcx
callq *0x10(%rax)
testb %al, %al
je 0x70231
leaq 0xc(%rsp), %r12
movslq 0xc(%rsp), %rax
movl %ebx, %ecx
subl %eax, %ecx
testl %ecx, %ecx
setle %bpl
subl %eax, %ebx
jle 0x70231
addq %rax, %r14
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
callq *0x10(%rax)
testb %al, %al
jne 0x70206
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SuperCardPro.cpp |
SuperCardPro::WriteExact(void const*, int) | bool SuperCardPro::WriteExact(const void* buf, int len)
{
auto p = reinterpret_cast<const uint8_t*>(buf);
auto bytes_written = 0;
while (len > 0)
{
if (!Write(p, len, &bytes_written))
return false;
len -= bytes_written;
p += bytes_written;
}
#ifndef _WIN32
// ToDo: find why the Raspberry Pi needs this.
usleep(5000);
#endif
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
testl %edx, %edx
setle %bpl
jle 0x702a5
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
leaq 0xc(%rsp), %rcx
callq *0x18(%rax)
testb %al, %al
je 0x702af
leaq 0xc(%rsp), %r12
movslq 0xc(%rsp), %rax
movl %ebx, %ecx
subl %eax, %ecx
testl %ecx, %ecx
setle %bpl
subl %eax, %ebx
jle 0x702a5
addq %rax, %r14
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
callq *0x18(%rax)
testb %al, %al
jne 0x70278
jmp 0x702af
movl $0x1388, %edi # imm = 0x1388
callq 0x35810
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /simonowen[P]samdisk/src/SuperCardPro.cpp |
SuperCardPro::SendCmd(unsigned char, void*, int, void*, int) | bool SuperCardPro::SendCmd(uint8_t cmd, void* buf, int len, void* bulkbuf, int bulklen)
{
auto p = reinterpret_cast<uint8_t*>(buf);
uint8_t datasum = CHECKSUM_INIT;
for (auto i = 0; i < len; ++i)
datasum += p[i];
Data data(2 + len + 1);
data[0] = cmd;
data[1] = static_cast<uint8_t>(len);
if (len) memcpy(&data[2], buf, len);
data[2 + len] = data[0] + data[1] + datasum;
if (!WriteExact(&data[0], data.size()))
return false;
if (cmd == CMD_LOADRAM_USB && !WriteExact(bulkbuf, bulklen))
return false;
else if (cmd == CMD_SENDRAM_USB && !ReadExact(bulkbuf, bulklen))
return false;
uint8_t result[2];
if (!ReadExact(result, sizeof(result)))
return false;
if (result[0] != cmd)
throw util::exception("SCP result command mismatch");
if (result[1] != pr_Ok)
{
m_error = result[1];
return false;
}
m_error = result[1]; // pr_Ok
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movq %r8, %r15
movl %ecx, %r13d
movq %rdx, %r12
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
testl %ecx, %ecx
jle 0x702f9
movl %r13d, %eax
movb $0x4a, %bpl
xorl %ecx, %ecx
addb (%r12,%rcx), %bpl
incq %rcx
cmpq %rcx, %rax
jne 0x702eb
jmp 0x702fc
movb $0x4a, %bpl
leal 0x3(%r13), %eax
movslq %eax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x38b58
leaq 0x10(%rsp), %rdx
movq (%rdx), %rax
movl 0x4(%rsp), %ecx
movb %cl, (%rax)
movq (%rdx), %rax
movb %r13b, 0x1(%rax)
movslq %r13d, %rcx
testl %r13d, %r13d
je 0x70349
movq 0x10(%rsp), %rdi
addq $0x2, %rdi
movq %r12, %rsi
movq %rcx, %r12
movq %rcx, %rdx
callq 0x354c0
movq %r12, %rcx
movq 0x10(%rsp), %rax
addb (%rax), %bpl
addb 0x1(%rax), %bpl
movb %bpl, 0x2(%rax,%rcx)
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
subl %esi, %edx
movq %rbx, %rdi
callq 0x70240
testb %al, %al
je 0x70455
cmpb $-0x57, 0x4(%rsp)
je 0x703a5
movzbl 0x4(%rsp), %eax
cmpl $0xaa, %eax
jne 0x703ef
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x70240
testb %al, %al
je 0x70455
cmpb $-0x57, 0x4(%rsp)
jne 0x703ef
movl $0x0, 0x8(%rsp)
testl %r14d, %r14d
setle %bpl
jle 0x703e9
leaq 0x8(%rsp), %r12
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r12, %rcx
callq *0x10(%rax)
testb %al, %al
je 0x703e9
movslq 0x8(%rsp), %rax
addq %rax, %r15
movl %r14d, %ecx
subl %eax, %ecx
testl %ecx, %ecx
setle %bpl
subl %eax, %r14d
jg 0x703bb
testb $0x1, %bpl
je 0x70455
leaq 0x8(%rsp), %r14
movl $0x0, (%r14)
movl $0x2, %r15d
leaq 0xe(%rsp), %r12
xorl %ebp, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq %r14, %rcx
callq *0x10(%rax)
testb %al, %al
je 0x70436
movslq 0x8(%rsp), %rax
addq %rax, %r12
movl %r15d, %ecx
subl %eax, %ecx
testl %ecx, %ecx
setle %bpl
subl %eax, %r15d
jg 0x70408
testb $0x1, %bpl
je 0x70455
movl 0x4(%rsp), %eax
cmpb %al, 0xe(%rsp)
jne 0x7047f
movb 0xf(%rsp), %al
cmpb $0x4f, %al
sete %bpl
movb %al, 0x8(%rbx)
jmp 0x70457
xorl %ebp, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7046e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x40259(%rip), %rsi # 0xb06ec
movq %rax, %rdi
callq 0x7100e
leaq 0x6b6de(%rip), %rsi # 0xdbb80
movq 0x6cad7(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x704c4
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x704c7
jmp 0x704c4
jmp 0x704c4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x704de
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/SuperCardPro.cpp |
SuperCardPro::GetDriveStatus(int&) | bool SuperCardPro::GetDriveStatus(int& status)
{
uint16_t drv_status;
if (!SendCmd(CMD_STATUS))
return false;
if (!ReadExact(&drv_status, sizeof(drv_status)))
return false;
status = util::betoh(drv_status);
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movl $0x8e, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x702be
testb %al, %al
je 0x7069f
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq (%r14), %rax
leaq 0xa(%rsp), %r15
movl $0x2, %ebp
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq *0x10(%rax)
testb %al, %al
je 0x70689
leaq 0xc(%rsp), %r12
movslq 0xc(%rsp), %rax
subl %eax, %ebp
jle 0x7068e
addq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r12, %rcx
callq *0x10(%rax)
testb %al, %al
jne 0x70664
testl %ebp, %ebp
jle 0x7068e
xorl %r15d, %r15d
jmp 0x7069f
movzwl 0xa(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rbx)
movb $0x1, %r15b
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| /simonowen[P]samdisk/src/SuperCardPro.cpp |
util::exception::exception<char const (&) [28]>(char const (&) [28]) | 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 0x711a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7104b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x6ab56(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7107b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
Track::data_extent_bits(Sector const&) const | int Track::data_extent_bits(const Sector& sector) const
{
auto it = find(sector);
assert(it != end());
auto drive_speed = (sector.datarate == DataRate::_300K) ? RPM_TIME_360 : RPM_TIME_300;
auto track_len = tracklen ? tracklen : GetTrackCapacity(drive_speed, sector.datarate, sector.encoding);
// Approximate bit distance to next ID header.
auto gap_bits = ((std::next(it) != end()) ? std::next(it)->offset : (track_len + begin()->offset)) - sector.offset;
return gap_bits;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x715cc
cmpq 0x10(%r14), %rax
je 0x715ac
movq %rax, %r15
movl (%r14), %eax
testl %eax, %eax
jne 0x7158c
movl 0x10(%rbx), %esi
movl 0x14(%rbx), %edx
cmpl $0x493e0, %esi # imm = 0x493E0
movl $0x28b0b, %eax # imm = 0x28B0B
movl $0x30d40, %edi # imm = 0x30D40
cmovel %eax, %edi
callq 0x608f0
leaq 0x40(%r15), %rcx
cmpq 0x10(%r14), %rcx
je 0x7159c
movl 0x58(%r15), %eax
jmp 0x715a3
movq 0x8(%r14), %rcx
addl 0x18(%rcx), %eax
subl 0x18(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3f3ae(%rip), %rdi # 0xb0961
leaq 0x3f309(%rip), %rsi # 0xb08c3
leaq 0x3f3ac(%rip), %rcx # 0xb096d
movl $0x4a, %edx
callq 0x35380
nop
| /simonowen[P]samdisk/src/Track.cpp |
Track::data_extent_bytes(Sector const&) const | int Track::data_extent_bytes(const Sector& sector) const
{
// We only support real data extent for MFM and FM sectors.
if (sector.encoding != Encoding::MFM && sector.encoding != Encoding::FM)
return sector.size();
auto encoding_shift = (sector.encoding == Encoding::FM) ? 5 : 4;
auto gap_bytes = data_extent_bits(sector) >> encoding_shift;
auto overhead_bytes = GetSectorOverhead(sector.encoding) - GetSyncOverhead(sector.encoding);
auto extent_bytes = (gap_bytes > overhead_bytes) ? gap_bytes - overhead_bytes : 0;
return extent_bytes;
} | pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl 0x14(%rsi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x716bc
cmpl $0x2, %eax
sete %bpl
movq %rbx, %rsi
callq 0x7154e
movl %eax, %r14d
orb $0x4, %bpl
movl %ebp, %ecx
sarl %cl, %r14d
movl 0x14(%rbx), %edi
callq 0x60857
movl %eax, %ebp
movl 0x14(%rbx), %edi
callq 0x60876
subl %eax, %ebp
xorl %eax, %eax
subl %ebp, %r14d
cmovlel %eax, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6bce0
| /simonowen[P]samdisk/src/Track.cpp |
Track::has_good_data() const | bool Track::has_good_data() const
{
auto it = std::find_if(begin(), end(), [](const Sector& sector) {
if (sector.is_8k_sector() && sector.has_data())
{
const Data& data = sector.data_copy();
if (!ChecksumMethods(data.data(), data.size()).empty())
return false;
}
return !sector.has_good_data();
});
return it == end();
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r12
movq %r12, %r13
subq %r14, %r13
sarq $0x8, %r13
testq %r13, %r13
jle 0x718d0
incq %r13
movq %r14, %rdi
callq 0x72954
testb %al, %al
jne 0x71908
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x72954
testb %al, %al
jne 0x71922
leaq 0x80(%r14), %r15
movq %r15, %rdi
callq 0x72954
testb %al, %al
jne 0x71922
leaq 0xc0(%r14), %r15
movq %r15, %rdi
callq 0x72954
testb %al, %al
jne 0x71922
addq $0x100, %r14 # imm = 0x100
decq %r13
cmpq $0x1, %r13
jg 0x71876
movq %r12, %rax
subq %r14, %rax
sarq $0x6, %rax
cmpq $0x1, %rax
je 0x71911
cmpq $0x2, %rax
je 0x718fc
cmpq $0x3, %rax
jne 0x7191f
movq %r14, %rdi
callq 0x72954
testb %al, %al
jne 0x71908
addq $0x40, %r14
movq %r14, %rdi
callq 0x72954
testb %al, %al
je 0x7190d
movq %r14, %r15
jmp 0x71922
addq $0x40, %r14
movq %r14, %rdi
callq 0x72954
testb %al, %al
cmovneq %r14, %r12
movq %r12, %r15
cmpq 0x10(%rbx), %r15
sete %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| /simonowen[P]samdisk/src/Track.cpp |
Track::clear() | void Track::clear()
{
*this = Track();
} | pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x713b8
movq (%r14), %rax
movq %rax, (%rbx)
leaq 0x8(%rsp), %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rbx), %rax
movups 0x10(%rbx), %xmm0
movq (%r14), %rcx
movq %rcx, 0x8(%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x10(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x18(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%r14)
movq %rdx, 0x8(%r14)
movq %rsi, 0x10(%r14)
callq 0x4106a
movq %r14, %rdi
callq 0x4106a
addq $0x38, %rsp
popq %rbx
popq %r14
retq
| /simonowen[P]samdisk/src/Track.cpp |
Track::format(CylHead const&, Format const&) | Track& Track::format(const CylHead& cylhead, const Format& fmt)
{
assert(fmt.sectors != 0);
m_sectors.clear();
m_sectors.reserve(fmt.sectors);
for (auto id : fmt.get_ids(cylhead))
{
Header header(cylhead.cyl, cylhead.head ? fmt.head1 : fmt.head0, id, fmt.size);
Sector sector(fmt.datarate, fmt.encoding, header, fmt.gap3);
Data data(fmt.sector_size(), fmt.fill);
sector.add(std::move(data));
add(std::move(sector));
}
return *this;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x0, 0x14(%rdx)
je 0x71f73
movq %rdx, %r14
movq %rsi, %r15
leaq 0x8(%rdi), %rbx
movq 0x8(%rdi), %r12
movq %rdi, 0x10(%rsp)
movq 0x10(%rdi), %r13
cmpq %r12, %r13
je 0x71e41
movq %r12, %rbp
leaq 0x28(%rbp), %rdi
callq 0x410b8
addq $0x40, %rbp
cmpq %r13, %rbp
jne 0x71e26
movq 0x10(%rsp), %rax
movq %r12, 0x10(%rax)
movslq 0x14(%r14), %rsi
movq %rbx, %rdi
callq 0x72d0e
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5e1d4
movq (%rbx), %rbp
movq 0x8(%rbx), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %rbp
je 0x71f45
leaq 0x38(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x98(%rsp), %r12
leaq 0x28(%rsp), %rbx
movq %rbx, %r13
movl (%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, 0x4(%r15)
movl (%r15), %esi
setne %al
movl 0x2c(%r14,%rax,4), %edx
movl 0x18(%r14), %r8d
movq %r12, %rbx
movq %r12, %rdi
callq 0x60752
movl 0xc(%r14), %esi
movl 0x10(%r14), %edx
movl 0x34(%r14), %r8d
leaq 0x58(%rsp), %rdi
movq %rbx, %r12
movq %rbx, %rcx
callq 0x6bb84
movq %r14, %rdi
callq 0x5e0ee
movq %r13, %rbx
movslq %eax, %rsi
movq %r13, %rdi
movq 0x18(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x5bf6a
leaq 0x58(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0xfb, %ecx
callq 0x6bd6c
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x71b18
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x71f29
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
leaq 0x80(%rsp), %rdi
callq 0x410b8
addq $0x4, %rbp
cmpq 0x20(%rsp), %rbp
jne 0x71e8b
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x71f5c
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x10(%rsp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3ea6c(%rip), %rdi # 0xb09e6
leaq 0x3e942(%rip), %rsi # 0xb08c3
leaq 0x3ea6f(%rip), %rcx # 0xb09f7
movl $0xf9, %edx
callq 0x35380
jmp 0x71f94
movq %rax, %rbx
jmp 0x71fc7
jmp 0x71f9b
movq %rax, %rbx
jmp 0x71fba
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x71fba
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
leaq 0x80(%rsp), %rdi
callq 0x410b8
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x71fde
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/Track.cpp |
Track::insert(int, Sector&&) | void Track::insert(int index, Sector&& sector)
{
assert(index <= static_cast<int>(m_sectors.size()));
if (!m_sectors.empty() && m_sectors[0].datarate != sector.datarate)
throw util::exception("can't mix datarates on a track");
auto it = m_sectors.begin() + index;
m_sectors.insert(it, std::move(sector));
} | pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rcx
movq %rcx, %r8
subq %rsi, %r8
shrq $0x6, %r8
cmpl %eax, %r8d
jl 0x721ff
cmpq %rcx, %rsi
je 0x721e6
movl 0x10(%rsi), %ecx
cmpl 0x10(%rdx), %ecx
jne 0x7221e
addq $0x8, %rdi
cltq
shlq $0x6, %rax
addq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x73184
leaq 0x3e8ac(%rip), %rdi # 0xb0ab2
leaq 0x3e6b6(%rip), %rsi # 0xb08c3
leaq 0x3e8ca(%rip), %rcx # 0xb0ade
movl $0x121, %edx # imm = 0x121
callq 0x35380
movl $0x10, %edi
callq 0x35260
movq %rax, %rbx
leaq 0x3e795(%rip), %rsi # 0xb09c7
movq %rax, %rdi
callq 0x61666
leaq 0x6993f(%rip), %rsi # 0xdbb80
movq 0x6ad38(%rip), %rdx # 0xdcf80
movq %rbx, %rdi
callq 0x35a50
movq %rax, %r14
movq %rbx, %rdi
callq 0x35430
movq %r14, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/src/Track.cpp |
Track::find(Header const&) | std::vector<Sector>::iterator Track::find(const Header& header)
{
return std::find_if(begin(), end(), [&](const Sector& s) {
return header == s.header;
});
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq 0x8(%rdi), %rbx
movq 0x10(%rdi), %r12
movq %r12, %r13
subq %rbx, %r13
sarq $0x8, %r13
testq %r13, %r13
jle 0x7244a
incq %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60772
testb %al, %al
jne 0x72488
leaq 0x40(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x60772
testb %al, %al
jne 0x724a5
leaq 0x80(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x60772
testb %al, %al
jne 0x724a5
leaq 0xc0(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x60772
testb %al, %al
jne 0x724a5
addq $0x100, %rbx # imm = 0x100
decq %r13
cmpq $0x1, %r13
jg 0x723e0
movq %r12, %rax
subq %rbx, %rax
sarq $0x6, %rax
cmpq $0x1, %rax
je 0x72491
cmpq $0x2, %rax
je 0x72479
cmpq $0x3, %rax
jne 0x724a2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60772
testb %al, %al
jne 0x72488
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60772
testb %al, %al
je 0x7248d
movq %rbx, %r15
jmp 0x724a5
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60772
testb %al, %al
cmovneq %rbx, %r12
movq %r12, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| /simonowen[P]samdisk/src/Track.cpp |
util::fmt[abi:cxx11](char const*, ...) | std::string fmt(const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
auto len = std::vsnprintf(nullptr, 0, fmt, args);
va_end(args);
std::vector<char> bytes(len + 1); // +1 for \0
va_start(args, fmt);
std::vsnprintf(&bytes[0], bytes.size(), fmt, args);
va_end(args);
return std::string(bytes.data(), len);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %rbp
movq %rdx, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
movq %r8, 0x20(%rbp)
movq %r9, 0x28(%rbp)
testb %al, %al
je 0x78539
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
leaq 0x20(%rsp), %r15
movq %rbp, 0x10(%r15)
leaq 0x130(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%r15)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0x35340
movl %eax, %r12d
leal 0x1(%r12), %eax
movslq %eax, %rsi
leaq 0x8(%rsp), %r13
leaq 0x7(%rsp), %rdx
movq %r13, %rdi
callq 0x78a06
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%r15)
leaq 0x130(%rsp), %rax
movq %rax, 0x8(%r15)
movq %rbp, 0x10(%r15)
movq (%r13), %rdi
movq 0x8(%r13), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x35340
movq (%r13), %rsi
movslq %r12d, %rdx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x445b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x785ea
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x78619
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/utils.cpp |
util::lowercase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::string lowercase(const std::string& str)
{
std::string ret = str;
ret.reserve(str.length());
std::transform(str.cbegin(), str.cend(), ret.begin(), [](char c) {
return static_cast<uint8_t>(std::tolower(static_cast<int>(c)));
});
return ret;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x41ad6
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x35910
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x788bf
movq (%r14), %r14
movq (%rbx), %r12
xorl %r13d, %r13d
movsbl (%r14,%r13), %edi
callq 0x35870
movb %al, (%r12,%r13)
incq %r13
cmpq %r13, %r15
jne 0x788a9
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x788e2
movq (%r15), %rsi
incq %rsi
callq 0x355d0
movq %r14, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/utils.cpp |
util::operator<<(util::LogHelper&, colour) | LogHelper& operator<<(LogHelper& h, colour c)
{
// Colours are screen only
if (util::is_stdout_a_tty())
{
#ifdef _WIN32
h.screen->flush();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), static_cast<int>(c));
#else
auto val = static_cast<int>(c);
if (val & 0x80)
*h.screen << "\x1b[" << (val & 0x7f) << ";1m";
else
*h.screen << "\x1b[0;" << (val & 0x7f) << 'm';
#endif
}
return h;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x78849
testb %al, %al
je 0x7896e
movzbl %bpl, %ebp
movq (%rbx), %r14
testb %bpl, %bpl
js 0x78939
leaq 0x3865f(%rip), %rsi # 0xb0f72
movl $0x4, %edx
movq %r14, %rdi
callq 0x356a0
movq %r14, %rdi
movl %ebp, %esi
callq 0x35a80
leaq 0xf(%rsp), %rsi
movb $0x6d, (%rsi)
movl $0x1, %edx
jmp 0x78966
leaq 0x3862b(%rip), %rsi # 0xb0f6b
movl $0x2, %edx
movq %r14, %rdi
callq 0x356a0
andl $0x7f, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x35a80
leaq 0x3860d(%rip), %rsi # 0xb0f6e
movl $0x3, %edx
movq %rax, %rdi
callq 0x356a0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /simonowen[P]samdisk/src/utils.cpp |
util::operator<<(util::LogHelper&, ttycmd) | LogHelper& operator<<(LogHelper& h, ttycmd cmd)
{
if (util::is_stdout_a_tty())
{
switch (cmd)
{
case ttycmd::statusbegin:
h.statusmsg = true;
break;
case ttycmd::statusend:
h.statusmsg = false;
h.clearline = true;
break;
case ttycmd::clearline:
h << "\r" << ttycmd::cleartoeol;
h.clearline = false;
break;
case ttycmd::cleartoeol:
#ifdef _WIN32
h.screen->flush();
DWORD dwWritten;
CONSOLE_SCREEN_BUFFER_INFO csbi{};
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
FillConsoleOutputCharacter(hConsole, ' ', csbi.dwSize.X - csbi.dwCursorPosition.X, csbi.dwCursorPosition, &dwWritten);
#else
* h.screen << "\x1b[0K";
#endif
break;
}
}
return h;
} | pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x78849
testb %al, %al
je 0x789fd
cmpb $0x3, %bpl
ja 0x789fd
movzbl %bpl, %eax
leaq 0x3859f(%rip), %rcx # 0xb0f3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
leaq 0x385c7(%rip), %rsi # 0xb0f77
movl $0x4, %edx
callq 0x356a0
jmp 0x789fd
movb $0x1, 0x10(%rbx)
jmp 0x789fd
movw $0x100, 0x10(%rbx) # imm = 0x100
jmp 0x789fd
leaq 0x36492(%rip), %rsi # 0xaee63
movq %rbx, %rdi
callq 0x38d1e
movq %rax, %r14
callq 0x78849
testb %al, %al
je 0x789f9
movq (%r14), %rdi
leaq 0x38588(%rip), %rsi # 0xb0f77
movl $0x4, %edx
callq 0x356a0
movb $0x0, 0x11(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
| /simonowen[P]samdisk/src/utils.cpp |
Read2D(MemFile&, std::shared_ptr<Disk>&) | bool Read2D(MemFile& file, std::shared_ptr<Disk>& disk)
{
Format fmt{ RegularFormat::_2D };
if (!IsFileExt(file.name(), "2d") || file.size() != fmt.disk_size())
return false;
file.rewind();
disk->format(fmt, file.data());
disk->strType = "2D";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2c(%rsp), %rdi
movl $0x19, %esi
callq 0x5db04
movq %r14, %rdi
callq 0x64ca2
movq %rax, %r15
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x384dd(%rip), %rsi # 0xb0fc7
leaq 0x384d8(%rip), %rdx # 0xb0fc9
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x445b8
movq %r15, %rdi
movq %r12, %rsi
callq 0x77230
testb %al, %al
je 0x78b8b
movq %r14, %rdi
callq 0x64c8e
movl %eax, %ebp
leaq 0x2c(%rsp), %rdi
callq 0x5e142
movl %eax, %r15d
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78b3b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
cmpl %r15d, %ebp
jne 0x78ba2
movq %r14, %rdi
callq 0x64db2
movq (%rbx), %r15
movq %r14, %rdi
callq 0x64c88
leaq 0x2c(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x547da
movq (%rbx), %rdi
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x381c6(%rip), %rcx # 0xb0d40
movl $0x2, %r8d
xorl %esi, %esi
callq 0x358f0
movb $0x1, %al
jmp 0x78ba4
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78ba2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78bcd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/types/2d.cpp |
void Message<unsigned long, char const*, unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned int&>(MsgType, char const*, unsigned long&&, char const*&&, unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned 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;
seen_messages.insert(msg);
}
switch (type)
{
case msgStatus: break;
case msgInfo: util::cout << "Info: "; break;
case msgFix: util::cout << colour::GREEN << "Fixed: "; break;
case msgWarning: util::cout << colour::YELLOW << "Warning: "; break;
case msgError: util::cout << colour::RED << "Error: "; break;
}
if (type == msgStatus)
util::cout << ttycmd::statusbegin << "\r" << msg << ttycmd::statusend;
else
util::cout << msg << colour::none << '\n';
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %r10
movq (%rdx), %rdx
movq (%rcx), %rcx
movzbl (%r8), %r8d
movzbl (%r9), %r9d
movzbl (%r10), %r10d
movzbl (%rdi), %r11d
movl (%rax), %r14d
subq $0x8, %rsp
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x784cc
addq $0x20, %rsp
testl %ebx, %ebx
je 0x7992b
cmpl $0x4, %ebx
je 0x79988
leaq 0x66597(%rip), %r14 # 0xdfdf8
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x418a4
addq $0x8, %r14
cmpq %r14, %rax
jne 0x79965
leaq 0x66576(%rip), %rdi # 0xdfdf8
leaq 0x8(%rsp), %rsi
callq 0x4192e
cmpl $0x3, %ebx
ja 0x798fe
movl %ebx, %eax
leaq 0x3774e(%rip), %rcx # 0xb0fe8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x66a06(%rip), %rdi # 0xe02b0
leaq 0x324e7(%rip), %rsi # 0xabd98
callq 0x4172b
jmp 0x798fa
leaq 0x669f1(%rip), %rdi # 0xe02b0
movl $0xa0, %esi
callq 0x788ea
leaq 0x324cf(%rip), %rsi # 0xabd9f
movq %rax, %rdi
callq 0x41794
jmp 0x798fa
leaq 0x669cf(%rip), %rdi # 0xe02b0
movl $0xa1, %esi
callq 0x788ea
leaq 0x324b5(%rip), %rsi # 0xabda7
movq %rax, %rdi
callq 0x405c6
testl %ebx, %ebx
je 0x7992b
leaq 0x669ab(%rip), %rdi # 0xe02b0
leaq 0x8(%rsp), %rsi
callq 0x3f60b
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x79965
leaq 0x6697e(%rip), %rdi # 0xe02b0
movl $0x2, %esi
callq 0x7897a
leaq 0x35520(%rip), %rsi # 0xaee63
movq %rax, %rdi
callq 0x38d1e
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x3f60b
movq %rax, %rdi
movl $0x3, %esi
callq 0x7897a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x79980
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x416b6
leaq 0x621d7(%rip), %rsi # 0xdbb80
movq 0x635d0(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x799c9
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x799cc
jmp 0x799c9
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x799e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/Util.h |
ReadBlockDevice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<Disk>&) | bool ReadBlockDevice(const std::string& path, std::shared_ptr<Disk>& disk)
{
if (!IsBlockDevice(path))
return false;
auto blockdev = std::make_unique<BlockDevice>();
if (!blockdev->Open(path, true))
return false;
Format fmt;
if (!Format::FromSize(blockdev->total_bytes, fmt))
throw util::exception("not a floppy device");
// Allow subsets of the track format
if (opt.sectors > fmt.sectors)
throw util::exception("sector count must be <= ", fmt.sectors);
else if (opt.sectors > 0)
fmt.sectors = opt.sectors;
auto blk_dev_disk = std::make_shared<BlockFloppyDisk>(std::move(blockdev));
blk_dev_disk->extend(CylHead(fmt.cyls - 1, fmt.heads - 1));
blk_dev_disk->fmt = fmt;
blk_dev_disk->strType = "Block Floppy Device";
disk = blk_dev_disk;
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x76f0f
testb %al, %al
je 0x7ab03
movl $0x2b8, %edi # imm = 0x2B8
callq 0x355b0
movq %rax, %r15
movq %rax, %rdi
callq 0x43aac
movq %r15, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x43b24
movl %eax, %ebp
testb %al, %al
je 0x7aaf9
movaps 0x31697(%rip), %xmm0 # 0xac070
leaq 0x24(%rsp), %rsi
movups %xmm0, (%rsi)
movaps 0x31698(%rip), %xmm0 # 0xac080
movups %xmm0, 0x10(%rsi)
movsd 0x33bfc(%rip), %xmm0 # 0xae5f0
movups %xmm0, 0x20(%rsi)
movq $0x1, 0x30(%rsi)
movw $0x0, 0x38(%rsi)
movq (%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x5e326
testb %al, %al
je 0x7ab14
leaq 0x64d1e(%rip), %rax # 0xdf740
movq 0x140(%rax), %rax
movslq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jg 0x7ab32
testq %rax, %rax
jle 0x7aa40
movl %eax, 0x38(%rsp)
leaq 0x10(%rsp), %r14
movq $0x0, -0x8(%r14)
leaq 0x8(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
movq %rsp, %rcx
movq %r14, %rdi
callq 0x7ad60
movq 0x8(%rsp), %r15
movl 0x24(%rsp), %esi
movl 0x28(%rsp), %edx
decl %esi
decl %edx
leaq 0x1c(%rsp), %r12
movq %r12, %rdi
callq 0x46fa2
movq %r15, %rdi
movq %r12, %rsi
callq 0x53684
movq 0x8(%rsp), %rdi
movups 0x24(%rsp), %xmm0
movups 0x34(%rsp), %xmm1
movups 0x44(%rsp), %xmm2
movups 0x4e(%rsp), %xmm3
movups %xmm3, 0x32(%rdi)
movups %xmm2, 0x28(%rdi)
movups %xmm1, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x36798(%rip), %rcx # 0xb125e
movl $0x13, %r8d
xorl %esi, %esi
callq 0x358f0
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
addq $0x8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7a762
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7aaf9
callq 0x4740e
movq %rsp, %rdi
callq 0x7ac8c
jmp 0x7ab05
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x36709(%rip), %rsi # 0xb1231
movq %rax, %rdi
callq 0x4d44c
jmp 0x7ab56
leaq 0x38(%rsp), %rbx
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x366fa(%rip), %rsi # 0xb1245
movq %rax, %rdi
movq %rbx, %rdx
callq 0x7ac16
leaq 0x61023(%rip), %rsi # 0xdbb80
movq 0x6241c(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x7ab6e
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x7ab98
jmp 0x7ab7d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7ab98
callq 0x4740e
jmp 0x7ab98
jmp 0x7ab95
jmp 0x7ab95
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7ac8c
jmp 0x7abb2
movq %rax, %rbx
movl $0x2b8, %esi # imm = 0x2B8
movq %r15, %rdi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/types/blk_dev.cpp |
util::exception::exception<char const (&) [25], int&>(char const (&) [25], int&) | 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 0x7acbf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ac53
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x60f4e(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ac83
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
complete(Track&) | static Track& complete(Track& track)
{
uint8_t fill = 0;
for (auto& sector : track)
{
// Add test data to sectors that lack it
if (!sector.copies())
sector.add(Data(sector.size(), fill));
// Remove data from sectors with 0 bytes of data (for no-data sectors)
else if (!sector.data_size())
sector.datas().clear();
++fill;
}
return track;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb $0x0, 0xe(%rsp)
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rbp
cmpq %rbp, %r14
je 0x83f8c
leaq 0x10(%rsp), %r15
leaq 0xe(%rsp), %r12
leaq 0xf(%rsp), %r13
movq %r14, %rdi
callq 0x6bcaa
movq %r14, %rdi
testl %eax, %eax
je 0x83f40
callq 0x6bcbe
testl %eax, %eax
jne 0x83f7f
movq %r14, %rdi
callq 0x6bd18
movq (%rax), %rsi
movq %rax, %rdi
callq 0x6c842
jmp 0x83f7f
callq 0x6bce0
movslq %eax, %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x5bf6a
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl $0xfb, %ecx
callq 0x6bd6c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x83f7f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
incb 0xe(%rsp)
addq $0x40, %r14
cmpq %rbp, %r14
jne 0x83f13
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x83fb8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/types/builtin.cpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [22]>(char const (&) [22]) | 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 0x58b06(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x84498
movq %rax, %rbx
movq 0x58ad6(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [31], int&>(char const (&) [31], int&) | 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 0x84b07
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x849e3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x571be(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84a13
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [42]>(char const (&) [42]) | 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 0x58387(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x84c17
movq %rax, %rbx
movq 0x58357(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [27]>(char const (&) [27]) | 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 0x582f2(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x84cac
movq %rax, %rbx
movq 0x582c2(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
ReadCPM(MemFile&, std::shared_ptr<Disk>&) | bool ReadCPM(MemFile& file, std::shared_ptr<Disk>& disk)
{
Format fmt = RegularFormat::ProDos;
// 720K images with a .cpm extension use the SAM Coupe Pro-Dos parameters
if (file.size() != fmt.disk_size() || !IsFileExt(file.name(), "cpm"))
return false;
file.rewind();
disk->format(fmt, file.data());
disk->strType = "Pro-DOS";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2c(%rsp), %r12
movq %r12, %rdi
movl $0x1, %esi
callq 0x5db04
movq %r14, %rdi
callq 0x64c8e
movl %eax, %r15d
movq %r12, %rdi
callq 0x5e142
movl %eax, %r12d
movb $0x1, %bpl
cmpl %eax, %r15d
jne 0x84d58
movq %r14, %rdi
callq 0x64ca2
movq %rax, %r13
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x276dd(%rip), %rsi # 0xac410
leaq 0x276d9(%rip), %rdx # 0xac413
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x445b8
movq %r13, %rdi
movq %rbp, %rsi
callq 0x77230
movl %eax, %ebp
xorb $0x1, %bpl
cmpl %r12d, %r15d
jne 0x84d78
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84d78
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
testb %bpl, %bpl
jne 0x84dc4
movq %r14, %rdi
callq 0x64db2
movq (%rbx), %r15
movq %r14, %rdi
callq 0x64c88
leaq 0x2c(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x547da
movq (%rbx), %rdi
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x2c9c3(%rip), %rcx # 0xb177a
movl $0x7, %r8d
xorl %esi, %esi
callq 0x358f0
xorb $0x1, %bpl
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x84df8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/types/cpm.cpp |
util::exception::exception<char const (&) [17]>(char const (&) [17]) | 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 0x8606e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85e4b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x55d56(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85e7b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [20], unsigned long>(char const (&) [20], unsigned long&&) | 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 $0x178, %rsp # imm = 0x178
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x35760
movq %r15, %rdi
callq 0x35210
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movq (%r14), %rsi
movq %rsp, %rdi
callq 0x353c0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x56262(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x86d3c
movq %rax, %rbx
movq 0x56232(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [22], unsigned char&, char const (&) [12], unsigned char&>(char const (&) [22], unsigned char&, char const (&) [12], unsigned char&) | std::string make_string(Args&& ... args)
{
std::ostringstream ss;
(void)std::initializer_list<bool> {(ss << args, false)...};
return ss.str();
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0x35760
movq %r13, %rdi
callq 0x35210
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x356a0
movzbl (%r12), %esi
movq %rsp, %rdi
callq 0x35a80
movq %r15, %rdi
callq 0x35210
movq %rsp, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movzbl (%r14), %esi
movq %rsp, %rdi
callq 0x35a80
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x56194(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x86e0d
movq %rax, %rbx
movq 0x56161(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [26], unsigned char&>(char const (&) [26], unsigned 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 %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x35760
movq %r15, %rdi
callq 0x35210
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x356a0
movzbl (%r14), %esi
movq %rsp, %rdi
callq 0x35a80
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x560ef(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x86eaf
movq %rax, %rbx
movq 0x560bf(%rip), %rsi # 0xdcf78
movq %rsp, %rdi
callq 0x352b0
leaq 0x70(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [52]>(char const (&) [52]) | 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 0x5605c(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x86f42
movq %rax, %rbx
movq 0x5602c(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
ReadD2M(MemFile&, std::shared_ptr<Disk>&) | bool ReadD2M(MemFile& file, std::shared_ptr<Disk>& disk)
{
// D2M is a fixed-size image
uint8_t ab[256];
if (file.size() != D2M_DISK_SIZE || !file.seek(D2M_PARTITION_OFFSET) || !file.read(&ab, sizeof(ab)))
return false;
// Check a partition starts at track 1 sector 1, with "SYSTEM" name
if (memcmp(ab, "\x01\x01", 2) || memcmp(ab + 5, "SYSTEM\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0", 16))
return false;
Format fmt{ RegularFormat::D2M };
// D2M stores the sides in the reverse order, so fiddle things to read it easily
file.rewind();
std::swap(fmt.head0, fmt.head1);
disk->format(fmt, file.data());
std::swap(disk->fmt.head0, disk->fmt.head1);
disk->flip_sides();
disk->strType = "D2M";
return true;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rsi, %rbx
movq %rdi, %r14
callq 0x64c8e
cmpl $0x195000, %eax # imm = 0x195000
jne 0x87165
movq %r14, %rdi
movl $0x190800, %esi # imm = 0x190800
callq 0x64dce
testb %al, %al
je 0x87165
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
movl $0x100, %edx # imm = 0x100
callq 0x64d0c
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x87167
movzwl 0x40(%rsp), %ecx
cmpl $0x101, %ecx # imm = 0x101
jne 0x87167
movdqu 0x45(%rsp), %xmm0
pcmpeqb 0x2a836(%rip), %xmm0 # 0xb1990
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x87176
xorl %eax, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movl $0x17, %esi
callq 0x5db04
movq %r14, %rdi
callq 0x64db2
rolq $0x20, 0x2c(%r15)
movq (%rbx), %r12
movq %r14, %rdi
callq 0x64c88
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x547da
movq (%rbx), %rdi
movl 0x34(%rdi), %eax
movl 0x38(%rdi), %ecx
movl %ecx, 0x34(%rdi)
movl %eax, 0x38(%rdi)
callq 0x55258
movq (%rbx), %rdi
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x29b82(%rip), %rcx # 0xb0d5b
movl $0x3, %r8d
xorl %esi, %esi
callq 0x358f0
movb $0x1, %al
jmp 0x87167
| /simonowen[P]samdisk/src/types/d2m.cpp |
ReadD4M(MemFile&, std::shared_ptr<Disk>&) | bool ReadD4M(MemFile& file, std::shared_ptr<Disk>& disk)
{
// D4M is a fixed-size image
uint8_t ab[256];
if (file.size() != D4M_DISK_SIZE || !file.seek(D4M_PARTITION_OFFSET) || !file.read(&ab, sizeof(ab)))
return false;
// Check a partition starts at track 1 sector 1, with "SYSTEM" name
if (memcmp(ab, "\x01\x01", 2) || memcmp(ab + 5, "SYSTEM\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0", 16))
return false;
Format fmt{ RegularFormat::D4M };
// D2M stores the sides in the reverse order, so fiddle things to read it easily
file.rewind();
std::swap(fmt.head0, fmt.head1);
disk->format(fmt, file.data());
std::swap(disk->fmt.head0, disk->fmt.head1);
disk->flip_sides();
disk->strType = "D4M";
return true;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rsi, %rbx
movq %rdi, %r14
callq 0x64c8e
cmpl $0x32a000, %eax # imm = 0x32A000
jne 0x872a9
movq %r14, %rdi
movl $0x320800, %esi # imm = 0x320800
callq 0x64dce
testb %al, %al
je 0x872a9
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
movl $0x100, %edx # imm = 0x100
callq 0x64d0c
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x872ab
movzwl 0x40(%rsp), %ecx
cmpl $0x101, %ecx # imm = 0x101
jne 0x872ab
movdqu 0x45(%rsp), %xmm0
pcmpeqb 0x2a6f2(%rip), %xmm0 # 0xb1990
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x872ba
xorl %eax, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movl $0x18, %esi
callq 0x5db04
movq %r14, %rdi
callq 0x64db2
rolq $0x20, 0x2c(%r15)
movq (%rbx), %r12
movq %r14, %rdi
callq 0x64c88
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x547da
movq (%rbx), %rdi
movl 0x34(%rdi), %eax
movl 0x38(%rdi), %ecx
movl %ecx, 0x34(%rdi)
movl %eax, 0x38(%rdi)
callq 0x55258
movq (%rbx), %rdi
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x29a42(%rip), %rcx # 0xb0d5f
movl $0x3, %r8d
xorl %esi, %esi
callq 0x358f0
movb $0x1, %al
jmp 0x872ab
| /simonowen[P]samdisk/src/types/d4m.cpp |
util::exception::exception<char const (&) [20], CylHead&>(char const (&) [20], 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 0x88f21
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88dfd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x52da4(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88e2d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [23], unsigned char&, char const (&) [6], CylHead&>(char const (&) [23], unsigned char&, char const (&) [6], 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 0x89029
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88e73
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x52d2e(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88ea3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [39]>(char const (&) [39]) | 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 0x8a4b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89831
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x52370(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89861
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
util::exception::exception<char const (&) [20], CylHead&, char const (&) [6]>(char const (&) [20], CylHead&, char const (&) [6]) | 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 0x8a548
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x898a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x522fa(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x898d7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [46]>(char const (&) [46]) | 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 0x5305a(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x89f44
movq %rax, %rbx
movq 0x5302a(%rip), %rsi # 0xdcf78
leaq 0x8(%rsp), %rdi
callq 0x352b0
leaq 0x78(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
DFIDisk::~DFIDisk() | void add_track_data(const CylHead& cylhead, Data&& data)
{
// Determine image clock rate if not yet known. It seems reasonable
// to assume this will not vary between tracks.
if (!m_tick_ns)
{
uint32_t index_pos = 0;
for (auto byte : data)
{
index_pos += (byte & 0x7f);
if (byte & 0x80)
break;
}
// Oddly, the clock frequency isn't stored in the image, so guess it.
for (auto mhz = 25; !m_tick_ns && mhz <= 100; mhz *= 2)
{
auto rpm = 60'000'000ULL * mhz / index_pos;
if (rpm >= 285 && rpm <= 380)
m_tick_ns = 1000 / mhz;
}
// Fail if we couldn't determine the clock rate
if (!m_tick_ns)
throw util::exception("failed to determine DFI clock frequency");
}
m_data[cylhead] = std::move(data);
extend(cylhead);
} | pushq %rbx
movq %rdi, %rbx
addq $0x110, %rdi # imm = 0x110
callq 0x8a2c0
movq %rbx, %rdi
popq %rbx
jmp 0x53fd2
nop
| /simonowen[P]samdisk/src/types/dfi.cpp |
DFIDisk::~DFIDisk() | void add_track_data(const CylHead& cylhead, Data&& data)
{
// Determine image clock rate if not yet known. It seems reasonable
// to assume this will not vary between tracks.
if (!m_tick_ns)
{
uint32_t index_pos = 0;
for (auto byte : data)
{
index_pos += (byte & 0x7f);
if (byte & 0x80)
break;
}
// Oddly, the clock frequency isn't stored in the image, so guess it.
for (auto mhz = 25; !m_tick_ns && mhz <= 100; mhz *= 2)
{
auto rpm = 60'000'000ULL * mhz / index_pos;
if (rpm >= 285 && rpm <= 380)
m_tick_ns = 1000 / mhz;
}
// Fail if we couldn't determine the clock rate
if (!m_tick_ns)
throw util::exception("failed to determine DFI clock frequency");
}
m_data[cylhead] = std::move(data);
extend(cylhead);
} | pushq %rbx
movq %rdi, %rbx
addq $0x110, %rdi # imm = 0x110
callq 0x8a2c0
movq %rbx, %rdi
callq 0x53fd2
movl $0x148, %esi # imm = 0x148
movq %rbx, %rdi
popq %rbx
jmp 0x355d0
| /simonowen[P]samdisk/src/types/dfi.cpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> util::make_string<char const (&) [20], CylHead&, char const (&) [6]>(char const (&) [20], CylHead&, char const (&) [6]) | 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), %edx
movl 0x4(%r15), %ecx
leaq 0x21846(%rip), %rsi # 0xabddb
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x784cc
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x356a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a5d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %r14, %rdi
callq 0x35210
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x356a0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x35920
movq 0x5297c(%rip), %rsi # 0xdcf78
leaq 0x28(%rsp), %rdi
callq 0x352b0
leaq 0x98(%rsp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x8a649
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a64c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x8a64c
movq %rax, %rbx
movq 0x52925(%rip), %rsi # 0xdcf78
leaq 0x28(%rsp), %rdi
callq 0x352b0
leaq 0x98(%rsp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35aa0
nop
| /simonowen[P]samdisk/include/utils.h |
ReadDMK(MemFile&, std::shared_ptr<Disk>&) | bool ReadDMK(MemFile& file, std::shared_ptr<Disk>& disk)
{
DMK_HEADER dh{};
if (!file.rewind() || !file.read(&dh, sizeof(dh)))
return false;
else if ((dh.protect != 0x00 && dh.protect != 0xff))
return false;
bool ignore_density = (dh.flags & 0x80) != 0;
bool single_density = (dh.flags & 0x40) != 0;
bool single_sided = (dh.flags & 0x10) != 0;
if (util::letoh(dh.realsig) == 0x12345678)
throw util::exception("DMK real-disk-specification images contain no data");
auto cyls = dh.cyls;
auto heads = single_sided ? 1 : 2;
int tracklen = util::letoh(dh.tracklen);
if (!cyls || !tracklen || tracklen > DMK_MAX_TRACK_LENGTH)
return false;
auto total_size = static_cast<int>(sizeof(DMK_HEADER) + tracklen * cyls * heads);
if (file.size() != total_size)
{
// Accept wrong size only if the extension is recognised.
if (!IsFileExt(file.name(), "dmk") && !IsFileExt(file.name(), "dsk"))
return false;
Message(msgWarning, "DMK size (%d) doesn't match calculated size (%d)",
file.size(), total_size);
}
if (ignore_density)
throw util::exception("DMK ignore density flag is not currently supported");
tracklen -= DMK_TRACK_INDEX_SIZE;
for (auto cyl = 0; cyl < cyls; ++cyl)
{
for (auto head = 0; head < heads; ++head)
{
std::vector<uint16_t> index(64);
std::vector<uint8_t> data(tracklen);
if (!file.read(index) || !file.read(data))
Message(msgWarning, "short file reading %s", CH(cyl, head));
std::transform(index.begin(), index.end(), index.begin(),
[](uint16_t w) { return util::letoh(w); });
int idx_idam = 0;
int pos = 0;
int last_pos = pos;
int current_idam_pos = 0;
int next_idam_pos = (index[0] & 0x3fff) - DMK_TRACK_INDEX_SIZE;
auto next_idam_encoding =
(!index[0] || (index[0] & 0x8000)) ? Encoding::MFM : Encoding::FM;
auto current_idam_encoding = next_idam_encoding;
int fm_step = single_density ? 1 : 2;
int step = (current_idam_encoding == Encoding::MFM) ? 1 : fm_step;
bool found_iam = false;
bool found_dam = false;
BitstreamTrackBuilder bitbuf(DataRate::_250K, current_idam_encoding);
if (opt.debug)
util::cout << "DMK: " << CylHead(cyl, head) << "\n";
while (pos < tracklen)
{
auto b = data[pos];
bool is_am = false;
if (next_idam_pos > 0 && pos >= next_idam_pos)
{
// Force sync in case of odd/even mismatch.
pos = next_idam_pos;
b = data[pos];
if (opt.debug)
{
util::cout << next_idam_encoding << " IDAM (" <<
data[pos + 3 * ((next_idam_encoding == Encoding::MFM) ? 1 : fm_step)] <<
") at offset " << pos << "\n";
}
assert(b == IBM_IDAM);
is_am = true;
}
else if (!found_iam && b == IBM_IAM && current_idam_pos == 0)
{
if (opt.debug)
util::cout << next_idam_encoding << " IAM at offset " << pos << "\n";
is_am = found_iam = true;
}
else if (!found_dam && b >= 0xf8 && b <= 0xfd)
{
auto min_distance = ((current_idam_encoding == Encoding::MFM) ? 14 : 7) * step;
auto max_distance = min_distance + ((current_idam_encoding == Encoding::MFM) ? 43 : 30) * step;
auto idam_distance = current_idam_pos ? (pos - current_idam_pos) : 0;
if (idam_distance >= min_distance && idam_distance <= max_distance)
{
if (opt.debug)
util::cout << current_idam_encoding << " DAM (" << b << ") at offset " << pos << "\n";
is_am = found_dam = true;
}
}
if (is_am)
{
auto am_encoding = (b == IBM_IDAM) ? next_idam_encoding : bitbuf.encoding();
int rewind = (am_encoding == Encoding::MFM) ? (8 + 3) : (6 * 2);
while (last_pos < (pos - rewind))
{
bitbuf.addByte(data[last_pos]);
last_pos += step;
}
// Rewrite minimal sync and the address mark with missing clock bits
bitbuf.setEncoding(am_encoding);
bitbuf.addBlock(0x00, (am_encoding == Encoding::MFM) ? 8 : 6);
bitbuf.addAM(b, true);
step = (am_encoding == Encoding::MFM) ? 1 : fm_step;
pos += step;
last_pos = pos;
if (b == IBM_IDAM)
{
current_idam_pos = next_idam_pos;
current_idam_encoding = next_idam_encoding;
found_dam = false;
auto idam_entry = index[++idx_idam];
next_idam_pos = (idam_entry & 0x3fff) - 0x80;
next_idam_encoding = (!idam_entry || (idam_entry & 0x8000)) ? Encoding::MFM : Encoding::FM;
}
else if (am_encoding == Encoding::FM && b == IBM_DAM_RX02)
{
bitbuf.setEncoding(Encoding::MFM);
step = 1;
}
continue;
}
pos += step;
}
while (last_pos < pos)
{
bitbuf.addByte(data[last_pos]);
last_pos += step;
}
disk->write(CylHead(cyl, head), std::move(bitbuf.buffer()));
}
}
disk->metadata["protect"] = dh.protect ? "read-only" : "read-write";
disk->strType = "DMK";
return true;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, 0x58(%rsp)
movq %rdi, %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
callq 0x64db2
testb %al, %al
je 0x8a6f3
leaq 0x40(%rsp), %rsi
movq %r13, %rdi
movl $0x10, %edx
callq 0x64d0c
testb %al, %al
je 0x8a6f3
movb 0x40(%rsp), %al
decb %al
cmpb $-0x2, %al
jb 0x8a6f3
cmpl $0x12345678, 0x4c(%rsp) # imm = 0x12345678
je 0x8afa0
movzbl 0x41(%rsp), %ebp
testl %ebp, %ebp
sete %al
movzwl 0x42(%rsp), %r15d
leal -0x4000(%r15), %ecx
movzwl %cx, %ecx
cmpl $0xc001, %ecx # imm = 0xC001
setb %cl
orb %al, %cl
je 0x8a707
xorl %eax, %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x44(%rsp), %ebx
movl %ebx, %ecx
andl $0x10, %ecx
movl %r15d, %eax
imull %ebp, %eax
movl %ecx, 0x78(%rsp)
shrl $0x4, %ecx
xorb $0x1, %cl
shll %cl, %eax
addl $0x10, %eax
movl %eax, 0x3c(%rsp)
movq %r13, %rdi
callq 0x64c8e
cmpl 0x3c(%rsp), %eax
movl %ebp, 0x30(%rsp)
je 0x8a84f
movq %r13, %rdi
callq 0x64ca2
movq %rax, %r14
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x27590(%rip), %rsi # 0xb1cef
leaq 0x2758c(%rip), %rdx # 0xb1cf2
leaq 0xb8(%rsp), %rdi
callq 0x445b8
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0x77230
movl %eax, %ebp
testb %al, %al
je 0x8a78e
xorl %r14d, %r14d
jmp 0x8a7d7
movq %r13, %rdi
callq 0x64ca2
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26673(%rip), %rsi # 0xb0e1f
leaq 0x2666f(%rip), %rdx # 0xb0e22
leaq 0x98(%rsp), %rdi
callq 0x445b8
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x77230
movl %eax, %r14d
xorb $0x1, %r14b
testb %bpl, %bpl
jne 0x8a7fd
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a7fd
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8a81a
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x355d0
testb %r14b, %r14b
jne 0x8a6f3
movq %r13, %rdi
callq 0x64c8e
leaq 0xb8(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x274b7(%rip), %rsi # 0xb1cf3
leaq 0x3c(%rsp), %rcx
movl $0x3, %edi
callq 0x8b137
movl 0x30(%rsp), %ebp
testb %bl, %bl
js 0x8afbe
testl %ebp, %ebp
je 0x8aebd
addq $-0x80, %r15
movl %ebx, %eax
andl $0x40, %eax
movq $0x0, 0x20(%rsp)
cmpl $0x1, %eax
movl $0x0, %eax
adcl $0x1, %eax
movl %eax, 0x38(%rsp)
shrl $0x6, %ebx
xorb $0x1, %bl
movl $0x3, %eax
movl %ebx, %ecx
shll %cl, %eax
movl %eax, 0x7c(%rsp)
leaq 0xb8(%rsp), %rbp
movq %r15, 0x90(%rsp)
movq %r13, 0x88(%rsp)
xorl %r12d, %r12d
movl $0x80, %edi
callq 0x355b0
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movq %rax, 0x28(%rsp)
movups %xmm0, (%rax)
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x38b58
movq %r13, %rdi
callq 0x64c96
cmpl $0x80, %eax
jl 0x8a932
movq 0x58(%r13), %rbx
movl $0x80, %edx
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x354c0
subq $-0x80, %rbx
movq %rbx, 0x58(%r13)
movq 0x68(%rsp), %rbx
subq 0x60(%rsp), %rbx
movq %r13, %rdi
callq 0x64c96
cmpl %ebx, %eax
jge 0x8a95d
movq 0x20(%rsp), %rdi
movl %r12d, %esi
callq 0x76a95
movq %rax, 0xb8(%rsp)
movl $0x3, %edi
leaq 0x27404(%rip), %rsi # 0xb1d57
movq %rbp, %rdx
callq 0x400e2
jmp 0x8a975
movq 0x60(%rsp), %rdi
movq 0x58(%r13), %rsi
movslq %ebx, %rbx
movq %rbx, %rdx
callq 0x354c0
addq %rbx, 0x58(%r13)
xorl %eax, %eax
addq $0x2, %rax
cmpq $0x80, %rax
jne 0x8a977
movl $0x0, (%rsp)
movq 0x28(%rsp), %rax
movzwl (%rax), %r14d
xorl %edx, %edx
testw %r14w, %r14w
movl 0x38(%rsp), %r13d
movl $0x1, %eax
cmovlel %eax, %r13d
setg %dl
incl %edx
movl %edx, 0x4(%rsp)
movl %edx, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x3d090, %esi # imm = 0x3D090
callq 0x43910
movq %r12, 0x80(%rsp)
leaq 0x54d70(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x8aa20
leaq 0x558d3(%rip), %rdi # 0xe02b0
leaq 0x27389(%rip), %rsi # 0xb1d6d
callq 0x40701
movq %rax, %rbx
leaq 0xc(%rsp), %r12
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x46fa2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3fa09
movq %rax, %rdi
leaq 0x22a13(%rip), %rsi # 0xad42e
callq 0x38d1e
movl (%rsp), %eax
xorl %r12d, %r12d
cmpl %r15d, %eax
jge 0x8ada9
andl $0x3fff, %r14d # imm = 0x3FFF
addl $-0x80, %r14d
movl $0x0, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x34(%rsp)
movslq %eax, %rsi
movq 0x60(%rsp), %rcx
movb (%rcx,%rsi), %dl
movb %dl, 0xc(%rsp)
testl %r14d, %r14d
setle %dil
cmpl %r14d, %esi
setl %sil
orb %dil, %sil
je 0x8aaf6
testb $0x1, 0x18(%rsp)
jne 0x8aba8
cmpb $-0x4, %dl
jne 0x8aba8
cmpl $0x0, 0x14(%rsp)
jne 0x8aba8
leaq 0x54c9b(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x8ad24
leaq 0x557fa(%rip), %rdi # 0xe02b0
leaq 0x4(%rsp), %rsi
callq 0x4045e
movq %rax, %rdi
leaq 0x20e3a(%rip), %rsi # 0xab904
callq 0x4062f
movq %rax, %rdi
movq %rsp, %rsi
callq 0x38c21
movb $0x1, %cl
movl %ecx, 0x18(%rsp)
movq %rax, %rdi
leaq 0x22944(%rip), %rsi # 0xad42e
callq 0x38d1e
movb $0x1, %cl
jmp 0x8ab8e
movl %r14d, (%rsp)
movl %r14d, %eax
movb (%rcx,%rax), %al
movb %al, 0xc(%rsp)
leaq 0x54c35(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x8ab81
leaq 0x55798(%rip), %rdi # 0xe02b0
leaq 0x4(%rsp), %rsi
callq 0x4045e
movq %rax, %rdi
leaq 0x27247(%rip), %rsi # 0xb1d73
callq 0x41794
cmpl $0x1, 0x4(%rsp)
movl 0x7c(%rsp), %ecx
movl %ecx, %esi
movl $0x3, %ecx
cmovel %ecx, %esi
movslq (%rsp), %rcx
addq %rcx, %rsi
addq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x3f708
movq %rax, %rdi
leaq 0x209c6(%rip), %rsi # 0xab528
callq 0x3f69f
movq %rax, %rdi
movq %rsp, %rsi
callq 0x38c21
movq %rax, %rdi
leaq 0x228b2(%rip), %rsi # 0xad42e
callq 0x38d1e
movb $0x1, %cl
cmpb $-0x2, 0xc(%rsp)
jne 0x8af81
testb %cl, %cl
je 0x8ab9f
cmpb $-0x2, 0xc(%rsp)
jne 0x8ac00
movl 0x4(%rsp), %ebx
jmp 0x8ac0a
addl %r13d, (%rsp)
jmp 0x8ad13
xorl %ecx, %ecx
testb $0x1, 0x8(%rsp)
jne 0x8ab8e
addb $0x2, %dl
cmpb $-0x6, %dl
jb 0x8ab8e
movl 0x1c(%rsp), %ecx
cmpl $0x1, %ecx
movl $0x7, %edx
movl $0xe, %esi
cmovel %esi, %edx
imull %r13d, %edx
movl 0x14(%rsp), %esi
subl %esi, %eax
testl %esi, %esi
cmovel %esi, %eax
cmpl %edx, %eax
jl 0x8abfc
cmpl $0x1, %ecx
movl $0x25, %ecx
movl $0x39, %edx
cmovel %edx, %ecx
imull %r13d, %ecx
cmpl %ecx, %eax
jle 0x8ad31
xorl %ecx, %ecx
jmp 0x8ab8e
movq %rbp, %rdi
callq 0x43a56
movl %eax, %ebx
xorl %r15d, %r15d
cmpl $0x1, %ebx
sete %r15b
orl $-0xc, %r15d
movl (%rsp), %eax
addl %r15d, %eax
cmpl %eax, %r12d
jge 0x8ac4b
movslq %r12d, %r12
movl %r13d, %r13d
movq 0x60(%rsp), %rax
movzbl (%rax,%r12), %esi
movq %rbp, %rdi
callq 0x73662
addq %r13, %r12
movl (%rsp), %eax
addl %r15d, %eax
cltq
cmpq %rax, %r12
jl 0x8ac29
movq %rbp, %rdi
movl %ebx, %esi
callq 0x4394e
movq 0x90(%rsp), %r15
xorl %eax, %eax
cmpl $0x1, %ebx
sete %al
leal 0x6(,%rax,2), %edx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x73748
movzbl 0xc(%rsp), %esi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x738d8
cmpl $0x1, %ebx
movl 0x38(%rsp), %r13d
cmovel %ebx, %r13d
movl (%rsp), %r12d
addl %r13d, %r12d
movl %r12d, (%rsp)
movb 0xc(%rsp), %al
cmpb $-0x2, %al
jne 0x8acf1
movl 0x4(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x34(%rsp), %ecx
movslq %ecx, %rax
incl %ecx
movl %ecx, 0x34(%rsp)
movq 0x28(%rsp), %rcx
movzwl 0x2(%rcx,%rax,2), %eax
movl %r14d, 0x14(%rsp)
movl %eax, %r14d
andl $0x3fff, %r14d # imm = 0x3FFF
addl $-0x80, %r14d
xorl %ecx, %ecx
testw %ax, %ax
setg %cl
incl %ecx
movl %ecx, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
jmp 0x8ad13
cmpl $0x2, %ebx
setne %cl
cmpb $-0x3, %al
setne %al
orb %cl, %al
jne 0x8ad13
movl $0x1, %r13d
movq %rbp, %rdi
movl $0x1, %esi
callq 0x4394e
movl (%rsp), %eax
cmpl %r15d, %eax
jl 0x8aa5d
jmp 0x8ada9
movb $0x1, %al
movl %eax, 0x18(%rsp)
movb $0x1, %cl
jmp 0x8ab8e
leaq 0x54a08(%rip), %rax # 0xdf740
cmpl $0x0, 0x74(%rax)
je 0x8ada1
leaq 0x5556b(%rip), %rdi # 0xe02b0
leaq 0x1c(%rsp), %rsi
callq 0x4045e
movq %rax, %rdi
leaq 0x270b9(%rip), %rsi # 0xb1e12
callq 0x4172b
movq %rax, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3f708
movq %rax, %rdi
leaq 0x207b3(%rip), %rsi # 0xab528
callq 0x3f69f
movq %rax, %rdi
movq %rsp, %rsi
callq 0x38c21
movb $0x1, %cl
movl %ecx, 0x8(%rsp)
movq %rax, %rdi
leaq 0x22699(%rip), %rsi # 0xad42e
callq 0x38d1e
movb $0x1, %cl
jmp 0x8ab8e
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x8ad2a
cmpl (%rsp), %r12d
jge 0x8add2
movslq %r12d, %rbx
movl %r13d, %r14d
movq 0x60(%rsp), %rax
movzbl (%rax,%rbx), %esi
movq %rbp, %rdi
callq 0x73662
addq %r14, %rbx
movslq (%rsp), %rax
cmpq %rax, %rbx
jl 0x8adb5
movq 0x58(%rsp), %rax
movq (%rax), %rbx
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x80(%rsp), %r12
movl %r12d, %edx
callq 0x46fa2
movq %rbp, %rdi
callq 0x43a4c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x54ff6
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
movq 0x88(%rsp), %r13
movl 0x30(%rsp), %ebx
je 0x8ae36
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x8ae53
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x8ae70
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x8ae87
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movl $0x80, %esi
movq 0x28(%rsp), %rdi
callq 0x355d0
leal 0x1(%r12), %eax
orl 0x78(%rsp), %r12d
movl %eax, %r12d
je 0x8a8ae
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
cmpl %ebx, %eax
jne 0x8a8ab
movb 0x40(%rsp), %bpl
testb %bpl, %bpl
leaq 0x26f4d(%rip), %rax # 0xb1e19
leaq 0x26756(%rip), %rbx # 0xb1629
cmoveq %rax, %rbx
movq 0x58(%rsp), %rax
movq (%rax), %r14
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x26f32(%rip), %rsi # 0xb1e24
leaq 0x26f32(%rip), %rdx # 0xb1e2b
leaq 0xb8(%rsp), %rdi
callq 0x445b8
addq $0x48, %r14
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0x48d0c
movq 0x8(%rax), %rdx
xorl %r8d, %r8d
cmpb $0x1, %bpl
adcq $0x9, %r8
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x358f0
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8af53
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x355d0
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x80(%rdi), %rdx
addq $0x78, %rdi
leaq 0x25dbf(%rip), %rcx # 0xb0d2c
movl $0x3, %r8d
xorl %esi, %esi
callq 0x358f0
movb $0x1, %al
jmp 0x8a6f5
leaq 0x26df3(%rip), %rdi # 0xb1d7b
leaq 0x26dfa(%rip), %rsi # 0xb1d89
leaq 0x26e4b(%rip), %rcx # 0xb1de1
movl $0x6f, %edx
callq 0x35380
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x26d08(%rip), %rsi # 0xb1cbc
movq %rax, %rdi
callq 0x8b0c2
jmp 0x8afda
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x26d52(%rip), %rsi # 0xb1d24
movq %rax, %rdi
callq 0x8b0c2
leaq 0x50b9f(%rip), %rsi # 0xdbb80
movq 0x51f98(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x8b025
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x355d0
jmp 0x8b025
jmp 0x8b022
jmp 0x8b037
jmp 0x8b068
jmp 0x8b068
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x8b054
jmp 0x8b0ba
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x8b0ba
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8b0ba
movq 0xc8(%rsp), %rsi
incq %rsi
jmp 0x8b0b5
jmp 0x8b084
movq %rax, %rbx
jmp 0x8b0ab
movq %rax, %rbx
jmp 0x8b0ba
jmp 0x8b073
jmp 0x8b084
jmp 0x8b073
movq %rax, %rbx
jmp 0x8b094
jmp 0x8b084
jmp 0x8b084
jmp 0x8b084
jmp 0x8b084
jmp 0x8b084
jmp 0x8b084
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x42d48
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x8b0ab
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x355d0
movl $0x80, %esi
movq 0x28(%rsp), %rdi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/src/types/dmk.cpp |
util::exception::exception<char const (&) [51]>(char const (&) [51]) | 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 0x8b2f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35710
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b0ff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
leaq 0x50aa2(%rip), %rax # 0xdbba8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b12f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/utils.h |
void Message<int, int&>(MsgType, char const*, int&&, 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;
seen_messages.insert(msg);
}
switch (type)
{
case msgStatus: break;
case msgInfo: util::cout << "Info: "; break;
case msgFix: util::cout << colour::GREEN << "Fixed: "; break;
case msgWarning: util::cout << colour::YELLOW << "Warning: "; break;
case msgError: util::cout << colour::RED << "Error: "; break;
}
if (type == msgStatus)
util::cout << ttycmd::statusbegin << "\r" << msg << ttycmd::statusend;
else
util::cout << msg << colour::none << '\n';
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
movl (%rdx), %edx
movl (%rcx), %ecx
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x784cc
testl %ebx, %ebx
je 0x8b232
cmpl $0x4, %ebx
je 0x8b28f
leaq 0x54c90(%rip), %r14 # 0xdfdf8
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x418a4
addq $0x8, %r14
cmpq %r14, %rax
jne 0x8b26c
leaq 0x54c6f(%rip), %rdi # 0xdfdf8
leaq 0x8(%rsp), %rsi
callq 0x4192e
cmpl $0x3, %ebx
ja 0x8b205
movl %ebx, %eax
leaq 0x26b0b(%rip), %rcx # 0xb1cac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x550ff(%rip), %rdi # 0xe02b0
leaq 0x20be0(%rip), %rsi # 0xabd98
callq 0x4172b
jmp 0x8b201
leaq 0x550ea(%rip), %rdi # 0xe02b0
movl $0xa0, %esi
callq 0x788ea
leaq 0x20bc8(%rip), %rsi # 0xabd9f
movq %rax, %rdi
callq 0x41794
jmp 0x8b201
leaq 0x550c8(%rip), %rdi # 0xe02b0
movl $0xa1, %esi
callq 0x788ea
leaq 0x20bae(%rip), %rsi # 0xabda7
movq %rax, %rdi
callq 0x405c6
testl %ebx, %ebx
je 0x8b232
leaq 0x550a4(%rip), %rdi # 0xe02b0
leaq 0x8(%rsp), %rsi
callq 0x3f60b
movq %rax, %rdi
xorl %esi, %esi
callq 0x788ea
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movq %rax, %rdi
callq 0x409e0
jmp 0x8b26c
leaq 0x55077(%rip), %rdi # 0xe02b0
movl $0x2, %esi
callq 0x7897a
leaq 0x23c19(%rip), %rsi # 0xaee63
movq %rax, %rdi
callq 0x38d1e
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x3f60b
movq %rax, %rdi
movl $0x3, %esi
callq 0x7897a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b287
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x35260
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x416b6
leaq 0x508d0(%rip), %rsi # 0xdbb80
movq 0x51cc9(%rip), %rdx # 0xdcf80
movq %r14, %rdi
callq 0x35a50
jmp 0x8b2d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x35430
jmp 0x8b2d3
jmp 0x8b2d0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8b2ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x355d0
movq %rbx, %rdi
callq 0x35aa0
| /simonowen[P]samdisk/include/Util.h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.