3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decrypt($a) { $strings = strtolower(strrev($str)); $MyKey = hexdec(substr($strings, 0, 4)) ^ hexdec('BFF') ^ hexdec('D77D'); $Temps = substr($strings, 4); unset($tmp); //echo $n; for ($i = 0; $i < strlen($Temps); $i+=6) { ++$n; $cal = ($n * $n) ^ hexdec("3E"); //echo chr(octdec(hexdec(substr($Temps, $i, 6))) ^ ($MyKey ^ hexdec("AFE43") ^ hexdec("399AA3") ^ $cal)) . "\n"; $tmp = $tmp . chr(octdec(hexdec(substr($Temps, $i, 6))) ^ ($MyKey ^ hexdec('AFE43') ^ hexdec('399AA3') ^ $cal)); } return $tmp; } echo decrypt('pass'); define('__FLAG__', 'flag{hidden_flag}'); if(decrypt('pass') == '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/s4AZN
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'decrypt'
          1        SEND_VAL                                                 'pass'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   22     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 '__FLAG__'
          6        SEND_VAL                                                 'flag%7Bhidden_flag%7D'
          7        DO_ICALL                                                 
   23     8        INIT_FCALL                                               'decrypt'
          9        SEND_VAL                                                 'pass'
         10        DO_FCALL                                      0  $2      
         11        IS_EQUAL                                                 $2, 'pwning_the_phpreverse%21'
         12      > JMPZ                                                     ~3, ->15
   25    13    >   FETCH_CONSTANT                                   ~4      '__FLAG__'
         14        ECHO                                                     ~4
   27    15    > > RETURN                                                   1

Function decrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 33
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 33
Branch analysis from position: 70
Branch analysis from position: 33
filename:       /in/s4AZN
function name:  decrypt
number of ops:  72
compiled vars:  !0 = $a, !1 = $strings, !2 = $str, !3 = $MyKey, !4 = $Temps, !5 = $tmp, !6 = $i, !7 = $n, !8 = $cal
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                                                 !2
          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                                                   !3, ~17
    6    25        INIT_FCALL                                               'substr'
         26        SEND_VAR                                                 !1
         27        SEND_VAL                                                 4
         28        DO_ICALL                                         $19     
         29        ASSIGN                                                   !4, $19
    7    30        UNSET_CV                                                 !5
    9    31        ASSIGN                                                   !6, 0
         32      > JMP                                                      ->67
   11    33    >   PRE_INC                                                  !7
   12    34        MUL                                              ~23     !7, !7
         35        INIT_FCALL                                               'hexdec'
         36        SEND_VAL                                                 '3E'
         37        DO_ICALL                                         $24     
         38        BW_XOR                                           ~25     $24, ~23
         39        ASSIGN                                                   !8, ~25
   14    40        INIT_FCALL                                               'chr'
         41        INIT_FCALL                                               'octdec'
         42        INIT_FCALL                                               'hexdec'
         43        INIT_FCALL                                               'substr'
         44        SEND_VAR                                                 !4
         45        SEND_VAR                                                 !6
         46        SEND_VAL                                                 6
         47        DO_ICALL                                         $27     
         48        SEND_VAR                                                 $27
         49        DO_ICALL                                         $28     
         50        SEND_VAR                                                 $28
         51        DO_ICALL                                         $29     
         52        INIT_FCALL                                               'hexdec'
         53        SEND_VAL                                                 'AFE43'
         54        DO_ICALL                                         $30     
         55        BW_XOR                                           ~31     !3, $30
         56        INIT_FCALL                                               'hexdec'
         57        SEND_VAL                                                 '399AA3'
         58        DO_ICALL                                         $32     
         59        BW_XOR                                           ~33     $32, ~31
         60        BW_XOR                                           ~34     !8, ~33
         61        BW_XOR                                           ~35     $29, ~34
         62        SEND_VAL                                                 ~35
         63        DO_ICALL                                         $36     
         64        CONCAT                                           ~37     !5, $36
         65        ASSIGN                                                   !5, ~37
    9    66        ASSIGN_OP                                     1          !6, 6
         67    >   STRLEN                                           ~40     !4
         68        IS_SMALLER                                               !6, ~40
         69      > JMPNZ                                                    ~41, ->33
   16    70    > > RETURN                                                   !5
   18    71*     > RETURN                                                   null

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.54 ms | 1407 KiB | 29 Q