you have this ctf question. you have been given two files to get the flag from. get the flag from the two files.

First file:
extern char data_42f8 = 0;
extern void * __dso_handle = &__dso_handle;
extern void * std::cout = 0x0;
extern void * std::cin = 0x0;



long sub_1020() {/* jump -> undetermined */}



long sub_1036() {
    return sub_1020();
}



long sub_1046() {
    return sub_1020();
}



long sub_1056() {
    return sub_1020();
}



long sub_1066() {
    return sub_1020();
}



long sub_1076() {
    return sub_1020();
}



long sub_1086() {
    return sub_1020();
}



long sub_1096() {
    return sub_1020();
}



long sub_10a6() {
    return sub_1020();
}



long sub_10b6() {
    return sub_1020();
}



long sub_10c6() {
    return sub_1020();
}



long sub_10d6() {
    return sub_1020();
}



long sub_10e6() {
    return sub_1020();
}



long sub_10f6() {
    return sub_1020();
}



long sub_1106() {
    return sub_1020();
}



long sub_1116() {
    return sub_1020();
}



long sub_1126() {
    return sub_1020();
}



long sub_1136() {
    return sub_1020();
}



long sub_1146() {
    return sub_1020();
}



void sub_11b0() {
    return;
}



void sub_11f0() {
    void * var_2;
    if (data_42f8 != 0) {
        return;
    }
    var_2 = __dso_handle;
    __cxa_finalize(/* d */ var_2);
    deregister_tm_clones();
    data_42f8 = 1;
    return;
}



void sub_1240() {
    return sub_11b0();
}

struct Elf64_Header {
    Elf64_Ident ident;
    e_type type;
    e_machine machine;
    unsigned int version;
    void() * entry;
    unsigned long program_header_offset;
    unsigned long section_header_offset;
    unsigned int flags;
    unsigned short header_size;
    unsigned short program_header_size;
    unsigned short program_header_count;
    unsigned short section_header_size;
    unsigned short section_header_count;
    unsigned short string_table;
};
struct Elf64_Ident {
    char [4] signature;
    unsigned char file_class;
    unsigned char encoding;
    unsigned char version;
    unsigned char os;
    unsigned char abi_version;
    char [7] pad;
};
enum e_type {
    ET_NONE = 0,
    ET_REL = 1,
    ET_EXEC = 2,
    ET_DYN = 3,
    ET_CORE = 4,
    ET_NUM = 5
};
enum e_machine {
    EM_NONE = 0,
    EM_M32 = 1,
    EM_SPARC = 2,
    EM_386 = 3,
    EM_68K = 4,
    EM_88K = 5,
    EM_860 = 7,
    EM_MIPS = 8,
    EM_S370 = 9,
    EM_MIPS_RS3_LE = 10,
    EM_PARISC = 15,
    EM_VPP500 = 17,
    EM_SPARC32PLUS = 18,
    EM_960 = 19,
    EM_PPC = 20,
    EM_PPC64 = 21,
    EM_S390 = 22,
    EM_V800 = 36,
    EM_FR20 = 37,
    EM_RH32 = 38,
    EM_RCE = 39,
    EM_ARM = 40,
    EM_FAKE_ALPHA = 41,
    EM_SH = 42,
    EM_SPARCV9 = 43,
    EM_TRICORE = 44,
    EM_ARC = 45,
    EM_H8_300 = 46,
    EM_H8_300H = 47,
    EM_H8S = 48,
    EM_H8_500 = 49,
    EM_IA_64 = 50,
    EM_MIPS_X = 51,
    EM_COLDFIRE = 52,
    EM_68HC12 = 53,
    EM_MMA = 54,
    EM_PCP = 55,
    EM_NCPU = 56,
    EM_NDR1 = 57,
    EM_STARCORE = 58,
    EM_ME16 = 59,
    EM_ST100 = 60,
    EM_TINYJ = 61,
    EM_X86_64 = 62,
    EM_PDSP = 63,
    EM_FX66 = 66,
    EM_ST9PLUS = 67,
    EM_ST7 = 68,
    EM_68HC16 = 69,
    EM_68HC11 = 70,
    EM_68HC08 = 71,
    EM_68HC05 = 72,
    EM_SVX = 73,
    EM_ST19 = 74,
    EM_VAX = 75,
    EM_CRIS = 76,
    EM_JAVELIN = 77,
    EM_FIREPATH = 78,
    EM_ZSP = 79,
    EM_MMIX = 80,
    EM_HUANY = 81,
    EM_PRISM = 82,
    EM_AVR = 83,
    EM_FR30 = 84,
    EM_D10V = 85,
    EM_D30V = 86,
    EM_V850 = 87,
    EM_M32R = 88,
    EM_MN10300 = 89,
    EM_MN10200 = 90,
    EM_PJ = 91,
    EM_OPENRISC = 92,
    EM_ARC_A5 = 93,
    EM_XTENSA = 94,
    EM_ALTERA_NIOS2 = 113,
    EM_AARCH64 = 183,
    EM_TILEPRO = 188,
    EM_MICROBLAZE = 189,
    EM_TILEGX = 191,
    EM_NUM = 192
};
struct tm {
    int tm_sec;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    int tm_isdst;
    long tm_gmtoff;
    char * tm_zone;
};

long * _Z17generate_passwordB5cxx11ibb(long * arg1, int arg2, char arg3, char arg4) {
    int tmp_0;
    int var_14;
    int var_15;
    unsigned long var_0;
    unsigned long var_17;
    unsigned long var_18;
    long var_16;
    void * var_19;
    void * var_20;
    unsigned long * var_22;
    long * var_11;
    long * var_12;
    long * var_13;
    tm * var_21;
    var_12 = &var_0;
    var_18 = 26UL;
    var_13 = std::string::_M_create(/* this */ &var_11, /* __capacity */ &var_18, /* __old_capacity */ 0UL);
    var_12 = var_13;
    __builtin_strncpy(/* dest */ var_13, /* src */ "abcdefghijklmnopqrstuvwxyz", /* n */ 26L);
    var_17 = var_18;
    *(var_13 + var_18) = 0x0;
    var_16 = 0x3fffffffffffffff - var_18;
    if (var_16 > 25L) {
        std::string::_M_append(/* this */ &var_12, /* __s */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ", /* __n */ 26UL);
        if (arg3 != 0) {
            if (var_16 <= 9L) {
                std::__throw_length_error(/* what */ "basic_string::append");
            }
            else {
                std::string::_M_append(/* this */ &var_12, /* __s */ "!@#$%^&*_+", /* __n */ 10UL);
            }
        }
        var_0 = var_18;
        if (arg4 != 0) {
            if (var_16 <= 9L) {
                std::__throw_length_error(/* what */ "basic_string::append");
            }
            else {
                std::string::_M_append(/* this */ &var_12, /* __s */ "0123456789", /* __n */ 10UL);
            }
        }
        *arg1 = arg1 + 16L;
        var_19 = arg1 + 8L;
        *var_19 = 0x0;
        var_20 = arg1 + 16L;
        *var_20 = 0x0;
        var_18 = time(0UL);
        var_21 = localtime(/* t */ &var_18);
        tmp_0 = var_21->tm_mday * 0xf4240 + var_21->tm_min * 100 + var_21->tm_sec + var_21->tm_hour * 0x2710 + (var_21->tm_year + "__gxx_personality_v0") * 0x540be400;
        srand(/* x */ tmp_0 + (var_21->tm_mon + 1) * 0x5f5e100);
        if (arg2 > 0) {
            var_14 = 0;
            do {
                var_15 = rand();
                var_22 = *var_19;
                if (var_20 == *arg1) {
                    var_16 = 15L;
                }
                else {
                    var_16 = *var_20;
                }
                if (var_16 < var_22 + 1L) {
                    std::string::_M_mutate(/* this */ arg1, /* __pos */ var_22, /* __len1 */ 0UL, /* __s */ 0UL, /* __len2 */ 1UL);
                }
                *(*arg1 + var_22) = *(var_12 + var_15 % var_17);
                *var_19 = var_22 + 1L;
                *(*arg1 + var_22 + 1L) = 0L;
                var_14++;
            }
            while (arg2 != var_14);
        }
        if (var_12 != &var_0) {
            operator_delete(/* ptr */ var_12);
        }
        return arg1;
    }
    std::__throw_length_error(/* what */ "basic_string::append");
}

struct _Unwind_Exception {
    unsigned long exception_class;
    void(_Unwind_Reason_Code, _Unwind_Exception *) * exception_cleanup;
    unsigned long private_1;
    unsigned long private_2;
};
enum _Unwind_Reason_Code {
    _URC_NO_REASON = 0,
    _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
    _URC_FATAL_PHASE2_ERROR = 2,
    _URC_FATAL_PHASE1_ERROR = 3,
    _URC_NORMAL_STOP = 4,
    _URC_END_OF_STACK = 5,
    _URC_HANDLER_FOUND = 6,
    _URC_INSTALL_CONTEXT = 7,
    _URC_CONTINUE_UNWIND = 8
};
class std::string {
    std::string::_Alloc_hider _M_dataplus;
    unsigned long _M_string_length;
    union __anonymous_union {
        char [16] _M_local_buf;
        unsigned long _M_allocated_capacity;
    };
};
struct std::string::_Alloc_hider {
    char * _M_p;
};
union __anonymous_union {
    char [16] _M_local_buf;
    unsigned long _M_allocated_capacity;
};

void sub_151c(_Unwind_Exception * arg1, std::string * arg2, long arg3) {
    void var_0;
    std::string::_M_dispose(/* this */ arg2);
    std::string::_M_dispose(/* this */ &var_0);
    _Unwind_Resume(/* exc */ arg1);
}

class std::ostream {
    int() ** _vptr.basic_ostream;
};

int main(int argc, char ** argv, char ** envp) {
    int var_14;
    long var_22;
    char var_15;
    char var_18;
    char var_24;
    char var_25;
    std::ostream * var_23;
    char * var_16;
    char * var_17;
    char * var_19;
    char * var_20;
    char * var_21;
    std::operator<<<std::char_traits<char>_>(/* __out */ &std::cout, /* __s */ "Enter len (max 50):\\n");
    std::operator<<<std::char_traits<char>_>(/* __out */ &std::cout, /* __s */ "Include sym? (yes/no):");
    std::istream::operator>>(/* this */ &std::cin, /* __n */ &var_14);
    std::operator<<<std::char_traits<char>_>(/* __out */ &std::cout, /* __s */ "Include sym? (yes/no):\\n");
    var_17 = &var_15;
    var_15 = 0;
    std::operator>><char>(/* __in */ &std::cin, /* __str */ &var_16);
    var_15 = 0;
    var_24 = std::operator==<char>(&var_17, "yes");
    std::operator<<<std::char_traits<char>_>(/* __out */ &std::cout, /* __s */ "Include num? (yes/no):\\n");
    var_20 = &var_18;
    var_18 = 0;
    std::operator>><char>(/* __in */ &std::cin, /* __str */ &var_19);
    var_18 = 0;
    var_25 = std::operator==<char>(&var_20, "yes");
    generate_password(&var_21, var_14, var_24, var_25);
    var_23 = std::operator<<<std::char_traits<char>_>(/* __out */ &std::cout, /* __s */ "Generated password: ");
    var_23 = std::__ostream_insert<char>(/* __out */ var_23, /* __s */ var_21, /* __n */ var_22);
    std::operator<<<std::char_traits<char>_>(/* __out */ var_23, /* __s */ "Enter len (max 50):\\n");
    std::string::_M_dispose(/* this */ &var_21);
    std::string::_M_dispose(/* this */ &var_20);
    std::string::_M_dispose(/* this */ &var_17);
    return 0;
}

struct _Unwind_Exception {
    unsigned long exception_class;
    void(_Unwind_Reason_Code, _Unwind_Exception *) * exception_cleanup;
    unsigned long private_1;
    unsigned long private_2;
};
enum _Unwind_Reason_Code {
    _URC_NO_REASON = 0,
    _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
    _URC_FATAL_PHASE2_ERROR = 2,
    _URC_FATAL_PHASE1_ERROR = 3,
    _URC_NORMAL_STOP = 4,
    _URC_END_OF_STACK = 5,
    _URC_HANDLER_FOUND = 6,
    _URC_INSTALL_CONTEXT = 7,
    _URC_CONTINUE_UNWIND = 8
};

void sub_16ba(_Unwind_Exception * arg1, long arg2) {
    void var_0;
    void var_1;
    void var_2;
    std::string::_M_dispose(/* this */ &var_0);
    std::string::_M_dispose(/* this */ &var_1);
    std::string::_M_dispose(/* this */ &var_2);
    _Unwind_Resume(/* exc */ arg1);
}



int _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(long * arg1, char * arg2) {
    int var_1;
    void * var_0;
    var_0 = arg1 + 8L;
    if (*var_0 != strlen(arg2)) {
        var_1 = 0;
    }
    else if (*var_0 == 0L) {
        var_1 = 1;
    }
    else {
        var_1 = memcmp(*arg1, arg2, *var_0);
        var_1 = var_1 == 0;
    }
    return var_1;
}

Second file is a decrypt.py file
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import padding

def decrypt_message(encrypted_message, key):
    try:
        key = key.ljust(32, b'\x00')
        iv = encrypted_message[:16]
        ciphertext = encrypted_message[16:]
        cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend())
        decryptor = cipher.decryptor()
        decrypted_padded_message = decryptor.update(ciphertext) + decryptor.finalize()
        unpadder = padding.PKCS7(algorithms.AES.block_size).unpadder()
        decrypted_message = unpadder.update(decrypted_padded_message) + unpadder.finalize()
        return decrypted_message.decode()
    except Exception as e:
        print(f"An error occurred during decryption: {e}")
        return None

if __name__ == "__main__":
    encrypted_message = bytes.fromhex('ad24426047b0ffb03b679773664838462a6f00bdcaf0589dd1748e9ed5c568601edc87d974894f9dd9b98cc35535145c494eb0af84c8f78d440a033c91c7de62d506d8cabdc2a10138b95139bbe60e89')
    key = input("Please input your key : ")
    decrypted_message = decrypt_message(encrypted_message, key.encode())
    if decrypted_message:
        print(f"Decrypted message: {decrypted_message}")
    else:
        print("Decryption failed or no valid message found.")