3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decrypt($a) { $a1 = strtolower(strrev($a)); $a2 = hexdec(substr($a1,0,4)) ^ hexdec('BFF') ^ hexdec('D77D'); $a3 = substr($a1,4); $a5 = 0; unset($ans); for($a5=0;$a5<strlen($a3);$a5+=6){ ++$a6; $mul=$a6 * $a6; $a7=$mul ^ hexdec('6E'); $ans = $ans . chr(octdec(hexdec(substr($a3,$a5,6))) ^ hexdec('AFE43') ^ hexdec('399AA3') ^ $a7 ^ $a2); } return $ans; } echo decrypt('DEFBFD2EFBFDBCFBFD58FBFD56FBFD31FBFDDFEBFD3BEBFD48EBFD16EBFD83EBFD2DDBFDDFDBFDBCDBFDCBDBFD87DBFDB9DBFDB5DBFD76DBFDF6DBFDF5DBFDD5DBFD82ED'); define('__FLAG__', 'flag{hidden_flag}'); if(decrypt("DEFBFD2EFBFDBCFBFD58FBFD56FBFD31FBFDDFEBFD3BEBFD48EBFD16EBFD83EBFD2DDBFDDFDBFDBCDBFDCBDBFD87DBFDB9DBFDB5DBFD76DBFDF6DBFDF5DBFDD5DBFD82ED") == 'pwning_the_phpreverse!') { echo __FLAG__; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/nQHEo
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'decrypt'
          1        SEND_VAL                                                 'DEFBFD2EFBFDBCFBFD58FBFD56FBFD31FBFDDFEBFD3BEBFD48EBFD16EBFD83EBFD2DDBFDDFDBFDBCDBFDCBDBFD87DBFDB9DBFDB5DBFD76DBFDF6DBFDF5DBFDD5DBFD82ED'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   23     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 '__FLAG__'
          6        SEND_VAL                                                 'flag%7Bhidden_flag%7D'
          7        DO_ICALL                                                 
   24     8        INIT_FCALL                                               'decrypt'
          9        SEND_VAL                                                 'DEFBFD2EFBFDBCFBFD58FBFD56FBFD31FBFDDFEBFD3BEBFD48EBFD16EBFD83EBFD2DDBFDDFDBFDBCDBFDCBDBFD87DBFDB9DBFDB5DBFD76DBFDF6DBFDF5DBFDD5DBFD82ED'
         10        DO_FCALL                                      0  $2      
         11        IS_EQUAL                                                 $2, 'pwning_the_phpreverse%21'
         12      > JMPZ                                                     ~3, ->15
   26    13    >   FETCH_CONSTANT                                   ~4      '__FLAG__'
         14        ECHO                                                     ~4
   28    15    > > RETURN                                                   1

Function decrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 34
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 34
Branch analysis from position: 72
Branch analysis from position: 34
filename:       /in/nQHEo
function name:  decrypt
number of ops:  74
compiled vars:  !0 = $a, !1 = $a1, !2 = $a2, !3 = $a3, !4 = $a5, !5 = $ans, !6 = $a6, !7 = $mul, !8 = $a7
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'strtolower'
          2        INIT_FCALL                                               'strrev'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $9      
          5        SEND_VAR                                                 $9
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !1, $10
    5     8        INIT_FCALL                                               'hexdec'
          9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 4
         13        DO_ICALL                                         $12     
         14        SEND_VAR                                                 $12
         15        DO_ICALL                                         $13     
         16        INIT_FCALL                                               'hexdec'
         17        SEND_VAL                                                 'BFF'
         18        DO_ICALL                                         $14     
         19        BW_XOR                                           ~15     $13, $14
         20        INIT_FCALL                                               'hexdec'
         21        SEND_VAL                                                 'D77D'
         22        DO_ICALL                                         $16     
         23        BW_XOR                                           ~17     $16, ~15
         24        ASSIGN                                                   !2, ~17
    6    25        INIT_FCALL                                               'substr'
         26        SEND_VAR                                                 !1
         27        SEND_VAL                                                 4
         28        DO_ICALL                                         $19     
         29        ASSIGN                                                   !3, $19
    7    30        ASSIGN                                                   !4, 0
    8    31        UNSET_CV                                                 !5
    9    32        ASSIGN                                                   !4, 0
         33      > JMP                                                      ->69
   10    34    >   PRE_INC                                                  !6
   12    35        MUL                                              ~24     !6, !6
         36        ASSIGN                                                   !7, ~24
   13    37        INIT_FCALL                                               'hexdec'
         38        SEND_VAL                                                 '6E'
         39        DO_ICALL                                         $26     
         40        BW_XOR                                           ~27     !7, $26
         41        ASSIGN                                                   !8, ~27
   15    42        INIT_FCALL                                               'chr'
         43        INIT_FCALL                                               'octdec'
         44        INIT_FCALL                                               'hexdec'
         45        INIT_FCALL                                               'substr'
         46        SEND_VAR                                                 !3
         47        SEND_VAR                                                 !4
         48        SEND_VAL                                                 6
         49        DO_ICALL                                         $29     
         50        SEND_VAR                                                 $29
         51        DO_ICALL                                         $30     
         52        SEND_VAR                                                 $30
         53        DO_ICALL                                         $31     
         54        INIT_FCALL                                               'hexdec'
         55        SEND_VAL                                                 'AFE43'
         56        DO_ICALL                                         $32     
         57        BW_XOR                                           ~33     $31, $32
         58        INIT_FCALL                                               'hexdec'
         59        SEND_VAL                                                 '399AA3'
         60        DO_ICALL                                         $34     
         61        BW_XOR                                           ~35     $34, ~33
         62        BW_XOR                                           ~36     !8, ~35
         63        BW_XOR                                           ~37     !2, ~36
         64        SEND_VAL                                                 ~37
         65        DO_ICALL                                         $38     
         66        CONCAT                                           ~39     !5, $38
         67        ASSIGN                                                   !5, ~39
    9    68        ASSIGN_OP                                     1          !4, 6
         69    >   STRLEN                                           ~42     !3
         70        IS_SMALLER                                               !4, ~42
         71      > JMPNZ                                                    ~43, ->34
   17    72    > > RETURN                                                   !5
   19    73*     > RETURN                                                   null

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.66 ms | 1407 KiB | 29 Q