3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('__FLAG__','3xZG{dgznclXAwFVCUHPMWFViZBDSsltxKdrvFBVYHSr1}'); function stypr_crypt($_0){$_1 = $_2 = $_3 = array(); $_4 =array('?','(','@', ';', '$','#', ']', '&', '*'); $_4 = array_merge($_4,range('a','z'),range('A','Z'),range('0','9')); $_4 = array_merge($_4,array('!', ')', '_', '+', '|', '%', '/', '[', '.', ' ')); for($_5=9,$_6=0;$_6 < $_5;$_6++){ for($_7=0;$_7<$_5;$_7++){$_2[$_6][$_7] = $_4[$_6*$_5+$_7]; $_3[$_6][$_7] = str_rot13($_4[($_5*$_5-1)-($_6*$_5+$_7)]);} } unset($_4); $_8 = floor(strlen($_0)/2)*2; $_9 = ($_8 == strlen($_0))?'':$_0[strlen($_0)-1]; $_10 =array(); for($_11 = 0;$_11 < $_8;$_11+=2){$_12 = $_13 = strval($_0[$_11]); $_14 = $_15 = strval($_0[$_11+1]); $_16 = $_17 = array(); for($_6=0;$_6 < $_5;$_6++){ for($_7=0;$_7<$_5;$_7++){ if($_12 === strval($_3[$_6][$_7])){ $_16 = array($_6, $_7);} if($_14 === strval($_2[$_6][$_7])){ $_17 = array($_6, $_7);} if(!isset($_9) && ($_9 === strval($_3[$_6][$_7]))){$_10 = array($_6, $_7);} } } if(sizeof($_16) && sizeof($_17)){$_13 = $_2[$_16[0]][$_17[1]]; $_15 = $_3[$_17[0]][$_16[1]];} $_1[] = $_13.$_15;} if(!isset($_9)&&sizeof($_10)){$_1[] = $_2[$_10[1]][$_10[0]];} return implode('',$_1); } $flag = 'flag{a}'; echo stypr_crypt(stypr_crypt(stypr_crypt($flag))); if(__FLAG__ === stypr_crypt(stypr_crypt(stypr_crypt($flag)))) echo 'Correct!'; else echo 'Incorrect..'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nfun7
function name:  (null)
number of ops:  31
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 '__FLAG__'
          2        SEND_VAL                                                 '3xZG%7BdgznclXAwFVCUHPMWFViZBDSsltxKdrvFBVYHSr1%7D'
          3        DO_ICALL                                                 
    6     4        ASSIGN                                                   !0, 'flag%7Ba%7D'
    7     5        INIT_FCALL                                               'stypr_crypt'
          6        INIT_FCALL                                               'stypr_crypt'
          7        INIT_FCALL                                               'stypr_crypt'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR                                                 $3
         11        DO_FCALL                                      0  $4      
         12        SEND_VAR                                                 $4
         13        DO_FCALL                                      0  $5      
         14        ECHO                                                     $5
    9    15        FETCH_CONSTANT                                   ~6      '__FLAG__'
         16        INIT_FCALL                                               'stypr_crypt'
         17        INIT_FCALL                                               'stypr_crypt'
         18        INIT_FCALL                                               'stypr_crypt'
         19        SEND_VAR                                                 !0
         20        DO_FCALL                                      0  $7      
         21        SEND_VAR                                                 $7
         22        DO_FCALL                                      0  $8      
         23        SEND_VAR                                                 $8
         24        DO_FCALL                                      0  $9      
         25        IS_IDENTICAL                                             $9, ~6
         26      > JMPZ                                                     ~10, ->29
   10    27    >   ECHO                                                     'Correct%21'
         28      > JMP                                                      ->30
   12    29    >   ECHO                                                     'Incorrect..'
   14    30    > > RETURN                                                   1

