|
|
@ -25,8 +25,11 @@ std::optional<recomp::symbol_table_t*> decomp_t::decompose(
|
|
|
|
std::for_each(
|
|
|
|
std::for_each(
|
|
|
|
m_objs.begin(), m_objs.end(), [&](std::vector<std::uint8_t>& img_data) {
|
|
|
|
m_objs.begin(), m_objs.end(), [&](std::vector<std::uint8_t>& img_data) {
|
|
|
|
auto img = reinterpret_cast<coff::image_t*>(img_data.data());
|
|
|
|
auto img = reinterpret_cast<coff::image_t*>(img_data.data());
|
|
|
|
for (auto idx = 0u; idx < img->file_header.num_symbols - 1; ++idx) {
|
|
|
|
for (auto idx = 0u; idx < img->file_header.num_symbols; ++idx) {
|
|
|
|
auto sym = img->get_symbol(idx);
|
|
|
|
auto sym = img->get_symbol(idx);
|
|
|
|
|
|
|
|
if (sym->section_index - 1 > img->file_header.num_sections)
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
auto sym_name = symbol_t::name(img, sym);
|
|
|
|
auto sym_name = symbol_t::name(img, sym);
|
|
|
|
if (sym_name.length()) {
|
|
|
|
if (sym_name.length()) {
|
|
|
|
auto sym_hash = symbol_t::hash(sym_name.data());
|
|
|
|
auto sym_hash = symbol_t::hash(sym_name.data());
|
|
|
|