Oko contract explorer
Contract

Code for 0x4f4e…2152 (Contract, bZx attack contract 1, bZx Exploit)

Since block 9484157

Panoramix decompilation

#
#  Panoramix 17 Feb 2020 
# 

def storage:
  stor0 is uint256 at storage 0
  stor0 is addr at storage 0

def _fallback() payable: # default function
  stop

def unknown7f5b002e(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == addr(_param1)
  return eth.balance(_param1)

def unknown363a7ef7(): # not payable
  if not addr(stor0):
      uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
  if addr(stor0) != tx.origin:
      revert with 0, 'bad origin'

def unknown746a5053(uint256 _param1, uint256 _param2) payable: 
  require calldata.size - 4 >=′ 64
  require _param1 == addr(_param1)
  require _param2 == _param2
  if not addr(stor0):
      uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
  if addr(stor0) != tx.origin:
      revert with 0, 'bad origin'
  create contract with 0 wei
                  code: 0xfe608060405234801561001057600080fd5b5060da8061001f6000396000f3fe608060405260043610601c5760003560e01c8063f2adf1cb14601e575b005b348015602957600080fd5b50601c60353660046050565b806001600160a01b0316ff5b8035604a816083565b92915050565b600060208284031215606157600080fd5b6000606b84846041565b949350505050565b60006001600160a01b038216604a565b608a816073565b8114609457600080fd5b5056fea365627a7a7231582002418c334d1aed8da2f2f5f053319e0c542be659c16228e886da830043f4c02a6c6578706572696d656e74616cf564736f6c634300051000
  if not create.new_address:
      revert with ext_call.return_data[0 len return_data.size]
  call addr(create.new_address) with:
     value _param2 wei
       gas 2300 * is_zero(value) wei
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require ext_code.size(addr(create.new_address))
  call addr(create.new_address).0xf2adf1cb with:
       gas gas_remaining wei
      args addr(_param1)
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  return 0, 64, 0

def unknown41fc3baf(uint256 _param1, array _param2, uint256 _param3) payable: 
  require calldata.size - 4 >=′ 96
  require _param1 == addr(_param1)
  require _param2 <= 18446744073709551615
  require _param2 + 35 <′ calldata.size
  require _param2.length <= 18446744073709551615
  require ceil32(_param2.length) + 128 >= 96 and ceil32(_param2.length) + 128 <= 18446744073709551615
  require _param2 + _param2.length + 36 <= calldata.size
  mem[128 len _param2.length] = _param2[all]
  mem[_param2.length + 128] = 0
  require _param3 == _param3
  if not addr(stor0):
      uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
  if addr(stor0) != tx.origin:
      revert with 0, 'bad origin'
  mem[ceil32(_param2.length) + 128 len ceil32(_param2.length)] = _param2[all], mem[_param2.length + 128 len ceil32(_param2.length) - _param2.length]
  if ceil32(_param2.length) > _param2.length:
      mem[ceil32(_param2.length) + _param2.length + 128] = 0
  call addr(_param1) with:
     funct Mask(32, -(8 * ceil32(_param2.length) + -_param2.length + 4) + 256, 0) >> -(8 * ceil32(_param2.length) + -_param2.length + 4) + 256
     value _param3 wei
       gas gas_remaining wei
      args mem[ceil32(_param2.length) + 132 len _param2.length - 4]
  if return_data.size:
      return bool(ext_call.success), Array(len=return_data.size, data=ext_call.return_data[0 len return_data.size])
  mem[ceil32(_param2.length) + 128] = bool(ext_call.success)
  mem[ceil32(_param2.length) + 160] = 64
  mem[ceil32(_param2.length) + 192] = _param2.length
  return Mask(8 * -ceil32(_param2.length) + _param2.length + 32, 0, 0), 
         mem[_param2.length + 160 len (2 * ceil32(_param2.length)) + -_param2.length + 64]

def unknown8b418713(uint256 _param1, uint256 _param2, uint256 _param3, array _param4): # not payable
  require calldata.size - 4 >=′ 128
  require _param1 == addr(_param1)
  require calldata.size - 36 >=′ 64
  require _param2 == addr(_param2)
  require _param3 == _param3
  mem[128] = _param3
  require _param4 <= 18446744073709551615
  require _param4 + 35 <′ calldata.size
  require _param4.length <= 18446744073709551615
  require ceil32(_param4.length) + 192 >= 160 and ceil32(_param4.length) + 192 <= 18446744073709551615
  mem[160] = _param4.length
  require _param4 + _param4.length + 36 <= calldata.size
  mem[192 len _param4.length] = _param4[all]
  mem[_param4.length + 192] = 0
  if not addr(stor0):
      uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
  if addr(stor0) != tx.origin:
      revert with 0, 'bad origin'
  mem[ceil32(_param4.length) + 192 len ceil32(_param4.length)] = _param4[all], mem[_param4.length + 192 len ceil32(_param4.length) - _param4.length]
  if ceil32(_param4.length) > _param4.length:
      mem[ceil32(_param4.length) + _param4.length + 192] = 0
  call this.address with:
     funct Mask(32, -(8 * ceil32(_param4.length) + -_param4.length + 4) + 256, 0) >> -(8 * ceil32(_param4.length) + -_param4.length + 4) + 256
       gas gas_remaining wei
      args mem[ceil32(_param4.length) + 196 len _param4.length - 4]
  if return_data.size:
      return bool(ext_call.success), Array(len=return_data.size, data=ext_call.return_data[0 len return_data.size])
  mem[ceil32(_param4.length) + 192] = bool(ext_call.success)
  mem[ceil32(_param4.length) + 224] = 64
  mem[ceil32(_param4.length) + 256] = _param2
  mem[ceil32(_param4.length) + 288 len ceil32(_param2)] = mem[128 len ceil32(_param2)]
  if ceil32(_param2) > _param2:
      mem[ceil32(_param4.length) + _param2 + 288] = 0
  return Mask(8 * -ceil32(_param4.length) + _param4.length + 32, 0, 0), 
         mem[_param4.length + 224 len ceil32(_param4.length) + -_param4.length + 32],
         _param2,
         mem[ceil32(_param4.length) + 288 len ceil32(_param2)]

def unknowna270ef06() payable: 
  require calldata.size - 4 >=′ 96
  require cd[4] <= 18446744073709551615
  require cd[4] + 35 <′ calldata.size
  require ('cd', 4).length <= 18446744073709551615
  require (32 * ('cd', 4).length) + 128 >= 96 and (32 * ('cd', 4).length) + 128 <= 18446744073709551615
  mem[96] = ('cd', 4).length
  require cd[4] + (32 * ('cd', 4).length) + 36 <= calldata.size
  idx = 0
  s = cd[4] + 36
  t = 128
  while idx < ('cd', 4).length:
      require cd[s] == addr(cd[s])
      mem[t] = cd[s]
      idx = idx + 1
      s = s + 32
      t = t + 32
      continue 
  require cd[36] <= 18446744073709551615
  require cd[36] + 35 <′ calldata.size
  require ('cd', 36).length <= 18446744073709551615
  require (32 * ('cd', 36).length) + 160 >= 128 and (32 * ('cd', 4).length) + (32 * ('cd', 36).length) + 160 <= 18446744073709551615
  mem[64] = (32 * ('cd', 4).length) + (32 * ('cd', 36).length) + 160
  mem[(32 * ('cd', 4).length) + 128] = ('cd', 36).length
  idx = 0
  s = cd[36] + 36
  t = (32 * ('cd', 4).length) + 160
  while idx < ('cd', 36).length:
      require cd[36] + cd[s] + 67 <′ calldata.size
      require cd[(cd[36] + cd[s] + 36)] <= 18446744073709551615
      _548 = mem[64]
      require mem[64] + ceil32(cd[(cd[36] + cd[s] + 36)]) + 32 >= mem[64] and mem[64] + ceil32(cd[(cd[36] + cd[s] + 36)]) + 32 <= 18446744073709551615
      mem[64] = mem[64] + ceil32(cd[(cd[36] + cd[s] + 36)]) + 32
      mem[_548] = cd[(cd[36] + cd[s] + 36)]
      require cd[36] + cd[s] + cd[(cd[36] + cd[s] + 36)] + 68 <= calldata.size
      mem[_548 + 32 len cd[(cd[36] + cd[s] + 36)]] = call.data[cd[36] + cd[s] + 68 len cd[(cd[36] + cd[s] + 36)]]
      mem[cd[(cd[36] + cd[s] + 36)] + _548 + 32] = 0
      mem[t] = _548
      idx = idx + 1
      s = s + 32
      t = t + 32
      continue 
  require cd[68] <= 18446744073709551615
  require cd[68] + 35 <′ calldata.size
  require ('cd', 68).length <= 18446744073709551615
  _549 = mem[64]
  require mem[64] + (32 * ('cd', 68).length) + 32 >= mem[64] and mem[64] + (32 * ('cd', 68).length) + 32 <= 18446744073709551615
  mem[64] = mem[64] + (32 * ('cd', 68).length) + 32
  mem[_549] = ('cd', 68).length
  require cd[68] + (32 * ('cd', 68).length) + 36 <= calldata.size
  idx = 0
  s = cd[68] + 36
  t = _549 + 32
  while idx < ('cd', 68).length:
      require cd[s] == cd[s]
      mem[t] = cd[s]
      idx = idx + 1
      s = s + 32
      t = t + 32
      continue 
  if addr(stor0):
      if addr(stor0) != tx.origin:
          revert with 0, 'bad origin'
      _821 = mem[96]
      _822 = mem[64]
      mem[mem[64]] = mem[96]
      mem[64] = mem[64] + (32 * _821) + 32
      if not _821:
          _1090 = mem[96]
          idx = 0
          while idx < _1090:
              require idx < mem[96]
              _1097 = mem[(32 * idx) + 128]
              require idx < mem[(32 * ('cd', 4).length) + 128]
              _1102 = mem[(32 * idx) + (32 * ('cd', 4).length) + 160]
              require idx < mem[_549]
              _1106 = mem[(32 * idx) + _549 + 32]
              if addr(stor0):
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1126 = mem[64]
                  _1137 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1137:
                      mem[s + _1126] = mem[s + _1102 + 32]
                      _1090 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1137) <= _1137:
                      call addr(_1097).mem[mem[64] len 4] with:
                         value _1106 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1137 + _1126 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1407 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1407] = bool(ext_call.success)
                      else:
                          _1372 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1372] = return_data.size
                          mem[_1372 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1409 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1372
                          mem[_1409] = bool(ext_call.success)
                  else:
                      mem[_1126 + _1137] = 0
                      call addr(_1097).mem[mem[64] len 4] with:
                         value _1106 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1137 + _1126 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1436 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1436] = bool(ext_call.success)
                      else:
                          _1387 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1387] = return_data.size
                          mem[_1387 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1438 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1387
                          mem[_1438] = bool(ext_call.success)
              else:
                  uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1132 = mem[64]
                  _1140 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1140:
                      mem[s + _1132] = mem[s + _1102 + 32]
                      _1090 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1140) <= _1140:
                      call addr(_1097).mem[mem[64] len 4] with:
                         value _1106 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1140 + _1132 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1413 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1413] = bool(ext_call.success)
                      else:
                          _1374 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1374] = return_data.size
                          mem[_1374 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1415 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1374
                          mem[_1415] = bool(ext_call.success)
                  else:
                      mem[_1132 + _1140] = 0
                      call addr(_1097).mem[mem[64] len 4] with:
                         value _1106 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1140 + _1132 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1442 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1442] = bool(ext_call.success)
                      else:
                          _1388 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1388] = return_data.size
                          mem[_1388 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1444 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1388
                          mem[_1444] = bool(ext_call.success)
              _1090 = mem[96]
              idx = idx + 1
              continue 
          _1096 = mem[64]
          mem[mem[64]] = 32
          _1108 = mem[_822]
          mem[mem[64] + 32] = mem[_822]
          idx = 0
          s = _822 + 32
          t = mem[64] + (32 * _1108) + 64
          u = mem[64] + 64
          while idx < _1108:
              mem[u] = t + -_1096 - 64
              _1354 = mem[s]
              mem[t] = bool(mem[mem[s]])
              _1386 = mem[_1354 + 32]
              mem[t + 32] = 64
              _1406 = mem[_1386]
              mem[t + 64] = mem[_1386]
              v = 0
              while v < _1406:
                  mem[v + t + 96] = mem[v + _1386 + 32]
                  v = v + 32
                  continue 
              if ceil32(_1406) > _1406:
                  mem[t + _1406 + 96] = 0
              idx = idx + 1
              s = s + 32
              t = t + ceil32(_1406) + 96
              u = u + 32
              continue 
      else:
          mem[64] = _822 + (32 * _821) + 96
          mem[_822 + (32 * _821) + 32] = 0
          mem[_822 + (32 * _821) + 64] = 96
          mem[var55001] = _822 + (32 * _821) + 32
          s = var55001
          idx = var55002
          while idx - 1:
              mem[64] = mem[64] + 64
              mem[_822 + (32 * _821) + 32] = 0
              mem[_822 + (32 * _821) + 64] = 96
              mem[s + 32] = _822 + (32 * _821) + 32
              s = s + 32
              idx = idx - 1
              continue 
          _1580 = mem[96]
          idx = 0
          while idx < _1580:
              require idx < mem[96]
              _1587 = mem[(32 * idx) + 128]
              require idx < mem[(32 * ('cd', 4).length) + 128]
              _1592 = mem[(32 * idx) + (32 * ('cd', 4).length) + 160]
              require idx < mem[_549]
              _1596 = mem[(32 * idx) + _549 + 32]
              if addr(stor0):
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1602 = mem[64]
                  _1609 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1609:
                      mem[s + _1602] = mem[s + _1592 + 32]
                      _1580 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1609) <= _1609:
                      call addr(_1587).mem[mem[64] len 4] with:
                         value _1596 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1609 + _1602 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1749 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1749] = bool(ext_call.success)
                      else:
                          _1726 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1726] = return_data.size
                          mem[_1726 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1751 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1726
                          mem[_1751] = bool(ext_call.success)
                  else:
                      mem[_1602 + _1609] = 0
                      call addr(_1587).mem[mem[64] len 4] with:
                         value _1596 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1609 + _1602 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1776 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1776] = bool(ext_call.success)
                      else:
                          _1735 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1735] = return_data.size
                          mem[_1735 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1778 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1735
                          mem[_1778] = bool(ext_call.success)
              else:
                  uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1606 = mem[64]
                  _1612 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1612:
                      mem[s + _1606] = mem[s + _1592 + 32]
                      _1580 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1612) <= _1612:
                      call addr(_1587).mem[mem[64] len 4] with:
                         value _1596 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1612 + _1606 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1755 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1755] = bool(ext_call.success)
                      else:
                          _1728 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1728] = return_data.size
                          mem[_1728 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1757 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1728
                          mem[_1757] = bool(ext_call.success)
                  else:
                      mem[_1606 + _1612] = 0
                      call addr(_1587).mem[mem[64] len 4] with:
                         value _1596 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1612 + _1606 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_822]
                          _1782 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = 96
                          mem[_1782] = bool(ext_call.success)
                      else:
                          _1736 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1736] = return_data.size
                          mem[_1736 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_822]
                          _1784 = mem[(32 * idx) + _822 + 32]
                          require idx < mem[_822]
                          mem[mem[(32 * idx) + _822 + 32] + 32] = _1736
                          mem[_1784] = bool(ext_call.success)
              _1580 = mem[96]
              idx = idx + 1
              continue 
          _1586 = mem[64]
          mem[mem[64]] = 32
          _1598 = mem[_822]
          mem[mem[64] + 32] = mem[_822]
          idx = 0
          s = _822 + 32
          t = mem[64] + (32 * _1598) + 64
          u = mem[64] + 64
          while idx < _1598:
              mem[u] = t + -_1586 - 64
              _1712 = mem[s]
              mem[t] = bool(mem[mem[s]])
              _1734 = mem[_1712 + 32]
              mem[t + 32] = 64
              _1748 = mem[_1734]
              mem[t + 64] = mem[_1734]
              v = 0
              while v < _1748:
                  mem[v + t + 96] = mem[v + _1734 + 32]
                  v = v + 32
                  continue 
              if ceil32(_1748) > _1748:
                  mem[t + _1748 + 96] = 0
              idx = idx + 1
              s = s + 32
              t = t + ceil32(_1748) + 96
              u = u + 32
              continue 
  else:
      uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
      if addr(stor0) != tx.origin:
          revert with 0, 'bad origin'
      _824 = mem[96]
      _825 = mem[64]
      mem[mem[64]] = mem[96]
      mem[64] = mem[64] + (32 * _824) + 32
      if not _824:
          _1091 = mem[96]
          idx = 0
          while idx < _1091:
              require idx < mem[96]
              _1100 = mem[(32 * idx) + 128]
              require idx < mem[(32 * ('cd', 4).length) + 128]
              _1104 = mem[(32 * idx) + (32 * ('cd', 4).length) + 160]
              require idx < mem[_549]
              _1107 = mem[(32 * idx) + _549 + 32]
              if addr(stor0):
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1129 = mem[64]
                  _1139 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1139:
                      mem[s + _1129] = mem[s + _1104 + 32]
                      _1091 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1139) <= _1139:
                      call addr(_1100).mem[mem[64] len 4] with:
                         value _1107 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1139 + _1129 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1421 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1421] = bool(ext_call.success)
                      else:
                          _1379 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1379] = return_data.size
                          mem[_1379 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1423 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1379
                          mem[_1423] = bool(ext_call.success)
                  else:
                      mem[_1129 + _1139] = 0
                      call addr(_1100).mem[mem[64] len 4] with:
                         value _1107 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1139 + _1129 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1448 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1448] = bool(ext_call.success)
                      else:
                          _1392 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1392] = return_data.size
                          mem[_1392 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1450 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1392
                          mem[_1450] = bool(ext_call.success)
              else:
                  uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1134 = mem[64]
                  _1142 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1142:
                      mem[s + _1134] = mem[s + _1104 + 32]
                      _1091 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1142) <= _1142:
                      call addr(_1100).mem[mem[64] len 4] with:
                         value _1107 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1142 + _1134 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1427 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1427] = bool(ext_call.success)
                      else:
                          _1381 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1381] = return_data.size
                          mem[_1381 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1429 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1381
                          mem[_1429] = bool(ext_call.success)
                  else:
                      mem[_1134 + _1142] = 0
                      call addr(_1100).mem[mem[64] len 4] with:
                         value _1107 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1142 + _1134 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1454 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1454] = bool(ext_call.success)
                      else:
                          _1393 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1393] = return_data.size
                          mem[_1393 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1456 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1393
                          mem[_1456] = bool(ext_call.success)
              _1091 = mem[96]
              idx = idx + 1
              continue 
          _1099 = mem[64]
          mem[mem[64]] = 32
          _1110 = mem[_825]
          mem[mem[64] + 32] = mem[_825]
          idx = 0
          s = _825 + 32
          t = mem[64] + (32 * _1110) + 64
          u = mem[64] + 64
          while idx < _1110:
              mem[u] = t + -_1099 - 64
              _1357 = mem[s]
              mem[t] = bool(mem[mem[s]])
              _1391 = mem[_1357 + 32]
              mem[t + 32] = 64
              _1420 = mem[_1391]
              mem[t + 64] = mem[_1391]
              v = 0
              while v < _1420:
                  mem[v + t + 96] = mem[v + _1391 + 32]
                  v = v + 32
                  continue 
              if ceil32(_1420) > _1420:
                  mem[t + _1420 + 96] = 0
              idx = idx + 1
              s = s + 32
              t = t + ceil32(_1420) + 96
              u = u + 32
              continue 
      else:
          mem[64] = _825 + (32 * _824) + 96
          mem[_825 + (32 * _824) + 32] = 0
          mem[_825 + (32 * _824) + 64] = 96
          mem[var56001] = _825 + (32 * _824) + 32
          s = var56001
          idx = var56002
          while idx - 1:
              mem[64] = mem[64] + 64
              mem[_825 + (32 * _824) + 32] = 0
              mem[_825 + (32 * _824) + 64] = 96
              mem[s + 32] = _825 + (32 * _824) + 32
              s = s + 32
              idx = idx - 1
              continue 
          _1581 = mem[96]
          idx = 0
          while idx < _1581:
              require idx < mem[96]
              _1590 = mem[(32 * idx) + 128]
              require idx < mem[(32 * ('cd', 4).length) + 128]
              _1594 = mem[(32 * idx) + (32 * ('cd', 4).length) + 160]
              require idx < mem[_549]
              _1597 = mem[(32 * idx) + _549 + 32]
              if addr(stor0):
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1604 = mem[64]
                  _1611 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1611:
                      mem[s + _1604] = mem[s + _1594 + 32]
                      _1581 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1611) <= _1611:
                      call addr(_1590).mem[mem[64] len 4] with:
                         value _1597 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1611 + _1604 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1762 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1762] = bool(ext_call.success)
                      else:
                          _1730 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1730] = return_data.size
                          mem[_1730 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1764 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1730
                          mem[_1764] = bool(ext_call.success)
                  else:
                      mem[_1604 + _1611] = 0
                      call addr(_1590).mem[mem[64] len 4] with:
                         value _1597 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1611 + _1604 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1788 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1788] = bool(ext_call.success)
                      else:
                          _1738 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1738] = return_data.size
                          mem[_1738 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1790 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1738
                          mem[_1790] = bool(ext_call.success)
              else:
                  uint256(stor0) = tx.origin or Mask(96, 160, uint256(stor0))
                  if addr(stor0) != tx.origin:
                      revert with 0, 'bad origin'
                  _1607 = mem[64]
                  _1613 = mem[mem[(32 * idx) + (32 * ('cd', 4).length) + 160]]
                  s = 0
                  while s < _1613:
                      mem[s + _1607] = mem[s + _1594 + 32]
                      _1581 = mem[96]
                      s = s + 32
                      continue 
                  if ceil32(_1613) <= _1613:
                      call addr(_1590).mem[mem[64] len 4] with:
                         value _1597 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1613 + _1607 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1768 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1768] = bool(ext_call.success)
                      else:
                          _1732 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1732] = return_data.size
                          mem[_1732 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1770 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1732
                          mem[_1770] = bool(ext_call.success)
                  else:
                      mem[_1607 + _1613] = 0
                      call addr(_1590).mem[mem[64] len 4] with:
                         value _1597 wei
                           gas gas_remaining wei
                          args mem[mem[64] + 4 len _1613 + _1607 + -mem[64] - 4]
                      if not return_data.size:
                          require idx < mem[_825]
                          _1794 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = 96
                          mem[_1794] = bool(ext_call.success)
                      else:
                          _1739 = mem[64]
                          mem[64] = mem[64] + ceil32(return_data.size) + 1
                          mem[_1739] = return_data.size
                          mem[_1739 + 32 len return_data.size] = ext_call.return_data[0 len return_data.size]
                          require idx < mem[_825]
                          _1796 = mem[(32 * idx) + _825 + 32]
                          require idx < mem[_825]
                          mem[mem[(32 * idx) + _825 + 32] + 32] = _1739
                          mem[_1796] = bool(ext_call.success)
              _1581 = mem[96]
              idx = idx + 1
              continue 
          _1589 = mem[64]
          mem[mem[64]] = 32
          _1599 = mem[_825]
          mem[mem[64] + 32] = mem[_825]
          idx = 0
          s = _825 + 32
          t = mem[64] + (32 * _1599) + 64
          u = mem[64] + 64
          while idx < _1599:
              mem[u] = t + -_1589 - 64
              _1715 = mem[s]
              mem[t] = bool(mem[mem[s]])
              _1737 = mem[_1715 + 32]
              mem[t + 32] = 64
              _1761 = mem[_1737]
              mem[t + 64] = mem[_1737]
              v = 0
              while v < _1761:
                  mem[v + t + 96] = mem[v + _1737 + 32]
                  v = v + 32
                  continue 
              if ceil32(_1761) > _1761:
                  mem[t + _1761 + 96] = 0
              idx = idx + 1
              s = s + 32
              t = t + ceil32(_1761) + 96
              u = u + 32
              continue 
  return memory
    from mem[64]
     len t - mem[64]

Decompilation generated by Panoramix.

Raw bytecode

0x6080604052600436106100555760003560e01c8063363a7ef71461005757806341fc3baf1461006c578063746a5053146100965780637f5b002e146100a95780638b418713146100d6578063a270ef06146100f6575b005b34801561006357600080fd5b50610055610116565b61007f61007a366004610617565b61016e565b60405161008d92919061092a565b60405180910390f35b61007f6100a436600461067c565b6101e2565b3480156100b557600080fd5b506100c96100c43660046105f1565b6102b9565b60405161008d919061095a565b3480156100e257600080fd5b5061007f6100f13660046106b6565b6102c6565b610109610104366004610711565b6102ec565b60405161008d9190610919565b6000546001600160a01b031661013957600080546001600160a01b031916321790555b6000546001600160a01b0316321461016c5760405162461bcd60e51b81526004016101639061094a565b60405180910390fd5b565b6000606061017a610116565b846001600160a01b0316838560405161019391906108ff565b60006040518083038185875af1925050503d80600081146101d0576040519150601f19603f3d011682016040523d82523d6000602084013e6101d5565b606091505b5091509150935093915050565b600060606101ee610116565b60006040516101fc906103cf565b604051809103906000f080158015610218573d6000803e3d6000fd5b506040519091506001600160a01b0382169085156108fc029086906000818181858888f19350505050158015610252573d6000803e3d6000fd5b5060405163f2adf1cb60e01b81526001600160a01b0382169063f2adf1cb9061027f90889060040161090b565b600060405180830381600087803b15801561029957600080fd5b505af11580156102ad573d6000803e3d6000fd5b50505050509250929050565b6001600160a01b03163190565b600060606102d2610116565b306001600160a01b031660008460405161019391906108ff565b60606102f6610116565b835160405190808252806020026020018201604052801561033157816020015b61031e6103db565b8152602001906001900390816103165790505b50905060005b84518110156103c75761038485828151811061034f57fe5b602002602001015185838151811061036357fe5b602002602001015185848151811061037757fe5b602002602001015161016e565b835184908490811061039257fe5b60200260200101516000018484815181106103a957fe5b60209081029190910181015101919091529015159052600101610337565b509392505050565b60f980610a7683390190565b60408051808201909152600081526060602082015290565b80356103fe81610a55565b92915050565b600082601f83011261041557600080fd5b81356104286104238261098f565b610968565b9150818183526020840193506020810190508385602084028201111561044d57600080fd5b60005b83811015610479578161046388826103f3565b8452506020928301929190910190600101610450565b5050505092915050565b600082601f83011261049457600080fd5b81356104a26104238261098f565b81815260209384019390925082018360005b8381101561047957813586016104ca8882610550565b84525060209283019291909101906001016104b4565b600082601f8301126104f157600080fd5b81356104ff6104238261098f565b9150818183526020840193506020810190508385602084028201111561052457600080fd5b60005b83811015610479578161053a88826105e6565b8452506020928301929190910190600101610527565b600082601f83011261056157600080fd5b813561056f610423826109b0565b9150808252602083016020830185838301111561058b57600080fd5b610596838284610a0f565b50505092915050565b6000604082840312156105b157600080fd5b6105bb6040610968565b905060006105c984846103f3565b82525060206105da848483016105e6565b60208301525092915050565b80356103fe81610a6c565b60006020828403121561060357600080fd5b600061060f84846103f3565b949350505050565b60008060006060848603121561062c57600080fd5b600061063886866103f3565b935050602084013567ffffffffffffffff81111561065557600080fd5b61066186828701610550565b9250506040610672868287016105e6565b9150509250925092565b6000806040838503121561068f57600080fd5b600061069b85856103f3565b92505060206106ac858286016105e6565b9150509250929050565b6000806000608084860312156106cb57600080fd5b60006106d786866103f3565b93505060206106e88682870161059f565b925050606084013567ffffffffffffffff81111561070557600080fd5b61067286828701610550565b60008060006060848603121561072657600080fd5b833567ffffffffffffffff81111561073d57600080fd5b61074986828701610404565b935050602084013567ffffffffffffffff81111561076657600080fd5b61077286828701610483565b925050604084013567ffffffffffffffff81111561078f57600080fd5b610672868287016104e0565b60006107a783836108c1565b9392505050565b6107b7816109f0565b82525050565b60006107c8826109de565b6107d281856109e2565b9350836020820285016107e4856109d8565b8060005b8581101561081e5784840389528151610801858261079b565b945061080c836109d8565b60209a909a01999250506001016107e8565b5091979650505050505050565b6107b7816109fb565b600061083f826109de565b61084981856109e2565b9350610859818560208601610a1b565b61086281610a4b565b9093019392505050565b6000610877826109de565b61088181856109eb565b9350610891818560208601610a1b565b9290920192915050565b60006108a8600a836109e2565b693130b21037b934b3b4b760b11b815260200192915050565b805160009060408401906108d5858261082b565b50602083015184820360208601526108ed8282610834565b95945050505050565b6107b781610a0c565b60006107a7828461086c565b602081016103fe82846107ae565b602080825281016107a781846107bd565b60408101610938828561082b565b818103602083015261060f8184610834565b602080825281016103fe8161089b565b602081016103fe82846108f6565b60405181810167ffffffffffffffff8111828210171561098757600080fd5b604052919050565b600067ffffffffffffffff8211156109a657600080fd5b5060209081020190565b600067ffffffffffffffff8211156109c757600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b919050565b60006103fe82610a00565b151590565b6001600160a01b031690565b90565b82818337506000910152565b60005b83811015610a36578181015183820152602001610a1e565b83811115610a45576000848401525b50505050565b601f01601f191690565b610a5e816109f0565b8114610a6957600080fd5b50565b610a5e81610a0c56fe608060405234801561001057600080fd5b5060da8061001f6000396000f3fe608060405260043610601c5760003560e01c8063f2adf1cb14601e575b005b348015602957600080fd5b50601c60353660046050565b806001600160a01b0316ff5b8035604a816083565b92915050565b600060208284031215606157600080fd5b6000606b84846041565b949350505050565b60006001600160a01b038216604a565b608a816073565b8114609457600080fd5b5056fea365627a7a7231582002418c334d1aed8da2f2f5f053319e0c542be659c16228e886da830043f4c02a6c6578706572696d656e74616cf564736f6c63430005100040a365627a7a723158205f7ad8c325f51b446360861264833c79f442a57cb5c62deae252515f1358fbc66c6578706572696d656e74616cf564736f6c63430005100040