// File: /workspace/github_cpp_makefile_star2_O1/lmclaramunt[P]AES-Crypto/Cipher.cpp
// Function: Cipher::Cipher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool, bool)
Cipher::Cipher(string* _textPath, string* _aesKeyPath, string* _macKeyPath, 
    bool padding, bool encrypt): 
    textPath(_textPath), aesKeyPath(*_aesKeyPath), macKeyPath(*_macKeyPath){
    try {
        if(!fileExists(textPath)) throw "File given in path '-p' wasn't found\n";
        if(!fileExists(_aesKeyPath)) throw "Key given in '-aes' wasn't found\n";
        if(!fileExists(_macKeyPath)) throw "Key given in '-mac' wasn't found\n";
        int keyLength = getKeySize(&aesKeyPath, &macKeyPath);
        cryptoDir();
        setBlockRoundCombinations(&keyLength, false);
        getKey(encrypt, &aesKeyPath, &aesKeyExp);
        getKey(encrypt, &macKeyPath, &macKeyExp);
        vector<unsigned char> inpVct;
        readText(&inpVct);
        inputBlock = new Block(&inpVct, padding);
    } catch(const char* str) {
        throw str;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %r12d
movl %r8d, (%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rdi, %rbx
movq %rsi, 0x28(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
movb $0x0, 0x40(%rdi)
leaq 0x50(%rdi), %r14
leaq 0x60(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x50(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x64c0
leaq 0x70(%rbx), %r15
leaq 0x80(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x70(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x64c0
movq 0x28(%rbx), %rax
movq (%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46a8
movq (%rbp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46b1
movq (%r13), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x46ba
movq %r14, %rsi
movq %r15, %rdx
callq 0x47ba
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
callq 0x3e0c
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3e9e
movzbl %r12b, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x42a0
leaq 0x8(%rbx), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x42a0
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x447c
movl $0x18, %edi
callq 0x2240
movq %rax, %rbp
movzbl (%rsp), %edx
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x338c
movq %rbp, 0x10(%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4696
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f6b(%rip), %r12      # 0x761a
jmp 0x46c1
leaq 0x2f88(%rip), %r12      # 0x7640
jmp 0x46c1
leaq 0x2fa1(%rip), %r12      # 0x7662
movl $0x8, %edi
callq 0x2120
movq %r12, (%rax)
movq 0x68eb(%rip), %rsi      # 0xafc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x23d0
movq %rdx, %r13
movq %rax, %r12
movl $0x18, %esi
movq %rbp, %rdi
callq 0x2250
jmp 0x470a
movq %rax, %r12
jmp 0x477c
movq %rax, %r12
jmp 0x4796
movq %rdx, %r13
movq %rax, %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x472b
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x472b
jmp 0x4725
movq %rdx, %r13
movq %rax, %r12
cmpl $0x1, %r13d
jne 0x4762
movq %r12, %rdi
callq 0x20d0
movq %rax, %r12
movl $0x8, %edi
callq 0x2120
movq %r12, (%rax)
movq 0x6870(%rip), %rsi      # 0xafc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x23d0
movq %rax, %r12
callq 0x23a0
movq (%r15), %rdi
cmpq 0x8(%rsp), %rdi
je 0x477c
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq (%r14), %rdi
cmpq 0x10(%rsp), %rdi
je 0x4796
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq 0x30(%rbx), %rdi
cmpq 0x18(%rsp), %rdi
je 0x47b1
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2250
movq %r12, %rdi
callq 0x2400
nop