once ❝ published name Reconstructed 91.5% of control flow structured Anchor ◇ GRzKU9i3Cs7A5Euf9gGZjbRnpypw7DzaU3hWRfUgpYTa copy decompiled 22 Oct 2026
Identity · published metadata ▾
Loader ■ v3 · upgradeable
sBPF ■ v0
Size ■ 556,728 bytes
Instructions ● 58,814
Functions ● 412
SHA-256 ● 23200e76…1d4a7b42
Upgrade authority ■ 8gop…M677
Last deploy slot ■ 459,519,774 ❝ Published by the authors · their claims, not revrsly output Verified build github.com/call-once/once-program @ 1ee2ebf · ✓ hash matches this bytecode IDL · none publishedsecurity.txt · embedded ■ read from the bytes view Loading the reconstruction…
Functions
Other functions 354
+ 294 more · type to filter
lock_and_buy_try_accounts ▾
pseudocode.c fn lock_and_buy_try_accounts · .text+0x22668 · 2,368 ins · 476 blocks · 2,295 lines · structured where the control flow allows copy ↓ .c download pseudocode.c 1 // lock_and_buy_try_accounts · 2368 instructions · 1 caller · 65 gotos
2 // panic locations in this function: src/syscalls.rs:279, /home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449
3 u64 lock_and_buy_try_accounts ( u64 r1, u64
Evidence why revrsly believes it ×
Function ◇ Inferred
lock_and_buy_try_accounts
◇ Anchor's account loader for lock_and_buy: the first call after its "Instruction: LockAndBuy" that can raise AccountNotEnoughKeys (3005).
● .text+0x22668 · 2,368 instructions · 476 blocks
● 1 caller
◇ takes 5 arguments (from register use)
r2,
u64
r3,
u64
r4,
u64
r5) {
340 r0 = fn_eb78(&pda, r2, r3);
344 *( u64 *)(r6 + 0x10 ) = r3;
345 *( u64 *)(r6 + 8 ) = r2;
350 local_9f8 = *( u64 *)(r7 - 0xff0 );
351 local_9f0 = *( u64 *)(r7 - 0xff8 );
352 r7 = *( u64 *)(r7 - 0x1000 );
358 r0 = fn_a368(&local_410, r2, r9);
364 r2 = *( u64 *)( 0x300000000 );
383 if (r1 <= 0x300000007 ) {
384 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
385 r0 = fn_67b18( 1 , 5 , r3);
387 *( u64 *)( 0x300000000 ) = r1;
388 *( u8 *)(r1 + 4 ) = 0x72 ;
389 *( u32 *)(r1) = 0x65797562 ;
391 *( u64 *)(r3 + 0x10 ) = r1;
392 *( u64 *)(r3 + 0x18 ) = 5 ;
393 *( u64 *)(r3 + 8 ) = 5 ;
396 *( u64 *)(r1 + 0x10 ) = r3;
397 *( u64 *)(r1 + 8 ) = r6;
406 goto L_22ab8; ● kept as goto
408 goto L_229e8; ● kept as goto
413 if (r1 <= 0x300000007 ) {
414 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
415 r0 = fn_67b18( 1 , 5 , r3);
417 *( u64 *)( 0x300000000 ) = r1;
418 *( u8 *)(r1 + 4 ) = 0x72 ;
419 *( u32 *)(r1) = 0x65797562 ;
421 *( u64 *)(r3 + 0x10 ) = r1;
422 *( u64 *)(r3 + 0x18 ) = 5 ;
423 *( u64 *)(r3 + 8 ) = 5 ;
426 *( u64 *)(r1 + 0x10 ) = r3;
427 *( u64 *)(r1 + 8 ) = r6;
432 r1 = *( u64 *)(r9 + 8 );
434 r0 = anchor_error_new (&local_9e0, 0xbbd ); // Anchor error 3005 AccountNotEnoughKeys?
438 *( u64 *)(r3 + 0x10 ) = r2;
439 *( u64 *)(r3 + 8 ) = r1;
446 *( u64 *)(r9 + 8 ) = r2;
451 r0 = anchor_error_new (&local_9d0, 0xbbd ); // Anchor error 3005 AccountNotEnoughKeys?
454 *( u64 *)(r6 + 0x10 ) = r2;
455 *( u64 *)(r6 + 8 ) = r1;
462 *( u64 *)(r9 + 8 ) = r1 + - 2 ;
464 *( u64 *)(r9) = r5 + 0x60 ;
466 r0 = fn_578(&pda, r2, r9);
471 r2 = *( u64 *)( 0x300000000 );
484 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
485 r0 = fn_67b18( 1 , 9 , r3);
487 *( u64 *)( 0x300000000 ) = r1;
488 *( u64 *)(r1) = 0x6e696d5f65636e6f ; // text "once_min"
489 *( u8 *)(r1 + 8 ) = 0x74 ;
491 *( u64 *)(r7 + 0x10 ) = r1;
492 *( u64 *)(r7 + 0x18 ) = 9 ;
493 *( u64 *)(r7 + 8 ) = 9 ;
496 *( u64 *)(r1 + 0x10 ) = r7;
497 *( u64 *)(r1 + 8 ) = r6;
502 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
503 r0 = fn_67b18( 1 , 9 , r3);
505 *( u64 *)( 0x300000000 ) = r1;
506 *( u64 *)(r1) = 0x6e696d5f65636e6f ; // text "once_min"
507 *( u8 *)(r1 + 8 ) = 0x74 ;
509 *( u64 *)(r7 + 0x10 ) = r1;
510 *( u64 *)(r7 + 0x18 ) = 9 ;
511 *( u64 *)(r7 + 8 ) = 9 ;
514 *( u64 *)(r1 + 0x10 ) = r7;
515 *( u64 *)(r1 + 8 ) = r6;
524 *( u64 *)( 0x300000000 ) = r1;
525 *( u64 *)(r1) = 0x6e696d5f65636e6f ; // text "once_min"
526 *( u8 *)(r1 + 8 ) = 0x74 ;
528 *( u64 *)(r7 + 0x10 ) = r1;
529 *( u64 *)(r7 + 0x18 ) = 9 ;
530 *( u64 *)(r7 + 8 ) = 9 ;
533 *( u64 *)(r1 + 0x10 ) = r7;
534 *( u64 *)(r1 + 8 ) = r6;
538 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
539 r0 = fn_67b18( 1 , 9 , r3);
543 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
544 r0 = fn_67b18( 1 , 9 , r3);
546 *( u64 *)( 0x300000000 ) = r1;
547 *( u64 *)(r1) = 0x6e696d5f65636e6f ; // text "once_min"
548 *( u8 *)(r1 + 8 ) = 0x74 ;
550 *( u64 *)(r7 + 0x10 ) = r1;
551 *( u64 *)(r7 + 0x18 ) = 9 ;
552 *( u64 *)(r7 + 8 ) = 9 ;
555 *( u64 *)(r1 + 0x10 ) = r7;
556 *( u64 *)(r1 + 8 ) = r6;
565 goto L_228e8; ● kept as goto
567 goto L_22c58; ● kept as goto
570 goto L_22c38; ● kept as goto
572 goto L_228d0; ● kept as goto
575 r5 = *( u64 *)( 0x300000000 );
585 if (r1 <= 0x300000007 ) {
586 r0 = fn_67b38( 8 , 0x80 );
589 *( u64 *)( 0x300000000 ) = r1;
591 r0 = memcpy (r1, &pda, 0x80 );
593 r0 = fn_0(&local_3e8, r2, r9);
599 r2 = *( u64 *)( 0x300000000 );
618 if (r1 <= 0x300000007 ) {
619 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
620 r0 = fn_67b18( 1 , 0x12 , r3);
622 *( u64 *)( 0x300000000 ) = r1;
623 *( u64 *)(r1 + 8 ) = 0x72676f72705f6e65 ; // text "en_progr"
624 *( u64 *)(r1) = 0x6b6f745f65636e6f ; // text "once_tok"
625 *( u16 *)(r1 + 0x10 ) = 0x6d61 ;
627 *( u64 *)(r3 + 0x10 ) = r1;
628 *( u64 *)(r3 + 0x18 ) = 0x12 ;
629 *( u64 *)(r3 + 8 ) = 0x12 ;
632 *( u64 *)(r1 + 0x10 ) = r3;
633 *( u64 *)(r1 + 8 ) = r6;
642 goto L_22f48; ● kept as goto
644 goto L_22e78; ● kept as goto
649 if (r1 <= 0x300000007 ) {
650 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
651 r0 = fn_67b18( 1 , 0x12 , r3);
653 *( u64 *)( 0x300000000 ) = r1;
654 *( u64 *)(r1 + 8 ) = 0x72676f72705f6e65 ; // text "en_progr"
655 *( u64 *)(r1) = 0x6b6f745f65636e6f ; // text "once_tok"
656 *( u16 *)(r1 + 0x10 ) = 0x6d61 ;
658 *( u64 *)(r3 + 0x10 ) = r1;
659 *( u64 *)(r3 + 0x18 ) = 0x12 ;
660 *( u64 *)(r3 + 8 ) = 0x12 ;
663 *( u64 *)(r1 + 0x10 ) = r3;
664 *( u64 *)(r1 + 8 ) = r6;
670 r0 = fn_628(&pda, r2, r9, r4, fp);
672 r0 = fn_5598(&local_440, pda, local_d0_u64, "once_source" , 0xb ); ■ string · 11 B
680 local_ff0 = local_9f8;
681 local_ff8 = local_9f0;
684 r0 = fn_15f8(&local_3d8, r2, r9, r8);
691 local_ff0 = local_9f8;
692 local_ff8 = local_9f0;
696 r0 = fn_17a0(&local_3c8, r2, r9);
703 r0 = fn_0(&local_3b8, r2, r9);
710 local_ff0 = local_9f8;
711 local_ff8 = local_9f0;
715 r0 = fn_17a0(&local_3a8, r2, r9);
722 r0 = fn_0(&local_398, r2, r9);
729 local_ff0 = local_9f8;
730 local_ff8 = local_9f0;
733 r0 = fn_15f8(&local_388, r2, r9, r8);
740 local_ff0 = local_9f8;
741 local_ff8 = local_9f0;
744 r0 = fn_15f8(&local_378, r2, r9, r8);
748 r0 = fn_5598(&local_4b0, r2, r7, "payment_destination" , 0x13 ); ■ string · 19 B
752 *( u64 *)(r6 + 0x10 ) = r7;
753 *( u64 *)(r6 + 8 ) = r1;
759 r0 = fn_ab30(&local_360, r2, r9);
763 r0 = fn_5598(&local_4c0, r2, r8, "system_program" , 0xe ); ■ string · 14 B
767 *( u64 *)(r6 + 0x10 ) = r8;
768 *( u64 *)(r6 + 8 ) = r1;
774 r1 = *( u64 *)(r9 + 8 );
777 *( u64 *)(r9) = r3 + 0x30 ;
779 *( u64 *)(r9 + 8 ) = r1;
783 *( u64 *)(r9 + 8 ) = r1 + - 1 ;
786 *( u64 *)(r9) = r1 + 0x30 ;
790 r0 = fn_5fbd0(&local_9c0, local_d4, local_d0_u32);
793 *( u64 *)(r6 + 0x10 ) = r2;
794 *( u64 *)(r6 + 8 ) = r1;
798 local_34c = local_cc;
799 local_344 = local_c4;
800 local_33c = local_bc;
801 local_350 = local_d0_u32;
802 r1 = *( u64 *)(*( u64 *)(local_a00));
804 r3 = *( u64 *)(r1 + 8 );
805 r4 = *( u64 *)(r1 + 0x10 );
806 r1 = *( u64 *)(r1 + 0x18 );
807 local_1d8_u64 = 0x79df0 ; // .rodata+0x9f0
808 local_1c8 = &local_2d0;
817 r0 = sol_try_find_program_address (&local_1d8_u64, 2 , r3, &pda, &pda_bump); // find a PDA and its bump ■ syscall
819 local_320 = local_c0;
820 local_328 = local_c8;
821 local_330 = local_d0_u64;
825 *( u8 *)(local_9f0) = r1;
828 local_c0 = *( u64 *)(r1 + 0x18 );
829 local_c8 = *( u64 *)(r1 + 0x10 );
830 local_d0_u64 = *( u64 *)(r1 + 8 );
833 if (r1 == local_338) {
834 if (local_d0_u64 == local_330) {
835 if (local_c8 == local_328) {
837 if (local_c0 != local_320) {
843 r0 = anchor_error_new (&local_510, 0x7d6 ); // Anchor error 2006 ConstraintSeeds?
844 r0 = fn_5598(&local_520, local_510, local_508, "lock" , 4 ); ■ string · 4 B
848 local_c0 = *( u64 *)(r1 + 0x18 );
849 local_c8 = *( u64 *)(r1 + 0x10 );
850 local_d0_u64 = *( u64 *)(r1 + 8 );
852 local_b8 = local_338;
853 local_b0 = local_330;
854 local_a8 = local_328;
855 local_a0 = local_320;
856 r0 = fn_5fca0(&local_530, r2, r3, &pda);
859 *( u64 *)(r6 + 0x10 ) = r2;
860 *( u64 *)(r6 + 8 ) = r1;
864 local_a8 = &local_430;
865 local_b0 = &local_311;
866 local_b8 = local_a00;
867 local_c0 = &local_368;
868 local_c8 = &local_418;
869 local_d0_u64 = &local_350;
871 r0 = fn_27320(&local_2d0, &pda);
875 *( u64 *)(r6 + 0x10 ) = r9;
876 *( u64 *)(r6 + 8 ) = r1;
882 if (*( u8 *)(r2 + 0x29 ) == 0 ) {
883 r0 = anchor_error_new (&local_540, 0x7d0 ); // Anchor error 2000 ConstraintMut?
884 r0 = fn_5598(&local_550, local_540, local_538, "lock" , 4 ); ■ string · 4 B
887 *( u64 *)(r6 + 0x10 ) = r2;
888 *( u64 *)(r6 + 8 ) = r1;
893 r0 = fn_9f28(r8, r2);
899 r0 = fn_9f28(r9, r2);
900 r0 = fn_63c40(&local_1d8_u64, r9);
901 if (local_1d8_u32 == 1 ) {
902 r0 = fn_5fbd0(&local_9b0, local_1d4, local_1d0_u32);
906 *( u64 *)(r3 + 0x10 ) = r2;
907 *( u64 *)(r3 + 8 ) = r1;
910 r0 = fn_67b8(&local_2d0);
913 r0 = fn_62a08(&local_350, r8, local_1d0_u64);
916 r0 = fn_67b8(&local_2d0);
918 r0 = anchor_error_new (&local_560, 0x7d5 ); // Anchor error 2005 ConstraintRentExempt?
919 r0 = fn_5598(&local_570, local_560, local_558, "lock" , 4 ); ■ string · 4 B
923 *( u64 *)(r3 + 0x10 ) = r2;
924 *( u64 *)(r3 + 8 ) = r1;
930 r0 = fn_5fbd0(&local_9a0, local_d4, local_d0_u32);
934 *( u64 *)(r3 + 0x10 ) = r2;
935 *( u64 *)(r3 + 8 ) = r1;
939 local_30c = local_cc;
940 local_304 = local_c4;
941 local_2fc = local_bc;
942 pda_bump = local_d0_u32;
943 r1 = *( u64 *)(*( u64 *)(local_a00));
945 r3 = *( u64 *)(r1 + 8 );
946 r4 = *( u64 *)(r1 + 0x10 );
947 r1 = *( u64 *)(r1 + 0x18 );
948 local_1d8_u64 = 0x7a07d ; // .rodata+0xc7d
949 local_1c8 = &local_2d0;
958 r0 = sol_try_find_program_address (&local_1d8_u64, 2 , r3, &pda, &pda_bump_2); // find a PDA and its bump ■ syscall
960 local_2e0 = local_c0;
961 local_2e8 = local_c8;
962 local_2f0 = local_d0_u64;
966 *( u8 *)(local_9f0 + 1 ) = r1;
967 r1 = *( u64 *)(local_a18);
968 local_c0 = *( u64 *)(r1 + 0x18 );
969 local_c8 = *( u64 *)(r1 + 0x10 );
970 local_d0_u64 = *( u64 *)(r1 + 8 );
973 if (r1 == local_2f8) {
974 if (local_d0_u64 == local_2f0) {
975 if (local_c8 == local_2e8) {
977 if (local_c0 != local_2e0) {
982 r0 = anchor_error_new (&local_580, 0x7d6 ); // Anchor error 2006 ConstraintSeeds?
983 r0 = fn_5598(&local_590, local_580, local_578, "lock_vault" , 0xa ); ■ string · 10 B
986 r1 = *( u64 *)(local_a18);
987 local_c0 = *( u64 *)(r1 + 0x18 );
988 local_c8 = *( u64 *)(r1 + 0x10 );
989 local_d0_u64 = *( u64 *)(r1 + 8 );
991 local_b8 = local_2f8;
992 local_b0 = local_2f0;
993 local_a8 = local_2e8;
994 local_a0 = local_2e0;
995 r0 = fn_5fca0(&local_5a0, r2, r3, &pda);
999 *( u64 *)(r3 + 0x10 ) = r2;
1000 *( u64 *)(r3 + 8 ) = r1;
⋯ ⋯ 1,295 more lines in this function. Download pseudocode.c for all of it.