Ejemplo n.º 1
0
        internal IntPtr method_19(string string_0)
        {
            IntPtr procAddress = externalProcessMemory_0.GetProcAddress("kernel32.dll", "GetProcAddress");
            IntPtr result;
            var    length = string_0.Length + 1;

            using (AllocatedMemory allocatedMemory = externalProcessMemory_0.CreateAllocatedMemory(length))
            {
                allocatedMemory.WriteString(0, string_0, Encoding.ASCII);
                result = externalProcessMemory_0.CallInjected <IntPtr>(procAddress, CallingConvention.StdCall, intptr_0, allocatedMemory.Address);
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="libraryName">mono.dll</param>
        /// <returns></returns>
        internal IntPtr method_18(string libraryName)
        {
            IntPtr procAddress = externalProcessMemory_0.GetProcAddress("kernel32.dll", "GetModuleHandleW");
            IntPtr result;
            var    length = libraryName.Length * 2 + 2;

            using (AllocatedMemory allocatedMemory = externalProcessMemory_0.CreateAllocatedMemory(length))
            {
                allocatedMemory.WriteString(0, libraryName, Encoding.Unicode);
                result = externalProcessMemory_0.CallInjected <IntPtr>(procAddress, CallingConvention.StdCall, allocatedMemory.Address);
            }
            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// mono_assembly_open
        /// </summary>
        /// <param name="string_0"></param>
        /// <param name="int_0"></param>
        /// <returns></returns>
        internal IntPtr method_40(string string_0, out int int_0)
        {
            IntPtr result;

            using (AllocatedMemory allocatedMemory = this.externalProcessMemory_0.CreateAllocatedMemory(string_0.Length * 2 + 2 + 4))
            {
                allocatedMemory.WriteString(4, string_0, Encoding.UTF8);
                IntPtr intPtr = this.method_17 <IntPtr>(this.intptr_6, //mono_assembly_open
                                                        new object[]
                {
                    allocatedMemory.Address + 4,
                    allocatedMemory.Address
                });
                int_0  = allocatedMemory.Read <int>(0);
                result = intPtr;
            }
            return(result);
        }
Ejemplo n.º 4
0
        internal IntPtr method_28(string string_0)
        {
            IntPtr result;

            using (AllocatedMemory allocatedMemory = this.externalProcessMemory_0.CreateAllocatedMemory((string_0.Length + 1) * 2))
            {
                if (string_0.Length > 0)
                {
                    allocatedMemory.WriteString(0, string_0, Encoding.UTF8);
                }
                else
                {
                    allocatedMemory.Write <ushort>(0, 0);
                }
                IntPtr intPtr = this.method_27();                //mono_domain_get
                result = this.method_17 <IntPtr>(this.intptr_25, //mono_string_new
                                                 new object[]
                {
                    intPtr,
                    allocatedMemory.Address
                });
            }
            return(result);
        }