terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
NativeMethods.cs
Go to the documentation of this file.
1using System;
5
6namespace Microsoft.Win32
7{
8 // Token: 0x02000075 RID: 117
9 internal static class NativeMethods
10 {
11 // Token: 0x060001B7 RID: 439 RVA: 0x00005F3C File Offset: 0x0000413C
13 {
14 IntPtr handle = hSourceHandle.handle;
15 if (!bInheritHandle)
16 {
17 long num = 0L;
18 hSourceHandle.DangerousRelease();
19 if (num == 0L)
20 {
21 }
22 throw new OutOfMemoryException();
23 }
24 long num2 = 0L;
25 hSourceHandle.DangerousRelease();
26 if (num2 == 0L)
27 {
28 }
29 throw new OutOfMemoryException();
30 }
31
32 // Token: 0x060001B8 RID: 440 RVA: 0x00005F78 File Offset: 0x00004178
34 {
35 /*
36An exception occurred when decompiling this method (060001B8)
37
38ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Microsoft.Win32.NativeMethods::DuplicateHandle(System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef,Microsoft.Win32.SafeHandles.SafeProcessHandle,System.Int32,System.Boolean,System.Int32)
39
40 ---> System.Exception: Basic block has to end with unconditional control flow.
41{
42 IL_0003:
43 brtrue(IL_0000, ldloc:int32[exp:bool](dwDesiredAccess))
44}
45
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
47 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
48 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
49 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
50 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
51 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
52 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
53 --- End of inner exception stack trace ---
54 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
55 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
56*/;
57 }
58
59 // Token: 0x060001B9 RID: 441 RVA: 0x00002050 File Offset: 0x00000250
60 public static IntPtr GetCurrentProcess()
61 {
62 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
63 }
64
65 // Token: 0x060001BA RID: 442 RVA: 0x00002050 File Offset: 0x00000250
66 public static bool GetExitCodeProcess(IntPtr processHandle, [Out] int exitCode)
67 {
68 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
69 }
70
71 // Token: 0x060001BB RID: 443 RVA: 0x00005F8C File Offset: 0x0000418C
73 {
74 if (!false)
75 {
76 }
77 throw new OutOfMemoryException();
78 }
79
80 // Token: 0x060001BC RID: 444 RVA: 0x00002050 File Offset: 0x00000250
81 public static int GetCurrentProcessId()
82 {
83 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
84 }
85
86 // Token: 0x060001BD RID: 445 RVA: 0x00005FB4 File Offset: 0x000041B4
87 public static bool SetPriorityClass(IntPtr handle, int priorityClass)
88 {
89 throw new NotSupportedException();
90 }
91
92 // Token: 0x060001BE RID: 446 RVA: 0x00005FC8 File Offset: 0x000041C8
93 public static bool SetPriorityClass(Microsoft.Win32.SafeHandles.SafeProcessHandle handle, int priorityClass)
94 {
95 throw new NotSupportedException();
96 }
97
98 // Token: 0x060001BF RID: 447 RVA: 0x00002050 File Offset: 0x00000250
99 public static bool CloseProcess(IntPtr handle)
100 {
101 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
102 }
103 }
104}
class f__AnonymousType0<< Count > j__TPar
static bool DuplicateHandle(HandleRef hSourceProcessHandle, SafeHandle hSourceHandle, HandleRef hTargetProcess, [Out] SafeWaitHandle targetHandle, int dwDesiredAccess, bool bInheritHandle, int dwOptions)
static bool DuplicateHandle(HandleRef hSourceProcessHandle, HandleRef hSourceHandle, HandleRef hTargetProcess, [Out] Microsoft.Win32.SafeHandles.SafeProcessHandle targetHandle, int dwDesiredAccess, bool bInheritHandle, int dwOptions)
static IntPtr GetCurrentProcess()
static bool CloseProcess(IntPtr handle)
static bool GetExitCodeProcess(IntPtr processHandle, [Out] int exitCode)
static bool SetPriorityClass(Microsoft.Win32.SafeHandles.SafeProcessHandle handle, int priorityClass)
static bool GetExitCodeProcess(Microsoft.Win32.SafeHandles.SafeProcessHandle processHandle, [Out] int exitCode)
static bool SetPriorityClass(IntPtr handle, int priorityClass)