// File: /workspace/github_cpp_makefile_star2_O1/illmat[P]MemCrawl/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    pid_t pid;
    int input = 0;
    bool isFirstRun = true;
    std::string commando;
    std::vector<scanRegion> regions;
    std::vector<scanResult> results;

    if(argc < 2)
    {
        printError("usage ./MemCrawl <pid>");
        return 1;
    }

    if ((pid = atol(argv[1])) == 0)
    {
        printError("usage ./MemCrawl <pid>");
        return 1;
    }

    // get read/writeable scan regions
    if (getRegions(regions, pid) != 0)
    {
        printError("could not get regions");
        return 1;
    }

    std::cout << "Enter Command (try: help)" << std::endl;
    std::cout << results.size() << "> ";
    std::getline (std::cin, commando);

    while (commando != "quit" && commando != "q")
    {

        try
        {
            input = string2int(commando);
            if (isFirstRun)
            {
                isFirstRun = false;
                if (scanIntInit(regions, results, pid, input) != 0)
                {
                    printError("could not scan memory");
                    return 1;
                }
            }
            else
            {
                if (scanIntResults(results, pid, input) != 0)
                {
                    std::cout << "could not scan memory" << std::endl;
                    return 1;
                }
            }

        }
        catch (int e)
        {
            if (e == 1)
            {
                if (commando == "help")
                {
                    printHelp();
                }

                if (commando == "list")
                {
                    printResults(results);
                }

                if (commando == "update")
                {
                    if (updateIntResults(results, pid) != 0)
                    {
                        printError("could not scan memory");
                        return 1;
                    }
                }

                if (commando == "ulist")
                {
                    if (updateIntResults(results, pid) != 0)
                    {
                        printError("could not scan memory");
                        return 1;
                    }
                    printResults(results);
                }

                if (commando == "info")
                {
                    std::cout << std::endl << "scan regions: " << std::endl;
                    int adresses = 0;
                    for(std::vector<scanRegion>::iterator it = regions.begin(); it != regions.end(); ++it)
                    {
                        scanRegion sr = (scanRegion) *it;
                        std::cout << std::hex << sr.startRegion << " - " << sr.endRegion << std::dec <<std::endl;
                        adresses += sr.endRegion - sr.startRegion;
                    }
                    std::cout << std::endl << adresses << " adresses" << std::endl;

                }

                if (commando == "reset")
                {
                    regions.clear();
                    results.clear();
                    isFirstRun = true;
                    // get read/writeable scan regions
                    if (getRegions(regions, pid) != 0)
                    {
                        printError("could not get regions");
                        return 1;
                    }

                }

                if (commando.substr(0, 3) == "pid")
                {
                    if (commando.length() < 5)
                    {
                        std::cout << "correct usage: pid <pid>" << std::endl;
                    }
                    else
                    {
                        int val = 0;
                        std::stringstream ss(commando.substr(4, commando.length()));
                        if ((ss >> val).fail())
                        {
                            printError("wrong parameter for pid command");
                        }
                        else
                        {
                            pid = val;
                            // reset
                            regions.clear();
                            results.clear();
                            isFirstRun = true;
                            // get read/writeable scan regions
                            if (getRegions(regions, pid) != 0)
                            {
                                printError("could not get regions");
                                return 1;
                            }
                        }
                    }
                }

                if (commando.substr(0, 3) == "set")
                {
                    if (commando.length() < 5)
                    {
                        std::cout << "correct usage: set 5" << std::endl;
                    }
                    else
                    {
                        int val = 0;
                        std::stringstream ss(commando.substr(4, commando.length()));
                        if ((ss >> val).fail())
                        {
                            printError("wrong parameter for set command");
                        }
                        else
                        {
                            if (setInt(results, pid, val) != 0)
                            {
                                std::cout << "could not set value" << std::endl;
                                return 1;
                            }
                        }
                    }
                }
            }
            else
            {
                printError("unknown");
            }
        }
        std::cout << results.size() << "> ";
        std::getline (std::cin, commando);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, -0x70(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq %rax, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
cmpl $0x1, %edi
jg 0x25ea
leaq -0x270(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x2a45(%rip), %rsi      # 0x5004
leaq 0x2a54(%rip), %rdx      # 0x501a
leaq -0x280(%rbp), %rdi
callq 0x3568
leaq -0x280(%rbp), %rdi
callq 0x40bb
movq -0x280(%rbp), %rdi
jmp 0x318c
movq 0x8(%rsi), %rdi
callq 0x2210
movq %rax, %rbx
testl %ebx, %ebx
je 0x2646
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
callq 0x3640
testl %eax, %eax
je 0x2683
leaq -0x230(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x2a00(%rip), %rsi      # 0x501b
leaq 0x2a0e(%rip), %rdx      # 0x5030
leaq -0x240(%rbp), %rdi
callq 0x3568
leaq -0x240(%rbp), %rdi
callq 0x40bb
movq -0x240(%rbp), %rdi
jmp 0x318c
leaq -0x250(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x29ac(%rip), %rsi      # 0x5004
leaq 0x29bb(%rip), %rdx      # 0x501a
leaq -0x260(%rbp), %rdi
callq 0x3568
leaq -0x260(%rbp), %rdi
callq 0x40bb
movq -0x260(%rbp), %rdi
jmp 0x318c
movq 0x4946(%rip), %r14      # 0x6fd0
leaq 0x29a0(%rip), %rsi      # 0x5031
movl $0x19, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x4914(%rip), %rdi      # 0x6fd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq -0x58(%rbp), %rsi
subq -0x60(%rbp), %rsi
sarq $0x4, %rsi
movq 0x48f4(%rip), %rdi      # 0x6fd0
callq 0x20d0
leaq 0x2963(%rip), %rsi      # 0x504b
movl $0x2, %edx
movq %rax, %rdi
callq 0x21e0
movq 0x48e4(%rip), %rdi      # 0x6fe0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %edx
movq 0x48c9(%rip), %rdi      # 0x6fe0
leaq -0xa0(%rbp), %rsi
callq 0x2310
leaq -0x210(%rbp), %r14
leaq -0x408(%rbp), %rax
addq $0x80, %rax
movq %rax, -0xd0(%rbp)
movb $0x1, %r13b
leaq -0xa0(%rbp), %r12
movl $0x0, -0x34(%rbp)
movq %r12, %rdi
leaq 0x28f5(%rip), %rsi      # 0x504e
callq 0x2050
testl %eax, %eax
je 0x31fc
movq %r12, %rdi
leaq 0x28e3(%rip), %rsi      # 0x5053
callq 0x2050
testl %eax, %eax
je 0x31fc
movq %r12, %rdi
callq 0x39f8
movl %eax, %r12d
testb $0x1, %r13b
je 0x2812
xorl %r13d, %r13d
leaq -0x200(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3460
leaq -0x200(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x4344
movl %eax, %r12d
movq -0x200(%rbp), %rdi
testq %rdi, %rdi
je 0x27d8
movq -0x1f0(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
testl %r12d, %r12d
je 0x2879
movq %r14, -0x220(%rbp)
leaq -0x220(%rbp), %r12
movq %r12, %rdi
leaq 0x285c(%rip), %rsi      # 0x5055
leaq 0x286a(%rip), %rdx      # 0x506a
callq 0x3568
movq %r12, %rdi
callq 0x40bb
jmp 0x3185
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x443d
testl %eax, %eax
je 0x287c
movl $0x15, %edx
movq 0x47a0(%rip), %rdi      # 0x6fd0
leaq 0x281e(%rip), %rsi      # 0x5055
callq 0x21e0
movq 0x478d(%rip), %rcx      # 0x6fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x476f(%rip), %rdi      # 0x6fd0
callq 0x2030
movl $0x1, %r12d
movq %rax, %rdi
callq 0x20e0
jmp 0x31a2
xorl %r13d, %r13d
movq -0x58(%rbp), %rsi
subq -0x60(%rbp), %rsi
sarq $0x4, %rsi
movq 0x4741(%rip), %rdi      # 0x6fd0
callq 0x20d0
leaq -0xa0(%rbp), %r12
movl $0x2, %edx
movq %rax, %rdi
leaq 0x27a1(%rip), %rsi      # 0x504b
callq 0x21e0
movq 0x472a(%rip), %rcx      # 0x6fe0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %edx
movq 0x470c(%rip), %rdi      # 0x6fe0
movq %r12, %rsi
callq 0x2310
jmp 0x274f
movq %rdx, -0x30(%rbp)
movq %rax, %r12
jmp 0x292b
movq %rdx, -0x30(%rbp)
movq %rax, %r12
movq -0x200(%rbp), %rdi
testq %rdi, %rdi
je 0x292b
movq -0x1f0(%rbp), %rsi
subq %rdi, %rsi
jmp 0x2926
movq %rdx, -0x30(%rbp)
movq %rax, %r12
movq -0x220(%rbp), %rdi
cmpq %r14, %rdi
je 0x292b
movq -0x210(%rbp), %rsi
incq %rsi
callq 0x21c0
xorl %r13d, %r13d
jmp 0x2937
movq %rdx, -0x30(%rbp)
movq %rax, %r12
cmpl $0x1, -0x30(%rbp)
jne 0x3413
movq %r12, %rdi
callq 0x2080
cmpl $0x1, (%rax)
jne 0x2af9
leaq -0xa0(%rbp), %rdi
leaq 0x270b(%rip), %rsi      # 0x506b
callq 0x2050
testl %eax, %eax
jne 0x296e
callq 0x411d
leaq -0xa0(%rbp), %rdi
leaq 0x26fc(%rip), %rsi      # 0x5078
callq 0x2050
testl %eax, %eax
jne 0x29bc
leaq -0x1e8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x34e4
leaq -0x1e8(%rbp), %rdi
callq 0x3f70
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x29bc
movq -0x1d8(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0xa0(%rbp), %rdi
leaq 0x26a6(%rip), %rsi      # 0x5070
callq 0x2050
testl %eax, %eax
je 0x2b5d
leaq -0xa0(%rbp), %rdi
leaq 0x2692(%rip), %rsi      # 0x5077
callq 0x2050
testl %eax, %eax
je 0x2bce
leaq -0xa0(%rbp), %rdi
leaq 0x267d(%rip), %rsi      # 0x507d
callq 0x2050
testl %eax, %eax
jne 0x2cb8
movq 0x45bc(%rip), %rdi      # 0x6fd0
callq 0x2090
movq %rax, %r12
movl $0xe, %edx
movq %rax, %rdi
leaq 0x2657(%rip), %rsi      # 0x5082
callq 0x21e0
movq %r12, %rdi
callq 0x2090
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq -0x78(%rbp), %rax
je 0x2c7b
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
movq 0x4566(%rip), %rdi      # 0x6fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rdi,%rax)
movq %rsi, -0x1b8(%rbp)
callq 0x20d0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x25f4(%rip), %rsi      # 0x5091
callq 0x21e0
movq %r12, %rdi
movq -0xc8(%rbp), %rsi
callq 0x20d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
callq 0x2090
movq -0xc8(%rbp), %rax
subl -0x1b8(%rbp), %eax
addl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
cmpq -0x78(%rbp), %rax
jne 0x2a51
jmp 0x2c82
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xf0(%rbp), %rdi
leaq 0x2612(%rip), %rsi      # 0x5127
leaq 0x2612(%rip), %rdx      # 0x512e
callq 0x3568
leaq -0xf0(%rbp), %rdi
callq 0x40bb
movq -0xf0(%rbp), %rdi
movb $0x1, %al
movl %eax, -0x30(%rbp)
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x3168
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3168
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
callq 0x4564
testl %eax, %eax
je 0x29d7
leaq -0x1a0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq 0x24c9(%rip), %rsi      # 0x5055
leaq 0x24d7(%rip), %rdx      # 0x506a
callq 0x3568
leaq -0x1b0(%rbp), %rdi
callq 0x40bb
movq -0x1b0(%rbp), %rdi
movl $0x1, -0x34(%rbp)
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x2df7
movq -0x1a0(%rbp), %rsi
jmp 0x2def
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
callq 0x4564
testl %eax, %eax
je 0x2c3b
leaq -0x180(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x190(%rbp), %rdi
leaq 0x245c(%rip), %rsi      # 0x5055
leaq 0x246a(%rip), %rdx      # 0x506a
callq 0x3568
leaq -0x190(%rbp), %rdi
callq 0x40bb
movq -0x190(%rbp), %rdi
movl $0x1, -0x34(%rbp)
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x2df7
movq -0x180(%rbp), %rsi
jmp 0x2def
leaq -0x1d0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x34e4
leaq -0x1d0(%rbp), %rdi
callq 0x3f70
movq -0x1d0(%rbp), %rdi
testq %rdi, %rdi
je 0x29f2
movq -0x1c0(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0x29f2
movl $0x0, -0x3c(%rbp)
movq 0x4347(%rip), %rdi      # 0x6fd0
callq 0x2090
movq %rax, %rdi
movl -0x3c(%rbp), %esi
callq 0x22e0
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x23ea(%rip), %rsi      # 0x5095
callq 0x21e0
movq %r12, %rdi
callq 0x2090
leaq -0xa0(%rbp), %rdi
leaq 0x23d9(%rip), %rsi      # 0x509f
callq 0x2050
testl %eax, %eax
je 0x2d68
movl $0x3, %ecx
leaq -0x408(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
xorl %edx, %edx
callq 0x21d0
leaq -0x408(%rbp), %rdi
leaq 0x26b3(%rip), %rsi      # 0x53ae
callq 0x2050
movl %eax, %r12d
movq -0x408(%rbp), %rdi
leaq -0x3f8(%rbp), %rax
cmpq %rax, %rdi
je 0x2d25
movq -0x3f8(%rbp), %rsi
incq %rsi
callq 0x21c0
testl %r12d, %r12d
jne 0x2f94
movq -0x98(%rbp), %rcx
cmpq $0x4, %rcx
ja 0x2e03
movl $0x18, %edx
movq 0x4285(%rip), %rdi      # 0x6fd0
leaq 0x2353(%rip), %rsi      # 0x50a5
callq 0x21e0
movq 0x4272(%rip), %rdi      # 0x6fd0
callq 0x2090
jmp 0x2f94
movq -0x80(%rbp), %rax
cmpq %rax, -0x78(%rbp)
je 0x2d76
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
cmpq %rax, -0x58(%rbp)
je 0x2d84
movq %rax, -0x58(%rbp)
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
callq 0x3640
testl %eax, %eax
je 0x2ece
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x170(%rbp), %rdi
leaq 0x2268(%rip), %rsi      # 0x501b
leaq 0x2276(%rip), %rdx      # 0x5030
callq 0x3568
leaq -0x170(%rbp), %rdi
callq 0x40bb
movq -0x170(%rbp), %rdi
movl $0x1, -0x34(%rbp)
movb $0x1, %r13b
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x2df7
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x21c0
movl $0x0, -0x30(%rbp)
jmp 0x3168
movl $0x0, -0x38(%rbp)
movl $0x4, %edx
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x21d0
leaq -0x408(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x18, %edx
callq 0x2280
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x2e5c
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x408(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
setne %r12b
je 0x2ed6
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x150(%rbp), %rdi
leaq 0x2224(%rip), %rsi      # 0x50be
leaq 0x223c(%rip), %rdx      # 0x50dd
callq 0x3568
leaq -0x150(%rbp), %rdi
callq 0x40bb
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
jne 0x2f59
jmp 0x2f69
movb $0x1, %r13b
jmp 0x2cd3
movq -0x80(%rbp), %rax
cmpq %rax, -0x78(%rbp)
je 0x2ee4
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
cmpq %rax, -0x58(%rbp)
je 0x2ef2
movq %rax, -0x58(%rbp)
movl -0x38(%rbp), %ebx
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
callq 0x3640
testl %eax, %eax
je 0x2f66
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
leaq 0x20fb(%rip), %rsi      # 0x501b
leaq 0x2109(%rip), %rdx      # 0x5030
callq 0x3568
leaq -0x130(%rbp), %rdi
callq 0x40bb
movq -0x130(%rbp), %rdi
movl $0x1, -0x34(%rbp)
movb $0x1, %r13b
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x317d
movq (%rax), %rsi
incq %rsi
callq 0x21c0
jmp 0x2f6c
movb $0x1, %r13b
movb $0x1, %r12b
leaq -0x408(%rbp), %rdi
movq 0x4036(%rip), %rsi      # 0x6fb0
callq 0x2110
movq -0xd0(%rbp), %rdi
callq 0x2060
testb %r12b, %r12b
je 0x2df7
movl $0x3, %ecx
leaq -0x408(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
xorl %edx, %edx
callq 0x21d0
leaq -0x408(%rbp), %rdi
leaq 0x20e5(%rip), %rsi      # 0x50a1
callq 0x2050
movl %eax, %r12d
movq -0x408(%rbp), %rdi
leaq -0x3f8(%rbp), %rax
cmpq %rax, %rdi
je 0x2fe6
movq -0x3f8(%rbp), %rsi
incq %rsi
callq 0x21c0
movb $0x1, %al
movl %eax, -0x30(%rbp)
testl %r12d, %r12d
jne 0x3168
movq -0x98(%rbp), %rcx
cmpq $0x4, %rcx
ja 0x302a
movl $0x14, %edx
movq 0x3fc3(%rip), %rdi      # 0x6fd0
leaq 0x20ca(%rip), %rsi      # 0x50de
callq 0x21e0
movq 0x3fb0(%rip), %rdi      # 0x6fd0
callq 0x2090
jmp 0x3168
movl $0x0, -0x38(%rbp)
movl $0x4, %edx
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x21d0
leaq -0x408(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x18, %edx
callq 0x2280
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x3083
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x408(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x30fe
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x2036(%rip), %rsi      # 0x50f3
leaq 0x204e(%rip), %rdx      # 0x5112
callq 0x3568
leaq -0x110(%rbp), %rdi
callq 0x40bb
movq -0x110(%rbp), %rdi
movb $0x1, %al
movl %eax, -0x30(%rbp)
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x3149
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3149
movl -0x38(%rbp), %edx
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
callq 0x45fd
testl %eax, %eax
je 0x3144
movl $0x13, %edx
movq 0x3eb4(%rip), %rdi      # 0x6fd0
leaq 0x1ff0(%rip), %rsi      # 0x5113
callq 0x21e0
movq 0x3ea1(%rip), %rdi      # 0x6fd0
callq 0x2090
movl $0x1, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
jmp 0x3149
movb $0x1, %al
movl %eax, -0x30(%rbp)
leaq -0x408(%rbp), %rdi
movq 0x3e59(%rip), %rsi      # 0x6fb0
callq 0x2110
movq -0xd0(%rbp), %rdi
callq 0x2060
callq 0x22b0
movl -0x34(%rbp), %r12d
cmpb $0x0, -0x30(%rbp)
jne 0x287c
jmp 0x31a2
xorl %r12d, %r12d
jmp 0x2f6c
movq -0x220(%rbp), %rdi
cmpq %r14, %rdi
je 0x319c
movq (%r14), %rsi
incq %rsi
callq 0x21c0
movl $0x1, %r12d
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x31b7
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x31cc
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x31e7
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21c0
movl %r12d, %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x31a2
jmp 0x3282
movq %rax, %r12
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x3285
movq -0x100(%rbp), %rsi
jmp 0x3278
jmp 0x3282
jmp 0x32a9
jmp 0x338e
jmp 0x338e
jmp 0x338e
movq %rax, %r12
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x3285
movq -0x120(%rbp), %rsi
jmp 0x3278
jmp 0x3282
jmp 0x3282
movq %rax, %r12
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x3285
movq -0x140(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3285
movq %rax, %r12
movq 0x3d24(%rip), %rsi      # 0x6fb0
leaq -0x408(%rbp), %rdi
callq 0x2110
leaq -0x388(%rbp), %rdi
callq 0x2060
jmp 0x33b1
movq %rax, %r12
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x33b1
movq -0xb0(%rbp), %rsi
jmp 0x3387
jmp 0x338e
movq %rax, %r12
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x33b1
movq -0x160(%rbp), %rsi
jmp 0x3387
jmp 0x338e
jmp 0x338e
jmp 0x338e
movq %rax, %r12
movq -0x1d0(%rbp), %rdi
testq %rdi, %rdi
je 0x33b1
movq -0x1c0(%rbp), %rsi
jmp 0x33a9
movq %rax, %r12
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x33b1
movq -0x180(%rbp), %rsi
jmp 0x3387
jmp 0x338e
movq %rax, %r12
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x33b1
movq -0x1a0(%rbp), %rsi
jmp 0x3387
jmp 0x338e
movq %rax, %r12
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x33b1
movq -0xe0(%rbp), %rsi
incq %rsi
jmp 0x33ac
jmp 0x338e
movq %rax, %r12
jmp 0x33b1
movq %rax, %r12
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x33b1
movq -0x1d8(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
callq 0x22b0
jmp 0x3413
movq %rax, %r12
movq -0x260(%rbp), %rdi
cmpq %r14, %rdi
je 0x3413
movq -0x250(%rbp), %rsi
jmp 0x3404
jmp 0x3410
movq %rax, %r12
movq -0x240(%rbp), %rdi
cmpq %r14, %rdi
je 0x3413
movq -0x230(%rbp), %rsi
jmp 0x3404
jmp 0x3410
jmp 0x3410
movq %rax, %r12
movq -0x280(%rbp), %rdi
cmpq %r14, %rdi
je 0x3413
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3413
jmp 0x3410
movq %rax, %r12
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x3428
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x343d
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x3458
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %r12, %rdi
callq 0x22f0