// File: 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>>*, int*, bool, bool)
Cipher::Cipher(string* _textPath, string* _aesKeyPath, string* _macKeyPath, 
    int* keyLength, bool padding, bool encrypt): 
    textPath(_textPath), aesKeyPath(*_aesKeyPath), macKeyPath(*_macKeyPath){
    try {
        if(!fileExists(textPath)) throw "File given in path '-p' wasn't found\n";
        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
movq %rsp, %rbp
subq $0xb0, %rsp
movl %r9d, %eax
movq %rcx, -0x90(%rbp)
movq %rdx, %rcx
movq -0x90(%rbp), %rdx
movq %rcx, -0x88(%rbp)
movq %rsi, %rcx
movq -0x88(%rbp), %rsi
movq %rcx, -0x80(%rbp)
movq %rdi, %r9
movq -0x80(%rbp), %rdi
movb %al, %cl
movb 0x10(%rbp), %al
movq %r9, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
andb $0x1, %cl
movb %cl, -0x29(%rbp)
andb $0x1, %al
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x28(%rdi)
addq $0x30, %rdi
movq %rdi, -0x78(%rbp)
callq 0x3390
movq -0x70(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x68(%rbp)
movq -0x18(%rbp), %rsi
callq 0x30d0
jmp 0x8613
movq -0x70(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x98(%rbp)
movq -0x20(%rbp), %rsi
callq 0x30d0
jmp 0x862d
movq -0x70(%rbp), %rdi
movq 0x28(%rdi), %rsi
callq 0x77e0
movb %al, -0x99(%rbp)
jmp 0x8642
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x86ad
jmp 0x864e
movl $0x8, %edi
callq 0x3120
movq %rax, %rdi
leaq 0x7028(%rip), %rax      # 0xf68a
movq %rax, (%rdi)
movq 0xd954(%rip), %rsi      # 0x15fc0
xorl %eax, %eax
movl %eax, %edx
callq 0x3490
jmp 0x8826
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x880b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x87a4
movq -0x70(%rbp), %rdi
callq 0x7820
jmp 0x86b8
movq -0x70(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x78c0
jmp 0x86c9
movq -0x70(%rbp), %rcx
movq %rcx, %rdx
addq $0x50, %rdx
movzbl -0x2a(%rbp), %esi
andl $0x1, %esi
movq %rcx, %rdi
callq 0x7b80
jmp 0x86e5
movq -0x70(%rbp), %rdi
movq %rdi, %rdx
addq $0x70, %rdx
movq %rdi, %rcx
addq $0x8, %rcx
movzbl -0x2a(%rbp), %esi
andl $0x1, %esi
callq 0x7b80
jmp 0x8705
leaq -0x58(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xaf30
movq -0x70(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x7e60
jmp 0x8727
movl $0x18, %edi
callq 0x3280
movq %rax, -0xb0(%rbp)
jmp 0x873a
movq -0xb0(%rbp), %rdi
movzbl -0x29(%rbp), %edx
andl $0x1, %edx
leaq -0x58(%rbp), %rsi
callq 0x4ee0
jmp 0x8753
movq -0x70(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x58(%rbp), %rdi
callq 0xaf50
jmp 0x87f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x879b
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x18, %esi
callq 0x3290
leaq -0x58(%rbp), %rdi
callq 0xaf50
movl -0x3c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x87ff
movq -0x38(%rbp), %rdi
callq 0x30b0
movq %rax, -0x60(%rbp)
movl $0x8, %edi
callq 0x3120
movq %rax, %rdi
movq -0x60(%rbp), %rax
movq %rax, (%rdi)
movq 0xd7e8(%rip), %rsi      # 0x15fc0
xorl %eax, %eax
movl %eax, %edx
callq 0x3490
jmp 0x8826
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3450
jmp 0x87ff
addq $0xb0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x3180
movq -0x68(%rbp), %rdi
callq 0x3180
movq -0x78(%rbp), %rdi
callq 0x3180
movq -0x38(%rbp), %rdi
callq 0x34d0
nopw %cs:(%rax,%rax)