export_module
Dump a live module to a PE file that IDA, Ghidra, and pefile can open by demapping RVA-indexed memory to correct raw section offsets; use raw mode for byte-exact mapped captures.
Instructions
Dump a live module to a PE file that IDA, Ghidra and pefile will open.
The last mile of unpacking: capture the module, then write it somewhere useful. A memory buffer is RVA-indexed, so writing it out verbatim gives a file whose section headers no longer match where the bytes are — every tool rejects it. This demaps it: headers stay, each section moves from its virtual address to its declared raw offset.
raw=True keeps the mapped layout instead, for byte-exact captures.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"module": "<module>",
"path": "<path>"
},
"name": "export_module"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| raw | No | ||
| path | Yes | ||
| module | Yes | ||
| session | No | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |