Fix ordinal value in get_imported_funcs and add get_offset function