Exploit database

GH-ea91ecf629103514d4b348ce44007631

jamf/cve-2020-1206-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-1206

3 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7
jamf/cve-2020-1206-pocRevision 9e917e593af3

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

ProtoSDK/MS-SWN/SwnStubFormatString.cs

C# · 27,399 bytes
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Microsoft.Protocols.TestTools.StackSdk.Networking.Rpce;

namespace Microsoft.Protocols.TestTools.StackSdk.Swn
{
    internal class SwnStubFormatString
    {
        // SWN type format string generated by midl, converted to byte array.
        internal static byte[] TypeFormatString
        {
            get
            {
                return RpceStubHelper.GetPlatform() == RpceStubTargetPlatform.Amd64 ?
                    RpceStubHelper.CreateFormatStringByteArray(TYPE_FORMAT_STRING_X64) :
                    RpceStubHelper.CreateFormatStringByteArray(TYPE_FORMAT_STRING_X86);
            }
        }

        // SWN proc format string generated by midl, converted to byte array.
        internal static byte[] ProcFormatString
        {
            get
            {
                return RpceStubHelper.GetPlatform() == RpceStubTargetPlatform.Amd64 ?
                    RpceStubHelper.CreateFormatStringByteArray(PROC_FORMAT_STRING_X64) :
                    RpceStubHelper.CreateFormatStringByteArray(PROC_FORMAT_STRING_X86);
            }
        }

        internal static ushort[] ProcFormatStringOffsetTable
        {
            get
            {
                return RpceStubHelper.GetPlatform() == RpceStubTargetPlatform.Amd64 ?
                    ProcFormatStringOffsetTableX64 : ProcFormatStringOffsetTableX86;
            }
        }

        #region midl.exe generated string
        //Copy the format string from midl.exe generated stub
        private const string PROC_FORMAT_STRING_X64 = @"
    /* Procedure WitnessrGetInterfaceList */

            0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/*  2 */	NdrFcLong( 0x0 ),	/* 0 */
/*  6 */	NdrFcShort( 0x0 ),	/* 0 */
/*  8 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 10 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 12 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 14 */	NdrFcShort( 0x0 ),	/* 0 */
/* 16 */	NdrFcShort( 0x8 ),	/* 8 */
/* 18 */	0x45,		/* Oi2 Flags:  srv must size, has return, has ext, */
            0x2,		/* 2 */
/* 20 */	0xa,		/* 10 */
            0x3,		/* Ext Flags:  new corr desc, clt corr check, */
/* 22 */	NdrFcShort( 0x1 ),	/* 1 */
/* 24 */	NdrFcShort( 0x0 ),	/* 0 */
/* 26 */	NdrFcShort( 0x0 ),	/* 0 */
/* 28 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 30 */	NdrFcShort( 0x2013 ),	/* Flags:  must size, must free, out, srv alloc size=8 */
/* 32 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 34 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */

    /* Parameter InterfaceList */

/* 36 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 38 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 40 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrRegister */


    /* Return value */

/* 42 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 44 */	NdrFcLong( 0x0 ),	/* 0 */
/* 48 */	NdrFcShort( 0x1 ),	/* 1 */
/* 50 */	NdrFcShort( 0x38 ),	/* x86 Stack size/offset = 56 */
/* 52 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 54 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 56 */	NdrFcShort( 0x8 ),	/* 8 */
/* 58 */	NdrFcShort( 0x40 ),	/* 64 */
/* 60 */	0x46,		/* Oi2 Flags:  clt must size, has return, has ext, */
            0x6,		/* 6 */
/* 62 */	0xa,		/* 10 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 64 */	NdrFcShort( 0x0 ),	/* 0 */
/* 66 */	NdrFcShort( 0x0 ),	/* 0 */
/* 68 */	NdrFcShort( 0x0 ),	/* 0 */
/* 70 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 72 */	NdrFcShort( 0x110 ),	/* Flags:  out, simple ref, */
/* 74 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 76 */	NdrFcShort( 0x52 ),	/* Type Offset=82 */

    /* Parameter ppContext */

/* 78 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 80 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 82 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Version */

/* 84 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 86 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 88 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter NetName */

/* 90 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 92 */	NdrFcShort( 0x20 ),	/* x86 Stack size/offset = 32 */
/* 94 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter IpAddress */

/* 96 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 98 */	NdrFcShort( 0x28 ),	/* x86 Stack size/offset = 40 */
/* 100 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter ClientComputerName */

/* 102 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 104 */	NdrFcShort( 0x30 ),	/* x86 Stack size/offset = 48 */
/* 106 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrUnRegister */


