package com.google.android.gms.measurement.internal;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.WorkerThread;
import com.google.android.gms.common.internal.zzx;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;

public class zzq
  extends zzz
{
  public zzq(zzw paramzzw)
  {
    super(paramzzw);
  }
  
  @WorkerThread
  private byte[] zzc(HttpURLConnection paramHttpURLConnection)
    throws IOException
  {
    byte[] arrayOfByte = null;
    Object localObject = arrayOfByte;
    ByteArrayOutputStream localByteArrayOutputStream;
    try
    {
      localByteArrayOutputStream = new ByteArrayOutputStream();
      localObject = arrayOfByte;
      paramHttpURLConnection = paramHttpURLConnection.getInputStream();
      localObject = paramHttpURLConnection;
      arrayOfByte = new byte['Ѐ'];
      for (;;)
      {
        localObject = paramHttpURLConnection;
        int i = paramHttpURLConnection.read(arrayOfByte);
        if (i <= 0) {
          break;
        }
        localObject = paramHttpURLConnection;
        localByteArrayOutputStream.write(arrayOfByte, 0, i);
      }
      localObject = paramHttpURLConnection;
    }
    finally
    {
      if (localObject != null) {
        ((InputStream)localObject).close();
      }
    }
    arrayOfByte = localByteArrayOutputStream.toByteArray();
    if (paramHttpURLConnection != null) {
      paramHttpURLConnection.close();
    }
    return arrayOfByte;
  }
  
  @WorkerThread
  public void zza(String paramString, URL paramURL, Map<String, String> paramMap, zza paramzza)
  {
    zzjk();
    zzjv();
    zzx.zzz(paramURL);
    zzx.zzz(paramzza);
    zzCn().zzh(new zzc(paramString, paramURL, null, paramMap, paramzza));
  }
  
  @WorkerThread
  public void zza(String paramString, URL paramURL, byte[] paramArrayOfByte, Map<String, String> paramMap, zza paramzza)
  {
    zzjk();
    zzjv();
    zzx.zzz(paramURL);
    zzx.zzz(paramArrayOfByte);
    zzx.zzz(paramzza);
    zzCn().zzh(new zzc(paramString, paramURL, paramArrayOfByte, paramMap, paramzza));
  }
  
  @WorkerThread
  protected HttpURLConnection zzc(URL paramURL)
    throws IOException
  {
    paramURL = paramURL.openConnection();
    if (!(paramURL instanceof HttpURLConnection)) {
      throw new IOException("Failed to obtain HTTP connection");
    }
    paramURL = (HttpURLConnection)paramURL;
    paramURL.setDefaultUseCaches(false);
    paramURL.setConnectTimeout((int)zzCp().zzBO());
    paramURL.setReadTimeout((int)zzCp().zzBP());
    paramURL.setInstanceFollowRedirects(false);
    paramURL.setDoInput(true);
    return paramURL;
  }
  
  protected void zziJ() {}
  
  public boolean zzlB()
  {
    zzjv();
    Object localObject1 = (ConnectivityManager)getContext().getSystemService("connectivity");
    try
    {
      localObject1 = ((ConnectivityManager)localObject1).getActiveNetworkInfo();
      if ((localObject1 != null) && (((NetworkInfo)localObject1).isConnected())) {
        return true;
      }
    }
    catch (SecurityException localSecurityException)
    {
      for (;;)
      {
        Object localObject2 = null;
      }
    }
    return false;
  }
  
  @WorkerThread
  static abstract interface zza
  {
    public abstract void zza(String paramString, int paramInt, Throwable paramThrowable, byte[] paramArrayOfByte);
  }
  
  @WorkerThread
  private static class zzb
    implements Runnable
  {
    private final int zzBc;
    private final String zzTJ;
    private final zzq.zza zzaWP;
    private final Throwable zzaWQ;
    private final byte[] zzaWR;
    
    private zzb(String paramString, zzq.zza paramzza, int paramInt, Throwable paramThrowable, byte[] paramArrayOfByte)
    {
      zzx.zzz(paramzza);
      this.zzaWP = paramzza;
      this.zzBc = paramInt;
      this.zzaWQ = paramThrowable;
      this.zzaWR = paramArrayOfByte;
      this.zzTJ = paramString;
    }
    
    public void run()
    {
      this.zzaWP.zza(this.zzTJ, this.zzBc, this.zzaWQ, this.zzaWR);
    }
  }
  
  @WorkerThread
  private class zzc
    implements Runnable
  {
    private final String zzTJ;
    private final byte[] zzaWS;
    private final zzq.zza zzaWT;
    private final Map<String, String> zzaWU;
    private final URL zzzq;
    
    public zzc(URL paramURL, byte[] paramArrayOfByte, Map<String, String> paramMap, zzq.zza paramzza)
    {
      zzx.zzcM(paramURL);
      zzx.zzz(paramArrayOfByte);
      Object localObject;
      zzx.zzz(localObject);
      this.zzzq = paramArrayOfByte;
      this.zzaWS = paramMap;
      this.zzaWT = ((zzq.zza)localObject);
      this.zzTJ = paramURL;
      this.zzaWU = paramzza;
    }
    
    /* Error */
    public void run()
    {
      // Byte code:
      //   0: aload_0
      //   1: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   4: invokevirtual 59	com/google/android/gms/measurement/internal/zzq:zzCd	()V
      //   7: iconst_0
      //   8: istore_3
      //   9: iconst_0
      //   10: istore 4
      //   12: iconst_0
      //   13: istore 5
      //   15: aload_0
      //   16: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   19: aload_0
      //   20: getfield 42	com/google/android/gms/measurement/internal/zzq$zzc:zzzq	Ljava/net/URL;
      //   23: invokevirtual 62	com/google/android/gms/measurement/internal/zzq:zzc	(Ljava/net/URL;)Ljava/net/HttpURLConnection;
      //   26: astore 6
      //   28: iload 5
      //   30: istore_1
      //   31: iload 4
      //   33: istore_2
      //   34: aload_0
      //   35: getfield 50	com/google/android/gms/measurement/internal/zzq$zzc:zzaWU	Ljava/util/Map;
      //   38: ifnull +149 -> 187
      //   41: iload 5
      //   43: istore_1
      //   44: iload 4
      //   46: istore_2
      //   47: aload_0
      //   48: getfield 50	com/google/android/gms/measurement/internal/zzq$zzc:zzaWU	Ljava/util/Map;
      //   51: invokeinterface 68 1 0
      //   56: invokeinterface 74 1 0
      //   61: astore 8
      //   63: iload 5
      //   65: istore_1
      //   66: iload 4
      //   68: istore_2
      //   69: aload 8
      //   71: invokeinterface 80 1 0
      //   76: ifeq +111 -> 187
      //   79: iload 5
      //   81: istore_1
      //   82: iload 4
      //   84: istore_2
      //   85: aload 8
      //   87: invokeinterface 84 1 0
      //   92: checkcast 86	java/util/Map$Entry
      //   95: astore 7
      //   97: iload 5
      //   99: istore_1
      //   100: iload 4
      //   102: istore_2
      //   103: aload 6
      //   105: aload 7
      //   107: invokeinterface 89 1 0
      //   112: checkcast 91	java/lang/String
      //   115: aload 7
      //   117: invokeinterface 94 1 0
      //   122: checkcast 91	java/lang/String
      //   125: invokevirtual 100	java/net/HttpURLConnection:addRequestProperty	(Ljava/lang/String;Ljava/lang/String;)V
      //   128: goto -65 -> 63
      //   131: astore 8
      //   133: aconst_null
      //   134: astore 7
      //   136: aload 7
      //   138: ifnull +8 -> 146
      //   141: aload 7
      //   143: invokevirtual 105	java/io/OutputStream:close	()V
      //   146: aload 6
      //   148: ifnull +8 -> 156
      //   151: aload 6
      //   153: invokevirtual 108	java/net/HttpURLConnection:disconnect	()V
      //   156: aload_0
      //   157: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   160: invokevirtual 112	com/google/android/gms/measurement/internal/zzq:zzCn	()Lcom/google/android/gms/measurement/internal/zzv;
      //   163: new 114	com/google/android/gms/measurement/internal/zzq$zzb
      //   166: dup
      //   167: aload_0
      //   168: getfield 48	com/google/android/gms/measurement/internal/zzq$zzc:zzTJ	Ljava/lang/String;
      //   171: aload_0
      //   172: getfield 46	com/google/android/gms/measurement/internal/zzq$zzc:zzaWT	Lcom/google/android/gms/measurement/internal/zzq$zza;
      //   175: iload_1
      //   176: aload 8
      //   178: aconst_null
      //   179: aconst_null
      //   180: invokespecial 117	com/google/android/gms/measurement/internal/zzq$zzb:<init>	(Ljava/lang/String;Lcom/google/android/gms/measurement/internal/zzq$zza;ILjava/lang/Throwable;[BLcom/google/android/gms/measurement/internal/zzq$1;)V
      //   183: invokevirtual 123	com/google/android/gms/measurement/internal/zzv:zzg	(Ljava/lang/Runnable;)V
      //   186: return
      //   187: iload 5
      //   189: istore_1
      //   190: iload 4
      //   192: istore_2
      //   193: aload_0
      //   194: getfield 44	com/google/android/gms/measurement/internal/zzq$zzc:zzaWS	[B
      //   197: ifnull +388 -> 585
      //   200: iload 5
      //   202: istore_1
      //   203: iload 4
      //   205: istore_2
      //   206: aload_0
      //   207: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   210: invokevirtual 127	com/google/android/gms/measurement/internal/zzq:zzCk	()Lcom/google/android/gms/measurement/internal/zzaj;
      //   213: aload_0
      //   214: getfield 44	com/google/android/gms/measurement/internal/zzq$zzc:zzaWS	[B
      //   217: invokevirtual 132	com/google/android/gms/measurement/internal/zzaj:zzg	([B)[B
      //   220: astore 8
      //   222: iload 5
      //   224: istore_1
      //   225: iload 4
      //   227: istore_2
      //   228: aload_0
      //   229: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   232: invokevirtual 136	com/google/android/gms/measurement/internal/zzq:zzAo	()Lcom/google/android/gms/measurement/internal/zzp;
      //   235: invokevirtual 142	com/google/android/gms/measurement/internal/zzp:zzCK	()Lcom/google/android/gms/measurement/internal/zzp$zza;
      //   238: ldc -112
      //   240: aload 8
      //   242: arraylength
      //   243: invokestatic 150	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
      //   246: invokevirtual 156	com/google/android/gms/measurement/internal/zzp$zza:zzj	(Ljava/lang/String;Ljava/lang/Object;)V
      //   249: iload 5
      //   251: istore_1
      //   252: iload 4
      //   254: istore_2
      //   255: aload 6
      //   257: iconst_1
      //   258: invokevirtual 160	java/net/HttpURLConnection:setDoOutput	(Z)V
      //   261: iload 5
      //   263: istore_1
      //   264: iload 4
      //   266: istore_2
      //   267: aload 6
      //   269: ldc -94
      //   271: ldc -92
      //   273: invokevirtual 100	java/net/HttpURLConnection:addRequestProperty	(Ljava/lang/String;Ljava/lang/String;)V
      //   276: iload 5
      //   278: istore_1
      //   279: iload 4
      //   281: istore_2
      //   282: aload 6
      //   284: aload 8
      //   286: arraylength
      //   287: invokevirtual 168	java/net/HttpURLConnection:setFixedLengthStreamingMode	(I)V
      //   290: iload 5
      //   292: istore_1
      //   293: iload 4
      //   295: istore_2
      //   296: aload 6
      //   298: invokevirtual 171	java/net/HttpURLConnection:connect	()V
      //   301: iload 5
      //   303: istore_1
      //   304: iload 4
      //   306: istore_2
      //   307: aload 6
      //   309: invokevirtual 175	java/net/HttpURLConnection:getOutputStream	()Ljava/io/OutputStream;
      //   312: astore 7
      //   314: aload 7
      //   316: aload 8
      //   318: invokevirtual 179	java/io/OutputStream:write	([B)V
      //   321: aload 7
      //   323: invokevirtual 105	java/io/OutputStream:close	()V
      //   326: iload 5
      //   328: istore_1
      //   329: iload 4
      //   331: istore_2
      //   332: aload 6
      //   334: invokevirtual 183	java/net/HttpURLConnection:getResponseCode	()I
      //   337: istore_3
      //   338: iload_3
      //   339: istore_1
      //   340: iload_3
      //   341: istore_2
      //   342: aload_0
      //   343: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   346: aload 6
      //   348: invokestatic 187	com/google/android/gms/measurement/internal/zzq:zza	(Lcom/google/android/gms/measurement/internal/zzq;Ljava/net/HttpURLConnection;)[B
      //   351: astore 8
      //   353: iconst_0
      //   354: ifeq +11 -> 365
      //   357: new 189	java/lang/NullPointerException
      //   360: dup
      //   361: invokespecial 190	java/lang/NullPointerException:<init>	()V
      //   364: athrow
      //   365: aload 6
      //   367: ifnull +8 -> 375
      //   370: aload 6
      //   372: invokevirtual 108	java/net/HttpURLConnection:disconnect	()V
      //   375: aload_0
      //   376: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   379: invokevirtual 112	com/google/android/gms/measurement/internal/zzq:zzCn	()Lcom/google/android/gms/measurement/internal/zzv;
      //   382: new 114	com/google/android/gms/measurement/internal/zzq$zzb
      //   385: dup
      //   386: aload_0
      //   387: getfield 48	com/google/android/gms/measurement/internal/zzq$zzc:zzTJ	Ljava/lang/String;
      //   390: aload_0
      //   391: getfield 46	com/google/android/gms/measurement/internal/zzq$zzc:zzaWT	Lcom/google/android/gms/measurement/internal/zzq$zza;
      //   394: iload_3
      //   395: aconst_null
      //   396: aload 8
      //   398: aconst_null
      //   399: invokespecial 117	com/google/android/gms/measurement/internal/zzq$zzb:<init>	(Ljava/lang/String;Lcom/google/android/gms/measurement/internal/zzq$zza;ILjava/lang/Throwable;[BLcom/google/android/gms/measurement/internal/zzq$1;)V
      //   402: invokevirtual 123	com/google/android/gms/measurement/internal/zzv:zzg	(Ljava/lang/Runnable;)V
      //   405: return
      //   406: astore 7
      //   408: aload_0
      //   409: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   412: invokevirtual 136	com/google/android/gms/measurement/internal/zzq:zzAo	()Lcom/google/android/gms/measurement/internal/zzp;
      //   415: invokevirtual 193	com/google/android/gms/measurement/internal/zzp:zzCE	()Lcom/google/android/gms/measurement/internal/zzp$zza;
      //   418: ldc -61
      //   420: aload 7
      //   422: invokevirtual 156	com/google/android/gms/measurement/internal/zzp$zza:zzj	(Ljava/lang/String;Ljava/lang/Object;)V
      //   425: goto -60 -> 365
      //   428: astore 7
      //   430: aload_0
      //   431: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   434: invokevirtual 136	com/google/android/gms/measurement/internal/zzq:zzAo	()Lcom/google/android/gms/measurement/internal/zzp;
      //   437: invokevirtual 193	com/google/android/gms/measurement/internal/zzp:zzCE	()Lcom/google/android/gms/measurement/internal/zzp$zza;
      //   440: ldc -61
      //   442: aload 7
      //   444: invokevirtual 156	com/google/android/gms/measurement/internal/zzp$zza:zzj	(Ljava/lang/String;Ljava/lang/Object;)V
      //   447: goto -301 -> 146
      //   450: astore 6
      //   452: aconst_null
      //   453: astore 8
      //   455: aconst_null
      //   456: astore 7
      //   458: iload_3
      //   459: istore_2
      //   460: aload 7
      //   462: ifnull +8 -> 470
      //   465: aload 7
      //   467: invokevirtual 105	java/io/OutputStream:close	()V
      //   470: aload 8
      //   472: ifnull +8 -> 480
      //   475: aload 8
      //   477: invokevirtual 108	java/net/HttpURLConnection:disconnect	()V
      //   480: aload_0
      //   481: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   484: invokevirtual 112	com/google/android/gms/measurement/internal/zzq:zzCn	()Lcom/google/android/gms/measurement/internal/zzv;
      //   487: new 114	com/google/android/gms/measurement/internal/zzq$zzb
      //   490: dup
      //   491: aload_0
      //   492: getfield 48	com/google/android/gms/measurement/internal/zzq$zzc:zzTJ	Ljava/lang/String;
      //   495: aload_0
      //   496: getfield 46	com/google/android/gms/measurement/internal/zzq$zzc:zzaWT	Lcom/google/android/gms/measurement/internal/zzq$zza;
      //   499: iload_2
      //   500: aconst_null
      //   501: aconst_null
      //   502: aconst_null
      //   503: invokespecial 117	com/google/android/gms/measurement/internal/zzq$zzb:<init>	(Ljava/lang/String;Lcom/google/android/gms/measurement/internal/zzq$zza;ILjava/lang/Throwable;[BLcom/google/android/gms/measurement/internal/zzq$1;)V
      //   506: invokevirtual 123	com/google/android/gms/measurement/internal/zzv:zzg	(Ljava/lang/Runnable;)V
      //   509: aload 6
      //   511: athrow
      //   512: astore 7
      //   514: aload_0
      //   515: getfield 27	com/google/android/gms/measurement/internal/zzq$zzc:zzaWV	Lcom/google/android/gms/measurement/internal/zzq;
      //   518: invokevirtual 136	com/google/android/gms/measurement/internal/zzq:zzAo	()Lcom/google/android/gms/measurement/internal/zzp;
      //   521: invokevirtual 193	com/google/android/gms/measurement/internal/zzp:zzCE	()Lcom/google/android/gms/measurement/internal/zzp$zza;
      //   524: ldc -61
      //   526: aload 7
      //   528: invokevirtual 156	com/google/android/gms/measurement/internal/zzp$zza:zzj	(Ljava/lang/String;Ljava/lang/Object;)V
      //   531: goto -61 -> 470
      //   534: astore 9
      //   536: aconst_null
      //   537: astore 7
      //   539: aload 6
      //   541: astore 8
      //   543: aload 9
      //   545: astore 6
      //   547: goto -87 -> 460
      //   550: astore 9
      //   552: aload 6
      //   554: astore 8
      //   556: iload_3
      //   557: istore_2
      //   558: aload 9
      //   560: astore 6
      //   562: goto -102 -> 460
      //   565: astore 8
      //   567: iconst_0
      //   568: istore_1
      //   569: aconst_null
      //   570: astore 7
      //   572: aconst_null
      //   573: astore 6
      //   575: goto -439 -> 136
      //   578: astore 8
      //   580: iconst_0
      //   581: istore_1
      //   582: goto -446 -> 136
      //   585: goto -259 -> 326
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	588	0	this	zzc
      //   30	552	1	i	int
      //   33	525	2	j	int
      //   8	549	3	k	int
      //   10	320	4	m	int
      //   13	314	5	n	int
      //   26	345	6	localHttpURLConnection	HttpURLConnection
      //   450	90	6	localObject1	Object
      //   545	29	6	localObject2	Object
      //   95	227	7	localObject3	Object
      //   406	15	7	localIOException1	IOException
      //   428	15	7	localIOException2	IOException
      //   456	10	7	localObject4	Object
      //   512	15	7	localIOException3	IOException
      //   537	34	7	localObject5	Object
      //   61	25	8	localIterator	java.util.Iterator
      //   131	46	8	localIOException4	IOException
      //   220	335	8	localObject6	Object
      //   565	1	8	localIOException5	IOException
      //   578	1	8	localIOException6	IOException
      //   534	10	9	localObject7	Object
      //   550	9	9	localObject8	Object
      // Exception table:
      //   from	to	target	type
      //   34	41	131	java/io/IOException
      //   47	63	131	java/io/IOException
      //   69	79	131	java/io/IOException
      //   85	97	131	java/io/IOException
      //   103	128	131	java/io/IOException
      //   193	200	131	java/io/IOException
      //   206	222	131	java/io/IOException
      //   228	249	131	java/io/IOException
      //   255	261	131	java/io/IOException
      //   267	276	131	java/io/IOException
      //   282	290	131	java/io/IOException
      //   296	301	131	java/io/IOException
      //   307	314	131	java/io/IOException
      //   332	338	131	java/io/IOException
      //   342	353	131	java/io/IOException
      //   357	365	406	java/io/IOException
      //   141	146	428	java/io/IOException
      //   15	28	450	finally
      //   465	470	512	java/io/IOException
      //   34	41	534	finally
      //   47	63	534	finally
      //   69	79	534	finally
      //   85	97	534	finally
      //   103	128	534	finally
      //   193	200	534	finally
      //   206	222	534	finally
      //   228	249	534	finally
      //   255	261	534	finally
      //   267	276	534	finally
      //   282	290	534	finally
      //   296	301	534	finally
      //   307	314	534	finally
      //   332	338	534	finally
      //   342	353	534	finally
      //   314	326	550	finally
      //   15	28	565	java/io/IOException
      //   314	326	578	java/io/IOException
    }
  }
}


/* Location:              /home/enzo/Documents/hacking/malwares/viking-horde/classes.jar!/com/google/android/gms/measurement/internal/zzq.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */