// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_list_infos
void eid0_list_infos(s8 *file_in) {
    u32 length;
    eid05_section_t *sptr;
    u8 *eid0 = _read_buffer(file_in, &length);

    if (eid0 != NULL) {
        printf("EID0:\n");

        u8 section_0[EID0_SECTION_0_SIZE];
        eid0_decrypt_section(eid0, section_0, 0);
        _hexdump(stdout, "Section 0:", 0, section_0, EID0_SECTION_0_SIZE, TRUE);
        sptr = (eid05_section_t *) section_0;
        _hexdump(stdout, " Data:    ", 0, sptr->data, 0x60, FALSE);
        _hexdump(stdout, " Common:  ", 0, sptr->common, 0x30, FALSE);
        _hexdump(stdout, " Unk:     ", 0, sptr->unk, 0x18, FALSE);
        _hexdump(stdout, " OMAC:    ", 0, sptr->omac, 0x10, FALSE);
        _hexdump(stdout, " Pad:     ", 0, sptr->pad, 0x08, FALSE);

        u8 section_A[EID0_SECTION_A_SIZE];
        eid0_decrypt_section(eid0, section_A, 10);
        _hexdump(stdout, "Section A:", 0, section_A, EID0_SECTION_A_SIZE, TRUE);
        sptr = (eid05_section_t *) section_A;
        _hexdump(stdout, " Data:    ", 0, sptr->data, 0x60, FALSE);
        _hexdump(stdout, " Common:  ", 0, sptr->common, 0x30, FALSE);
        _hexdump(stdout, " Unk:     ", 0, sptr->unk, 0x18, FALSE);
        _hexdump(stdout, " OMAC:    ", 0, sptr->omac, 0x10, FALSE);
        _hexdump(stdout, " Pad:     ", 0, sptr->pad, 0x08, FALSE);

        free(eid0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x9960
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xaa23
leaq 0x657d(%rip), %rdi      # 0x10d4f
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
xorl %edx, %edx
callq 0x9fc0
movq 0x97ee(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
leaq -0xe0(%rbp), %rcx
leaq 0x6553(%rip), %rsi      # 0x10d56
xorl %edx, %edx
movl $0xc0, %r8d
movl $0x1, %r9d
callq 0x9830
leaq -0xe0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x97b8(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0x652b(%rip), %rsi      # 0x10d61
xorl %r9d, %r9d
movl $0x60, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x9792(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0x60, %rcx
leaq 0x650c(%rip), %rsi      # 0x10d6c
xorl %r9d, %r9d
movl $0x30, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x9768(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0x90, %rcx
leaq 0x64ea(%rip), %rsi      # 0x10d77
xorl %r9d, %r9d
movl $0x18, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x973b(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0xa8, %rcx
leaq 0x64c8(%rip), %rsi      # 0x10d82
xorl %r9d, %r9d
movl $0x10, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x970e(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0xb8, %rcx
leaq 0x64a6(%rip), %rsi      # 0x10d8d
xorl %r9d, %r9d
movl $0x8, %r8d
movl %r9d, %edx
callq 0x9830
movq -0x20(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0xa, %edx
callq 0x9fc0
movq 0x96cc(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
leaq -0x1a0(%rbp), %rcx
leaq 0x6473(%rip), %rsi      # 0x10d98
xorl %edx, %edx
movl $0xc0, %r8d
movl $0x1, %r9d
callq 0x9830
leaq -0x1a0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x9696(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0x6409(%rip), %rsi      # 0x10d61
xorl %r9d, %r9d
movl $0x60, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x9670(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0x60, %rcx
leaq 0x63ea(%rip), %rsi      # 0x10d6c
xorl %r9d, %r9d
movl $0x30, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x9646(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0x90, %rcx
leaq 0x63c8(%rip), %rsi      # 0x10d77
xorl %r9d, %r9d
movl $0x18, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x9619(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0xa8, %rcx
leaq 0x63a6(%rip), %rsi      # 0x10d82
xorl %r9d, %r9d
movl $0x10, %r8d
movl %r9d, %edx
callq 0x9830
movq 0x95ec(%rip), %rax      # 0x13fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
addq $0xb8, %rcx
leaq 0x6384(%rip), %rsi      # 0x10d8d
xorl %r9d, %r9d
movl $0x8, %r8d
movl %r9d, %edx
callq 0x9830
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)