    /* Return value */

/* 108 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 110 */	NdrFcLong( 0x0 ),	/* 0 */
/* 114 */	NdrFcShort( 0x2 ),	/* 2 */
/* 116 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 118 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 120 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 122 */	NdrFcShort( 0x24 ),	/* 36 */
/* 124 */	NdrFcShort( 0x8 ),	/* 8 */
/* 126 */	0x44,		/* Oi2 Flags:  has return, has ext, */
            0x2,		/* 2 */
/* 128 */	0xa,		/* 10 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 130 */	NdrFcShort( 0x0 ),	/* 0 */
/* 132 */	NdrFcShort( 0x0 ),	/* 0 */
/* 134 */	NdrFcShort( 0x0 ),	/* 0 */
/* 136 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 138 */	NdrFcShort( 0x8 ),	/* Flags:  in, */
/* 140 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 142 */	NdrFcShort( 0x5a ),	/* Type Offset=90 */

    /* Parameter pContext */

/* 144 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 146 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 148 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrAsyncNotify */


    /* Return value */

/* 150 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 152 */	NdrFcLong( 0x0 ),	/* 0 */
/* 156 */	NdrFcShort( 0x3 ),	/* 3 */
/* 158 */	NdrFcShort( 0x20 ),	/* x86 Stack size/offset = 32 */
/* 160 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 162 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 164 */	NdrFcShort( 0x24 ),	/* 36 */
/* 166 */	NdrFcShort( 0x8 ),	/* 8 */
/* 168 */	0x45,		/* Oi2 Flags:  srv must size, has return, has ext, */
            0x3,		/* 3 */
/* 170 */	0xa,		/* 10 */
            0x3,		/* Ext Flags:  new corr desc, clt corr check, */
/* 172 */	NdrFcShort( 0x1 ),	/* 1 */
/* 174 */	NdrFcShort( 0x0 ),	/* 0 */
/* 176 */	NdrFcShort( 0x0 ),	/* 0 */
/* 178 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 180 */	NdrFcShort( 0x8 ),	/* Flags:  in, */
/* 182 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 184 */	NdrFcShort( 0x5e ),	/* Type Offset=94 */

    /* Parameter pContext */

/* 186 */	NdrFcShort( 0x2013 ),	/* Flags:  must size, must free, out, srv alloc size=8 */
/* 188 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 190 */	NdrFcShort( 0x62 ),	/* Type Offset=98 */

    /* Parameter pResp */

/* 192 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 194 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 196 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrRegisterEx */


    /* Return value */

/* 198 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 200 */	NdrFcLong( 0x0 ),	/* 0 */
/* 204 */	NdrFcShort( 0x4 ),	/* 4 */
/* 206 */	NdrFcShort( 0x50 ),	/* x86 Stack size/offset = 80 */
/* 208 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 210 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 212 */	NdrFcShort( 0x18 ),	/* 24 */
/* 214 */	NdrFcShort( 0x40 ),	/* 64 */
/* 216 */	0x46,		/* Oi2 Flags:  clt must size, has return, has ext, */
            0x9,		/* 9 */
/* 218 */	0xa,		/* 10 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 220 */	NdrFcShort( 0x0 ),	/* 0 */
/* 222 */	NdrFcShort( 0x0 ),	/* 0 */
/* 224 */	NdrFcShort( 0x0 ),	/* 0 */
/* 226 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 228 */	NdrFcShort( 0x110 ),	/* Flags:  out, simple ref, */
/* 230 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 232 */	NdrFcShort( 0x52 ),	/* Type Offset=82 */

    /* Parameter ppContext */

/* 234 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 236 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 238 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Version */

/* 240 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 242 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 244 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter NetName */

/* 246 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 248 */	NdrFcShort( 0x20 ),	/* x86 Stack size/offset = 32 */
/* 250 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter ShareName */

/* 252 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 254 */	NdrFcShort( 0x28 ),	/* x86 Stack size/offset = 40 */
/* 256 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter IpAddress */

/* 258 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 260 */	NdrFcShort( 0x30 ),	/* x86 Stack size/offset = 48 */
/* 262 */	NdrFcShort( 0x56 ),	/* Type Offset=86 */

    /* Parameter ClientComputerName */

/* 264 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 266 */	NdrFcShort( 0x38 ),	/* x86 Stack size/offset = 56 */
/* 268 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Flags */

/* 270 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 272 */	NdrFcShort( 0x40 ),	/* x86 Stack size/offset = 64 */
/* 274 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter KeepAliveTimeout */

/* 276 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 278 */	NdrFcShort( 0x48 ),	/* x86 Stack size/offset = 72 */
/* 280 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

            0x0";

        private const string PROC_FORMAT_STRING_X86 = @"
    /* Procedure WitnessrGetInterfaceList */

            0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/*  2 */	NdrFcLong( 0x0 ),	/* 0 */
/*  6 */	NdrFcShort( 0x0 ),	/* 0 */
/*  8 */	NdrFcShort( 0xc ),	/* x86 Stack size/offset = 12 */
/* 10 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 12 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 14 */	NdrFcShort( 0x0 ),	/* 0 */
/* 16 */	NdrFcShort( 0x8 ),	/* 8 */
/* 18 */	0x45,		/* Oi2 Flags:  srv must size, has return, has ext, */
            0x2,		/* 2 */
/* 20 */	0x8,		/* 8 */
            0x3,		/* Ext Flags:  new corr desc, clt corr check, */
/* 22 */	NdrFcShort( 0x1 ),	/* 1 */
/* 24 */	NdrFcShort( 0x0 ),	/* 0 */
/* 26 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 28 */	NdrFcShort( 0x2013 ),	/* Flags:  must size, must free, out, srv alloc size=8 */
/* 30 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 32 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */

    /* Parameter InterfaceList */

/* 34 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 36 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 38 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrRegister */


    /* Return value */

/* 40 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 42 */	NdrFcLong( 0x0 ),	/* 0 */
/* 46 */	NdrFcShort( 0x1 ),	/* 1 */
/* 48 */	NdrFcShort( 0x1c ),	/* x86 Stack size/offset = 28 */
/* 50 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 52 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 54 */	NdrFcShort( 0x8 ),	/* 8 */
/* 56 */	NdrFcShort( 0x40 ),	/* 64 */
/* 58 */	0x46,		/* Oi2 Flags:  clt must size, has return, has ext, */
            0x6,		/* 6 */
/* 60 */	0x8,		/* 8 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 62 */	NdrFcShort( 0x0 ),	/* 0 */
/* 64 */	NdrFcShort( 0x0 ),	/* 0 */
/* 66 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 68 */	NdrFcShort( 0x110 ),	/* Flags:  out, simple ref, */
/* 70 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 72 */	NdrFcShort( 0x50 ),	/* Type Offset=80 */

    /* Parameter ppContext */

/* 74 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 76 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 78 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Version */

/* 80 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 82 */	NdrFcShort( 0xc ),	/* x86 Stack size/offset = 12 */
/* 84 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter NetName */

/* 86 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 88 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 90 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter IpAddress */

/* 92 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 94 */	NdrFcShort( 0x14 ),	/* x86 Stack size/offset = 20 */
/* 96 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter ClientComputerName */

/* 98 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 100 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 102 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrUnRegister */


    /* Return value */

/* 104 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 106 */	NdrFcLong( 0x0 ),	/* 0 */
/* 110 */	NdrFcShort( 0x2 ),	/* 2 */
/* 112 */	NdrFcShort( 0xc ),	/* x86 Stack size/offset = 12 */
/* 114 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 116 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 118 */	NdrFcShort( 0x24 ),	/* 36 */
/* 120 */	NdrFcShort( 0x8 ),	/* 8 */
/* 122 */	0x44,		/* Oi2 Flags:  has return, has ext, */
            0x2,		/* 2 */
/* 124 */	0x8,		/* 8 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 126 */	NdrFcShort( 0x0 ),	/* 0 */
/* 128 */	NdrFcShort( 0x0 ),	/* 0 */
/* 130 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 132 */	NdrFcShort( 0x8 ),	/* Flags:  in, */
/* 134 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 136 */	NdrFcShort( 0x58 ),	/* Type Offset=88 */

    /* Parameter pContext */

/* 138 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 140 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 142 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrAsyncNotify */


    /* Return value */

/* 144 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 146 */	NdrFcLong( 0x0 ),	/* 0 */
/* 150 */	NdrFcShort( 0x3 ),	/* 3 */
/* 152 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 154 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 156 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 158 */	NdrFcShort( 0x24 ),	/* 36 */
/* 160 */	NdrFcShort( 0x8 ),	/* 8 */
/* 162 */	0x45,		/* Oi2 Flags:  srv must size, has return, has ext, */
            0x3,		/* 3 */
/* 164 */	0x8,		/* 8 */
            0x3,		/* Ext Flags:  new corr desc, clt corr check, */
/* 166 */	NdrFcShort( 0x1 ),	/* 1 */
/* 168 */	NdrFcShort( 0x0 ),	/* 0 */
/* 170 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 172 */	NdrFcShort( 0x8 ),	/* Flags:  in, */
/* 174 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 176 */	NdrFcShort( 0x5c ),	/* Type Offset=92 */

    /* Parameter pContext */

/* 178 */	NdrFcShort( 0x2013 ),	/* Flags:  must size, must free, out, srv alloc size=8 */
/* 180 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 182 */	NdrFcShort( 0x60 ),	/* Type Offset=96 */

    /* Parameter pResp */

/* 184 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 186 */	NdrFcShort( 0xc ),	/* x86 Stack size/offset = 12 */
/* 188 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Procedure WitnessrRegisterEx */


    /* Return value */

/* 190 */	0x0,		/* 0 */
            0x48,		/* Old Flags:  */
/* 192 */	NdrFcLong( 0x0 ),	/* 0 */
/* 196 */	NdrFcShort( 0x4 ),	/* 4 */
/* 198 */	NdrFcShort( 0x28 ),	/* x86 Stack size/offset = 40 */
/* 200 */	0x32,		/* FC_BIND_PRIMITIVE */
            0x0,		/* 0 */
/* 202 */	NdrFcShort( 0x0 ),	/* x86 Stack size/offset = 0 */
/* 204 */	NdrFcShort( 0x18 ),	/* 24 */
/* 206 */	NdrFcShort( 0x40 ),	/* 64 */
/* 208 */	0x46,		/* Oi2 Flags:  clt must size, has return, has ext, */
            0x9,		/* 9 */
/* 210 */	0x8,		/* 8 */
            0x1,		/* Ext Flags:  new corr desc, */
/* 212 */	NdrFcShort( 0x0 ),	/* 0 */
/* 214 */	NdrFcShort( 0x0 ),	/* 0 */
/* 216 */	NdrFcShort( 0x0 ),	/* 0 */

    /* Parameter Handle */

/* 218 */	NdrFcShort( 0x110 ),	/* Flags:  out, simple ref, */
/* 220 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 222 */	NdrFcShort( 0x50 ),	/* Type Offset=80 */

    /* Parameter ppContext */

/* 224 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 226 */	NdrFcShort( 0x8 ),	/* x86 Stack size/offset = 8 */
/* 228 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Version */

/* 230 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 232 */	NdrFcShort( 0xc ),	/* x86 Stack size/offset = 12 */
/* 234 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter NetName */

/* 236 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 238 */	NdrFcShort( 0x10 ),	/* x86 Stack size/offset = 16 */
/* 240 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter ShareName */

/* 242 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 244 */	NdrFcShort( 0x14 ),	/* x86 Stack size/offset = 20 */
/* 246 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter IpAddress */

/* 248 */	NdrFcShort( 0xb ),	/* Flags:  must size, must free, in, */
/* 250 */	NdrFcShort( 0x18 ),	/* x86 Stack size/offset = 24 */
/* 252 */	NdrFcShort( 0x54 ),	/* Type Offset=84 */

    /* Parameter ClientComputerName */

/* 254 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 256 */	NdrFcShort( 0x1c ),	/* x86 Stack size/offset = 28 */
/* 258 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter Flags */

/* 260 */	NdrFcShort( 0x48 ),	/* Flags:  in, base type, */
/* 262 */	NdrFcShort( 0x20 ),	/* x86 Stack size/offset = 32 */
/* 264 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

    /* Parameter KeepAliveTimeout */

/* 266 */	NdrFcShort( 0x70 ),	/* Flags:  out, return, base type, */
/* 268 */	NdrFcShort( 0x24 ),	/* x86 Stack size/offset = 36 */
/* 270 */	0x8,		/* FC_LONG */
            0x0,		/* 0 */

            0x0";

        //Copy the format string from midl.exe generated stub
        private const string TYPE_FORMAT_STRING_X64 = @"
            NdrFcShort( 0x0 ),	/* 0 */
/*  2 */	
            0x11, 0x14,	/* FC_RP [alloced_on_stack] [pointer_deref] */
/*  4 */	NdrFcShort( 0x2 ),	/* Offset= 2 (6) */
/*  6 */	
            0x12, 0x0,	/* FC_UP */
/*  8 */	NdrFcShort( 0x36 ),	/* Offset= 54 (62) */
/* 10 */	
            0x1d,		/* FC_SMFARRAY */
            0x1,		/* 1 */
/* 12 */	NdrFcShort( 0x208 ),	/* 520 */
/* 14 */	0x5,		/* FC_WCHAR */
            0x5b,		/* FC_END */
/* 16 */	
            0x1d,		/* FC_SMFARRAY */
            0x1,		/* 1 */
/* 18 */	NdrFcShort( 0x10 ),	/* 16 */
/* 20 */	0x6,		/* FC_SHORT */
            0x5b,		/* FC_END */
/* 22 */	
            0x15,		/* FC_STRUCT */
            0x3,		/* 3 */
/* 24 */	NdrFcShort( 0x228 ),	/* 552 */
/* 26 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 28 */	NdrFcShort( 0xffee ),	/* Offset= -18 (10) */
/* 30 */	0x8,		/* FC_LONG */
            0x6,		/* FC_SHORT */
/* 32 */	0x3e,		/* FC_STRUCTPAD2 */
            0x8,		/* FC_LONG */
/* 34 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 36 */	NdrFcShort( 0xffec ),	/* Offset= -20 (16) */
/* 38 */	0x8,		/* FC_LONG */
            0x5b,		/* FC_END */
/* 40 */	
            0x21,		/* FC_BOGUS_ARRAY */
            0x3,		/* 3 */
/* 42 */	NdrFcShort( 0x0 ),	/* 0 */
/* 44 */	0x19,		/* Corr desc:  field pointer, FC_ULONG */
            0x0,		/*  */
/* 46 */	NdrFcShort( 0x0 ),	/* 0 */
/* 48 */	NdrFcShort( 0x1 ),	/* Corr flags:  early, */
/* 50 */	NdrFcLong( 0xffffffff ),	/* -1 */
/* 54 */	NdrFcShort( 0x0 ),	/* Corr flags:  */
/* 56 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 58 */	NdrFcShort( 0xffdc ),	/* Offset= -36 (22) */
/* 60 */	0x5c,		/* FC_PAD */
            0x5b,		/* FC_END */
/* 62 */	
            0x1a,		/* FC_BOGUS_STRUCT */
            0x3,		/* 3 */
/* 64 */	NdrFcShort( 0x10 ),	/* 16 */
/* 66 */	NdrFcShort( 0x0 ),	/* 0 */
/* 68 */	NdrFcShort( 0x6 ),	/* Offset= 6 (74) */
/* 70 */	0x8,		/* FC_LONG */
            0x40,		/* FC_STRUCTPAD4 */
/* 72 */	0x36,		/* FC_POINTER */
            0x5b,		/* FC_END */
/* 74 */	
            0x12, 0x0,	/* FC_UP */
/* 76 */	NdrFcShort( 0xffdc ),	/* Offset= -36 (40) */
/* 78 */	
            0x11, 0x4,	/* FC_RP [alloced_on_stack] */
/* 80 */	NdrFcShort( 0x2 ),	/* Offset= 2 (82) */
/* 82 */	0x30,		/* FC_BIND_CONTEXT */
            0xa0,		/* Ctxt flags:  via ptr, out, */
/* 84 */	0x0,		/* 0 */
            0x0,		/* 0 */
/* 86 */	
            0x12, 0x8,	/* FC_UP [simple_pointer] */
/* 88 */	
            0x25,		/* FC_C_WSTRING */
            0x5c,		/* FC_PAD */
/* 90 */	0x30,		/* FC_BIND_CONTEXT */
            0x41,		/* Ctxt flags:  in, can't be null */
/* 92 */	0x0,		/* 0 */
            0x0,		/* 0 */
/* 94 */	0x30,		/* FC_BIND_CONTEXT */
            0x41,		/* Ctxt flags:  in, can't be null */
/* 96 */	0x1,		/* 1 */
            0x0,		/* 0 */
/* 98 */	
            0x11, 0x14,	/* FC_RP [alloced_on_stack] [pointer_deref] */
/* 100 */	NdrFcShort( 0x2 ),	/* Offset= 2 (102) */
/* 102 */	
            0x12, 0x0,	/* FC_UP */
/* 104 */	NdrFcShort( 0xe ),	/* Offset= 14 (118) */
/* 106 */	
            0x1b,		/* FC_CARRAY */
            0x0,		/* 0 */
/* 108 */	NdrFcShort( 0x1 ),	/* 1 */
/* 110 */	0x19,		/* Corr desc:  field pointer, FC_ULONG */
            0x0,		/*  */
/* 112 */	NdrFcShort( 0x4 ),	/* 4 */
/* 114 */	NdrFcShort( 0x1 ),	/* Corr flags:  early, */
/* 116 */	0x2,		/* FC_CHAR */
            0x5b,		/* FC_END */
/* 118 */	
            0x1a,		/* FC_BOGUS_STRUCT */
            0x3,		/* 3 */
/* 120 */	NdrFcShort( 0x18 ),	/* 24 */
/* 122 */	NdrFcShort( 0x0 ),	/* 0 */
/* 124 */	NdrFcShort( 0x8 ),	/* Offset= 8 (132) */
/* 126 */	0x8,		/* FC_LONG */
            0x8,		/* FC_LONG */
/* 128 */	0x8,		/* FC_LONG */
            0x40,		/* FC_STRUCTPAD4 */
/* 130 */	0x36,		/* FC_POINTER */
            0x5b,		/* FC_END */
/* 132 */	
            0x12, 0x0,	/* FC_UP */
/* 134 */	NdrFcShort( 0xffe4 ),	/* Offset= -28 (106) */

