"""Dump xwwqazamx bl/w/A method refs from TNG dex."""
import re
import zipfile

APK = r"C:\Users\Administrator\Desktop\notiMessage\reverse\apks\tng\base.apk"
with zipfile.ZipFile(APK) as z:
    data = b"".join(z.read(n) for n in z.namelist() if n.endswith(".dex"))

for cls in ["Lxwwqazamx/bl;", "Lxwwqazamx/w;", "Lxwwqazamx/W;", "Lxwwqazamx/A;"]:
    print("===", cls, "===")
    refs = sorted(set(re.findall(cls.encode() + rb"->[^\x00]{1,80}", data)))
    for r in refs[:30]:
        print(r.decode("ascii", "ignore"))
    print()

print("=== lifecycle on xwwqazamx/w ===")
for m in sorted(set(re.findall(rb"Lxwwqazamx/w;->on[A-Za-z]+", data))):
    print(m.decode())
