// Main Method public static void Main(String[] args) { Console.WriteLine("Starting up..."); var storageInformation = new StorageInformation(); storageInformation.DisplayDisks(); }
public static StorageInformation Get() { var storageInformation = new StorageInformation { AccountName = GetAccountName(), ContainerName = GetContainerName(), KeyValue = GetKeyValue() }; return(storageInformation); }
} // Offset: 0x16F, Size: 1 public byte[] ToByteArray() { var buffer = new byte[0x170]; BitConverter.GetBytes(ProgramId).CopyTo(buffer, 0); BitConverter.GetBytes(CoreVersion).CopyTo(buffer, 8); buffer[0xC] = Flag1; buffer[0xD] = Flag2; buffer[0xE] = Flag0; buffer[0xF] = Priority; Array.Copy(ResourceLimitDescriptors, 0, buffer, 0x10, 0x20); Array.Copy(StorageInformation.ToByteArray(), 0, buffer, 0x30, 0x20); for (int i = 0; i < 32; i++) { BitConverter.GetBytes(ServiceAccessControl[i]).CopyTo(buffer, 0x50 + i * 8); } BitConverter.GetBytes(ExtendedServiceAccessControl[0]).CopyTo(buffer, 0x150); BitConverter.GetBytes(ExtendedServiceAccessControl[1]).CopyTo(buffer, 0x158); Array.Copy(Reserved, 0, buffer, 0x160, 0xF); buffer[0x16F] = ResourceLimitCategory; return(buffer); }
public void dumpAsm_BT_Click(object sender, EventArgs e) { editor_RTB.Clear(); IntPtr trueIntPtr = IntPtr.Zero; Delegate targetMethodDelegate = null; if (domainTraverser.currentMethod == null || domainTraverser.currentMethod.Name.Contains("Dispose")) return; int containedIndex = methodHelpers.containedInList(domainTraverser.currentMethod); if (containedIndex == -1 || methodHelpers.StorageInformationArrayList[containedIndex].dumped != true) { byte[] memory; if (containedIndex != -1) { memory = assemblyHelpers.DumpAFunction(methodHelpers.StorageInformationArrayList[containedIndex].methodIntPtr); grayStorm._addrOfMethod_TB.Text = methodHelpers.StorageInformationArrayList[containedIndex].methodIntPtr.ToString("X"); if (memory == null) { editor_RTB.AppendText(String.Format("COULD NOT READ MEMORY\n")); return; } else { methodHelpers.StorageInformationArrayList[containedIndex].memory = memory; methodHelpers.StorageInformationArrayList[containedIndex].dumped = true; } } else { methodInvoking invokeMethods = new methodInvoking(); System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(domainTraverser.currentMethod.MethodHandle); //JIT the method! grayStorm._addrOfMethod_TB.Text = domainTraverser.currentMethod.MethodHandle.GetFunctionPointer().ToString("X"); targetMethodDelegate = invokeMethods.getMethodDelegate(domainTraverser.currentMethod); //Get the Delegate of the method. trueIntPtr = invokeMethods.getIntPtrFromDelegate(targetMethodDelegate); memory = assemblyHelpers.DumpAFunction(trueIntPtr); if (memory == null) { editor_RTB.AppendText(String.Format("COULD NOT READ MEMORY\n")); return; } else { currentMethod = new StorageInformation(); currentMethod.memory = memory; currentMethod.methodSignature = domainTraverser.currentMethod; currentMethod.dumped = true; currentMethod.methodIntPtr = trueIntPtr; currentMethod.oldMethod = currentMethod.memory; currentMethod.methodDelegate = targetMethodDelegate; methodHelpers.StorageInformationArrayList.Add(currentMethod); containedIndex = methodHelpers.StorageInformationArrayList.Count - 1; grayStorm._addrOfMethod_TB.Text = methodHelpers.StorageInformationArrayList[containedIndex].methodIntPtr.ToString("X"); } } } if (disassemble_CB.Checked) { beaEngine.disassemble disasm = new beaEngine.disassemble(); disasm.disassembler(methodHelpers.StorageInformationArrayList[containedIndex].memory, this.editor_RTB, methodHelpers.StorageInformationArrayList[containedIndex].methodIntPtr); } else { foreach (byte b in methodHelpers.StorageInformationArrayList[containedIndex].memory) { editor_RTB.AppendText(String.Format("0x{0:X2}\n", b)); } } }