def get_encoded_stack_string_wide(stack, startoffset, size=None):
    """
        given a stack and the starting offset, pull out the string from the stack        if size is given, pull that many bytes off stack

        :param stack: stack dictionary of your current working stack as created by the create_stack function
        :param startoffset: offset to start from on stack
        :param size: optional parameter for size to pull off stack, if not set will read until two null bytes
                    (wchar null)

        :return: string of characters from the stack dictionary starting at offset and reading until size or a null byte
                 this will not be wide characters
    """
    encrypted = []
    offset = startoffset
    while stack.get(offset) and stack.get(offset + 1):
        if not size and stack[offset][0] == 0 and stack[offset + 1][0] == 0:
            break
        if size and size + startoffset >= offset:
            break
        encrypted.append(stack[offset][0])
        encrypted.append(stack[offset + 1][0])
        offset += 2
    return bytes(encrypted)
