3v4l.org

run code in 300+ PHP versions simultaneously
<?php function evalCrossTotal($strMD5) { $intTotal = 0; $arrMD5Chars = str_split($strMD5, 1); foreach ($arrMD5Chars as $value) { $intTotal += '0x0'.$value; } return $intTotal; } function encryptString($strString, $strPassword) { // $strString is the content of the entire file with serials $strPasswordMD5 = md5($strPassword); $intMD5Total = evalCrossTotal($strPasswordMD5); $arrEncryptedValues = array(); $intStrlen = strlen($strString); for ($i=0; $i<$intStrlen; $i++) { $arrEncryptedValues[] = ord(substr($strString, $i, 1)) + ('0x0' . substr($strPasswordMD5, $i%32, 1)) - $intMD5Total; $intMD5Total = evalCrossTotal(substr(md5(substr($strString,0,$i+1)), 0, 16) . substr(md5($intMD5Total), 0, 16)); } return implode(' ' , $arrEncryptedValues); } encryptString("woord", "woord"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BFDpJ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   INIT_FCALL                                               'encryptstring'
          1        SEND_VAL                                                 'woord'
          2        SEND_VAL                                                 'woord'
          3        DO_FCALL                                      0          
   38     4      > RETURN                                                   1

Function evalcrosstotal:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/BFDpJ
function name:  evalCrossTotal
number of ops:  15
compiled vars:  !0 = $strMD5, !1 = $intTotal, !2 = $arrMD5Chars, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, 0
    7     2        INIT_FCALL                                               'str_split'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    8     7      > FE_RESET_R                                       $7      !2, ->12
          8    > > FE_FETCH_R                                               $7, !3, ->12
   10     9    >   CONCAT                                           ~8      '0x0', !3
         10        ASSIGN_OP                                     1          !1, ~8
    8    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $7
   12    13      > RETURN                                                   !1
   13    14*     > RETURN                                                   null

End of function evalcrosstotal

Function encryptstring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 15
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 15
Branch analysis from position: 64
Branch analysis from position: 15
filename:       /in/BFDpJ
function name:  encryptString
number of ops:  70
compiled vars:  !0 = $strString, !1 = $strPassword, !2 = $strPasswordMD5, !3 = $intMD5Total, !4 = $arrEncryptedValues, !5 = $intStrlen, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   21     2        INIT_FCALL                                               'md5'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
   22     6        INIT_FCALL                                               'evalcrosstotal'
          7        SEND_VAR                                                 !2
          8        DO_FCALL                                      0  $9      
          9        ASSIGN                                                   !3, $9
   23    10        ASSIGN                                                   !4, <array>
   24    11        STRLEN                                           ~12     !0
         12        ASSIGN                                                   !5, ~12
   25    13        ASSIGN                                                   !6, 0
         14      > JMP                                                      ->62
   27    15    >   INIT_FCALL                                               'ord'
         16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !6
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $16     
         21        SEND_VAR                                                 $16
         22        DO_ICALL                                         $17     
   28    23        INIT_FCALL                                               'substr'
         24        SEND_VAR                                                 !2
         25        MOD                                              ~18     !6, 32
         26        SEND_VAL                                                 ~18
         27        SEND_VAL                                                 1
         28        DO_ICALL                                         $19     
         29        CONCAT                                           ~20     '0x0', $19
         30        ADD                                              ~21     $17, ~20
   29    31        SUB                                              ~22     ~21, !3
   27    32        ASSIGN_DIM                                               !4
   29    33        OP_DATA                                                  ~22
   30    34        INIT_FCALL                                               'evalcrosstotal'
         35        INIT_FCALL                                               'substr'
         36        INIT_FCALL                                               'md5'
         37        INIT_FCALL                                               'substr'
         38        SEND_VAR                                                 !0
         39        SEND_VAL                                                 0
         40        ADD                                              ~23     !6, 1
         41        SEND_VAL                                                 ~23
         42        DO_ICALL                                         $24     
         43        SEND_VAR                                                 $24
         44        DO_ICALL                                         $25     
         45        SEND_VAR                                                 $25
         46        SEND_VAL                                                 0
         47        SEND_VAL                                                 16
         48        DO_ICALL                                         $26     
   31    49        INIT_FCALL                                               'substr'
         50        INIT_FCALL                                               'md5'
         51        SEND_VAR                                                 !3
         52        DO_ICALL                                         $27     
         53        SEND_VAR                                                 $27
         54        SEND_VAL                                                 0
         55        SEND_VAL                                                 16
         56        DO_ICALL                                         $28     
         57        CONCAT                                           ~29     $26, $28
         58        SEND_VAL                                                 ~29
         59        DO_FCALL                                      0  $30     
   30    60        ASSIGN                                                   !3, $30
   25    61        PRE_INC                                                  !6
         62    >   IS_SMALLER                                               !6, !5
         63      > JMPNZ                                                    ~33, ->15
   33    64    >   INIT_FCALL                                               'implode'
         65        SEND_VAL                                                 '+'
         66        SEND_VAR                                                 !4
         67        DO_ICALL                                         $34     
         68      > RETURN                                                   $34
   34    69*     > RETURN                                                   null

End of function encryptstring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.05 ms | 1407 KiB | 26 Q