{
   ((Map)localObject1).put("isFirstCall", Boolean.toString(bool1));
   localObject2 = (String)a.get("appsflyerKey");
   if ((localObject2 == null) || (((String)localObject2).length() == 0))
   {
     Log.d(str, "Not sending data yet, waiting for dev key");
     return;
   }
   localObject1 = new HashUtils().a(a);
   a.put("af_v", localObject1);
   localObject1 = AppsFlyerLib.a(a);
   for (;;)
   {
     try
     {
       localObject3 = c;
       WeakReference localWeakReference = d;
       if ((!b) || (AppsFlyerLib.b() == null)) {
         break label452;
       }
       bool1 = bool2;
       AppsFlyerLib.a((String)localObject3, (String)localObject1, (String)localObject2, localWeakReference, null, str, bool1);
       return;
     }
     catch (IOException localIOException2)
     {
       localObject2 = localObject1;
       localObject1 = localIOException2;
     }
     if ((localObject2 == null) || (d == null) || (c.contains("&isCachedRequest=true&timeincache="))) {
       break;
     }
     Log.e(str, ((IOException)localObject1).getMessage(), (Throwable)localObject1);
     CacheManager.a().a(new RequestCacheData(c, (String)localObject2, "3.2"), (Context)d.get());
     return;
     bool1 = false;
   }
   return;
   label493:
   bool1 = false;
   break;
   label498:
   bool1 = false;
   break label164;
 }
 public void run()
 {
   boolean bool2 = true;
   String str = AppsFlyerLib.b(a);
   try
   {
     localObject1 = (Context)d.get();
     if (localObject1 == null) {
       break label481;
     }
     localObject2 = AppsFlyerProperties.a().a((Context)localObject1);
     if ((localObject2 != null) && (((String)localObject2).length() > 0) && (a.get("referrer") == null)) {
       a.put("referrer", localObject2);
     }
     bool3 = "true".equals(((Context)localObject1).getSharedPreferences("appsflyer-data", 0).getString("sentSuccessfully", ""));
     localObject2 = (String)a.get("eventName");
     if (localObject2 != null) {
       break label493;
     }
     bool1 = true;
     int i = AppsFlyerLib.a((Context)localObject1, "appsFlyerCount", bool1);
     a.put("counter", Integer.toString(i));
     localObject3 = a;
     if (localObject2 == null) {
       break label498;
     }
     bool1 = true;
     label164:
     ((Map)localObject3).put("iaecounter", Integer.toString(AppsFlyerLib.a((Context)localObject1, "appsFlyerInAppEventCount", bool1)));
     a.put("timepassedsincelastlaunch", Long.toString(AppsFlyerLib.a((Context)localObject1, true)));
     if ((!b) || (i != 1)) {
       break label486;
     }
     AppsFlyerProperties.a().d();
   }
   catch (Throwable localThrowable)
 public static void a(Context context, String s, String s1, String s2)
 {
     b(context, s, s1, s2, context.getSharedPreferences("appsflyer-data", 0).getString("referrer", ""));
 }
    private static void c(Context context, String s, String s1, String s2, String s3)
    {
        StringBuilder stringbuilder;
        HashMap hashmap;
        String s4;
        String s5;
        String s6;
        String s7;
        Exception exception2;
        SimpleDateFormat simpledateformat;
        int i;
        File file;
        PackageInfo packageinfo;
        long l;
        long l1;
        String s8;
        TelephonyManager telephonymanager;
        String s9;
        String s10;
        String s11;
        try
        {
            b("collect data for server", "", context);
            stringbuilder = new StringBuilder();
            stringbuilder.append("https://track.appsflyer.com/api/v2.2/androidevent?buildnumber=1.3.16.0&app_id=").append(context.getPackageName());
            hashmap = new HashMap();
            hashmap.put("brand", Build.BRAND);
            hashmap.put("device", Build.DEVICE);
            hashmap.put("product", Build.PRODUCT);
            hashmap.put("sdk", Integer.toString(android.os.Build.VERSION.SDK_INT));
            hashmap.put("model", Build.MODEL);
            hashmap.put("deviceType", Build.TYPE);
        }
        catch (Throwable throwable)
        {
            Log.e("AppsFlyer", "", throwable);
            return;
        }
        if (s != null)
        {
            break MISSING_BLOCK_LABEL_132;
        }
        s = a("AppsFlyerKey");
        if (s == null)
        {
            break MISSING_BLOCK_LABEL_147;
        }
        hashmap.put("appsflyerKey", s);
        s4 = a();
        if (s4 == null)
        {
            break MISSING_BLOCK_LABEL_169;
        }
        hashmap.put("appUserId", s4);
        if (s1 == null || s2 == null)
        {
            break MISSING_BLOCK_LABEL_199;
        }
        hashmap.put("eventName", s1);
        hashmap.put("eventValue", s2);
        if (a("appid") != null)
        {
            hashmap.put("appid", a("appid"));
        }
        s5 = a("currencyCode");
        if (s5 == null)
        {
            break MISSING_BLOCK_LABEL_288;
        }
        if (s5.length() != 3)
        {
            Log.w("AppsFlyer", (new StringBuilder()).append("Appsflyer WARNING: currency code should be 3 characters!!! '").append(s5).append("' is not a legal value.").toString());
        }
        hashmap.put("currency", s5);
        s6 = a("IS_UPDATE");
        if (s6 == null)
        {
            break MISSING_BLOCK_LABEL_314;
        }
        hashmap.put("isUpdate", s6);
        s7 = a(context.getContentResolver());
        if (s7 == null)
        {
            break MISSING_BLOCK_LABEL_341;
        }
        hashmap.put("fb", s7);
        s11 = ((TelephonyManager)context.getSystemService("phone")).getDeviceId();
        if (s11 == null)
        {
            break MISSING_BLOCK_LABEL_374;
        }
        try
        {
            hashmap.put("imei", s11);
        }
        catch (Exception exception) { }
        s10 = android.provider.Settings.Secure.getString(context.getContentResolver(), "android_id");
        if (s10 == null)
        {
            break MISSING_BLOCK_LABEL_404;
        }
        try
        {
            hashmap.put("android_id", s10);
        }
        catch (Exception exception1) { }
        s9 = Installation.a(context);
        if (s9 == null)
        {
            break MISSING_BLOCK_LABEL_428;
        }
        hashmap.put("uid", s9);
_L1:
        Exception exception5;
        Exception exception6;
        android.content.pm.PackageManager.NameNotFoundException namenotfoundexception;
        NoSuchFieldError nosuchfielderror;
        Exception exception7;
        try
        {
            hashmap.put("lang", Locale.getDefault().getDisplayLanguage());
        }
        catch (Exception exception3) { }
        try
        {
            telephonymanager = (TelephonyManager)context.getSystemService("phone");
            hashmap.put("operator", telephonymanager.getSimOperatorName());
            hashmap.put("carrier", telephonymanager.getNetworkOperatorName());
        }
        catch (Exception exception4) { }
        hashmap.put("network", a(context));
_L2:
        s8 = ((WifiManager)context.getSystemService("wifi")).getConnectionInfo().getMacAddress();
        if (s8 == null)
        {
            break MISSING_BLOCK_LABEL_540;
        }
        try
        {
            hashmap.put("mac", s8);
        }
        // Misplaced declaration of an exception variable
        catch (Exception exception6) { }
        simpledateformat = new SimpleDateFormat("yyyy-MM-dd_hhmmZ");
        i = android.os.Build.VERSION.SDK_INT;
        if (i < 9)
        {
            break MISSING_BLOCK_LABEL_602;
        }
        try
        {
            hashmap.put("installDate", simpledateformat.format(new Date(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime)));
        }
        // Misplaced declaration of an exception variable
        catch (Exception exception7) { }
        try
        {
            packageinfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
            hashmap.put("app_version_code", Integer.toString(packageinfo.versionCode));
            hashmap.put("app_version_name", packageinfo.versionName);
            l = packageinfo.firstInstallTime;
            l1 = packageinfo.lastUpdateTime;
            hashmap.put("date1", simpledateformat.format(new Date(l)));
            hashmap.put("date2", simpledateformat.format(new Date(l1)));
        }
        // Misplaced declaration of an exception variable
        catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) { }
        // Misplaced declaration of an exception variable
        catch (NoSuchFieldError nosuchfielderror) { }
        file = context.getFilesDir();
        (new SimpleDateFormat("dd-MM-yyyy_hhmmZ")).format(new Date(file.lastModified()));
        if (s3.length() > 0)
        {
            hashmap.put("referrer", s3);
        }
        Executors.newScheduledThreadPool(1).schedule(new SendToServerRunnable(stringbuilder.toString(), hashmap, context.getApplicationContext(), null), 5000L, TimeUnit.MILLISECONDS);
        return;
        exception2;
        Log.i("AppsFlyer", (new StringBuilder()).append("could not get uid ").append(exception2.getMessage()).toString());
          goto _L1
 static void a(String s, String s1, Context context)
 {
     b(s, s1, context);
 }