code: public static int extractFlagsFromType2Message(byte[] msg) {
          byte[] flagsBytes = new byte[4];
  
          System.arraycopy(msg, 20, flagsBytes, 0, 4);
          ByteUtilities.changeWordEndianess(flagsBytes, 0, 4);
  
          return ByteUtilities.makeIntFromByte4(flagsBytes);
      }
docs: Extracts the NTLM flags from the type 2 message.
  
  @param msg the type 2 message byte array
  @return the proxy flags as an int