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▸ 3 more #[derive(Accounts)] structs · lines 18–49
50
51#[derive(Accounts)]
52pub struct RemoveAgents<'info> {◇ 4 accounts · order, types and checks inferred
53 #[account(mut)]
54 pub admin: Signer<'info>,
55 #[account(mut)]
56 pub payer: Signer<'info>,
57 #[account(mut, seeds = [b"registry"], bump)]■ string · 8 B
58 pub registry: AccountInfo<'info>,
59 pub system_program: Program<'info, System>,
60}
61
62▸ 3 more #[derive(Accounts)] structs · lines 62–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 }
560 ▸ pub fn init_registry(ctx: Context<InitRegistry>, arg_0: Pubkey) -> Result<()> { … 255 lines }
817
818 // discriminator 1eb1f72d5ebd64ce● found in the code at .text+0x3c60
819 // arg layout: @0: u32, @4: u32, @8: u16, @10: u64, @18: u8 | bool, @19: u64, @27: u64, @35: u8 | bool
820 // argument names are placeholders; offsets, sizes (hence types) inferred from the handler's data reads
821 ▾ pub fn remove_agents(ctx: Context<RemoveAgents>, arg_0: u32, arg_4: u32, arg_8: u16, arg_a: u64, arg_12: u8, arg_13: u64, arg_1b: u64, arg_23: u8) -> Result<()> {● its sha256 matches the discriminator
822 // ◇ The program's own handler (`remove_agents` in reconstructed.rs), register-level. Anchor's wrapper
823
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 }
// (`remove_agents_handler`) loads the accounts, then calls it with r1 = where its Result is written,
824 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
825 // 40 stack slots (local_…) used below; declared in reconstructed.rs.
826 r7 = *((r2 + 0x10) as *const u64);
827 if (r7 + -1) >= 0x18 {
828 r0 = fn_e068(&local_e8, 0x24848); // .rodata+0x518
829 r0 = fn_1130(&local_d0, 0);
830 local_100_u64 = 0x24878; // .rodata+0x548
835 local_70 = 0x1770; // custom Anchor error 6000 (#0)?
836 r0 = fn_158b0(&local_108_u64);
839 r1 = *((r1 + 8) as *const u64);
841 r4 = *((r1 + 0x10) as *const u64);
842 r3 = *((r4 + 8) as *const u64);
843 r1 = *((r3) as *const u64) + 1;
848 r5 = *((r4) as *const u64);
849 *((r3) as *mut u64) = r1;
851 r1 = *((r4 + 0x10) as *const u64);
852 r0 = *((r1) as *const u64) + 1;
857 *((r1) as *mut u64) = r0;
860 r2 = *((r4 + 0x18) as *const u64);
861 r0 = *((r4 + 0x20) as *const u64);
862 r8 = *((r4 + 0x28) as *const u8);
863 r9 = *((r4 + 0x29) as *const u8);
864 local_3e = *((r4 + 0x2a) as *const u8);
872 r3 = *((*((local_110) as *const u64)) as *const u64);
873 local_f0_u64 = *((r3 + 0x18) as *const u64);
874 local_f8 = *((r3 + 0x10) as *const u64);
875 local_100_u64 = *((r3 + 8) as *const u64);
876 local_108_u64 = *((r3) as *const u64);
877 r0 = fn_3090(r1, r2, &local_108_u64);
880 local_120 = &local_60;
885 r3 = *((r2) as *const u64) + -1;
886 *((r2) as *mut u64) = r3;
890 r0 = fn_195b8(local_120);
895 r3 = *((r2) as *const u64) + -1;
896 *((r2) as *mut u64) = r3;
908 r9 = *((r6 + 8) as *const u64);
909 local_20 = *((r9 + 0x18) as *const u64);
910 local_28 = *((r9 + 0x10) as *const u64);
911 local_30 = *((r9 + 8) as *const u64);
912 local_38 = *((r9) as *const u64);
915 r4 = *((r1 + 0x10) as *const u64);
916 if r4 <= 0x7ffffffffffffffe {
917 local_150 = &local_f8;
918 local_158 = &local_100_u64;
919 local_128 = &local_14;
920 local_130 = &local_fc;
923 r7 = (r7 << 5) + -0x20;
926 *((r1 + 0x10) as *mut u64) = r4 + 1;
927 r2 = *((r1 + 0x20) as *const u64);
929 r1 = *((r1 + 0x18) as *const u64);
930 r6 = *((r1 + 0x2c) as *const u32);
931 r0 = fn_2ca0(r1, r2, r6, &local_38);
932 r2 = *((r8) as *const u64) + -1;
934 *((r8) as *mut u64) = r2;
938 local_20 = *((r9 + 0x18) as *const u64);
939 local_28 = *((r9 + 0x10) as *const u64);
940 local_30 = *((r9 + 8) as *const u64);
941 local_38 = *((r9) as *const u64);
946 r4 = *((r1 + 0x10) as *const u64);
947 if r4 < 0x7fffffffffffffff {
950 r2 = local_118 >> 0x20;
954 r0 = fn_15938(r1, r2);
958 /* continues at L_7550; not expressible as structured Rust */● an edge Rust can't hold
961 r2 = *((r1) as *const u64) + -1;
962 *((r1) as *mut u64) = r2;
964 r0 = fn_195b8(local_120);
967 r2 = *((r1) as *const u64) + -1;
968 *((r1) as *mut u64) = r2;
977 if *((r8 + 0x10) as *const u64) == 0 {
978 *((r8 + 0x10) as *mut u64) = -1;
979 if r1 <= 0x7ffffffffffffff {
991 r3 = (r6 << 5) + 0x30;
993 r2 = *((r8 + 0x20) as *const u64);
997 r2 = *((r8 + 0x18) as *const u64);
998 r0 = memmove(r2 + r5, r2 + r1, r3);
999 r2 = *((r8 + 0x20) as *const u64);
1003 *((*((r8 + 0x18) as *const u64) + 0x2c) as *mut u32) = r6;
1004 *((r8 + 0x10) as *mut u64) = *((r8 + 0x10) as *const u64) + 1;
1005 r6 = (r6 << 5) + 0x30;
1006 r0 = fn_196e8(&local_68, r6);
1008 if (r0 << 0x20 >> 0x20) == 0x1a {
1009 r0 = fn_19608(&local_68);
1011 r0 = rent_get(&local_108_u64);
1012 if local_108_u32 != 1 {
1016 *((r3 + 0x10) as *mut u32) = *((r4 + 0x10) as *const u32);
1017 *((r3 + 8) as *mut u64) = *((r4 + 8) as *const u64);
1018 *((r3) as *mut u64) = *((r4) as *const u64);
1020 r0 = fn_184f0(&local_18, r6);
1030 if *((r2 + 0x10) as *const u64) == 0 {
1031 *((r2 + 0x10) as *mut u64) = -1;
1032 r3 = *((r2 + 0x18) as *const u64);
1033 r4 = *((r3) as *const u64);
1036 *((r3) as *mut u64) = r4 - r1;
1037 *((r2 + 0x10) as *mut u64) = *((r2 + 0x10) as *const u64) + 1;
1038 r3 = *((local_110) as *const u64);
1039 r2 = *((r3 + 8) as *const u64);
1040 r5 = *((r2) as *const u64) + 1;
1044 r4 = *((r3) as *const u64);
1045 *((r2) as *mut u64) = r5;
1047 r5 = *((r3 + 0x10) as *const u64);
1048 r0 = *((r5) as *const u64) + 1;
1052 *((r5) as *mut u64) = r0;
1054 r0 = *((r3 + 0x18) as *const u64);
1055 r6 = *((r3 + 0x20) as *const u64);
1056 r8 = *((r3 + 0x28) as *const u8);
1057 r1 = *((r3 + 0x29) as *const u8);
1058 local_de = *((r3 + 0x2a) as *const u8);
1066 if *((r2 + 0x10) as *const u64) == 0 {
1067 *((r2 + 0x10) as *mut u64) = -1;
1068 r3 = *((r2 + 0x18) as *const u64);
1069 r5 = *((r3) as *const u64);
1070 r4 = r5 + local_148;
1075 *((r3) as *mut u64) = r4;
1076 *((r2 + 0x10) as *mut u64) = *((r2 + 0x10) as *const u64) + 1;
1078 r2 = *((r1) as *const u64) + -1;
1079 *((r1) as *mut u64) = r2;
1083 r2 = *((r1) as *const u64) + -1;
1084 *((r1) as *mut u64) = r2;
1086 /* continues at L_73d8; not expressible as structured Rust */● an edge Rust can't hold
1088 r0 = fn_19568(local_150);
1089 /* continues at L_73d8; not expressible as structured Rust */● an edge Rust can't hold
1091 r0 = fn_195b8(local_158);
1092 /* continues at L_73a0; not expressible as structured Rust */● an edge Rust can't hold
1097 /* continues at L_7338; not expressible as structured Rust */● an edge Rust can't hold
1099 r0 = fn_15938(0xb, 0);
1102 r0 = fn_1570(&local_108_u64);
1105 /* continues at L_7488; not expressible as structured Rust */● an edge Rust can't hold
1107 abort(); // abort the program■ syscall
1110 /* continues at L_7268; not expressible as structured Rust */● an edge Rust can't hold
1112 abort(); // abort the program■ syscall
1115 /* continues at L_7220; not expressible as structured Rust */● an edge Rust can't hold
1117 r0 = fn_21a48(&Location("programs\\nauto_hook\\src\\lib.rs:154:17"));■ string · 37 B
1122 /* continues at L_7480; not expressible as structured Rust */● an edge Rust can't hold
1124 /* continues at L_73d8; not expressible as structured Rust */● an edge Rust can't hold
1129 /* continues at L_73d8; not expressible as structured Rust */● an edge Rust can't hold
1131 /* continues at L_7178; not expressible as structured Rust */● an edge Rust can't hold
1134 /* continues at L_7168; not expressible as structured Rust */● an edge Rust can't hold
1136 /* continues at L_7148; not expressible as structured Rust */● an edge Rust can't hold
1140 /* continues at L_7480; not expressible as structured Rust */● an edge Rust can't hold
1143 /* continues at L_7480; not expressible as structured Rust */● an edge Rust can't hold
1145 r0 = fn_21a48(&Location("programs\\nauto_hook\\src\\lib.rs:148:45"));■ string · 37 B
1147 r0 = fn_206b0(0x30, r2, &Location("programs\\nauto_hook\\src\\lib.rs:148:18"));■ string · 37 B
1149 local_108_u64 = 0x27c18; // &"dest is out of bounds"
1154 r0 = fn_1d7c0(&local_108_u64, &Location("programs\\nauto_hook\\src\\lib.rs:147:19"));■ string · 37 B
1156 r0 = fn_206b0(r3, r2, &Location("programs\\nauto_hook\\src\\lib.rs:147:19"));■ string · 37 B
1158 r0 = fn_206b8(r1, r3, &Location("programs\\nauto_hook\\src\\lib.rs:147:19"));■ string · 37 B
1160 r0 = fn_219f0(&Location("programs\\nauto_hook\\src\\lib.rs:147:31"));■ string · 37 B
1163 /* continues at L_6f38; not expressible as structured Rust */● an edge Rust can't hold
1165 r0 = fn_219f0(&Location("programs\\nauto_hook\\src\\lib.rs:146:26"));■ string · 37 B
1168 /* continues at L_6f00; not expressible as structured Rust */● an edge Rust can't hold
1170 r0 = fn_21aa0(&Location("programs\\nauto_hook\\src\\lib.rs:146:35"));■ string · 37 B
1172 /* continues at L_7688; not expressible as structured Rust */● an edge Rust can't hold
1174 r0 = fn_206b0(0x30, r2, &Location("programs\\nauto_hook\\src\\lib.rs:243:25"));■ string · 37 B
1176 r0 = fn_219f0(&Location("programs\\nauto_hook\\src\\lib.rs:155:17"));■ string · 37 B
1178 /* continues at L_7478; not expressible as structured Rust */● an edge Rust can't hold
1181 abort(); // abort the program■ syscall