Function stypr_crypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 32
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 71
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
2 jumps found. (Code = 44) Position 1 = 149, Position 2 = 79
Branch analysis from position: 149
2 jumps found. (Code = 46) Position 1 = 152, Position 2 = 154
Branch analysis from position: 152
2 jumps found. (Code = 43) Position 1 = 155, Position 2 = 161
Branch analysis from position: 155
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 161
Branch analysis from position: 154
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
2 jumps found. (Code = 44) Position 1 = 128, Position 2 = 92
Branch analysis from position: 128
2 jumps found. (Code = 46) Position 1 = 130, Position 2 = 132
Branch analysis from position: 130
2 jumps found. (Code = 43) Position 1 = 133, Position 2 = 143
Branch analysis from position: 133
2 jumps found. (Code = 44) Position 1 = 149, Position 2 = 79
Branch analysis from position: 149
Branch analysis from position: 79
Branch analysis from position: 143
Branch analysis from position: 132
Branch analysis from position: 92
1 jumps found. (Code = 42) Position 1 = 123
Branch analysis from position: 123
2 jumps found. (Code = 44) Position 1 = 125, Position 2 = 94
Branch analysis from position: 125
2 jumps found. (Code = 44) Position 1 = 128, Position 2 = 92
Branch analysis from position: 128
Branch analysis from position: 92
Branch analysis from position: 94
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 102
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 107, Position 2 = 110
Branch analysis from position: 107
2 jumps found. (Code = 46) Position 1 = 113, Position 2 = 118
Branch analysis from position: 113
2 jumps found. (Code = 43) Position 1 = 119, Position 2 = 122
Branch analysis from position: 119
2 jumps found. (Code = 44) Position 1 = 125, Position 2 = 94
Branch analysis from position: 125
Branch analysis from position: 94
Branch analysis from position: 122
Branch analysis from position: 118
Branch analysis from position: 110
Branch analysis from position: 102
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 34
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 32
Branch analysis from position: 58
Branch analysis from position: 32
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 34
Branch analysis from position: 55
Branch analysis from position: 34
filename:       /in/nfun7
function name:  stypr_crypt
number of ops:  167
compiled vars:  !0 = $_0, !1 = $_1, !2 = $_2, !3 = $_3, !4 = $_4, !5 = $_5, !6 = $_6, !7 = $_7, !8 = $_8, !9 = $_9, !10 = $_10, !11 = $_11, !12 = $_12, !13 = $_13, !14 = $_14, !15 = $_15, !16 = $_16, !17 = $_17
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        ASSIGN                                           ~18     !3, <array>
          2        ASSIGN                                           ~19     !2, ~18
          3        ASSIGN                                                   !1, ~19
          4        ASSIGN                                                   !4, <array>
          5        INIT_FCALL                                               'array_merge'
          6        SEND_VAR                                                 !4
          7        INIT_FCALL                                               'range'
          8        SEND_VAL                                                 'a'
          9        SEND_VAL                                                 'z'
         10        DO_ICALL                                         $22     
         11        SEND_VAR                                                 $22
         12        INIT_FCALL                                               'range'
         13        SEND_VAL                                                 'A'
         14        SEND_VAL                                                 'Z'
         15        DO_ICALL                                         $23     
         16        SEND_VAR                                                 $23
         17        INIT_FCALL                                               'range'
         18        SEND_VAL                                                 '0'
         19        SEND_VAL                                                 '9'
         20        DO_ICALL                                         $24     
         21        SEND_VAR                                                 $24
         22        DO_ICALL                                         $25     
         23        ASSIGN                                                   !4, $25
         24        INIT_FCALL                                               'array_merge'
         25        SEND_VAR                                                 !4
         26        SEND_VAL                                                 <array>
         27        DO_ICALL                                         $27     
         28        ASSIGN                                                   !4, $27
         29        ASSIGN                                                   !5, 9
         30        ASSIGN                                                   !6, 0
         31      > JMP                                                      ->56
         32    >   ASSIGN                                                   !7, 0
         33      > JMP                                                      ->53
         34    >   MUL                                              ~34     !6, !5
         35        ADD                                              ~35     ~34, !7
         36        FETCH_DIM_R                                      ~36     !4, ~35
         37        FETCH_DIM_W                                      $32     !2, !6
         38        ASSIGN_DIM                                               $32, !7
         39        OP_DATA                                                  ~36
         40        INIT_FCALL                                               'str_rot13'
         41        MUL                                              ~39     !5, !5
         42        SUB                                              ~40     ~39, 1
         43        MUL                                              ~41     !6, !5
         44        ADD                                              ~42     ~41, !7
         45        SUB                                              ~43     ~40, ~42
         46        FETCH_DIM_R                                      ~44     !4, ~43
         47        SEND_VAL                                                 ~44
         48        DO_ICALL                                         $45     
         49        FETCH_DIM_W                                      $37     !3, !6
         50        ASSIGN_DIM                                               $37, !7
         51        OP_DATA                                                  $45
         52        PRE_INC                                                  !7
         53    >   IS_SMALLER                                               !7, !5
         54      > JMPNZ                                                    ~47, ->34
         55    >   PRE_INC                                                  !6
         56    >   IS_SMALLER                                               !6, !5
         57      > JMPNZ                                                    ~49, ->32
         58    >   UNSET_CV                                                 !4
         59        INIT_FCALL                                               'floor'
         60        STRLEN                                           ~50     !0
         61        DIV                                              ~51     ~50, 2
         62        SEND_VAL                                                 ~51
         63        DO_ICALL                                         $52     
         64        MUL                                              ~53     $52, 2
         65        ASSIGN                                                   !8, ~53
         66        STRLEN                                           ~55     !0
         67        IS_EQUAL                                                 !8, ~55
         68      > JMPZ                                                     ~56, ->71
         69    >   QM_ASSIGN                                        ~57     ''
         70      > JMP                                                      ->75
         71    >   STRLEN                                           ~58     !0
         72        SUB                                              ~59     ~58, 1
         73        FETCH_DIM_R                                      ~60     !0, ~59
         74        QM_ASSIGN                                        ~57     ~60
         75    >   ASSIGN                                                   !9, ~57
         76        ASSIGN                                                   !10, <array>
         77        ASSIGN                                                   !11, 0
         78      > JMP                                                      ->147
         79    >   FETCH_DIM_R                                      ~64     !0, !11
         80        CAST                                          6  ~65     ~64
         81        ASSIGN                                           ~66     !13, ~65
         82        ASSIGN                                                   !12, ~66
         83        ADD                                              ~68     !11, 1
         84        FETCH_DIM_R                                      ~69     !0, ~68
         85        CAST                                          6  ~70     ~69
         86        ASSIGN                                           ~71     !15, ~70
         87        ASSIGN                                                   !14, ~71
         88        ASSIGN                                           ~73     !17, <array>
         89        ASSIGN                                                   !16, ~73
         90        ASSIGN                                                   !6, 0
         91      > JMP                                                      ->126
         92    >   ASSIGN                                                   !7, 0
         93      > JMP                                                      ->123
         94    >   FETCH_DIM_R                                      ~77     !3, !6
         95        FETCH_DIM_R                                      ~78     ~77, !7
         96        CAST                                          6  ~79     ~78
         97        IS_IDENTICAL                                             !12, ~79
         98      > JMPZ                                                     ~80, ->102
         99    >   INIT_ARRAY                                       ~81     !6
        100        ADD_ARRAY_ELEMENT                                ~81     !7
        101        ASSIGN                                                   !16, ~81
        102    >   FETCH_DIM_R                                      ~83     !2, !6
        103        FETCH_DIM_R                                      ~84     ~83, !7
        104        CAST                                          6  ~85     ~84
        105        IS_IDENTICAL                                             !14, ~85
        106      > JMPZ                                                     ~86, ->110
        107    >   INIT_ARRAY                                       ~87     !6
        108        ADD_ARRAY_ELEMENT                                ~87     !7
        109        ASSIGN                                                   !17, ~87
        110    >   ISSET_ISEMPTY_CV                                 ~89     !9
        111        BOOL_NOT                                         ~90     ~89
        112      > JMPZ_EX                                          ~90     ~90, ->118
        113    >   FETCH_DIM_R                                      ~91     !3, !6
        114        FETCH_DIM_R                                      ~92     ~91, !7
        115        CAST                                          6  ~93     ~92
        116        IS_IDENTICAL                                     ~94     !9, ~93
        117        BOOL                                             ~90     ~94
        118    > > JMPZ                                                     ~90, ->122
        119    >   INIT_ARRAY                                       ~95     !6
        120        ADD_ARRAY_ELEMENT                                ~95     !7
        121        ASSIGN                                                   !10, ~95
        122    >   PRE_INC                                                  !7
        123    >   IS_SMALLER                                               !7, !5
        124      > JMPNZ                                                    ~98, ->94
        125    >   PRE_INC                                                  !6
        126    >   IS_SMALLER                                               !6, !5
        127      > JMPNZ                                                    ~100, ->92
        128    >   COUNT                                            ~101    !16
        129      > JMPZ_EX                                          ~101    ~101, ->132
        130    >   COUNT                                            ~102    !17
        131        BOOL                                             ~101    ~102
        132    > > JMPZ                                                     ~101, ->143
        133    >   FETCH_DIM_R                                      ~103    !16, 0
        134        FETCH_DIM_R                                      ~105    !17, 1
        135        FETCH_DIM_R                                      ~104    !2, ~103
        136        FETCH_DIM_R                                      ~106    ~104, ~105
        137        ASSIGN                                                   !13, ~106
        138        FETCH_DIM_R                                      ~108    !17, 0
        139        FETCH_DIM_R                                      ~110    !16, 1
        140        FETCH_DIM_R                                      ~109    !3, ~108
        141        FETCH_DIM_R                                      ~111    ~109, ~110
        142        ASSIGN                                                   !15, ~111
        143    >   CONCAT                                           ~114    !13, !15
        144        ASSIGN_DIM                                               !1
        145        OP_DATA                                                  ~114
        146        ASSIGN_OP                                     1          !11, 2
        147    >   IS_SMALLER                                               !11, !8
        148      > JMPNZ                                                    ~116, ->79
        149    >   ISSET_ISEMPTY_CV                                 ~117    !9
        150        BOOL_NOT                                         ~118    ~117
        151      > JMPZ_EX                                          ~118    ~118, ->154
        152    >   COUNT                                            ~119    !10
        153        BOOL                                             ~118    ~119
        154    > > JMPZ                                                     ~118, ->161
        155    >   FETCH_DIM_R                                      ~121    !10, 1
        156        FETCH_DIM_R                                      ~123    !10, 0
        157        FETCH_DIM_R                                      ~122    !2, ~121
        158        FETCH_DIM_R                                      ~124    ~122, ~123
        159        ASSIGN_DIM                                               !1
        160        OP_DATA                                                  ~124
        161    >   INIT_FCALL                                               'implode'
        162        SEND_VAL                                                 ''
        163        SEND_VAR                                                 !1
        164        DO_ICALL                                         $125    
        165      > RETURN                                                   $125
        166*     > RETURN                                                   null

End of function stypr_crypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.3 ms | 1419 KiB | 31 Q