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

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.19 ms | 1407 KiB | 28 Q