// File: lmclaramunt[P]AES-Crypto/Cipher.cpp
// Function: Cipher::Cipher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int*, bool, bool)
Cipher::Cipher(string* _textPath, int* keyLength, bool padding, bool encrypt): 
        textPath(_textPath) {
    try {
        if(!fileExists(textPath)) throw "File given in path '-p' wasn't found\n";
        cryptoDir();
        setBlockRoundCombinations(keyLength, true);
        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 $0x90, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %cl
movb %cl, -0x19(%rbp)
andb $0x1, %al
movb %al, -0x1a(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x28(%rdi)
addq $0x30, %rdi
movq %rdi, -0x78(%rbp)
callq 0x3390
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x70(%rbp)
callq 0x3390
movq -0x60(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x68(%rbp)
callq 0x3390
movq -0x60(%rbp), %rdi
movq 0x28(%rdi), %rsi
callq 0x77e0
movb %al, -0x51(%rbp)
jmp 0x7626
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x766c
jmp 0x762f
movl $0x8, %edi
callq 0x3120
movq %rax, %rdi
leaq 0x8047(%rip), %rax      # 0xf68a
movq %rax, (%rdi)
movq 0xe973(%rip), %rsi      # 0x15fc0
xorl %eax, %eax
movl %eax, %edx
callq 0x3490
jmp 0x77df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x7760
movq -0x60(%rbp), %rdi
callq 0x7820
jmp 0x7677
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x78c0
jmp 0x768b
movq -0x60(%rbp), %rcx
movq %rcx, %rdx
addq $0x50, %rdx
movzbl -0x1a(%rbp), %esi
andl $0x1, %esi
movq %rcx, %rdi
callq 0x7b80
jmp 0x76a7
movq -0x60(%rbp), %rdi
movq %rdi, %rdx
addq $0x70, %rdx
movq %rdi, %rcx
addq $0x8, %rcx
movzbl -0x1a(%rbp), %esi
andl $0x1, %esi
callq 0x7b80
jmp 0x76c7
leaq -0x48(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xaf30
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x7e60
jmp 0x76e3
movl $0x18, %edi
callq 0x3280
movq %rax, -0x88(%rbp)
jmp 0x76f6
movq -0x88(%rbp), %rdi
movzbl -0x19(%rbp), %edx
andl $0x1, %edx
leaq -0x48(%rbp), %rsi
callq 0x4ee0
jmp 0x770f
movq -0x60(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x48(%rbp), %rdi
callq 0xaf50
jmp 0x77b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x7757
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x18, %esi
callq 0x3290
leaq -0x48(%rbp), %rdi
callq 0xaf50
movl -0x2c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x77bb
movq -0x28(%rbp), %rdi
callq 0x30b0
movq %rax, -0x50(%rbp)
movl $0x8, %edi
callq 0x3120
movq %rax, %rdi
movq -0x50(%rbp), %rax
movq %rax, (%rdi)
movq 0xe82c(%rip), %rsi      # 0x15fc0
xorl %eax, %eax
movl %eax, %edx
callq 0x3490
jmp 0x77df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3450
jmp 0x77bb
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3180
movq -0x70(%rbp), %rdi
callq 0x3180
movq -0x78(%rbp), %rdi
callq 0x3180
movq -0x28(%rbp), %rdi
callq 0x34d0
nop