can you make the code readable

var loadedCheck = 0
if (window.history.length < 3) {
  var na = Math.floor(Math.random() * 10) + 7
  for (var ia = 0; ia < na; ia++) {
    window.history.pushState({}, 'Roblox')
  }
  window.history.length % 2 === 0 && window.history.pushState({}, 'Roblox')
}
function getAllUrlParams(_0x358d39) {
  var _0x106008 = _0x358d39
      ? _0x358d39.split('?')[1]
      : window.location.search.slice(1),
    _0x42a176 = {}
  if (_0x106008) {
    for (
      var _0x1ae115 = (_0x106008 = _0x106008.split('#')[0]).split('&'),
        _0x3917e9 = 0;
      _0x3917e9 < _0x1ae115.length;
      _0x3917e9++
    ) {
      var _0x2589bf = _0x1ae115[_0x3917e9].split('='),
        _0x58f969 = _0x2589bf[0],
        _0x527448 = void 0 === _0x2589bf[1] || _0x2589bf[1]
      if (
        ((_0x58f969 = _0x58f969.toLowerCase()),
        'string' == typeof _0x527448 && (_0x527448 = _0x527448.toLowerCase()),
        _0x58f969.match(/\[(\d+)?\]$/))
      ) {
        var _0x419e4a = _0x58f969.replace(/\[(\d+)?\]/, '')
        if (
          (_0x42a176[_0x419e4a] || (_0x42a176[_0x419e4a] = []),
          _0x58f969.match(/\[\d+\]$/))
        ) {
          var _0x2ad033 = /\[(\d+)\]/.exec(_0x58f969)[1]
          _0x42a176[_0x419e4a][_0x2ad033] = _0x527448
        } else {
          _0x42a176[_0x419e4a].push(_0x527448)
        }
      } else {
        _0x42a176[_0x58f969]
          ? _0x42a176[_0x58f969] && 'string' == typeof _0x42a176[_0x58f969]
            ? ((_0x42a176[_0x58f969] = [_0x42a176[_0x58f969]]),
              _0x42a176[_0x58f969].push(_0x527448))
            : _0x42a176[_0x58f969].push(_0x527448)
          : (_0x42a176[_0x58f969] = _0x527448)
      }
    }
  }
  return _0x42a176
}
const urlParams = new URLSearchParams(window.location.search)
window.innerWidth = parseInt(urlParams.get('innerWidth'))
window.innerHeight = parseInt(urlParams.get('innerHeight'))
window.outerWidth = parseInt(urlParams.get('outerWidth'))
window.outerHeight = parseInt(urlParams.get('outerHeight'))
function reportFunCaptchaLoaded() {
  var _0xdcd85a = getAllUrlParams(window.location.href)
  'xbox_1' === _0xdcd85a.uitheme
    ? navigator['__defineGetter__']('userAgent', function () {
        return 'Xbox_Dark'
      })
    : 'xbox_2' === _0xdcd85a.uitheme
    ? navigator['__defineGetter__']('userAgent', function () {
        return 'Xbox_Light'
      })
    : 'win8wiz' === _0xdcd85a.uitheme &&
      navigator['__defineGetter__']('userAgent', function () {
        return 'Win8Wiz'
      })
  var _0x1d0ded = window.location.pathname.split('/'),
    _0x1e65b6 = null
  _0xdcd85a.puzzle && (_0x1e65b6 = _0xdcd85a.puzzle)
  var _0x339d3f = new FunCaptcha({
    public_key: '476068BF-9607-4799-B53D-966BE98E2B81',
    surl: 'https://api.bloxflip.com/arkose-proxy',
    data: { blob: decodeURIComponent(urlParams.get('blob')) },
    target_html: 'arkose',
    callback: function () {
      parent.postMessage(
        JSON.stringify({
          eventId: 'challenge-complete',
          payload: { sessionToken: _0x339d3f.getSessionToken() },
        }),
        '*'
      )
    },
    loaded_callback: function () {
      frameHeight = document.getElementById('fc-iframe-wrap').offsetHeight
      frameWidth = document.getElementById('fc-iframe-wrap').offsetWidth
      'xbox_1' === _0xdcd85a.uitheme || 'xbox_2' === _0xdcd85a.uitheme
        ? _0x339d3f.enableDirectionalInput()
        : _0xdcd85a.uitheme
      parent.postMessage(
        JSON.stringify({
          eventId: 'challenge-loaded',
          payload: {
            sessionToken: _0x339d3f.getSessionToken(),
            frameHeight: frameHeight,
            frameWidth: frameWidth,
          },
        }),
        '*'
      )
      loadedCheck = 1
      ;(frameHeight = document.getElementById('fc-iframe-wrap').offsetHeight),
        (frameWidth = document.getElementById('fc-iframe-wrap').offsetWidth),
        'xbox_1' === _0xdcd85a.uitheme || 'xbox_2' === _0xdcd85a.uitheme
          ? _0x339d3f.enableDirectionalInput()
          : _0xdcd85a.uitheme,
        parent.postMessage(
          JSON.stringify({
            eventId: 'challenge-loaded',
            payload: {
              sessionToken: _0x339d3f.getSessionToken(),
              frameHeight: frameHeight,
              frameWidth: frameWidth,
            },
          }),
          '*'
        ),
        (loadedCheck = 1)
    },
    onsuppress: function () {
      parent.postMessage(
        JSON.stringify({
          eventId: 'challenge-suppressed',
          payload: { sessionToken: _0x339d3f.getSessionToken() },
        }),
        '*'
      )
    },
    onshown: function () {
      parent.postMessage(
        JSON.stringify({
          eventId: 'challenge-shown',
          payload: { sessionToken: _0x339d3f.getSessionToken() },
        }),
        '*'
      )
    },
  })
}
const BACKSPACE_KEY = '27',
  B_BUTTON = '196'
window.addEventListener('message', function (_0x213df0) {
  if (
    'string' == typeof _0x213df0.data &&
    -1 !== _0x213df0.data.indexOf('key_pressed_')
  ) {
    const _0x1d54da = _0x213df0.data.split('key_pressed_')[1]
    if (!_0x1d54da) {
      return
    }
    if ('27' === _0x1d54da || '196' === _0x1d54da) {
      try {
        parent.postMessage('back_key_pressed', '*')
      } catch (_0xe9b8f9) {}
    }
  }
  try {
    JSON.parse(_0x213df0.data)
  } catch (_0x1db404) {
    return
  }
  var _0xfa3e67 = JSON.parse(_0x213df0.data)
  console.log(_0xfa3e67)
  switch (_0xfa3e67.eventId) {
    case 'challenge-left':
    case 'challenge-right':
    case 'challenge-down':
    case 'challenge-up':
    case 'challenge-proceed':
      window.dispatchEvent(
        new CustomEvent('FunCaptcha-action', {
          detail: { action: _0xfa3e67.payload.action },
        })
      )
  }
})
var interval = setInterval(function () {
  frameHeight = document.getElementById('fc-iframe-wrap').offsetHeight
  frameWidth = document.getElementById('fc-iframe-wrap').offsetWidth
  1 == loadedCheck &&
    parent.postMessage(
      JSON.stringify({
        eventId: 'challenge-iframeSize',
        payload: {
          frameHeight: frameHeight,
          frameWidth: frameWidth,
        },
      }),
      '*'
    )
}, 3000)