nauto_hook
Reconstructed94.1% of control flow structuredAnchor ◇EPAAwc1SGWCheofexAqLVZ7jm1nk2ahrqX5pev1bMyo6decompiled 13 Oct 2026
- Loader
- ■v3 · upgradeable
- sBPF
- ■v0
- Size
- ■187,512 bytes
- Instructions
- ●17,312
- Functions
- ●243
- SHA-256
- ●a0744a33…055a7f24
- Upgrade authority
- ■EVcs…edDs
- Last deploy slot
- ■455,854,751
❝ Published by the authors · nothing, so everything here is revrsly outputVerified build · noneIDL · none publishedsecurity.txt · none
Loading the reconstruction…
1// Reconstructed from the compiled program by revrsly.
2// Read from the bytecode: instruction names and discriminators; each instruction's accounts in
3// order, with the types and attributes their loaders' checks imply (◇ inferred: the error codes
4// they raise, the account type whose discriminator they compare, the program ids they compare
5// with); the program's error enum; event and account type names. `/* … */` is a value not
6// recovered. Handler bodies are the register-level logic of each instruction's own handler.
7// Argument names come from a published IDL when there is one, else they are placeholders; struct
8// fields are not recovered. This is a reconstruction, NOT the author's source, and will not
9// compile as-is.
10// Program: EPAAwc1SGWCheofexAqLVZ7jm1nk2ahrqX5pev1bMyo6 (mainnet)
11
12use anchor_lang::prelude::*;
13
14declare_id!("EPAAwc1SGWCheofexAqLVZ7jm1nk2ahrqX5pev1bMyo6");■ string · 44 B
15
16// Accounts — each instruction's accounts, in order, as its account loader (try_accounts) checks them.
17
18▸ 2 more #[derive(Accounts)] structs · lines 18–40
41
42#[derive(Accounts)]
43pub struct InitRegistry<'info> {◇ 3 accounts · order, types and checks inferred
44 #[account(mut)]
45 pub payer: Signer<'info>,
46 #[account(mut, seeds = [b"registry"], bump)]■ string · 8 B
47 pub registry: AccountInfo<'info>,
48 pub system_program: Program<'info, System>,
49}
50
51▸ 4 more #[derive(Accounts)] structs · lines 51–86
87
88#[program]
89pub mod program {
90 use super::*;
91
95 ▸ pub fn add_agents(ctx: Context<AddAgents>, … 8 args) -> Result<()> { … 400 lines }
500 ▸ pub fn init_mint(ctx: Context<InitMint>) -> Result<()> { … 54 lines }
556
557 // discriminator 83160467185ea3ef● found in the code at .text+0x3d18
558 // arg layout: @0: Pubkey | [u8; 32]
559 // argument names are placeholders; offsets, sizes (hence types) inferred from the handler's data reads
560 ▾ pub fn init_registry(ctx: Context<InitRegistry>, arg_0: Pubkey) -> Result<()> {● its sha256 matches the discriminator
561 // ◇ The program's own handler (`init_registry` in reconstructed.rs), register-level. Anchor's wrapper
562 // (`init_registry_handler`) loads the accounts, then calls it with r1 = where its Result is written,
563 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
564 // 64 stack slots (local_…) used below; declared in reconstructed.rs.
565 r6 = *((r1 + 8) as *const
821 ▸ pub fn remove_agents(ctx: Context<RemoveAgents>, … 8 args) -> Result<()> { … 360 lines }
1187 ▸ pub fn set_admin(ctx: Context<SetAdmin>, arg_0: Pubkey) -> Result<()> { … 103 lines }
1296 ▸ pub fn set_open(ctx: Context<SetOpen>, arg_0: u8) -> Result<()> { … 96 lines }
1397 ▸ pub fn transfer_hook(ctx: Context<TransferHook>) -> Result<()> { … 148 lines }
u64
);
566 r3 = *((*((r6) as *const u64)) as *const u64);
567 r7 = -0x1c6524c6f73e8338; // compares a key with EVcscbZSXe6ifKX6i8C88eGt6UQurJ7yWdv1sf91edDs
568 if *((r3) as *const u64) == r7 {
569 // …part 2 of EVcscbZSXe6ifKX6i8C88eGt6UQurJ7yWdv1sf91edDs
570 if *((r3 + 8) as *const u64) == 0x58a9de222f911e9b {
571 // …part 3 of EVcscbZSXe6ifKX6i8C88eGt6UQurJ7yWdv1sf91edDs
572 if *((r3 + 0x10) as *const u64) == -0x277efa8bd0942e28 {
573 // …part 4 of EVcscbZSXe6ifKX6i8C88eGt6UQurJ7yWdv1sf91edDs
574 if *((r3 + 0x18) as *const u64) != 0x428554042bb52c76 {
576 r0 = fn_e068(&local_108, 0x2486c); // .rodata+0x53c
577 r0 = fn_1130(&local_f0, 1);
578 local_120_u64 = 0x24878; // .rodata+0x548
580 local_110_u32 = 0x3c;
583 local_90 = 0x1771; // custom Anchor error 6001 (#1)?
584 r0 = fn_158b0(&local_128_u64);
586 r1 = *((*((r6) as *const u64)) as *const u64);
587 r3 = *((r1) as *const u64);
588 r4 = *((r1 + 8) as *const u64);
589 r5 = *((r1 + 0x10) as *const u64);
590 r1 = *((r1 + 0x18) as *const u64);
592 local_100_u64 = 0x58a9de222f911e9b;
593 local_f8 = -0x277efa8bd0942e28;
594 local_f0 = 0x428554042bb52c76;
599 r0 = fn_15a00(r0, r2, &local_128_u64);
604 r0 = fn_19680(*((r6 + 8) as *const u64));
606 r0 = fn_19608(*((r6 + 8) as *const u64));
608 r0 = fn_e068(&local_108, 0x24860); // .rodata+0x530
609 r0 = fn_1130(&local_f0, 2);
610 local_120_u64 = 0x24878; // .rodata+0x548
612 local_110_u32 = 0x3e;
615 local_90 = 0x1772; // custom Anchor error 6002 (#2)?
616 r0 = fn_158b0(&local_128_u64);
619 r9 = *((r7 + 0x20) as *const u8);
620 r0 = rent_get(&local_128_u64);
621 if local_128_u32 == 1 {
622 r0 = fn_15938(local_124, local_120_u32);
625 local_84 = local_11c;
626 local_7c = local_114;
627 local_74 = local_10c;
628 local_88 = local_120_u32;
629 r0 = fn_184f0(&local_88, 0x30);
630 r3 = *((*((r6 + 8) as *const u64)) as *const u64);
631 r2 = *((*((r6) as *const u64)) as *const u64);
632 local_ff8 = *((r7) as *const u64);
634 r0 = fn_145b0(&local_88, r2, r3, r0, fp);
635 r2 = *((r6) as *const u64);
636 r4 = *((r2 + 8) as *const u64);
637 r1 = *((r4) as *const u64) + 1;
642 r7 = *((r2) as *const u64);
643 *((r4) as *mut u64) = r1;
645 r5 = *((r2 + 0x10) as *const u64);
646 r1 = *((r5) as *const u64) + 1;
651 *((r5) as *mut u64) = r1;
653 r0 = *((r6 + 8) as *const u64);
654 r1 = *((r0 + 8) as *const u64);
656 r1 = *((r1) as *const u64) + 1;
662 local_168 = *((r2 + 0x2a) as *const u8);
663 local_160 = *((r2 + 0x29) as *const u8);
664 local_158 = *((r2 + 0x28) as *const u8);
665 local_150 = *((r2 + 0x20) as *const u64);
666 local_148 = *((r2 + 0x18) as *const u64);
667 local_170 = *((r0) as *const u64);
668 *((local_138) as *mut u64) = r1;
670 r3 = *((r0 + 0x10) as *const u64);
671 r1 = *((r3) as *const u64) + 1;
678 *((r3) as *mut u64) = r1;
681 r9 = *((r6 + 0x10) as *const u64);
682 r7 = *((r9 + 8) as *const u64);
683 r2 = *((r7) as *const u64) + 1;
688 local_198 = *((r0 + 0x2a) as *const u8);
689 local_190 = *((r0 + 0x29) as *const u8);
690 r1 = *((r0 + 0x28) as *const u8);
691 r5 = *((r0 + 0x20) as *const u64);
692 r8 = *((r0 + 0x18) as *const u64);
693 local_1a0 = *((r9) as *const u64);
694 *((r7) as *mut u64) = r2;
696 r2 = *((r9 + 0x10) as *const u64);
697 r3 = *((r2) as *const u64) + 1;
704 *((r2) as *mut u64) = r3;
706 abort(); // abort the program■ syscall
708 r3 = *((r9 + 0x18) as *const u64);
709 r0 = *((r9 + 0x20) as *const u64);
710 r4 = *((r9 + 0x28) as *const u8);
711 r1 = *((r9 + 0x29) as *const u8);
712 local_9e = *((r9 + 0x2a) as *const u8);
719 local_c8 = local_1a0;
720 local_ce = local_198;
721 local_cf = local_190;
722 local_d0 = local_1b0;
725 local_e8 = local_188;
726 local_f0 = local_138;
727 local_f8 = local_170;
728 local_fe = local_168;
729 local_ff = local_160;
730 local_100_u8 = local_158;
731 local_108 = local_150;
732 local_110_u64 = local_148;
733 local_118 = local_140;
734 local_120_u64 = local_1a8;
735 local_128_u64 = local_180;
736 local_38 = &local_28;
738 local_28 = 0x24955; // .rodata+0x625
744 r0 = invoke_signed(&local_88, &local_128_u64, 3, &local_38, 1);
746 if (r0 << 0x20 >> 0x20) != 0x1a {
747 r0 = fn_15938(r0, r2);
750 r0 = fn_1608(&local_128_u64);
755 r0 = fn_1608(&local_128_u64);
756 r1 = *((*((r6 + 8) as *const u64) + 0x10) as *const u64);
757 if *((r1 + 0x10) as *const u64) != 0 {
758 r0 = fn_15938(0xb, 0);
761 *((r1 + 0x10) as *mut u64) = -1;
762 r2 = *((r1 + 0x20) as *const u64);
764 r0 = fn_206b0(8, r2, &Location("programs\\nauto_hook\\src\\lib.rs:82:10"));■ string · 36 B
766 *((*((r1 + 0x18) as *const u64)) as *mut u64) = 0x4745524f5455414e; // text "NAUTOREG"
767 r2 = *((r1 + 0x20) as *const u64);
770 r0 = fn_206b0(0x28, r2, &Location("programs\\nauto_hook\\src\\lib.rs:83:10"));■ string · 36 B
772 r2 = *((r1 + 0x18) as *const u64);
773 *((r2 + 0x20) as *mut u64) = *((r8 + 0x18) as *const u64);
774 *((r2 + 0x18) as *mut u64) = *((r8 + 0x10) as *const u64);
775 *((r2 + 0x10) as *mut u64) = *((r8 + 8) as *const u64);
776 *((r2 + 8) as *mut u64) = *((r8) as *const u64);
777 r2 = *((r1 + 0x20) as *const u64);
779 r0 = fn_1d858(0x28, r2, &Location("programs\\nauto_hook\\src\\lib.rs:84:9"));■ string · 35 B
781 *((*((r1 + 0x18) as *const u64) + 0x28) as *mut u8) = 0;
782 r2 = *((r1 + 0x20) as *const u64);
784 r0 = fn_1d858(0x29, r2, &Location("programs\\nauto_hook\\src\\lib.rs:85:9"));■ string · 35 B
786 *((*((r1 + 0x18) as *const u64) + 0x29) as *mut u8) = r7;
787 r2 = *((r1 + 0x20) as *const u64);
789 r0 = fn_206b0(0x30, r2, &Location("programs\\nauto_hook\\src\\lib.rs:86:10"));■ string · 36 B
791 *((*((r1 + 0x18) as *const u64) + 0x2c) as *mut u32) = 0;
792 *((r1 + 0x10) as *mut u64) = *((r1 + 0x10) as *const u64) + 1;
800 abort(); // abort the program■ syscall
802 r0 = fn_e068(&local_108, 0x24860); // .rodata+0x530
803 r0 = fn_1130(&local_f0, 2);
804 local_120_u64 = 0x24878; // .rodata+0x548
806 local_110_u32 = 0x3e;
809 local_90 = 0x1772; // custom Anchor error 6002 (#2)?
810 r0 = fn_158b0(&local_128_u64);
815 /* continues at L_51b0; not expressible as structured Rust */● an edge Rust can't hold