import os import pefile import re import struct as s from Crypto.Cipher import ARC4 import sys import hexdump import argparse """ __author__: @tccontre18 - Br3akp0int date: 04.05.2024 description: a simple python script to extract the headless wineloader code in dll side loaded dll in vcruntime140.dll """ def scan_wineloader_sideload(file_path): with open(file_path, 'rb') as file: data = file.read() byte_sequence = b"\x48\x83\xEC\x08\x48\x8D\x0D????????\x48\xC7\xC2\x28\x80\x00\x00\xE8????????\x48\x8D\x0D????????\x48\x8D\x05????????\x48\x89\x05????????\x48\xC7\x05????????????\x00\x00\x48\xC7\x05????????\x28\x80\x00\x00\xE8????\x00\x00\x48\x83\xC4\x08\xC3" # Convert byte sequence to regular expression pattern pattern = byte_sequence.hex().replace('3f', '.') # Search for the pattern match = re.search(pattern, data.hex()) if match: offset = match.start() // 2 print(f"[+] Byte sequence found at offset {hex(offset)}") else: print(f"[+] Byte sequence not found in the file") return offset def extract_struct_four_bytes_data(f, file_offset, num_of_byted_read=4): f.seek(file_offset, 0) result = s.unpack("