import frida, time, subprocess, re
ADB="/opt/android-sdk/platform-tools/adb"
JS=r"""
function ins(){ var m=Process.findModuleByName("libil2cpp.so"); if(!m) return false;
 var b=m.base; var seen={};
 function G(a,n){ Interceptor.attach(b.add(a),{onLeave:function(rv){ var k=n+"="+(rv.isNull()?"NULL":"obj"); if(!seen[k]){seen[k]=1; send(k);} }}); }
 G(0xd91f2b,"get_mask"); G(0xd878af,"get_equippedBag"); G(0xd878c3,"get_equippedRifle"); G(0xd91f45,"get_avatar");
 Interceptor.attach(b.add(0xd437c9),{onEnter:function(){send(">ConfigureFromPlayerProfile");}});
 Interceptor.attach(b.add(0xe1890d),{onEnter:function(){send(">VaultThief.Initialise");}});
 send("__ready"); return true; }
if(!ins()){ var iv=setInterval(function(){ if(ins()) clearInterval(iv); },120); }
"""
subprocess.run([ADB,"shell","am","force-stop","se.foglo.svt"])
dev=frida.get_usb_device(timeout=10); pid=dev.spawn(["se.foglo.svt"])
s=dev.attach(pid); sc=s.create_script(JS); t0=time.time()
s.on("detached", lambda r,c=None: print("DETACH @%.1f %s"%(time.time()-t0,r),flush=True))
sc.on("message",lambda m,d: print("[%5.1f] %s"%(time.time()-t0,m.get("payload",m)),flush=True))
sc.load(); dev.resume(pid)
time.sleep(40)