            0x0";

        private const string TYPE_FORMAT_STRING_X86 = @"
            NdrFcShort( 0x0 ),	/* 0 */
/*  2 */	
            0x11, 0x14,	/* FC_RP [alloced_on_stack] [pointer_deref] */
/*  4 */	NdrFcShort( 0x2 ),	/* Offset= 2 (6) */
/*  6 */	
            0x12, 0x0,	/* FC_UP */
/*  8 */	NdrFcShort( 0x30 ),	/* Offset= 48 (56) */
/* 10 */	
            0x1d,		/* FC_SMFARRAY */
            0x1,		/* 1 */
/* 12 */	NdrFcShort( 0x208 ),	/* 520 */
/* 14 */	0x5,		/* FC_WCHAR */
            0x5b,		/* FC_END */
/* 16 */	
            0x1d,		/* FC_SMFARRAY */
            0x1,		/* 1 */
/* 18 */	NdrFcShort( 0x10 ),	/* 16 */
/* 20 */	0x6,		/* FC_SHORT */
            0x5b,		/* FC_END */
/* 22 */	
            0x15,		/* FC_STRUCT */
            0x3,		/* 3 */
/* 24 */	NdrFcShort( 0x228 ),	/* 552 */
/* 26 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 28 */	NdrFcShort( 0xffee ),	/* Offset= -18 (10) */
/* 30 */	0x8,		/* FC_LONG */
            0x6,		/* FC_SHORT */
/* 32 */	0x3e,		/* FC_STRUCTPAD2 */
            0x8,		/* FC_LONG */
/* 34 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 36 */	NdrFcShort( 0xffec ),	/* Offset= -20 (16) */
/* 38 */	0x8,		/* FC_LONG */
            0x5b,		/* FC_END */
/* 40 */	
            0x1b,		/* FC_CARRAY */
            0x3,		/* 3 */
/* 42 */	NdrFcShort( 0x228 ),	/* 552 */
/* 44 */	0x19,		/* Corr desc:  field pointer, FC_ULONG */
            0x0,		/*  */
/* 46 */	NdrFcShort( 0x0 ),	/* 0 */
/* 48 */	NdrFcShort( 0x1 ),	/* Corr flags:  early, */
/* 50 */	0x4c,		/* FC_EMBEDDED_COMPLEX */
            0x0,		/* 0 */
/* 52 */	NdrFcShort( 0xffe2 ),	/* Offset= -30 (22) */
/* 54 */	0x5c,		/* FC_PAD */
            0x5b,		/* FC_END */
/* 56 */	
            0x16,		/* FC_PSTRUCT */
            0x3,		/* 3 */
/* 58 */	NdrFcShort( 0x8 ),	/* 8 */
/* 60 */	
            0x4b,		/* FC_PP */
            0x5c,		/* FC_PAD */
/* 62 */	
            0x46,		/* FC_NO_REPEAT */
            0x5c,		/* FC_PAD */
/* 64 */	NdrFcShort( 0x4 ),	/* 4 */
/* 66 */	NdrFcShort( 0x4 ),	/* 4 */
/* 68 */	0x12, 0x0,	/* FC_UP */
/* 70 */	NdrFcShort( 0xffe2 ),	/* Offset= -30 (40) */
/* 72 */	
            0x5b,		/* FC_END */

            0x8,		/* FC_LONG */
/* 74 */	0x8,		/* FC_LONG */
            0x5b,		/* FC_END */
/* 76 */	
            0x11, 0x4,	/* FC_RP [alloced_on_stack] */
/* 78 */	NdrFcShort( 0x2 ),	/* Offset= 2 (80) */
/* 80 */	0x30,		/* FC_BIND_CONTEXT */
            0xa0,		/* Ctxt flags:  via ptr, out, */
/* 82 */	0x0,		/* 0 */
            0x0,		/* 0 */
/* 84 */	
            0x12, 0x8,	/* FC_UP [simple_pointer] */
/* 86 */	
            0x25,		/* FC_C_WSTRING */
            0x5c,		/* FC_PAD */
/* 88 */	0x30,		/* FC_BIND_CONTEXT */
            0x41,		/* Ctxt flags:  in, can't be null */
/* 90 */	0x0,		/* 0 */
            0x0,		/* 0 */
/* 92 */	0x30,		/* FC_BIND_CONTEXT */
            0x41,		/* Ctxt flags:  in, can't be null */
/* 94 */	0x1,		/* 1 */
            0x0,		/* 0 */
/* 96 */	
            0x11, 0x14,	/* FC_RP [alloced_on_stack] [pointer_deref] */
/* 98 */	NdrFcShort( 0x2 ),	/* Offset= 2 (100) */
/* 100 */	
            0x12, 0x0,	/* FC_UP */
/* 102 */	NdrFcShort( 0xe ),	/* Offset= 14 (116) */
/* 104 */	
            0x1b,		/* FC_CARRAY */
            0x0,		/* 0 */
/* 106 */	NdrFcShort( 0x1 ),	/* 1 */
/* 108 */	0x19,		/* Corr desc:  field pointer, FC_ULONG */
            0x0,		/*  */
/* 110 */	NdrFcShort( 0x4 ),	/* 4 */
/* 112 */	NdrFcShort( 0x1 ),	/* Corr flags:  early, */
/* 114 */	0x2,		/* FC_CHAR */
            0x5b,		/* FC_END */
/* 116 */	
            0x16,		/* FC_PSTRUCT */
            0x3,		/* 3 */
/* 118 */	NdrFcShort( 0x10 ),	/* 16 */
/* 120 */	
            0x4b,		/* FC_PP */
            0x5c,		/* FC_PAD */
/* 122 */	
            0x46,		/* FC_NO_REPEAT */
            0x5c,		/* FC_PAD */
/* 124 */	NdrFcShort( 0xc ),	/* 12 */
/* 126 */	NdrFcShort( 0xc ),	/* 12 */
/* 128 */	0x12, 0x0,	/* FC_UP */
/* 130 */	NdrFcShort( 0xffe6 ),	/* Offset= -26 (104) */
/* 132 */	
            0x5b,		/* FC_END */

            0x8,		/* FC_LONG */
/* 134 */	0x8,		/* FC_LONG */
            0x8,		/* FC_LONG */
/* 136 */	0x8,		/* FC_LONG */
            0x5b,		/* FC_END */

            0x0";

        internal static ushort[] ProcFormatStringOffsetTableX64 = 
        {
            0,
            42,
            108,
            150,
            198
        };

        internal static ushort[] ProcFormatStringOffsetTableX86 = 
        {
            0,
            40,
            104,
            144,
            190
        };
        #endregion
    }
}