def METHOD_NAME(project, addr: int, as_str: bool = False):
    # This function loads a null-terminated string from the static memory region
    s = b""
    while True:
        char_addr = addr + len(s)
        try:
            v = project.loader.memory.load(char_addr, 1)
        except KeyError:
            break
        if v == b"\x00":
            break
        s += v
    return s.decode("utf-8") if as_str else (s + b"\x00")