LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/des.c
// Function: des3_set2key
static void des3_set2key(uint32_t esk[96],
        uint32_t dsk[96],
        const unsigned char key[DES_KEY_SIZE * 2]) {
    int i;

    des_setkey(esk, key);
    des_setkey(dsk + 32, key + 8);

    for (i = 0; i < 32; i += 2) {
        dsk[i ] = esk[30 - i];
        dsk[i + 1] = esk[31 - i];

        esk[i + 32] = dsk[62 - i];
        esk[i + 33] = dsk[63 - i];

        esk[i + 64] = esk[i ];
        esk[i + 65] = esk[i + 1];

        dsk[i + 64] = dsk[i ];
        dsk[i + 65] = dsk[i + 1];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x76f0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x76f0
movl $0x0, -0x1c(%rbp)
cmpl $0x20, -0x1c(%rbp)
jge 0x7ed1
movq -0x8(%rbp), %rax
movl $0x1e, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl $0x1f, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl $0x3e, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl $0x3f, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x21, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x41, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x41, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7dc0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/des.c
// Function: des3_set2key_dec
int des3_set2key_dec(des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 2]) {
    uint32_t sk[96];

    des3_set2key(sk, ctx->sk, key);
    memset(sk, 0, sizeof ( sk));

    return ( 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x190(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rdx
callq 0x7d80
leaq -0x190(%rbp), %rdi
xorl %esi, %esi
movl $0x180, %edx            # imm = 0x180
callq 0x1090
xorl %eax, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/des.c
// Function: des3_set3key
static void des3_set3key(uint32_t esk[96],
        uint32_t dsk[96],
        const unsigned char key[24]) {
    int i;

    des_setkey(esk, key);
    des_setkey(dsk + 32, key + 8);
    des_setkey(esk + 64, key + 16);

    for (i = 0; i < 32; i += 2) {
        dsk[i ] = esk[94 - i];
        dsk[i + 1] = esk[95 - i];

        esk[i + 32] = dsk[62 - i];
        esk[i + 33] = dsk[63 - i];

        dsk[i + 64] = esk[30 - i];
        dsk[i + 65] = esk[31 - i];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x76f0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x76f0
movq -0x8(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x76f0
movl $0x0, -0x1c(%rbp)
cmpl $0x20, -0x1c(%rbp)
jge 0x80b7
movq -0x8(%rbp), %rax
movl $0x5e, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl $0x5f, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl $0x3e, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl $0x3f, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x21, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl $0x1e, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl $0x1f, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x41, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7fd8
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/des.c
// Function: des_crypt_cbc
int des_crypt_cbc(des_context *ctx,
        int mode,
        size_t length,
        unsigned char iv[8],
        const unsigned char *input,
        unsigned char *output) {
    int i;
    unsigned char temp[8];

    if (length % 8)
        return ( POLARSSL_ERR_DES_INVALID_INPUT_LENGTH);

    if (mode == DES_ENCRYPT) {
        while (length > 0) {
            for (i = 0; i < 8; i++)
                output[i] = (unsigned char) (input[i] ^ iv[i]);

            des_crypt_ecb(ctx, output, output);
            memcpy(iv, output, 8);

            input += 8;
            output += 8;
            length -= 8;
        }
    } else /* DES_DECRYPT */ {
        while (length > 0) {
            memcpy(temp, input, 8);
            des_crypt_ecb(ctx, input, output);

            for (i = 0; i < 8; i++)
                output[i] = (unsigned char) (output[i] ^ iv[i]);

            memcpy(iv, temp, 8);

            input += 8;
            output += 8;
            length -= 8;
        }
    }

    return ( 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x8619
movl $0xffffffce, -0x4(%rbp) # imm = 0xFFFFFFCE
jmp 0x8761
cmpl $0x1, -0x14(%rbp)
jne 0x86bc
jmp 0x8625
cmpq $0x0, -0x20(%rbp)
jbe 0x86b7
movl $0x0, -0x3c(%rbp)
cmpl $0x8, -0x3c(%rbp)
jge 0x866f
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8637
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8110
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x8625
jmp 0x875a
jmp 0x86be
cmpq $0x0, -0x20(%rbp)
jbe 0x8758
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8110
movl $0x0, -0x3c(%rbp)
cmpl $0x8, -0x3c(%rbp)
jge 0x8724
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x86ec
movq -0x28(%rbp), %rax
movq -0x44(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x86be
jmp 0x875a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/aes_omac.c
// Function: gf_mul
void _gf_mul(unsigned char *pad) {
    unsigned int i;
    unsigned cxor = (pad[0] & 0x80) ? 0x87 : 0;

    for (i = 0; i < 15; i++)
        pad[i] = (pad[i] << 1) | (pad[i + 1] >> 7);
    pad[15] = (pad[15] << 1) ^ cxor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %edx
andl $0x80, %edx
xorl %eax, %eax
movl $0x87, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0xf, -0xc(%rbp)
jae 0x925b
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movzbl (%rax,%rcx), %eax
shll %eax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
sarl $0x7, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x921c
movq -0x8(%rbp), %rax
movzbl 0xf(%rax), %eax
shll %eax
xorl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0xf(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/kgen.c
// Function: generate_ata_keys
void generate_ata_keys(u8 *eid_root_key, u8 *eid_root_iv, u8 *data_key_dst, u8 *tweak_key_dst) {
    aes_context aes_ctxt;
    u8 iv[0x10];

    //Generate ATA data key.
    aes_setkey_enc(&aes_ctxt, eid_root_key, 0x100);
    memcpy(iv, eid_root_iv, 0x10);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0x20, iv, sb_indiv_seed_00, data_key_dst);

    //Generate ATA tweak key.
    aes_setkey_enc(&aes_ctxt, eid_root_key, 0x100);
    memcpy(iv, eid_root_iv, 0x10);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0x20, iv, sb_indiv_seed_20, tweak_key_dst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x260(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x260(%rbp), %rcx
movq -0x18(%rbp), %r9
leaq -0x250(%rbp), %rdi
movl $0x1, %esi
movl $0x20, %edx
leaq 0xb0b4(%rip), %r8       # 0x14570
callq 0x2eb0
movq -0x8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x260(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x260(%rbp), %rcx
movq -0x20(%rbp), %r9
leaq -0x250(%rbp), %rdi
movl $0x1, %esi
movl $0x20, %edx
leaq 0xb07e(%rip), %r8       # 0x14590
callq 0x2eb0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/kgen.c
// Function: generate_encdec_keys
void generate_encdec_keys(u8 *eid_root_key, u8 *eid_root_iv, u8 *data_key_dst, u8 *tweak_key_dst) {
    aes_context aes_ctxt;
    u8 iv[0x10];

    //Generate encdec_k1.
    aes_setkey_enc(&aes_ctxt, eid_root_key, 0x100);
    memcpy(iv, eid_root_iv, 0x10);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0x20, iv, encdec_seed_00, data_key_dst);

    //Generate encdec_k3.
    aes_setkey_enc(&aes_ctxt, eid_root_key, 0x100);
    memcpy(iv, eid_root_iv, 0x10);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0x20, iv, encdec_seed_20, tweak_key_dst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x260(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x260(%rbp), %rcx
movq -0x18(%rbp), %r9
leaq -0x250(%rbp), %rdi
movl $0x1, %esi
movl $0x20, %edx
leaq 0xafa4(%rip), %r8       # 0x14530
callq 0x2eb0
movq -0x8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x260(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x260(%rbp), %rcx
movq -0x20(%rbp), %r9
leaq -0x250(%rbp), %rdi
movl $0x1, %esi
movl $0x20, %edx
leaq 0xaf6e(%rip), %r8       # 0x14550
callq 0x2eb0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/aes_xts.c
// Function: aes_xts_init
int aes_xts_init(aes_xts_ctxt_t *ctxt, int mode, const u8 *data_key, const u8 *tweak_key, int keybits) {
    ctxt->mode = mode;
    ctxt->keybits = keybits;
    aes_setkey_enc(&ctxt->twk_ctxt, tweak_key, keybits);

    if (mode == AES_ENCRYPT)
        aes_setkey_enc(&ctxt->aes_ctxt, data_key, keybits);
    else if (mode == AES_DECRYPT)
        aes_setkey_dec(&ctxt->aes_ctxt, data_key, keybits);
    else
        return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x460(%rax)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x464(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x1250
cmpl $0x1, -0x14(%rbp)
jne 0x9654
movq -0x10(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x1250
jmp 0x967e
cmpl $0x0, -0x14(%rbp)
jne 0x9673
movq -0x10(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x1810
jmp 0x967c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9685
jmp 0x967e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/util.c
// Function: hexdump
void _hexdump(FILE *fp, const char *name, u32 offset, u8 *buf, int len, BOOL print_addr) {
    int i, j, align = strlen(name) + 1;

    fprintf(fp, "%s ", name);
    if (print_addr == TRUE)
        fprintf(fp, "%08x: ", offset);
    for (i = 0; i < len; i++) {
        if (i % 16 == 0 && i != 0) {
            fprintf(fp, "\n");
            for (j = 0; j < align; j++)
                putchar(' ');
            if (print_addr == TRUE)
                fprintf(fp, "%08X: ", offset + i);
        }
        fprintf(fp, "%02X ", buf[i]);
    }
    fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
addq $0x1, %rax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x73b2(%rip), %rsi      # 0x10c20
movb $0x0, %al
callq 0x10c0
cmpl $0x1, -0x28(%rbp)
jne 0x9890
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x739b(%rip), %rsi      # 0x10c24
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x993b
movl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x990f
cmpl $0x0, -0x2c(%rbp)
je 0x990f
movq -0x8(%rbp), %rdi
leaq 0x73f7(%rip), %rsi      # 0x10cbb
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x98ef
movl $0x20, %edi
callq 0x1040
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x98d2
cmpl $0x1, -0x28(%rbp)
jne 0x990d
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
addl -0x2c(%rbp), %edx
leaq 0x7325(%rip), %rsi      # 0x10c2b
movb $0x0, %al
callq 0x10c0
jmp 0x990f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x730c(%rip), %rsi      # 0x10c32
movb $0x0, %al
callq 0x10c0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9897
movq -0x8(%rbp), %rdi
leaq 0x7375(%rip), %rsi      # 0x10cbb
movb $0x0, %al
callq 0x10c0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/util.c
// Function: read_buffer
u8 *_read_buffer(s8 *file, u32 *length) {
    FILE *fp;
    u32 size;

    if ((fp = fopen(file, "rb")) == NULL)
        return NULL;

    fseek(fp, 0, SEEK_END);
    size = ftell(fp);
    fseek(fp, 0, SEEK_SET);

    u8 *buffer = (u8 *) malloc(sizeof (u8) * size);
    fread(buffer, sizeof (u8), size, fp);

    if (length != NULL)
        *length = size;

    fclose(fp);

    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x72bd(%rip), %rsi      # 0x10c38
callq 0x1110
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9994
movq $0x0, -0x8(%rbp)
jmp 0x9a0b
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1100
movq -0x20(%rbp), %rdi
callq 0x10d0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1100
movl -0x24(%rbp), %eax
movl %eax, %edi
shlq $0x0, %rdi
callq 0x10f0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x1050
cmpq $0x0, -0x18(%rbp)
je 0x99fa
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x1060
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/util.c
// Function: write_buffer
void _write_buffer(s8 *file, u8 *buffer, u32 length) {
    FILE *fp;

    if ((fp = fopen(file, "wb")) == NULL)
        return;

    fwrite(buffer, sizeof (u8), length, fp);
    fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x71fd(%rip), %rsi      # 0x10c3b
callq 0x1110
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9a4f
jmp 0x9a6f
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x1140
movq -0x20(%rbp), %rdi
callq 0x1060
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/indiv.c
// Function: indiv_gen
void indiv_gen(u8 *seed0, u8 *seed1, u8 *seed2, u8 *seed3, u8 *indiv) {
    u32 i, rounds = INDIV_SIZE / INDIV_CHUNK_SIZE;
    u8 iv[0x10];
    aes_context aes_ctxt;

    memset(indiv, 0, INDIV_SIZE);

    //Copy seeds.
    if (seed0 != NULL)
        memcpy(indiv, seed0, INDIV_SEED_SIZE);
    if (seed1 != NULL)
        memcpy(indiv + INDIV_SEED_SIZE, seed1, INDIV_SEED_SIZE);
    if (seed2 != NULL)
        memcpy(indiv + INDIV_SEED_SIZE * 2, seed2, INDIV_SEED_SIZE);
    if (seed3 != NULL)
        memcpy(indiv + INDIV_SEED_SIZE * 3, seed3, INDIV_SEED_SIZE);

    //Generate.
    for (i = 0; i < rounds; i++, indiv += INDIV_CHUNK_SIZE) {
        //Set key and iv.
        aes_setkey_enc(&aes_ctxt, eid_root_key, KEY_BITS(ISO_ROOT_KEY_SIZE));
        memcpy(iv, eid_root_key + 0x20, ISO_ROOT_IV_SIZE);
        //Encrypt one chunk.
        aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, INDIV_CHUNK_SIZE, iv, indiv, indiv);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x4, -0x30(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x1090
cmpq $0x0, -0x8(%rbp)
je 0x9acf
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x40, %edx
callq 0x10e0
cmpq $0x0, -0x10(%rbp)
je 0x9aec
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %edx
callq 0x10e0
cmpq $0x0, -0x18(%rbp)
je 0x9b0c
movq -0x28(%rbp), %rdi
addq $0x80, %rdi
movq -0x18(%rbp), %rsi
movl $0x40, %edx
callq 0x10e0
cmpq $0x0, -0x20(%rbp)
je 0x9b2c
movq -0x28(%rbp), %rdi
addq $0xc0, %rdi
movq -0x20(%rbp), %rsi
movl $0x40, %edx
callq 0x10e0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x9ba9
leaq 0xaa7e(%rip), %rax      # 0x145c0
movq (%rax), %rsi
leaq -0x270(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
leaq 0xaa63(%rip), %rax      # 0x145c0
movq (%rax), %rax
movq 0x20(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x40(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
movl $0x40, %edx
callq 0x2eb0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x28(%rbp)
jmp 0x9b33
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid_unpack
void eid_unpack(s8 *file) {
    u32 i, length;
    u8 *eid = _read_buffer(file, &length);

    if (eid != NULL) {
        eid_header_t *h = (eid_header_t *) eid;

        //Fix header.
        _es_eid_header(h);

        eid_entry_t *e = (eid_entry_t *) (eid + sizeof (eid_header_t));
        for (i = 0; i < h->entcnt; i++, e++) {
            //Fix entry.
            _es_eid_entry(e);

            s8 fname[128];
            sprintf(fname, "%s%d", file, (u32) e->entnum);
            printf("writing entry @ offset 0x%08x (0x%08x bytes) to %s\n", e->offset, e->size, fname);
            _write_buffer(fname, eid + e->offset, e->size);
        }

        free(eid);
    } else
        printf("error: could not read %s\n", file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x9960
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9cb1
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9cd0
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x9ca6
movq -0x28(%rbp), %rdi
callq 0x9d70
leaq -0xb0(%rbp), %rdi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
leaq 0x6ffb(%rip), %rsi      # 0x10c3e
movb $0x0, %al
callq 0x1130
movq -0x28(%rbp), %rax
movl (%rax), %esi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %edx
leaq -0xb0(%rbp), %rcx
leaq 0x6fde(%rip), %rdi      # 0x10c43
movb $0x0, %al
callq 0x1080
leaq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movl (%rax), %eax
addq %rax, %rsi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x9a20
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
jmp 0x9c0f
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0x9cc3
movq -0x8(%rbp), %rsi
leaq 0x6fbb(%rip), %rdi      # 0x10c77
movb $0x0, %al
callq 0x1080
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid_get_entry
u8 *eid_get_entry(s8 *file, u64 entnum) {
    u32 i, length;
    u8 *res = NULL;
    u8 *eid = _read_buffer(file, &length);

    if (eid != NULL) {
        eid_header_t *h = (eid_header_t *) eid;

        //Fix header.
        _es_eid_header(h);

        eid_entry_t *e = (eid_entry_t *) (eid + sizeof (eid_header_t));
        for (i = 0; i < h->entcnt; i++, e++) {
            //Fix entry.
            _es_eid_entry(e);

            if (e->entnum == entnum) {
                res = (u8 *) malloc(e->size);
                memcpy(res, eid + e->offset, e->size);
                break;
            }
        }

        free(eid);
    } else
        printf("error: could not read %s\n", file);

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x9960
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x9fa1
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9cd0
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x9f96
movq -0x38(%rbp), %rdi
callq 0x9d70
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x9f7d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
callq 0x10f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rax
movl (%rax), %eax
addq %rax, %rsi
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x10e0
jmp 0x9f96
jmp 0x9f7f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
jmp 0x9f28
movq -0x28(%rbp), %rdi
callq 0x1030
jmp 0x9fb3
movq -0x8(%rbp), %rsi
leaq 0x6ccb(%rip), %rdi      # 0x10c77
movb $0x0, %al
callq 0x1080
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_hash_encrypt_section_0
void eid0_hash_encrypt_section_0(u8 *section_in, u8 *section_out) {
    u8 indiv[INDIV_SIZE];
    u8 key[0x10];
    aes_context aes_ctxt;

    //Generate individuals.
    indiv_gen(eid0_indiv_seed, NULL, NULL, NULL, indiv);

    //Generate key.
	aes_setkey_enc(&aes_ctxt, indiv + INDIV_EID0_SEC_0_GENKEY_OFFSET, 0x100);
    aes_crypt_ecb(&aes_ctxt, AES_ENCRYPT, eid0_keyseed_0, key);

    //Calculate aes omac1.
    aes_omac1(section_in + 0xA8, section_in, 0xA8, key, 0x80);

    //Encrypt section 0 of eid0.
    aes_setkey_enc(&aes_ctxt, key, 0x80);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0xC0, indiv + INDIV_EID0_SEC_0_IV_OFFSET, section_in, section_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %r8
leaq 0xa15f(%rip), %rdi      # 0x14360
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x9a80
leaq -0x110(%rbp), %rsi
addq $0x20, %rsi
leaq -0x350(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
leaq -0x120(%rbp), %rcx
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
leaq 0xa27a(%rip), %rdx      # 0x144c0
callq 0x1be0
movq -0x8(%rbp), %rdi
addq $0xa8, %rdi
movq -0x8(%rbp), %rsi
leaq -0x120(%rbp), %rcx
movl $0xa8, %edx
movl $0x80, %r8d
callq 0x9280
leaq -0x120(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x80, %edx
callq 0x1250
leaq -0x110(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
movq -0x10(%rbp), %r9
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
movl $0xc0, %edx
callq 0x2eb0
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_hash_encrypt_section_6
void eid0_hash_encrypt_section_6(u8 *section_in, u8 *section_out) {
    u8 indiv[INDIV_SIZE];
    u8 key[0x10];
    aes_context aes_ctxt;

    //Generate individuals.
    indiv_gen(eid0_indiv_seed, NULL, NULL, NULL, indiv);

    //Generate key.
    aes_setkey_enc(&aes_ctxt, indiv + INDIV_EID0_SEC_6_GENKEY_OFFSET, 0x100);
    aes_crypt_ecb(&aes_ctxt, AES_ENCRYPT, eid0_keyseed_6, key);

    //Calculate aes omac1.
    aes_omac1(section_in + 0xA8, section_in, 0xA8, key, 0x80);

    //Encrypt section 0 of eid0.
    aes_setkey_enc(&aes_ctxt, key, 0x80);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0xC0, indiv + INDIV_EID0_SEC_6_IV_OFFSET, section_in, section_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %r8
leaq 0xa07f(%rip), %rdi      # 0x14360
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x9a80
leaq -0x110(%rbp), %rsi
addq $0x20, %rsi
leaq -0x350(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
leaq -0x120(%rbp), %rcx
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
leaq 0xa1aa(%rip), %rdx      # 0x144d0
callq 0x1be0
movq -0x8(%rbp), %rdi
addq $0xa8, %rdi
movq -0x8(%rbp), %rsi
leaq -0x120(%rbp), %rcx
movl $0xa8, %edx
movl $0x80, %r8d
callq 0x9280
leaq -0x120(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x80, %edx
callq 0x1250
leaq -0x110(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
movq -0x10(%rbp), %r9
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
movl $0xc0, %edx
callq 0x2eb0
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_hash_encrypt_section_A
void eid0_hash_encrypt_section_A(u8 *section_in, u8 *section_out) {
    u8 indiv[INDIV_SIZE];
    u8 key[0x10];
    aes_context aes_ctxt;

    //Generate individuals.
    indiv_gen(eid0_indiv_seed, NULL, NULL, NULL, indiv);

    //Generate key.
    aes_setkey_enc(&aes_ctxt, indiv + INDIV_EID0_SEC_A_GENKEY_OFFSET, 0x100);
    aes_crypt_ecb(&aes_ctxt, AES_ENCRYPT, eid0_keyseed_A, key);

    //Calculate aes omac1.
    aes_omac1(section_in + 0xA8, section_in, 0xA8, key, 0x80);

    //Encrypt section A of eid0.
    aes_setkey_enc(&aes_ctxt, key, 0x80);
    aes_crypt_cbc(&aes_ctxt, AES_ENCRYPT, 0xC0, indiv + INDIV_EID0_SEC_A_IV_OFFSET, section_in, section_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %r8
leaq 0x9f9f(%rip), %rdi      # 0x14360
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x9a80
leaq -0x110(%rbp), %rsi
addq $0x20, %rsi
leaq -0x350(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1250
leaq -0x120(%rbp), %rcx
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
leaq 0xa0ea(%rip), %rdx      # 0x144f0
callq 0x1be0
movq -0x8(%rbp), %rdi
addq $0xa8, %rdi
movq -0x8(%rbp), %rsi
leaq -0x120(%rbp), %rcx
movl $0xa8, %edx
movl $0x80, %r8d
callq 0x9280
leaq -0x120(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x80, %edx
callq 0x1250
leaq -0x110(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
movq -0x10(%rbp), %r9
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
movl $0xc0, %edx
callq 0x2eb0
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_decrypt
void eid0_decrypt(s8 *file_in, s8 *file_out) {
    u32 length;
    u8 *eid0 = _read_buffer(file_in, &length);

    if (eid0 != NULL) {
        u8 section_0[EID0_SECTION_0_SIZE];
        eid0_decrypt_section(eid0, section_0, 0);

        u8 section_6[EID0_SECTION_0_SIZE];
        eid0_decrypt_section(eid0, section_6, 6);

        u8 section_A[EID0_SECTION_0_SIZE];
        eid0_decrypt_section(eid0, section_A, 10);

        s8 fname_0[128];
        sprintf(fname_0, "%s.section_0.bin", file_out);
        _write_buffer(fname_0, section_0, 0xC0);

        s8 fname_6[128];
        sprintf(fname_6, "%s.section_6.bin", file_out);
        _write_buffer(fname_6, section_6, 0xC0);

        s8 fname_A[128];
        sprintf(fname_A, "%s.section_A.bin", file_out);
        _write_buffer(fname_A, section_A, 0xC0);

        free(eid0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x9960
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa587
movq -0x20(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
xorl %edx, %edx
callq 0x9fc0
movq -0x20(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0x6, %edx
callq 0x9fc0
movq -0x20(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0xa, %edx
callq 0x9fc0
leaq -0x2e0(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x6818(%rip), %rsi      # 0x10d15
movb $0x0, %al
callq 0x1130
leaq -0x2e0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
leaq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x67f8(%rip), %rsi      # 0x10d26
movb $0x0, %al
callq 0x1130
leaq -0x360(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
leaq -0x3e0(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x67d8(%rip), %rsi      # 0x10d37
movb $0x0, %al
callq 0x1130
leaq -0x3e0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_encrypt_section_0
void eid0_encrypt_section_0(s8 *file_in, s8 *file_out) {
    s8 fname_0_in[128];
    sprintf(fname_0_in, "%s.bin", file_in);

    u32 length;
    u8 *section_0_decrypted = _read_buffer(fname_0_in, &length);

    if (section_0_decrypted != NULL) {
        u8 section_0[EID0_SECTION_0_SIZE];
        eid0_hash_encrypt_section_0(section_0_decrypted, section_0);

        s8 fname_0[128];
        sprintf(fname_0, "%s.bin", file_out);
        _write_buffer(fname_0, section_0, 0xC0);

        free(section_0_decrypted);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x6793(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x90(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x9960
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0xa630
movq -0xa0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xa1e0
leaq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x6743(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x1e0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
movq -0xa0(%rbp), %rdi
callq 0x1030
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_encrypt_section_6
void eid0_encrypt_section_6(s8 *file_in, s8 *file_out) {
    s8 fname_6_in[128];
    sprintf(fname_6_in, "%s.bin", file_in);

    u32 length;
    u8 *section_6_decrypted = _read_buffer(fname_6_in, &length);

    if (section_6_decrypted != NULL) {
        u8 section_6[EID0_SECTION_6_SIZE];
        eid0_hash_encrypt_section_6(section_6_decrypted, section_6);

        s8 fname_6[128];
        sprintf(fname_6, "%s.bin", file_out);
        _write_buffer(fname_6, section_6, 0xC0);

        free(section_6_decrypted);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x66e3(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x90(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x9960
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0xa6e0
movq -0xa0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xa2c0
leaq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x6693(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x1e0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
movq -0xa0(%rbp), %rdi
callq 0x1030
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid0_encrypt_section_A
void eid0_encrypt_section_A(s8 *file_in, s8 *file_out) {
    s8 fname_A_in[128];
    sprintf(fname_A_in, "%s.bin", file_in);

    u32 length;
    u8 *section_A_decrypted = _read_buffer(fname_A_in, &length);

    if (section_A_decrypted != NULL) {
        u8 section_A[EID0_SECTION_A_SIZE];
        eid0_hash_encrypt_section_A(section_A_decrypted, section_A);

        s8 fname_A[128];
        sprintf(fname_A, "%s.bin", file_out);
        _write_buffer(fname_A, section_A, 0xC0);

        free(section_A_decrypted);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x6633(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x90(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x9960
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0xa790
movq -0xa0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0xa3a0
leaq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x65e3(%rip), %rsi      # 0x10d48
movb $0x0, %al
callq 0x1130
leaq -0x1e0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
movl $0xc0, %edx
callq 0x9a20
movq -0xa0(%rbp), %rdi
callq 0x1030
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid1_decrypt
void eid1_decrypt(s8 *file_in, s8 *file_out) {
    u32 length;
    u8 *eid1 = _read_buffer(file_in, &length);

    if (eid1 != NULL) {
        eid1_decrypt_buffer(eid1);
		_write_buffer(file_out, eid1, 0x280);
		free(eid1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x9960
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xac9c
movq -0x20(%rbp), %rdi
callq 0xaa30
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x280, %edx            # imm = 0x280
callq 0x9a20
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid2_generate_block_buffer
u8 *eid2_generate_block_buffer(u8 *eid2, u32 blocktype) {
    u8 *res = NULL, indiv[INDIV_SIZE];
    aes_context aes_ctxt;

    //Generate individuals.
    indiv_gen(eid2_indiv_seed, NULL, NULL, NULL, indiv);

    switch (blocktype) {
        case EID2_BLOCKTYPE_P:
            res = (u8 *) malloc(0x80);
            aes_setkey_dec(&aes_ctxt, indiv + INDIV_EID2_KEY_OFFSET, 0x100);
            aes_crypt_cbc(&aes_ctxt, AES_DECRYPT, 0x80, indiv + INDIV_EID2_IV_OFFSET, eid2 + 0x20, res);
            break;
        case EID2_BLOCKTYPE_S:
            res = (u8 *) malloc(0x690);
            aes_setkey_dec(&aes_ctxt, indiv + INDIV_EID2_KEY_OFFSET, 0x100);
            aes_crypt_cbc(&aes_ctxt, AES_DECRYPT, 0x690, indiv + INDIV_EID2_IV_OFFSET, eid2 + 0x20 + 0x80, res);
            break;
    }

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x972f(%rip), %rdi      # 0x14400
xorl %eax, %eax
movl %eax, %ecx
leaq -0x120(%rbp), %r8
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x9a80
movl -0xc(%rbp), %eax
movl %eax, -0x354(%rbp)
subl $0x1, %eax
je 0xad07
jmp 0xacf7
movl -0x354(%rbp), %eax
subl $0x2, %eax
je 0xad5d
jmp 0xadb8
movl $0x80, %edi
callq 0x10f0
movq %rax, -0x18(%rbp)
leaq -0x120(%rbp), %rsi
addq $0x20, %rsi
leaq -0x350(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1810
leaq -0x120(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
addq $0x20, %r8
movq -0x18(%rbp), %r9
leaq -0x350(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2eb0
jmp 0xadb8
movl $0x690, %edi            # imm = 0x690
callq 0x10f0
movq %rax, -0x18(%rbp)
leaq -0x120(%rbp), %rsi
addq $0x20, %rsi
leaq -0x350(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1810
leaq -0x120(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
addq $0x20, %r8
addq $0x80, %r8
movq -0x18(%rbp), %r9
leaq -0x350(%rbp), %rdi
xorl %esi, %esi
movl $0x690, %edx            # imm = 0x690
callq 0x2eb0
movq -0x18(%rbp), %rax
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid2_generate_block
void eid2_generate_block(s8 *file_in, u32 blocktype, s8 *file_out) {
    u32 length;
    u8 *eid2 = _read_buffer(file_in, &length);

    if (eid2 != NULL) {
        u8 *block = eid2_generate_block_buffer(eid2, blocktype);
        if (block != NULL) {
            switch (blocktype) {
                case EID2_BLOCKTYPE_P:
                    _write_buffer(file_out, block, 0x80);
                    free(block);
                    break;
                case EID2_BLOCKTYPE_S:
                    _write_buffer(file_out, block, 0x690);
                    free(block);
                    break;
            }

        }

        free(eid2);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x9960
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xae6c
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xacb0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xae63
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x1, %eax
je 0xae29
jmp 0xae1f
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0xae46
jmp 0xae61
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x80, %edx
callq 0x9a20
movq -0x30(%rbp), %rdi
callq 0x1030
jmp 0xae61
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x690, %edx            # imm = 0x690
callq 0x9a20
movq -0x30(%rbp), %rdi
callq 0x1030
jmp 0xae63
movq -0x28(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid2_decrypt_block
void eid2_decrypt_block(u8 *block, u32 length) {
    u8 tmp[0x08], iv[0x08];
    int block_size = 8;
    int num_blocks = (int) (length / block_size);

    memcpy(iv, eid2_des_iv, 0x08);

    if (num_blocks > 0) {
        int i, j;
        des_context ctx;
        des_setkey_dec(&ctx, eid2_des_key);
        for (i = 0; i < num_blocks - 1; ++i) {
            u8 *ptr = block + i * block_size;
            memcpy(tmp, ptr, block_size);
            des_crypt_ecb(&ctx, ptr, ptr);
            if (i > 0) {
                for (j = 0; j < block_size; ++j)
                    ptr[j] = ptr[j] ^ iv[j];
            }
            memcpy(iv, tmp, block_size);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x8, -0x20(%rbp)
movl -0xc(%rbp), %eax
xorl %edx, %edx
divl -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq 0x9735(%rip), %rax      # 0x145e0
movq (%rax), %rax
movq %rax, -0x1c(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0xaf9a
leaq -0xb0(%rbp), %rdi
leaq 0x9656(%rip), %rsi      # 0x14520
callq 0x7c40
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xaf98
movq -0x8(%rbp), %rax
movl -0x28(%rbp), %ecx
imull -0x20(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
leaq -0x14(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x10e0
movq -0xb8(%rbp), %rsi
movq -0xb8(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
callq 0x8110
cmpl $0x0, -0x28(%rbp)
jle 0xaf79
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xaf77
movq -0xb8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movslq -0x2c(%rbp), %rcx
movzbl -0x1c(%rbp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0xb8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xaf3a
jmp 0xaf79
leaq -0x1c(%rbp), %rdi
leaq -0x14(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x10e0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xaed6
jmp 0xaf9a
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid3_decrypt
void eid3_decrypt(s8 *file_in, s8 *file_out) {
    u32 length;
    u8 *eid3 = _read_buffer(file_in, &length);

    if (eid3 != NULL) {
        eid3_decrypt_buffer(eid3);
        _write_buffer(file_out, eid3, EID3_SIZE);
        free(eid3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x9960
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xb1ec
movq -0x20(%rbp), %rdi
callq 0xafb0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x9a20
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid4_decrypt_buffer
void eid4_decrypt_buffer(u8 *eid4) {
    u8 indiv[INDIV_SIZE];
    aes_context aes_ctxt;

    //Generate individuals.
    indiv_gen(eid4_indiv_seed, NULL, NULL, NULL, indiv);

    //Calculate eid4 aes omac1.
    u8 digest[AES_OMAC1_DIGEST_SIZE];
    aes_omac1(digest, eid4, 0x20, indiv + INDIV_EID4_KEY_OFFSET, 0x100);

    if (memcmp(digest, eid4 + 0x20, AES_OMAC1_DIGEST_SIZE) != 0)
        printf("warning: eid4 hash check failed!\n");

    //Decrypt eid4.
    aes_setkey_dec(&aes_ctxt, indiv + INDIV_EID4_KEY_OFFSET, 0x100);
    aes_crypt_cbc(&aes_ctxt, AES_DECRYPT, 0x20, indiv + INDIV_EID4_IV_OFFSET, eid4, eid4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
leaq -0x110(%rbp), %r8
leaq 0x9263(%rip), %rdi      # 0x14480
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x9a80
leaq -0x350(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x110(%rbp), %rcx
addq $0x20, %rcx
movl $0x20, %edx
movl $0x100, %r8d            # imm = 0x100
callq 0x9280
leaq -0x350(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x20, %rcx
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xb28d
leaq 0x5bf4(%rip), %rdi      # 0x10e7a
movb $0x0, %al
callq 0x1080
leaq -0x110(%rbp), %rsi
addq $0x20, %rsi
leaq -0x340(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x1810
leaq -0x110(%rbp), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %r8
movq -0x8(%rbp), %r9
leaq -0x340(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2eb0
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zecoxao[P]ps3_decrypt_tools/lib/eid.c
// Function: eid4_decrypt
void eid4_decrypt(s8 *file_in, s8 *file_out) {
    u32 length;
    u8 *eid4 = _read_buffer(file_in, &length);

    if (eid4 != NULL) {
        eid4_decrypt_buffer(eid4);
        _write_buffer(file_out, eid4, EID4_SIZE);
        free(eid4);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x9960
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xb32c
movq -0x20(%rbp), %rdi
callq 0xb200
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x30, %edx
callq 0x9a20
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)