// File: /workspace/github_c_makefile_star2_O0/Jesskas[P]decompisas/source/fileformat/pe.c
// Function: parseWin32
void parseWin32(FILE* fp, long fileSize) {
    unsigned int width = 0x400; // TODO: Handle better! 0x400 seems to be enough for Windows.

    //struct DOS_Header dos_Header = { 0 }; // TODO: Populate values in DOS_Header.
    struct COFFHeader coffHeader = { 0 };
    struct PEOptHeader peOptHeader = { 0 };

    // TODO: The structure here was originally taken from the print() functions
    // in main(), which, featured an actual loop. This is not a true loop.
    // refactor this.
    int endOfFile = 0;
    while (!endOfFile) {
        unsigned char* buffer = (unsigned char*)malloc(width);
        unsigned int amountRead = fread(buffer, sizeof(unsigned char), width, fp);
        if (amountRead < width) {
            endOfFile = 1;
        }

        int pePtr = buffer[60];
        printf("PE Header listed to be at offset %d (%02X)\n", pePtr, pePtr);

        if (amountRead < pePtr) { // TODO: Handle separately
            fprintf(stderr, "Invalid file (amountRead < pePtr)\n"); exit(-1);
        }

        const char peCheck[3] = { buffer[pePtr], buffer[pePtr+1] };

        if (strcmp(peCheck, "PE")) { // TODO: Handle separately
            fprintf(stderr, "Invalid file (peCheck != PE)\n"); exit(-1);
        }

        unsigned int coffOffset = pePtr+4;

        // TODO: For debugging/detail functionality, implement printf methods of the struct
        coffHeader.Machine =
            MAKE_SHORT(buffer[coffOffset+1], buffer[coffOffset]);
        coffHeader.NumberOfSections =
            MAKE_SHORT(buffer[coffOffset+3], buffer[coffOffset+2]);
        coffHeader.TimeDateStamp =
            MAKE_LONG(buffer[coffOffset+7], buffer[coffOffset+6],
                buffer[coffOffset+5], buffer[coffOffset+4]);
        coffHeader.PointerToSymbolTable =
            MAKE_LONG(buffer[coffOffset+11], buffer[coffOffset+10],
                buffer[coffOffset+9], buffer[coffOffset+8]);
        coffHeader.NumberOfSymbols =
            MAKE_LONG(buffer[coffOffset+15], buffer[coffOffset+14],
                buffer[coffOffset+13], buffer[coffOffset+12]);
        coffHeader.SizeOfOptionalHeader =
            MAKE_SHORT(buffer[coffOffset+17], buffer[coffOffset+16]);
        coffHeader.Characteristics =
            MAKE_SHORT(buffer[coffOffset+19], buffer[coffOffset+18]);

        unsigned int peOptOffset = coffOffset + sizeof(struct COFFHeader);

        int filePeOptSigCheck =
            MAKE_SHORT(buffer[peOptOffset+1], buffer[peOptOffset]);
        if (filePeOptSigCheck != 267 && filePeOptSigCheck != 523
            && filePeOptSigCheck != 263) {
            fprintf(stderr, "Incompatible file (filePeOptSigCheck not \
              267, 523, or 263)\nThis may have been created in Cygwin,\
               which is not yet handled.\n");

            printf("Dumping COFFHeader:\n");
            printCOFFHeader(coffHeader);

            exit(-1);
        }

        printf("filePeOptSigCheck = %d (267=32b, 523=64b)\n", filePeOptSigCheck);

        peOptHeader.signature = filePeOptSigCheck;
        peOptHeader.MajorLinkerVersion = buffer[peOptOffset+2];
        peOptHeader.MinorLinkerVersion = buffer[peOptOffset+3];
        peOptHeader.SizeOfCode =
            MAKE_LONG(buffer[peOptOffset+7], buffer[peOptOffset+6],
                buffer[peOptOffset+5], buffer[peOptOffset+4]);
        peOptHeader.SizeOfInitializedData =
            MAKE_LONG(buffer[peOptOffset+11], buffer[peOptOffset+10],
                buffer[peOptOffset+9], buffer[peOptOffset+8]);
        peOptHeader.SizeOfUninitializedData =
            MAKE_LONG(buffer[peOptOffset+15], buffer[peOptOffset+14],
                buffer[peOptOffset+13], buffer[peOptOffset+12]);
        peOptHeader.AddressOfEntryPoint =
            MAKE_LONG(buffer[peOptOffset+19], buffer[peOptOffset+18],
                buffer[peOptOffset+17], buffer[peOptOffset+16]);
        peOptHeader.BaseOfCode =
            MAKE_LONG(buffer[peOptOffset+23], buffer[peOptOffset+22],
                buffer[peOptOffset+21], buffer[peOptOffset+20]);
        peOptHeader.BaseOfData =
            MAKE_LONG(buffer[peOptOffset+27], buffer[peOptOffset+22],
                buffer[peOptOffset+25], buffer[peOptOffset+24]);
        peOptHeader.ImageBase =
            MAKE_LONG(buffer[peOptOffset+31], buffer[peOptOffset+30],
                buffer[peOptOffset+29], buffer[peOptOffset+28]);
        peOptHeader.SectionAlignment =
            MAKE_LONG(buffer[peOptOffset+35], buffer[peOptOffset+34],
                buffer[peOptOffset+33], buffer[peOptOffset+32]);
        peOptHeader.FileAlignment =
            MAKE_LONG(buffer[peOptOffset+39], buffer[peOptOffset+38],
                buffer[peOptOffset+37], buffer[peOptOffset+36]);
        peOptHeader.MajorOSVersion =
            MAKE_SHORT(buffer[peOptOffset+41], buffer[peOptOffset+40]);
        peOptHeader.MinorOSVersion =
            MAKE_SHORT(buffer[peOptOffset+43], buffer[peOptOffset+42]);
        peOptHeader.MajorImageVersion =
            MAKE_SHORT(buffer[peOptOffset+45], buffer[peOptOffset+44]);
        peOptHeader.MinorImageVersion =
            MAKE_SHORT(buffer[peOptOffset+47], buffer[peOptOffset+46]);
        peOptHeader.MajorSubsystemVersion =
            MAKE_SHORT(buffer[peOptOffset+49], buffer[peOptOffset+48]);
        peOptHeader.MinorSubsystemVersion =
            MAKE_SHORT(buffer[peOptOffset+51], buffer[peOptOffset+50]);
        peOptHeader.Win32VersionValue =
            MAKE_LONG(buffer[peOptOffset+55], buffer[peOptOffset+54],
                buffer[peOptOffset+53], buffer[peOptOffset+52]);
        peOptHeader.SizeOfImage =
            MAKE_LONG(buffer[peOptOffset+59], buffer[peOptOffset+58],
                buffer[peOptOffset+57], buffer[peOptOffset+56]);
        peOptHeader.SizeOfHeaders =
            MAKE_LONG(buffer[peOptOffset+63], buffer[peOptOffset+62],
                buffer[peOptOffset+61], buffer[peOptOffset+60]);
        peOptHeader.Checksum =
            MAKE_LONG(buffer[peOptOffset+67], buffer[peOptOffset+66],
                buffer[peOptOffset+65], buffer[peOptOffset+64]);
        peOptHeader.Subsystem =
            MAKE_SHORT(buffer[peOptOffset+69], buffer[peOptOffset+68]);
        peOptHeader.DLLCharacteristics =
            MAKE_SHORT(buffer[peOptOffset+71], buffer[peOptOffset+70]);
        peOptHeader.SizeOfStackReserve =
            MAKE_LONG(buffer[peOptOffset+75], buffer[peOptOffset+74],
                buffer[peOptOffset+73], buffer[peOptOffset+72]);
        peOptHeader.SizeOfStackCommit =
            MAKE_LONG(buffer[peOptOffset+79], buffer[peOptOffset+78],
                buffer[peOptOffset+77], buffer[peOptOffset+76]);
        peOptHeader.SizeOfHeapReserve =
            MAKE_LONG(buffer[peOptOffset+83], buffer[peOptOffset+82],
                buffer[peOptOffset+81], buffer[peOptOffset+80]);
        peOptHeader.SizeOfHeapCommit =
            MAKE_LONG(buffer[peOptOffset+87], buffer[peOptOffset+86],
                buffer[peOptOffset+85], buffer[peOptOffset+84]);
        peOptHeader.LoaderFlags =
            MAKE_LONG(buffer[peOptOffset+91], buffer[peOptOffset+90],
                buffer[peOptOffset+89], buffer[peOptOffset+88]);
        peOptHeader.NumberOfRvaAndSizes =
            MAKE_LONG(buffer[peOptOffset+95], buffer[peOptOffset+94],
                buffer[peOptOffset+93], buffer[peOptOffset+92]);

        unsigned int dataDirOffset = peOptOffset + 96;

        peOptHeader.DataDirectory =
            (struct data_directory*)malloc(
                sizeof(struct data_directory)*peOptHeader.NumberOfRvaAndSizes);
        int i;
        for (i = 0; i < peOptHeader.NumberOfRvaAndSizes; i++) {
            struct data_directory data_dir = { 0 };
            data_dir.VirtualAddress =
                MAKE_LONG(buffer[dataDirOffset+i*8+3], buffer[dataDirOffset+i*8+2],
                    buffer[dataDirOffset+i*8+1], buffer[dataDirOffset+i*8]);
            data_dir.Size =
                MAKE_LONG(buffer[dataDirOffset+i*8+7], buffer[dataDirOffset+i*8+6],
                    buffer[dataDirOffset+i*8+5], buffer[dataDirOffset+i*8+4]);

            peOptHeader.DataDirectory[i] = data_dir;
        }

        // Starts at the offset at which ".text" and other sections begin.
        unsigned int sectionOffset = dataDirOffset +
            (peOptHeader.NumberOfRvaAndSizes)*sizeof(struct data_directory);

        struct FCSection* fileCodeSections =
            (struct FCSection*)malloc(sizeof(struct FCSection)*coffHeader.NumberOfSections);
        unsigned char* fileCodeSectionBuffers[4];

        for (i = 0; i < coffHeader.NumberOfSections; i++) {
            struct FCSection fileCodeSection = {{ 0 }};

            // SectionName
            char secName[8];
            int j;
            for (j = 0; j < 8; j++)
                secName[j] = buffer[sectionOffset+i*0x28+j];
            memcpy(fileCodeSection.SectionName, secName, sizeof(char)*8);

            fileCodeSection.SectionSize =
                MAKE_LONG(buffer[sectionOffset+i*0x28+11], buffer[sectionOffset+i*0x28+10],
                buffer[sectionOffset+i*0x28+9], buffer[sectionOffset+i*0x28+8]);
            fileCodeSection.RVA =
                MAKE_LONG(buffer[sectionOffset+i*0x28+15], buffer[sectionOffset+i*0x28+14],
                buffer[sectionOffset+i*0x28+13], buffer[sectionOffset+i*0x28+12]);
            fileCodeSection.PhysicalSize =
                MAKE_LONG(buffer[sectionOffset+i*0x28+19], buffer[sectionOffset+i*0x28+18],
                buffer[sectionOffset+i*0x28+17], buffer[sectionOffset+i*0x28+16]);
            fileCodeSection.PhysicalLocation =
                MAKE_LONG(buffer[sectionOffset+i*0x28+23], buffer[sectionOffset+i*0x28+22],
                buffer[sectionOffset+i*0x28+21], buffer[sectionOffset+i*0x28+20]);
            // TODO: fileCodeSection.Reserved.
            fileCodeSection.SectionFlags =
                MAKE_LONG(buffer[sectionOffset+i*0x28+39], buffer[sectionOffset+i*0x28+38],
                buffer[sectionOffset+i*0x28+37], buffer[sectionOffset+i*0x28+36]);

            fileCodeSections[i] = fileCodeSection;
        }
        free(buffer);


        for (i = 0; i < coffHeader.NumberOfSections; i++) {
            // TODO: Get to location finet's
            if (fseek(fp, 0l, SEEK_SET) != 0) {
                printf("Error seeking back to zero (parseWin32).\n");
            }

            if (fseek(fp, fileCodeSections[i].PhysicalLocation, SEEK_SET) != 0) {
                printf("Error seeking to PhysicalLocation.\n");
                printf("Cygwin!GCC Error? Dumping headers:\n");
                printCOFFHeader(coffHeader);
                printPEOptHeader(peOptHeader);
                printFCSection(fileCodeSections[i]);
                exit(-1);
            }

            unsigned int sectionSize = fileCodeSections[i].PhysicalSize;
            unsigned char* sectionBuffer = (unsigned char*)malloc(
                sizeof(unsigned char)*sectionSize);

            unsigned int amountOfSectionRead = fread(sectionBuffer,
                sizeof(unsigned char), sectionSize, fp);
            if (amountOfSectionRead < sectionSize) {
                // TODO: Check and fail
                printf("amountOfSectionRead < sectionSize\n");
            }

            fileCodeSectionBuffers[i] = sectionBuffer;
        }

        printf("\nDisassembly below:\n\n");
        for (i = 0; i < coffHeader.NumberOfSections; i++) {
            long int executableFlag = 0x20000000; // later, turn into a define

            if (fileCodeSections[i].SectionFlags & executableFlag) {
                if (coffHeader.Machine ==0x8664 || coffHeader.Machine ==0x14c) {
                    if (fileCodeSections[i].PhysicalSize != 0) {
                        disassemble_x86(fileCodeSections[i].SectionName,
                            fileCodeSections[i].RVA + peOptHeader.ImageBase,
                            fileCodeSectionBuffers[i],
                            fileCodeSections[i].PhysicalSize);
                    } else {
                        printf("%s:0x%08X\t\t; empty executable code section\n",
                            fileCodeSections[i].SectionName,
                            fileCodeSections[i].RVA + peOptHeader.ImageBase);
                    }
                } else {
                  printf("This architecture is not yet handled.\n");
                }
            }
        }

        // TODO: Free all memory!!
        free(peOptHeader.DataDirectory);
        free(fileCodeSections);
        for (i = 0; i < coffHeader.NumberOfSections; i++) {
            free(fileCodeSectionBuffers[i]);
        }

        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x400, -0x14(%rbp)     # imm = 0x400
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x1060
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x1060
movl $0x0, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x38bc
jmp 0x4fcf
movl -0x14(%rbp), %eax
movl %eax, %edi
callq 0x10b0
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x1040
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x3902
movl $0x1, -0x94(%rbp)
movq -0xa0(%rbp), %rax
movzbl 0x3c(%rax), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %esi
movl -0xa8(%rbp), %edx
leaq 0xa170(%rip), %rdi      # 0xda96
movb $0x0, %al
callq 0x1050
movl -0xa4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jae 0x395d
movq 0xd6b6(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0xa176(%rip), %rsi      # 0xdac2
movb $0x0, %al
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movq -0xa0(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xab(%rbp)
movq -0xa0(%rbp), %rax
movl -0xa8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0xaa(%rbp)
leaq -0xab(%rbp), %rax
addq $0x2, %rax
leaq -0xab(%rbp), %rcx
addq $0x3, %rcx
movq %rcx, -0x190(%rbp)
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq -0x190(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x188(%rbp)
jne 0x39b4
leaq -0xab(%rbp), %rdi
leaq 0xa102(%rip), %rsi      # 0xdae5
callq 0x1070
cmpl $0x0, %eax
je 0x3a0f
movq 0xd604(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0xa0ea(%rip), %rsi      # 0xdae8
movb $0x0, %al
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movl -0xa8(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xb0(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x28(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x26(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x7, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x6, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x5, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x4, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0xb, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0xa, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x9, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x8, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0xf, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0xe, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0xd, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0xc, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x11, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x10, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x18(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x13, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb0(%rbp), %edx
addl $0x12, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x16(%rbp)
movl -0xb0(%rbp), %eax
addq $0x14, %rax
movl %eax, -0xb4(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0xb8(%rbp)
cmpl $0x10b, -0xb8(%rbp)     # imm = 0x10B
je 0x3ce1
cmpl $0x20b, -0xb8(%rbp)     # imm = 0x20B
je 0x3ce1
cmpl $0x107, -0xb8(%rbp)     # imm = 0x107
je 0x3ce1
movq 0xd360(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x9e64(%rip), %rsi      # 0xdb06
movb $0x0, %al
callq 0x1080
leaq 0x9eee(%rip), %rdi      # 0xdb9e
movb $0x0, %al
callq 0x1050
leaq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x5080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movl -0xb8(%rbp), %esi
leaq 0x9ec5(%rip), %rdi      # 0xdbb3
movb $0x0, %al
callq 0x1050
movl -0xb8(%rbp), %eax
movw %ax, -0x90(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x8e(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x8d(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x7, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x6, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x5, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x4, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x8c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0xb, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0xa, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x9, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x8, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x88(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0xf, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0xe, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0xd, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0xc, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x84(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x13, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x12, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x11, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x10, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x80(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x17, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x16, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x15, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x14, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x7c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x1b, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x16, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x19, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x18, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x78(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x1f, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x1e, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x1d, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x1c, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x74(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x23, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x22, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x21, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x20, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x70(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x27, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x26, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x25, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x24, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x6c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x29, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x28, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x68(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x2b, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x2a, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x66(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x2d, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x2c, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x64(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x2f, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x2e, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x62(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x31, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x30, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x60(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x33, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x32, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x5e(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x37, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x36, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x35, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x34, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x3b, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x3a, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x39, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x38, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x3f, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x3e, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x3d, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x3c, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x43, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x42, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x41, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x40, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x50(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x45, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x44, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x4c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x47, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x46, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movw %ax, -0x4a(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x4b, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x4a, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x49, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x48, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x48(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x4f, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x4e, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x4d, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x4c, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x44(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x53, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x52, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x51, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x50, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x40(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x57, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x56, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x55, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x54, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x5b, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x5a, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x59, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x58, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0xa0(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x5f, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x5e, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x5d, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xb4(%rbp), %edx
addl $0x5c, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0xb4(%rbp), %eax
addl $0x60, %eax
movl %eax, -0xbc(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x10b0
movq %rax, -0x30(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x486d
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1060
movq -0xa0(%rbp), %rax
movl -0xbc(%rbp), %ecx
movl -0xc0(%rbp), %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0xc8(%rbp)
movq -0xa0(%rbp), %rax
movl -0xbc(%rbp), %ecx
movl -0xc0(%rbp), %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x7, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
addl $0x6, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
addl $0x5, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %esi
shll $0x3, %esi
addl %esi, %edx
addl $0x4, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0xc4(%rbp)
movq -0x30(%rbp), %rax
movslq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x46f2
movl -0xbc(%rbp), %eax
movl -0x34(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movl %eax, -0xcc(%rbp)
movswq -0x26(%rbp), %rax
imulq $0x28, %rax, %rdi
callq 0x10b0
movq %rax, -0xd8(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4c37
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x1060
movl $0x0, -0x134(%rbp)
cmpl $0x8, -0x134(%rbp)
jge 0x491a
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl -0x134(%rbp), %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movslq -0x134(%rbp), %rax
movb %cl, -0x130(%rbp,%rax)
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x48d1
movq -0x130(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl $0xb, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0xa, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x9, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x8, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x120(%rbp)
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl $0xf, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0xe, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0xd, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0xc, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x11c(%rbp)
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl $0x13, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x12, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x11, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x10, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x118(%rbp)
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl $0x17, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x16, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x15, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x14, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x114(%rbp)
movq -0xa0(%rbp), %rax
movl -0xcc(%rbp), %ecx
imull $0x28, -0xc0(%rbp), %edx
addl %edx, %ecx
addl $0x27, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x26, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x25, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0xa0(%rbp), %rcx
movl -0xcc(%rbp), %edx
imull $0x28, -0xc0(%rbp), %esi
addl %esi, %edx
addl $0x24, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x104(%rbp)
movq -0xd8(%rbp), %rdi
movslq -0xc0(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x128(%rbp), %rsi
movl $0x28, %edx
callq 0x10a0
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x48a2
movq -0xa0(%rbp), %rdi
callq 0x1030
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4e23
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x10c0
cmpl $0x0, %eax
je 0x4c81
leaq 0x8f64(%rip), %rdi      # 0xdbde
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rsi
xorl %edx, %edx
callq 0x10c0
cmpl $0x0, %eax
je 0x4d84
leaq 0x8f53(%rip), %rdi      # 0xdc08
movb $0x0, %al
callq 0x1050
leaq 0x8f69(%rip), %rdi      # 0xdc2c
movb $0x0, %al
callq 0x1050
leaq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x5080
movq -0x30(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movups -0x40(%rbp), %xmm0
movups %xmm0, 0x50(%rax)
movups -0x50(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x90(%rbp), %xmm0
movups -0x80(%rbp), %xmm1
movups -0x70(%rbp), %xmm2
movups -0x60(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x50d0
movq -0xd8(%rbp), %rsi
movslq -0xc0(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
leaq -0x160(%rbp), %rdi
movl $0x28, %edx
callq 0x10a0
movq -0x140(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x160(%rbp), %xmm0
movups -0x150(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x52d0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x164(%rbp)
movl -0x164(%rbp), %eax
movl %eax, %edi
shlq $0x0, %rdi
callq 0x10b0
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
movl -0x164(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x1040
movl %eax, -0x174(%rbp)
movl -0x174(%rbp), %eax
cmpl -0x164(%rbp), %eax
jae 0x4df9
leaq 0x8e5e(%rip), %rdi      # 0xdc50
movb $0x0, %al
callq 0x1050
movq -0x170(%rbp), %rcx
movslq -0xc0(%rbp), %rax
movq %rcx, -0x100(%rbp,%rax,8)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x4c4d
leaq 0x8e49(%rip), %rdi      # 0xdc73
movb $0x0, %al
callq 0x1050
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4f7b
movq $0x20000000, -0x180(%rbp) # imm = 0x20000000
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x24(%rax), %rax
andq -0x180(%rbp), %rax
cmpq $0x0, %rax
je 0x4f65
movswl -0x28(%rbp), %eax
cmpl $0x8664, %eax           # imm = 0x8664
je 0x4e9c
movswl -0x28(%rbp), %eax
cmpl $0x14c, %eax            # imm = 0x14C
jne 0x4f55
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
je 0x4f15
movq -0xd8(%rbp), %rdi
movslq -0xc0(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %esi
addl -0x74(%rbp), %esi
movslq -0xc0(%rbp), %rax
movq -0x100(%rbp,%rax,8), %rdx
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
callq 0x5310
jmp 0x4f53
movq -0xd8(%rbp), %rsi
movslq -0xc0(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
movq -0xd8(%rbp), %rax
movslq -0xc0(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %edx
addl -0x74(%rbp), %edx
leaq 0x8d3d(%rip), %rdi      # 0xdc89
movb $0x0, %al
callq 0x1050
jmp 0x4f63
leaq 0x8d59(%rip), %rdi      # 0xdcb5
movb $0x0, %al
callq 0x1050
jmp 0x4f65
jmp 0x4f67
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x4e3b
movq -0x30(%rbp), %rdi
callq 0x1030
movq -0xd8(%rbp), %rdi
callq 0x1030
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4fcd
movslq -0xc0(%rbp), %rax
movq -0x100(%rbp,%rax,8), %rdi
callq 0x1030
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x4f9a
jmp 0x4fcf
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nopl (%rax,%rax)