// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
leaq 0xc(%rsp), %rsi
callq 0x5437
testq %rax, %rax
je 0x5ff2
movq %rax, %rbx
leaq 0x5fb4(%rip), %rdi      # 0xbdeb
callq 0x1050
leaq 0xd0(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x57e8
movq 0x9188(%rip), %r13      # 0xefe0
movq (%r13), %rdi
leaq 0x5eba(%rip), %rsi      # 0xbd1d
pushq $0x1
popq %r9
xorl %edx, %edx
movq %r12, %rcx
movl $0xc0, %r8d
callq 0x5300
movq (%r13), %rdi
leaq 0x5ea6(%rip), %rsi      # 0xbd28
pushq $0x60
popq %r8
xorl %edx, %edx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
leaq 0x130(%rsp), %rcx
leaq 0x5e8d(%rip), %rsi      # 0xbd33
pushq $0x30
popq %r8
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
movl $0x90, %r15d
leaq (%r12,%r15), %rcx
leaq 0x5e75(%rip), %rsi      # 0xbd3e
pushq $0x18
popq %r8
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
movl $0xa8, %ebp
leaq (%r12,%rbp), %rcx
leaq 0x5e5e(%rip), %rsi      # 0xbd49
pushq $0x10
popq %r8
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
movl $0xb8, %eax
addq %rax, %r12
leaq 0x5e48(%rip), %r14      # 0xbd54
pushq $0x8
popq %r8
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0x5300
leaq 0x10(%rsp), %r12
pushq $0xa
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x57e8
movq (%r13), %rdi
leaq 0x5e21(%rip), %rsi      # 0xbd5f
xorl %edx, %edx
movq %r12, %rcx
movl $0xc0, %r8d
pushq $0x1
popq %r9
callq 0x5300
movq (%r13), %rdi
leaq 0x5dcb(%rip), %rsi      # 0xbd28
xorl %edx, %edx
movq %r12, %rcx
pushq $0x60
popq %r8
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
leaq 0x70(%rsp), %rcx
leaq 0x5db5(%rip), %rsi      # 0xbd33
xorl %edx, %edx
pushq $0x30
popq %r8
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
addq %r12, %r15
leaq 0x5da4(%rip), %rsi      # 0xbd3e
xorl %edx, %edx
movq %r15, %rcx
pushq $0x18
popq %r8
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
addq %r12, %rbp
leaq 0x5d90(%rip), %rsi      # 0xbd49
xorl %edx, %edx
movq %rbp, %rcx
pushq $0x10
popq %r8
xorl %r9d, %r9d
callq 0x5300
movq (%r13), %rdi
movl $0xb8, %eax
addq %rax, %r12
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
pushq $0x8
popq %r8
xorl %r9d, %r9d
callq 0x5300
movq %rbx, %rdi
callq 0x1030
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq