// File: meirdev[P]HexViewer/Style/HexDump/HexDump.cpp
// Function: HexDump::HexDump()
HexDump::HexDump()
: m_rowBuffer(256)
{
    std::stringstream byte;

    for (int i = 0; i < 256; ++i)
    {
        byte << std::setfill('0') << std::setw(2) << std::hex << i;

        if (isprint(i))
        {
            m_byteTextStyle.push_back({ byte.str(), std::string(1, static_cast<char>(i)) });
        }
        else
        {
            m_byteTextStyle.push_back({ byte.str(), "." });
        }

        byte.str("");
    }

    m_byteTextStyle.push_back({ "  ", "" });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x3a7c0
movq -0x310(%rbp), %rdi
leaq 0x23a23(%rip), %rax     # 0x5db80
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x318(%rbp)
callq 0x3a7e0
movq -0x310(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0x308(%rbp)
movl $0x100, %esi            # imm = 0x100
callq 0x39c30
jmp 0x3a18e
leaq -0x1a0(%rbp), %rdi
callq 0x62e0
jmp 0x3a19c
movl $0x0, -0x1a4(%rbp)
cmpl $0x100, -0x1a4(%rbp)    # imm = 0x100
jge 0x3a525
leaq -0x190(%rbp), %rax
movq %rax, -0x328(%rbp)
movl $0x30, %edi
callq 0x3a800
movb %al, -0x319(%rbp)
jmp 0x3a1d6
movq -0x328(%rbp), %rdi
movb -0x319(%rbp), %al
movb %al, -0x1a5(%rbp)
movzbl -0x1a5(%rbp), %esi
callq 0x6680
movq %rax, -0x330(%rbp)
jmp 0x3a1fe
movl $0x2, %edi
callq 0x32ae0
movl %eax, -0x334(%rbp)
jmp 0x3a210
movq -0x330(%rbp), %rdi
movl -0x334(%rbp), %eax
movl %eax, -0x1ac(%rbp)
movl -0x1ac(%rbp), %esi
callq 0x64d0
movq %rax, -0x340(%rbp)
jmp 0x3a237
movq -0x340(%rbp), %rdi
leaq 0x5db(%rip), %rsi       # 0x3a820
callq 0x6140
movq %rax, -0x348(%rbp)
jmp 0x3a253
movq -0x348(%rbp), %rdi
movl -0x1a4(%rbp), %esi
callq 0x6720
jmp 0x3a267
movl -0x1a4(%rbp), %edi
callq 0x6760
cmpl $0x0, %eax
je 0x3a3d8
movq -0x310(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x350(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x63c0
jmp 0x3a2a2
movsbl -0x1a4(%rbp), %eax
movl %eax, -0x35c(%rbp)
leaq -0x231(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x6770
movl -0x35c(%rbp), %edx
movq -0x358(%rbp), %rcx
leaq -0x230(%rbp), %rdi
movl $0x1, %esi
callq 0x12450
jmp 0x3a2e2
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
leaq -0x230(%rbp), %rdx
callq 0x3a880
jmp 0x3a2fe
movq -0x350(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x3a850
jmp 0x3a313
leaq -0x1f0(%rbp), %rdi
callq 0x3a8c0
leaq -0x230(%rbp), %rdi
callq 0x6280
leaq -0x231(%rbp), %rdi
callq 0x6460
leaq -0x210(%rbp), %rdi
callq 0x6280
jmp 0x3a481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a5b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a5ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a5a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a3bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a3af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x3a8c0
leaq -0x230(%rbp), %rdi
callq 0x6280
leaq -0x231(%rbp), %rdi
callq 0x6460
leaq -0x210(%rbp), %rdi
callq 0x6280
jmp 0x3a5a1
movq -0x310(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x368(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x63c0
jmp 0x3a3ff
leaq 0x75b2(%rip), %rdx      # 0x419b8
leaq -0x278(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x3a8f0
jmp 0x3a41b
movq -0x368(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x3a850
jmp 0x3a430
leaq -0x278(%rbp), %rdi
callq 0x3a8c0
leaq -0x298(%rbp), %rdi
callq 0x6280
jmp 0x3a481
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x3a8c0
leaq -0x298(%rbp), %rdi
callq 0x6280
jmp 0x3a5a1
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x6770
movq -0x370(%rbp), %rdx
leaq 0x74e0(%rip), %rsi      # 0x41982
leaq -0x2b8(%rbp), %rdi
callq 0x8eb0
jmp 0x3a4b0
leaq -0x1a0(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x64c0
jmp 0x3a4c5
leaq -0x2b8(%rbp), %rdi
callq 0x6280
leaq -0x2b9(%rbp), %rdi
callq 0x6460
movl -0x1a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x3a1a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x3a517
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x6280
leaq -0x2b9(%rbp), %rdi
callq 0x6460
jmp 0x3a5a1
movq -0x310(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x378(%rbp)
leaq 0x7446(%rip), %rsi      # 0x41984
leaq 0x743d(%rip), %rdx      # 0x41982
leaq -0x300(%rbp), %rdi
callq 0x3a980
jmp 0x3a553
movq -0x378(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x3a850
jmp 0x3a568
leaq -0x300(%rbp), %rdi
callq 0x3a8c0
leaq -0x1a0(%rbp), %rdi
callq 0x6320
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x3a8c0
leaq -0x1a0(%rbp), %rdi
callq 0x6320
movq -0x308(%rbp), %rdi
callq 0x39c80
movq -0x318(%rbp), %rdi
callq 0x3aa60
movq -0x310(%rbp), %rdi
callq 0x3a110
movq -0x10(%rbp), %rdi
callq 0x6750
nopw (%rax,%rax)