local L0_0
L0_0 = _ENV
L0_0.require("import")
L0_0.import("res/init")
L0_0.import("android.app.*")
L0_0.import("android.os.*")
L0_0.import("android.widget.*")
L0_0.import("android.view.*")
L0_0.import("android.graphics.drawable.ColorDrawable")
L0_0.import("http")
L0_0.this.theme = L0_0.android.R.style.Theme_Material_Light_DarkActionBar
L0_0.this.ActionBar.backgroundDrawable = L0_0.ColorDrawable(4278228616)
L0_0.activity.setContentView(L0_0.loadlayout({
  L0_0.LinearLayout,
  layout_height = "fill",
  id = "bj",
  orientation = "vertical",
  layout_width = "fill",
  {
    L0_0.LinearLayout,
    gravity = "center",
    orientation = "vertical",
    layout_height = "fill",
    layout_width = "fill",
    layout_margin = "20dp",
    {
      L0_0.TextView,
      id = "Title",
      text = "Login...",
      layout_gravity = "left",
      textSize = "40sp",
      textColor = "0xFFFFFFFF"
    },
    {
      L0_0.LinearLayout,
      id = "Card",
      backgroundColor = "0x3FFFFFFF",
      orientation = "vertical",
      layout_height = "200dp",
      gravity = "center",
      layout_width = "fill",
      layout_marginTop = "10dp",
      {
        L0_0.LinearLayout,
        gravity = "center",
        layout_width = "fill",
        layout_marginLeft = "20dp",
        layout_marginRight = "20dp",
        id = "kmBj",
        {
          L0_0.ImageView,
          src = "res/km.png",
          layout_height = "fill",
          layout_width = "20dp",
          layout_marginLeft = "10dp",
          ColorFilter = "0xFFFFFFFF"
        },
        {
          L0_0.EditText,
          singleLine = true,
          layout_marginLeft = "10dp",
          hintTextColor = "0xFFFFFFFF",
          layout_width = "fill",
          textColor = "0xFFFFFFFF",
          id = "km",
          textSize = "15sp",
          hint = "请输入卡密"
        }
      },
      {
        L0_0.LinearLayout,
        layout_width = "fill",
        layout_marginTop = "25dp",
        gravity = "center",
        {
          L0_0.LinearLayout,
          id = "jbBj",
          layout_marginRight = "10dp",
          {
            L0_0.ImageView,
            src = "res/jb.png",
            layout_height = "fill",
            layout_width = "25dp",
            layout_marginLeft = "20dp",
            ColorFilter = "0xFFFFFFFF"
          },
          {
            L0_0.Button,
            id = "kmdismiss",
            text = "解绑",
            textSize = "15sp",
            layout_height = "40dp",
            textColor = "0xFFFFFFFF"
          }
        },
        {
          L0_0.LinearLayout,
          id = "loginBj",
          layout_marginLeft = "10dp",
          {
            L0_0.ImageView,
            src = "res/dl.png",
            layout_height = "fill",
            layout_width = "25dp",
            layout_marginLeft = "20dp",
            ColorFilter = "0xFFFFFFFF"
          },
          {
            L0_0.Button,
            id = "login",
            text = "登录",
            textSize = "15sp",
            layout_height = "40dp",
            textColor = "0xFFFFFFFF"
          }
        }
      }
    }
  }
}))
L0_0.activity.ActionBar.hide()
if L0_0.Build.VERSION.SDK_INT >= 19 then
  L0_0.activity.getWindow().addFlags(L0_0.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
end
L0_0.import("android.renderscript.Element")
L0_0.import("android.renderscript.Allocation")
L0_0.import("android.renderscript.RenderScript")
L0_0.import("android.graphics.Bitmap")
L0_0.import("android.renderscript.ScriptIntrinsicBlur")
L0_0.import("android.graphics.Matrix")
L0_0.import("android.graphics.drawable.BitmapDrawable")
function L0_0.GaussianBlur(A0_1, A1_2, A2_3, A3_4)
  local L4_5, L5_6
  L4_5 = L0_0
  function L5_6(A0_7, A1_8, A2_9)
    local L3_10
    L3_10 = L4_5
    L3_10.renderScript = L3_10.RenderScript.create(A0_7)
    L3_10.blurScript = L3_10.ScriptIntrinsicBlur.create(L3_10.renderScript, L3_10.Element.U8_4(L3_10.renderScript))
    L3_10.inAllocation = L3_10.Allocation.createFromBitmap(L3_10.renderScript, A1_8)
    L3_10.outputBitmap = A1_8
    L3_10.outAllocation = L3_10.Allocation.createTyped(L3_10.renderScript, L3_10.inAllocation.getType())
    L3_10.blurScript.setRadius(A2_9)
    L3_10.blurScript.setInput(L3_10.inAllocation)
    L3_10.blurScript.forEach(L3_10.outAllocation)
    L3_10.outAllocation.copyTo(L3_10.outputBitmap)
    L3_10.inAllocation.destroy()
    L3_10.outAllocation.destroy()
    L3_10.renderScript.destroy()
    L3_10.blurScript.destroy()
    return L3_10.outputBitmap
  end
  
  L4_5.blur = L5_6
  function L5_6(A0_11, A1_12)
    local L2_13
    L2_13 = L4_5
    L2_13.w = A0_11.getWidth()
    L2_13.h = A0_11.getHeight()
    L2_13.matrix = L2_13.Matrix()
    L2_13.matrix.postScale(A1_12, A1_12)
    A0_11 = L2_13.Bitmap.createBitmap(A0_11, 0, 0, L2_13.w, L2_13.h, L2_13.matrix, true)
    return A0_11
  end
  
  L4_5.zoomBitmap = L5_6
  function L5_6(A0_14, A1_15, A2_16, A3_17)
    local L4_18
    L4_18 = L4_5
    return L4_18.zoomBitmap(L4_18.blur(A0_14, L4_18.zoomBitmap(A1_15, 1 / A3_17), A2_16), A3_17)
  end
  
  L4_5.blurAndZoom = L5_6
  L5_6 = A0_1.setBackgroundDrawable
  L5_6(L4_5.BitmapDrawable((L4_5.blurAndZoom(L4_5.activity, A1_2, A2_3, A3_4))))
end

L0_0.GaussianBlur(L0_0.bj, L0_0.loadbitmap("res/bj.png"), 15, 5)
L0_0.import("android.graphics.*")
L0_0.Title.getPaint().setFakeBoldText(true)
function L0_0.CircleButton(A0_19, A1_20, A2_21)
  local L3_22
  L3_22 = L0_0
  L3_22.import("android.graphics.drawable.GradientDrawable")
  L3_22.drawable = L3_22.GradientDrawable()
  L3_22.drawable.setShape(L3_22.GradientDrawable.RECTANGLE)
  L3_22.drawable.setColor(A1_20)
  L3_22.drawable.setCornerRadii({
    A2_21,
    A2_21,
    A2_21,
    A2_21,
    A2_21,
    A2_21,
    A2_21,
    A2_21
  })
  A0_19.setBackgroundDrawable(L3_22.drawable)
end

L0_0.CircleButton(L0_0.Card, 1073741823, 30)
L0_0.CircleButton(L0_0.km, 16777215, 30)
L0_0.CircleButton(L0_0.kmdismiss, 16777215, 30)
L0_0.CircleButton(L0_0.login, 16777215, 30)
L0_0.CircleButton(L0_0.kmBj, 1073741823, 30)
L0_0.CircleButton(L0_0.jbBj, 1073741823, 30)
L0_0.CircleButton(L0_0.loginBj, 1073741823, 30)
function L0_0.wToast(A0_23)
  local L1_24
  L1_24 = L0_0
  L1_24.Toast.makeText(L1_24.activity, A0_23, L1_24.Toast.LENGTH_SHORT).show()
end

L0_0.Http.get("http://app.llua.cn/api/?id=lua&appid=" .. "41285", function(A0_25, A1_26)
  if not _UPVALUE1_(_UPVALUE2_(_UPVALUE3_(A1_26, "wf4f4f8def84766874d4690f4501a471", false))) then
    L0_0.print("云函数有语法错误", _UPVALUE1_(_UPVALUE2_(_UPVALUE3_(A1_26, "wf4f4f8def84766874d4690f4501a471", false))))
  end
end
)
L0_0.Time = L0_0.os.time()
L0_0.Http.get("https://wy.llua.cn" .. "/api/?id=notice&app=" .. "41285", function(A0_27, A1_28)
  local L2_29, L3_30
  L2_29 = L0_0
  L3_30 = _UPVALUE1_.decode
  L3_30 = L3_30(_UPVALUE2_(A1_28, "k468ccdbbff5b5e0196288f38e86800c2", false))
  if L3_30.code == 102 then
    L2_29.km.Error = "软件已关闭"
    L2_29.task(3000, function()
      local L0_31
      L0_31 = L2_29
      L0_31.activity.finish()
      L0_31.os.exit()
      while true do
      end
    end
    )
  end
  if L3_30.code == 200 then
    if L2_29.type(L3_30.msg.app_gg) ~= "userdata" and L3_30.msg.app_gg ~= "" then
      L2_29.AlertDialog.Builder(L2_29.this).setTitle("公告").setMessage(L3_30.msg.app_gg).setPositiveButton("已阅", nil).show()
    end
  else
    L2_29.km.Error = "服务器连接异常"
    L2_29.task(3000, function()
      local L0_32
      L0_32 = L2_29
      L0_32.activity.finish()
      L0_32.os.exit()
      while true do
      end
    end
    )
  end
end
)
L0_0.Http.get("https://wy.llua.cn" .. "/api/?id=ini&app=" .. "41285", function(A0_33, A1_34)
  local L2_35, L3_36
  L2_35 = L0_0
  L3_36 = _UPVALUE1_.decode
  L3_36 = L3_36(_UPVALUE2_(A1_34, "k468ccdbbff5b5e0196288f38e86800c2", false))
  if L2_35.activity.getPackageManager().getPackageInfo(L2_35.activity.getPackageName(), 0).versionName ~= L3_36.msg.version and L2_35.string.find(L2_35.tostring(L3_36.msg.app_update_url), "http") ~= nil then
    if L3_36.msg.app_update_must == "y" then
      L2_35.isUp = true
    end
    L2_35.AlertDialog.Builder(L2_35.this).setTitle("有新版本").setMessage(L2_35.tostring(L3_36.msg.app_update_show)).setPositiveButton("前往更新", {
      onClick = function()
        local L0_37
        L0_37 = L2_35
        L0_37.import("android.content.Intent")
        L0_37.import("android.net.Uri")
        L0_37.activity.startActivity(L0_37.Intent("android.intent.action.VIEW", L0_37.Uri.parse(L3_36.msg.app_update_url)))
      end
      
    }).show()
  end
end
)
if L0_0.io.open("/sdcard/km", "r") == nil then
else
  L0_0.km.Text = (""):read("*a")
end
function L0_0.login.onClick()
  local L0_38
  L0_38 = L0_0
  if L0_38.isUp then
    L0_38.km.Error = "强制更新，请先更新后使用"
  else
    L0_38.import("android.provider.Settings$Secure")
    if L0_38.km.Text == "" then
      L0_38.km.Error = "卡密不可为空"
    else
      L0_38.login.Text = "登录中..."
      L0_38.Http.get(_UPVALUE3_ .. "/api/?id=kmlogin&app=" .. "41285" .. "&" .. "data=" .. _UPVALUE2_("kami=" .. L0_38.km.Text .. "&markcode=" .. L0_38.Secure.getString(L0_38.activity.getContentResolver(), L0_38.Secure.ANDROID_ID) .. "&t=" .. L0_38.os.time() .. "&sign=" .. _UPVALUE1_("kami=" .. L0_38.km.Text .. "&markcode=" .. L0_38.Secure.getString(L0_38.activity.getContentResolver(), L0_38.Secure.ANDROID_ID) .. "&t=" .. L0_38.os.time() .. "&" .. "wf4f4f8def84766874d4690f4501a471") .. "&value=" .. L0_38.math.random(1000, 99999) .. L0_38.os.time(), "k468ccdbbff5b5e0196288f38e86800c2", true), function(A0_39, A1_40)
        local L2_41, L3_42
        L2_41 = L0_38
        if A0_39 == 200 then
          L3_42 = _UPVALUE1_.decode
          L3_42 = L3_42(_UPVALUE2_(A1_40, "k468ccdbbff5b5e0196288f38e86800c2", false))
          if L3_42.a11b9b37a12c0c129321cdaa3b5d5bd60 == 45367 and L3_42.u6ff965fab1e681396a8f8c5c07e52389.w097592d1c817b05bb6c153ee8371191f == "f09b707a086e30bce51874677991f593" then
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471")
            _UPVALUE3_(L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "wf4f4f8def84766874d4690f4501a471" .. _UPVALUE4_)
            if L3_42.i64c002550468699579967670a8669e47 - _UPVALUE5_ > 30 or L3_42.i64c002550468699579967670a8669e47 - _UPVALUE5_ < -30 then
              L2_41.km.Error = "设备时间不准"
            elseif _UPVALUE3_("" .. L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "" .. "wf4f4f8def84766874d4690f4501a471" .. "" .. _UPVALUE4_ .. "") == L3_42.h02dbde137af71c2c5c7918604b58afc4 then
              if _UPVALUE3_("" .. L2_41.tointeger(L3_42.i64c002550468699579967670a8669e47) .. "" .. "wf4f4f8def84766874d4690f4501a471" .. "" .. _UPVALUE4_ .. "") == _UPVALUE3_(L2_41.os.time() .. _UPVALUE4_ .. "wf4f4f8def84766874d4690f4501a471") then
                L2_41.km.Error = "检测到非法操作，请立即终止！"
              else
                if L3_42.u6ff965fab1e681396a8f8c5c07e52389.xd7df7f27946aafd9494551d7c9ef409b == "single" then
                  L2_41.wToast("剩余次数:" .. L3_42.u6ff965fab1e681396a8f8c5c07e52389.scc73125fbccd8d445d8dbda4b7374d05)
                else
                  L2_41.wToast("登录成功\n到期时间:" .. L2_41.os.date("%Y-%m-%d %H:%M:%S", L3_42.u6ff965fab1e681396a8f8c5c07e52389.j20bcfb015a14f802707916b49d9a6b29))
                end
                L2_41.import("java.io.File")
                L2_41.File(L2_41.tostring(L2_41.File(L2_41.tostring(_UPVALUE6_)).getParentFile())).mkdirs()
                L2_41.File(L2_41.tostring(L2_41.File(L2_41.tostring(_UPVALUE7_)).getParentFile())).mkdirs()
                L2_41.io.open(_UPVALUE6_, "w"):write(L2_41.km.Text):close()
                L2_41.io.open(_UPVALUE7_, "w"):write(_UPVALUE8_):close()
                L2_41.task((L3_42.u6ff965fab1e681396a8f8c5c07e52389.j20bcfb015a14f802707916b49d9a6b29 - L2_41.os.time()) * 1000, function()
                  local L0_43
                  L0_43 = L2_41
                  L0_43.activity.finish()
                  L0_43.os.exit()
                  while true do
                  end
                end
                )
                L2_41.require("import")
                L2_41.import({
                  "android.app.*",
                  "android.os.*",
                  "android.widget.*",
                  "android.view.*",
                  "layout",
                  "floating_window",
                  "suspended_ball",
                  "style",
                  "android.content.Context",
                  "android.provider.Settings",
                  "android.view.animation.*",
                  "android.animation.ObjectAnimator",
                  "android.graphics.drawable.GradientDrawable",
                  "android.graphics.Typeface",
                  "android.net.Uri",
                  "android.content.Intent",
                  "android.graphics.Color"
                })
                function L2_41.请求Root权限()
                  local L0_44
                  L0_44 = L2_41
                  L0_44.io.popen("su -c 'command -v su'"):close()
                  if L0_44.io.popen("su -c 'command -v su'"):read("*all") ~= nil and L0_44.io.popen("su -c 'command -v su'"):read("*all") ~= "" then
                    L0_44.os.execute("su")
                    return true
                  else
                    return false
                  end
                end
                
                if not L2_41.请求Root权限() then
                  L2_41.Toast.makeText(L2_41.activity, "未能获得Root权限", L2_41.Toast.LENGTH_LONG).show()
                end
                L2_41.activity.setTheme(L2_41.R.Theme_Blue)
                L2_41.import("android.graphics.BitmapFactory")
                L2_41.import("android.graphics.drawable.BitmapDrawable")
                L2_41.import("android.graphics.BitmapFactory")
                L2_41.import("android.graphics.drawable.BitmapDrawable")
                L2_41.import("java.io.File")
                if not L2_41.File(L2_41.activity.getLuaDir() .. "/weiyan/bj.png").exists() then
                  L2_41.Toast.makeText(L2_41.activity, "图片不存在:\n" .. L2_41.activity.getLuaDir() .. "/weiyan/bj.png", L2_41.Toast.LENGTH_LONG).show()
                  L2_41.activity.setContentView((L2_41.loadlayout(L2_41.layout)))
                elseif L2_41.BitmapFactory.decodeFile(L2_41.activity.getLuaDir() .. "/weiyan/bj.png") == nil then
                  L2_41.Toast.makeText(L2_41.activity, "图片加载失败", L2_41.Toast.LENGTH_SHORT).show()
                  L2_41.activity.setContentView((L2_41.loadlayout(L2_41.layout)))
                else
                  L2_41.loadlayout(L2_41.layout).setBackgroundDrawable((L2_41.BitmapDrawable((L2_41.BitmapFactory.decodeFile(L2_41.activity.getLuaDir() .. "/weiyan/bj.png")))))
                  L2_41.activity.setContentView((L2_41.loadlayout(L2_41.layout)))
                end
                L2_41.activity.ActionBar.hide()
                if L2_41.tonumber(L2_41.Build.VERSION.SDK) >= 23 then
                  L2_41.activity.getWindow().getDecorView().setSystemUiVisibility(L2_41.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)
                end
                if L2_41.Build.VERSION.SDK_INT >= 21 then
                  L2_41.activity.getWindow().addFlags(L2_41.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(4282549748)
                end
                if L2_41.Build.VERSION.SDK_INT >= 19 then
                  L2_41.activity.getWindow().addFlags(L2_41.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
                end
                L2_41.wmManagers = L2_41.activity.getSystemService(L2_41.Context.WINDOW_SERVICE)
                L2_41.HasFocus = false
                L2_41.wmParams = L2_41.WindowManager.LayoutParams()
                if L2_41.Build.VERSION.SDK_INT >= 26 then
                  L2_41.wmParams.type = L2_41.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
                else
                  L2_41.wmParams.type = L2_41.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT
                end
                function L2_41.判断悬浮窗权限()
                  local L0_45
                  L0_45 = L2_41
                  if not L0_45.Settings.canDrawOverlays(L0_45.this) then
                    L0_45.AlertDialog.Builder(L0_45.this).setTitle("没有悬浮窗权限！").setMessage("检测到没有给予悬浮窗权限，请先给予悬浮窗权限").setPositiveButton("点击授权悬浮窗权限", {
                      onClick = function(A0_46)
                        local L1_47
                        L1_47 = L0_45
                        L1_47.import("android.net.Uri")
                        L1_47.import("android.content.Intent")
                        L1_47.import("android.provider.Settings")
                        L1_47.intent = L1_47.Intent(L1_47.Settings.ACTION_MANAGE_OVERLAY_PERMISSION)
                        L1_47.intent.setData(L1_47.Uri.parse("package:" .. L1_47.activity.getPackageName()))
                        L1_47.activity.startActivityForResult(L1_47.intent, 100)
                      end
                      
                    }).show()
                  end
                end
                
                L2_41.判断悬浮窗权限()
                L2_41.import("android.graphics.PixelFormat")
                L2_41.wmParams.format = L2_41.PixelFormat.RGBA_8888
                L2_41.wmParams.flags = L2_41.WindowManager.LayoutParams().FLAG_NOT_FOCUSABLE
                L2_41.wmParams.gravity = L2_41.Gravity.LEFT | L2_41.Gravity.TOP
                L2_41.wmParams.y = L2_41.activity.getWidth() / 2
                L2_41.wmParams.width = L2_41.WindowManager.LayoutParams.WRAP_CONTENT
                L2_41.wmParams.height = L2_41.WindowManager.LayoutParams.WRAP_CONTENT
                L2_41.floating_window = L2_41.loadlayout(L2_41.floating_window)
                L2_41.suspendedball = L2_41.loadlayout(L2_41.suspended_ball)
                L2_41.LayoutAnimationController(L2_41.AnimationSet(true), 0.2).setOrder(L2_41.LayoutAnimationController.ORDER_NORMAL)
                L2_41.AlphaAnimation(0, 1).setDuration(500)
                L2_41.AnimationSet(true).addAnimation((L2_41.AlphaAnimation(0, 1)))
                function L2_41.open_suspendedball()
                  local L0_48
                  L0_48 = L2_41
                  if not L0_48.fb then
                    L0_48.suspendedball.setLayoutAnimation(_UPVALUE1_)
                    L0_48.wmManagers.addView(L0_48.suspendedball, L0_48.wmParams)
                    L0_48.fb = true
                  end
                end
                
                function L2_41.close_suspendedball()
                  local L0_49
                  L0_49 = L2_41
                  if L0_49.fb then
                    L0_49.wmManagers.removeView(L0_49.suspendedball)
                    L0_49.fb = false
                  end
                end
                
                function L2_41.open_floatingwindow()
                  local L0_50
                  L0_50 = L2_41
                  L0_50.LayoutAnimationController(L0_50.AnimationSet(true), 0.2).setOrder(L0_50.LayoutAnimationController.ORDER_NORMAL)
                  L0_50.AlphaAnimation(0, 1).setDuration(500)
                  L0_50.TranslateAnimation(-100, 0, 0, 0).setDuration(500)
                  L0_50.AnimationSet(true).addAnimation((L0_50.AlphaAnimation(0, 1)))
                  L0_50.AnimationSet(true).addAnimation((L0_50.TranslateAnimation(-100, 0, 0, 0)))
                  if not L0_50.fw then
                    L0_50.floating_window.setLayoutAnimation((L0_50.LayoutAnimationController(L0_50.AnimationSet(true), 0.2)))
                    L0_50.wmManagers.addView(L0_50.floating_window, L0_50.wmParams)
                    L0_50.close_suspendedball()
                    L0_50.fw = true
                  end
                end
                
                function L2_41.openwindow.OnTouchListener(A0_51, A1_52)
                  local L2_53
                  L2_53 = L2_41
                  if not L2_53.fw and A1_52.getAction() == L2_53.MotionEvent.ACTION_DOWN then
                    _UPVALUE1_ = A1_52.getRawX()
                    _UPVALUE2_ = A1_52.getRawY()
                    _UPVALUE3_ = L2_53.wmParams.x
                    _UPVALUE4_ = L2_53.wmParams.y
                  elseif A1_52.getAction() == L2_53.MotionEvent.ACTION_MOVE then
                    _UPVALUE5_.x = _UPVALUE3_ + (A1_52.getRawX() - _UPVALUE1_)
                    _UPVALUE5_.y = _UPVALUE4_ + (A1_52.getRawY() - _UPVALUE2_)
                    L2_53.wmParams.x = _UPVALUE5_.x
                    L2_53.wmParams.y = _UPVALUE5_.y
                    L2_53.wmManagers.updateViewLayout(L2_53.suspendedball, L2_53.wmParams)
                  elseif A1_52.getAction() == L2_53.MotionEvent.ACTION_UP then
                    L2_53.wmManagers.updateViewLayout(L2_53.suspendedball, L2_53.wmParams)
                  end
                  return false
                end
                
                function L2_41.floating_window.OnTouchListener(A0_54, A1_55)
                  local L2_56
                  L2_56 = L2_41
                  if A1_55.getAction() == L2_56.MotionEvent.ACTION_DOWN then
                    _UPVALUE1_ = A1_55.getRawX()
                    _UPVALUE2_ = A1_55.getRawY()
                    _UPVALUE3_ = L2_56.wmParams.x
                    _UPVALUE4_ = L2_56.wmParams.y
                  elseif A1_55.getAction() == L2_56.MotionEvent.ACTION_MOVE then
                    L2_56.wmParams.x = _UPVALUE3_ + (A1_55.getRawX() - _UPVALUE1_)
                    L2_56.wmParams.y = _UPVALUE4_ + (A1_55.getRawY() - _UPVALUE2_)
                    L2_56.wmManagers.updateViewLayout(L2_56.floating_window, L2_56.wmParams)
                  elseif A1_55.getAction() == L2_56.MotionEvent.ACTION_UP then
                    L2_56.wmManagers.updateViewLayout(L2_56.floating_window, L2_56.wmParams)
                  end
                  return false
                end
                
                function L2_41.minimize.onClick()
                  local L0_57
                  L0_57 = L2_41
                  if L0_57.fw then
                    L0_57.wmManagers.removeView(L0_57.floating_window)
                    L0_57.open_suspendedball()
                    L0_57.fw = false
                  end
                end
                
                function L2_41.close.onClick()
                  local L0_58
                  L0_58 = L2_41
                  if L0_58.fb then
                    L0_58.wmManagers.removeView(L0_58.suspendedball)
                    L0_58.fb = false
                  end
                  if L0_58.fw then
                    L0_58.wmManagers.removeView(L0_58.floating_window)
                    L0_58.fw = false
                  end
                  L0_58.open.setText("启用悬浮窗")
                end
                
                L2_41.fw = false
                function L2_41.openwindow.onClick()
                  local L0_59
                  L0_59 = L2_41
                  if not L0_59.fw then
                    L0_59.open_floatingwindow()
                  end
                end
                
                L2_41.fb = false
                function L2_41.open.onClick()
                  local L0_60
                  L0_60 = L2_41
                  if not L0_60.fb then
                    L0_60.open_suspendedball()
                    L0_60.open.setText("关闭悬浮窗")
                    L0_60.fb = true
                  else
                    L0_60.close_suspendedball()
                    L0_60.open.setText("启用悬浮窗")
                    L0_60.fb = false
                  end
                end
                
                L2_41.dip = {
                  toPx = function(A0_61, A1_62)
                    local L2_63
                    L2_63 = L2_41
                    return A1_62 * A0_61.getResources().getDisplayMetrics().density + 0.5
                  end
                  
                }
                function L2_41.CircleBack_SeekDra(A0_64, A1_65, A2_66, A3_67)
                  local L4_68, L5_69
                  L4_68 = L2_41
                  L5_69 = A0_64
                  L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setCornerRadius(L4_68.dip.toPx(L4_68.this, A1_65) / 1.5)
                  L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setColor(A0_64)
                  if A2_66 then
                    L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setStroke(L4_68.dip.toPx(L4_68.this, 5), 16777215)
                    L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setSize(L4_68.dip.toPx(L4_68.this, A1_65), (L4_68.dip.toPx(L4_68.this, A1_65)))
                  else
                    L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setAlpha(30)
                    L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setStroke(L4_68.dip.toPx(L4_68.this, 0), 16777215)
                  end
                  L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}).setGradientType(L4_68.GradientDrawable.RECTANGLE)
                  return (L4_68.GradientDrawable(L4_68.GradientDrawable.Orientation.TOP_BOTTOM, {}))
                end
                
                function L2_41.Switch_x(A0_70, A1_71, A2_72, A3_73, A4_74)
                  L2_41.pcall(function()
                    local L0_75, L1_76
                    L0_75 = _UPVALUE0_
                    L1_76 = nil
                    if A0_70.isChecked() then
                      L1_76 = A1_71
                    else
                      L1_76 = A2_72
                    end
                    A0_70.setThumbDrawable(L0_75.CircleBack_SeekDra(4294967295, A4_74, true)).setTrackDrawable(L0_75.CircleBack_SeekDra(A3_73, A4_74, false)).setPadding(L0_75.dip.toPx(L0_75.this, A4_74 / 5), L0_75.dip.toPx(L0_75.this, A4_74 / 5), L0_75.dip.toPx(L0_75.this, A4_74 / 5), (L0_75.dip.toPx(L0_75.this, A4_74 / 5)))
                  end
                  )
                end
                
                L2_41.Ad_Color = 4278216959
                L2_41.Ad_Color3 = 4278190080
                L2_41.Ad_Color2 = 4294967295
                L2_41.Ad_Size = 25
                L2_41.Ad_Padding = 7
                L2_41.Switch_x(L2_41.swich1, L2_41.Ad_Color, L2_41.Ad_Color2, L2_41.Ad_Color3, L2_41.Ad_Size, L2_41.Ad_Padding)
                function L2_41.免root执行(A0_77, A1_78)
                  local L2_79
                  L2_79 = L2_41
                  L2_79.os.execute("chmod 777 " .. L2_79.activity.getLuaDir(A0_77))
                  L2_79.Runtime.getRuntime().exec((L2_79.activity.getLuaDir(A0_77)))
                  L2_79.print(A1_78)
                end
                
                function L2_41.root执行(A0_80, A1_81)
                  local L2_82
                  L2_82 = L2_41
                  L2_82.os.execute("su -c chmod 777 " .. L2_82.activity.getLuaDir(A0_80))
                  L2_82.Runtime.getRuntime().exec("su -c " .. L2_82.activity.getLuaDir(A0_80))
                  L2_82.print(A1_81)
                end
                
                function L2_41.a1.onClick()
                  local L0_83
                  L0_83 = L2_41
                  if L0_83.a1.checked then
                    L0_83.MD提示("开启成功", 2952790015, 4278190080, 1, 80)
                    if _UPVALUE1_ then
                      L0_83.root执行("rjz/a1", "已获取Root权限，操作成功")
                    else
                      L0_83.免root执行("rjz/a1", "未获取Root权限，进行免Root操作")
                    end
                  end
                end
                
              end
            else
              L2_41.km.Error = "检测到非法操作，请立即终止！"
            end
          else
            L2_41.km.Error = L3_42.u6ff965fab1e681396a8f8c5c07e52389
          end
        else
          L3_42 = L2_41.km
          L3_42.Error = "网络异常:" .. A0_39
        end
        L3_42 = L2_41.login
        L3_42.Text = "登录"
      end
      )
    end
  end
end

function L0_0.kmdismiss.onClick()
  local L0_84
  L0_84 = L0_0
  L0_84.import("android.provider.Settings$Secure")
  if L0_84.km.Text == "" then
    L0_84.km.Error = "卡密不可为空"
  else
    L0_84.kmdismiss.Text = "解绑中..."
    L0_84.Http.get(_UPVALUE3_ .. "/api/?id=kmdismiss&app=" .. "41285" .. "&" .. "data=" .. _UPVALUE2_("kami=" .. L0_84.km.Text .. "&markcode=" .. L0_84.Secure.getString(L0_84.activity.getContentResolver(), L0_84.Secure.ANDROID_ID) .. "&t=" .. L0_84.os.time() .. "&sign=" .. _UPVALUE1_("kami=" .. L0_84.km.Text .. "&markcode=" .. L0_84.Secure.getString(L0_84.activity.getContentResolver(), L0_84.Secure.ANDROID_ID) .. "&t=" .. L0_84.os.time() .. "&" .. "wf4f4f8def84766874d4690f4501a471") .. "&value=" .. L0_84.math.random(1000, 99999) .. L0_84.os.time(), "k468ccdbbff5b5e0196288f38e86800c2", true), function(A0_85, A1_86)
      local L2_87, L3_88
      L2_87 = L0_84
      L3_88 = _UPVALUE1_.decode
      L3_88 = L3_88(_UPVALUE2_(A1_86, "k468ccdbbff5b5e0196288f38e86800c2", false))
      if L3_88.code == 200 then
        L2_87.wToast("解绑成功\n当前卡密解绑次数剩余 " .. L3_88.msg.num .. " 次")
      else
        L2_87.km.Error = L3_88.msg
      end
      L2_87.kmdismiss.Text = "解绑"
    end
    )
  end
end

