#!/usr/bin/env python3 """Recover packed chat ammo/item arguments and bounded timer substitutions.""" import json import struct from pathlib import Path from analyze_deferred_auth import partition_function, trace_slice from analyze_game_cvars import vm_string from analyze_qvm import decode,write_json from analyze_vm_extensions import verified def name_candidates(data,h,count=30): """Read an explicitly sampled domain; this does not establish table length.""" if not 0<=count<=256:raise ValueError('sample outside low-byte domain') rows=[] for index in range(count): address=4020+432*index if address+4>h['data_length']:raise ValueError('sample word outside initialized data') if h['data_offset']+address+4>len(data):raise ValueError('truncated sampled word') pointer=struct.unpack_from('