#include <kernwin.hpp> // For read_selection() #include <bytes.hpp> // For get_many_bytes() #include <diskio.hpp> char buf[MAXSTR]; ea_t saddr, eaddr; // Create the binary dump file FILE *fp = ecreate("c:\\bindump"); // Get the address range selected, or return false if there was no selection if (read_selection(&saddr, &eaddr)) { int size = eaddr - saddr; // Dump the selected address range to a binary file get_many_bytes(saddr, buf, size); ewrite(fp, buf, size); } eclose(fp);