void hex_dump(char *buf, size_t size, size_t off) { size_t i; i = 0; if (!buf || !size) return ; while (i < size) { dump_offset(i + off, size, off); dump_hex_line(&buf[i], (size - i)); dump_char_line(&buf[i], (size - i)); printf("\n"); i += 16; } }
void msft_dump(void) { int i; dump_msft_header(); for(i=0; i < typeinfo_cnt; i++) print_hex_id("typeinfo %d offset", i); if(header_flags & HELPDLLFLAG) print_hex("help dll offset"); print_offset(); printf("\n"); dump_msft_segdir(); while(!msft_eof) { if(!dump_offset()) print_hex("unknown"); } }