# Path: malwareconfig/crypto.py
# def decrypt_rsa(key, data):
# def decrypt_xor(key, data):
# def decrypt_arc4(key, data):
# def decrypt_des_ecb(key, data, iv=None):
# def decrypt_des_cbc(key, data, iv=None):
# def decrypt_des3(key, data):
# def decrypt_aes(key, data):
# def decrypt_aes_cbc_iv(key, iv, data):
# def decrypt_blowfish(key, data):
# def decrypt_RC6(key, encrypted, P, Q, rounds):
#     def rol(a, i):
#     def ror(a, i):
#     def to_int(bytestring):
#     def decrypt_block(block, S):
# def derive_pbkdf2(key, salt, iv_length, key_length, iterations=8):
#     T = 2 * rounds + 4
#     L = to_int(key)
#     S = []
#     S = [0 for i in range(T)]
#     S[0] = P
#     A = 0
#     B = 0
#         A = S[i] = rol((S[i] + A + B), 3)
#         B = L[j] = rol((L[j] + A + B), (A + B))
# 
# Path: malwareconfig/common.py
# class Decoder(object):
#     decoder_name = ""
#     decoder_version = 1
#     decoder_author = ""
#     decoder_description = ""
#     file_info = object
# 
#     def set_file(self, file_info):
#         self.file_info = file_info
# 
#     def get_config(self):
#         pass


from xml.etree import ElementTree as ET
from malwareconfig import crypto
from malwareconfig.common import Decoder
            new_config['Reg Value'] = old_config['regname']
            return new_config

        if old_config['Version'] == 'Adwind RAT v2.0':
            new_config = {}
            new_config['Version'] = old_config['Version']
            new_config['Delay'] = old_config['delay']
            new_config['Domain'] = old_config['dns']
            new_config['Install Flag'] = old_config['instalar']
            new_config['Reg Key'] = old_config['keyClase']
            new_config['Password'] = old_config['password']
            new_config['Campaign ID'] = old_config['prefijo']
            new_config['Port1'] = old_config['puerto']
            return new_config
        return old_config

    def get_config(self):
        '''
        This is the main entry
        :return:
        '''

        key = "awenubisskqi"

        # Get the file from the zip
        zip_xml = self.file_info.file_from_zip('config.xml')

        # No Easy way to detect version so just try it

        try:

# Path: malwareconfig/crypto.py
# def decrypt_rsa(key, data):
# def decrypt_xor(key, data):
# def decrypt_arc4(key, data):
# def decrypt_des_ecb(key, data, iv=None):
# def decrypt_des_cbc(key, data, iv=None):
# def decrypt_des3(key, data):
# def decrypt_aes(key, data):
# def decrypt_aes_cbc_iv(key, iv, data):
# def decrypt_blowfish(key, data):
# def decrypt_RC6(key, encrypted, P, Q, rounds):
#     def rol(a, i):
#     def ror(a, i):
#     def to_int(bytestring):
#     def decrypt_block(block, S):
# def derive_pbkdf2(key, salt, iv_length, key_length, iterations=8):
#     T = 2 * rounds + 4
#     L = to_int(key)
#     S = []
#     S = [0 for i in range(T)]
#     S[0] = P
#     A = 0
#     B = 0
#         A = S[i] = rol((S[i] + A + B), 3)
#         B = L[j] = rol((L[j] + A + B), (A + B))
# 
# Path: malwareconfig/common.py
# class Decoder(object):
#     decoder_name = ""
#     decoder_version = 1
#     decoder_author = ""
#     decoder_description = ""
#     file_info = object
# 
#     def set_file(self, file_info):
#         self.file_info = file_info
# 
#     def get_config(self):
#         pass


# Path: malwareconfig/decoders/adwind.py
from xml.etree import ElementTree as ET
from malwareconfig import crypto
from malwareconfig.common import Decoder

            new_config['Reg Value'] = old_config['regname']
            return new_config

        if old_config['Version'] == 'Adwind RAT v2.0':
            new_config = {}
            new_config['Version'] = old_config['Version']
            new_config['Delay'] = old_config['delay']
            new_config['Domain'] = old_config['dns']
            new_config['Install Flag'] = old_config['instalar']
            new_config['Reg Key'] = old_config['keyClase']
            new_config['Password'] = old_config['password']
            new_config['Campaign ID'] = old_config['prefijo']
            new_config['Port1'] = old_config['puerto']
            return new_config
        return old_config

    def get_config(self):
        '''
        This is the main entry
        :return:
        '''

        key = "awenubisskqi"

        # Get the file from the zip
        zip_xml = self.file_info.file_from_zip('config.xml')

        # No Easy way to detect version so just try it

        try:

            xml_string = crypto.decrypt_des_ecb(key[:-4], zip_xml)