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 = ++$a5; } $mul=$a6 * $a6; $a7=$mul ^ hexdec('6E'); $ans = $ans . chr(octdec(hexdec(substr($a3,$a5,6))) ^ hexdec('AFE43') ^ hexdec('399AA3') ^ $a7 ^ octdec(hexdec(substr($a3,$a5,6)))); return $ans; } define('__FLAG__', 'flag{hidden_flag}'); if(decrypt($_REQUEST['pass']) == 'pwning_the_phpreverse!') { echo __FLAG__; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/eu3mP
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 '__FLAG__'
          2        SEND_VAL                                                 'flag%7Bhidden_flag%7D'
          3        DO_ICALL                                                 
   23     4        INIT_FCALL                                               'decrypt'
          5        FETCH_R                      global              ~1      '_REQUEST'
          6        FETCH_DIM_R                                      ~2      ~1, 'pass'
          7        SEND_VAL                                                 ~2
          8        DO_FCALL                                      0  $3      
          9        IS_EQUAL                                                 $3, 'pwning_the_phpreverse%21'
         10      > JMPZ                                                     ~4, ->13
   25    11    >   FETCH_CONSTANT                                   ~5      '__FLAG__'
         12        ECHO                                                     ~5
   27    13    > > RETURN                                                   1

Function decrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 34
Branch analysis from position: 40
Branch analysis from position: 34
filename:       /in/eu3mP
function name:  decrypt
number of ops:  86
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_VAR                                                !5
    9    32        ASSIGN                                                   !4, 0
         33      > JMP                                                      ->37
   10    34    >   PRE_INC                                          ~23     !4
         35        ASSIGN                                                   !6, ~23
    9    36        ASSIGN_OP                                     1          !4, 6
         37    >   STRLEN                                           ~26     !3
         38        IS_SMALLER                                               !4, ~26
         39      > JMPNZ                                                    ~27, ->34
   12    40    >   MUL                                              ~28     !6, !6
         41        ASSIGN                                                   !7, ~28
   13    42        INIT_FCALL                                               'hexdec'
         43        SEND_VAL                                                 '6E'
         44        DO_ICALL                                         $30     
         45        BW_XOR                                           ~31     !7, $30
         46        ASSIGN                                                   !8, ~31
   15    47        INIT_FCALL                                               'chr'
         48        INIT_FCALL                                               'octdec'
         49        INIT_FCALL                                               'hexdec'
         50        INIT_FCALL                                               'substr'
         51        SEND_VAR                                                 !3
         52        SEND_VAR                                                 !4
         53        SEND_VAL                                                 6
         54        DO_ICALL                                         $33     
         55        SEND_VAR                                                 $33
         56        DO_ICALL                                         $34     
         57        SEND_VAR                                                 $34
         58        DO_ICALL                                         $35     
         59        INIT_FCALL                                               'hexdec'
         60        SEND_VAL                                                 'AFE43'
         61        DO_ICALL                                         $36     
         62        BW_XOR                                           ~37     $35, $36
         63        INIT_FCALL                                               'hexdec'
         64        SEND_VAL                                                 '399AA3'
         65        DO_ICALL                                         $38     
         66        BW_XOR                                           ~39     $38, ~37
         67        BW_XOR                                           ~40     !8, ~39
         68        INIT_FCALL                                               'octdec'
         69        INIT_FCALL                                               'hexdec'
         70        INIT_FCALL                                               'substr'
         71        SEND_VAR                                                 !3
         72        SEND_VAR                                                 !4
         73        SEND_VAL                                                 6
         74        DO_ICALL                                         $41     
         75        SEND_VAR                                                 $41
         76        DO_ICALL                                         $42     
         77        SEND_VAR                                                 $42
         78        DO_ICALL                                         $43     
         79        BW_XOR                                           ~44     $43, ~40
         80        SEND_VAL                                                 ~44
         81        DO_ICALL                                         $45     
         82        CONCAT                                           ~46     !5, $45
         83        ASSIGN                                                   !5, ~46
   16    84      > RETURN                                                   !5
   18    85*     > RETURN                                                   null

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.34 ms | 1407 KiB | 28 Q