# Windows executables and DLL's

## dnSpy

dnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don't have any source code available.

{% embed url="<https://github.com/dnSpy/dnSpy>" %}

<figure><img src="/files/O5yhEEQbfkstxP4uhAKX" alt=""><figcaption></figcaption></figure>

## Python compiled executable

If a executable was compiled with pyinstaller, we can extract the python compiled code and actually decompile it.

To extract use:

{% embed url="<https://github.com/extremecoders-re/pyinstxtractor>" %}

```
python pyinstxtractor.py <filename>
```

And to decompile use Uncompyle6

* Tip: use a python venv

{% embed url="<https://github.com/rocky/python-uncompyle6/>" %}

```
uncompyle6 *compiled-python-file-pyc-or-pyo*
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.incendium.rocks/pentesting-notes/reversing/windows-executables-and-dlls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
