{"action":"closed","issue":{"url":"https://api.github.com/repos/jbevain/cecil/issues/514","repository_url":"https://api.github.com/repos/jbevain/cecil","labels_url":"https://api.github.com/repos/jbevain/cecil/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/jbevain/cecil/issues/514/comments","events_url":"https://api.github.com/repos/jbevain/cecil/issues/514/events","html_url":"https://github.com/jbevain/cecil/issues/514","id":318656473,"number":514,"title":"BadImageFormatException when reading mono.dll (Format of the executable (.exe) or library (.dll) is invalid.)","user":{"login":"sebastientromp","id":7889624,"avatar_url":"https://avatars2.githubusercontent.com/u/7889624?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastientromp","html_url":"https://github.com/sebastientromp","followers_url":"https://api.github.com/users/sebastientromp/followers","following_url":"https://api.github.com/users/sebastientromp/following{/other_user}","gists_url":"https://api.github.com/users/sebastientromp/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastientromp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastientromp/subscriptions","organizations_url":"https://api.github.com/users/sebastientromp/orgs","repos_url":"https://api.github.com/users/sebastientromp/repos","events_url":"https://api.github.com/users/sebastientromp/events{/privacy}","received_events_url":"https://api.github.com/users/sebastientromp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-28T17:57:31Z","updated_at":"2018-04-30T17:43:20Z","closed_at":"2018-04-30T17:43:20Z","author_association":"NONE","body":"Hello,\r\n\r\nI apologize if this is not the correct place to report this - I'm totally new at memory reading, and am struggling to get started.\r\n\r\nI want to read memory from a game built in Unity, and am trying to read the `mono.dll` assembly.\r\nMy code is\r\n```\r\npublic class EntryPoint\r\n\t{\r\n\t    static void Main()\r\n\t\t{\r\n\t\t\tvar assemblyDef = AssemblyDefinition.ReadAssembly(\"path/to/mono.dll\");\r\n\t\t}\r\n\t}\r\n```\r\nWhen executing it, I get the following exception:\r\n```\r\nUnhandled Exception: System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.\r\n   at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders(UInt16& subsystem, UInt16& dll_characteristics, UInt16& linker)\r\n   at Mono.Cecil.PE.ImageReader.ReadImage()\r\n   at Mono.Cecil.PE.ImageReader.ReadImage(Disposable`1 stream, String file_name)\r\n   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)\r\n   at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName)\r\n   at MindVision.New.EntryPoint.Main()\r\n```\r\nI can provide the `mono.dll` I'm targeting if that can help.\r\n\r\nIs there any I'm not doing properly? Is there anything else I should know about using Cecil + mono?\r\n\r\nThanks for any help you can give!\r\nSeb"}}
{"actor":{"display_login":"jbevain"}}