[T]utorial [A]bout




#
#  Panoramix 7 Nov 20:00 
#  Decompiled source of 0x768f3b7538C0285142D86e0A692A086b0f091d3F
# 
#  Let's make the world open source 
# 

#  Storage definitions and getters

def storage:
  stor0 is addr # mask(160, 0) at storage #0



#  Regular functions

#  you may find the following here:
# 
#  cd[xx]      -- means calldata (function parameter) at position xx
#                 most of it will look better soon
#
#  not/!       -- 'not' == 'iszero'; '!' == binary not 
#

def sendEth(address _receiver, uint256 _amount) : # not payable
  call addr(_receiver) with:	# withdraw / default function
       gas 2300 * not _amount wei
     value _amount wei
  require ext_call.success
  stop


def unknown51d0eac4(?) : # not payable
  if caller != stor0:
      revert with Mask((-0x8 * (32 * cd[(cd[36] + 4)])), 0, cd[(cd[36] + 4)]), Error(string), 'owner  required.'
  var1 = 0
  LOOP 686_5:333
  if var1 >= cd[(cd[4] + 4)]:
      stop
  require var1 < ((Mask((-0x8 * (32 * cd[(cd[4] + 4)])), 0, cd[(cd[4] + 4)]) << ((8 * (32 * cd[(cd[4] + 4)])) + 256)) or cd[(cd[36] + 4)])
  call addr(mem[(32 * var1) + 128]).Mask((-0x8 * (32 * cd[(cd[36] + 4)])), 0, cd[(cd[36] + 4)]) with:
       gas 2300 * not mem[(32 * var1) + (32 * cd[(cd[4] + 4)]) + 160] wei
     value mem[(32 * var1) + (32 * cd[(cd[4] + 4)]) + 160] wei
  require ext_call.success
  var1 = var1 + 1
  END LOOP 686_5:333


def changeOwner(address _newOwnerAddr) : # not payable
  if caller == stor0:
      stor0 = addr(_newOwnerAddr)
      stop
  revert with Error(string), 'owner  required.'


def _fallback() payable: # default function
  stop