def METHOD_NAME(self, start_offset: int, size: int) -> bytes:
    buffer = [0xFF] * size
    for i in range(size):
        if start_offset + i < 0x100:
            mem_value = self.read_memory(start_offset + i)
            if mem_value is not None:
                buffer[i] = mem_value
            else:
                self.logger.log_hal(f'[ec] Unable to read EC offset 0x{start_offset + i:X}')
        else:
            mem_value = self.read_memory_extended(start_offset + i)
            if mem_value is not None:
                buffer[i] = mem_value
            else:
                self.logger.log_hal(f'[ec] Unable to read EC offset 0x{start_offset + i:X}')
    self.logger.log_hal(f'[ec] read EC memory from offset {start_offset:X} size {size:X}:')
    if self.logger.HAL:
        print_buffer_bytes(buffer)
    return bytes(buffer)