1

I am writing to understand the functionality of this contract (https://etherscan.io/address/0x1f14b77e9f4844889fa63bc1e5180c8b90ec18db), this does not look even "functional" to me.

Here is the decompiled output this contract with JEB3:

contract DecompiledContract {
    function start() {
        *0x40 = 0x60;
        var0 = msg.data.length;

        if(var0 != 0x0) {
            var0 = (uint256)$msg.sig;

            if(var0 == 0x41c0e1b5) {
                kill();
            }

            if(var0 == 0xe5225381) {
                collect();
            }
        }

        if($msg.value > 0x0) {
            var2 = msg.sender;
            uint256* var6 = *0x40;
            *var6 = $msg.value;
            emit Deposit(*0x40, var6 + 1 - *0x40);
        }

        stop();
    }

    function kill() public payable {
        __impl_kill();
        stop();
    }

    function collect() public payable {
        __impl_collect();
        stop();
    }

   function __impl_kill() private {
        var1 = storage[0x0];
        int256 var0 = var1;
        var1 = msg.sender;

        if((address(var0)) == (address(msg.sender))) {
            var1 = storage[0x0];
            suicide(address(var1));
        }
    }

    function __impl_collect() private {
        var1 = storage[0x0];
        int256 var0 = var1;
        var1 = msg.sender;

        if((address(var0)) == (address(msg.sender))) {
            var1 = storage[0x0];
            var2 = address(this);
            var2 = balance(address(var2));
            uint256 var5 = *0x40;
            var4 = call(0x0, address(var1), var2, var5, *0x40 - var5, var5, 0x0);
        }
    }

}

It seems to me that this contract is performing some fund collection (like shown in the fallback function), and when the owner calls the collect function, the fund will all be transferred to the owner.

However, the major confusion is that there is no deposit operation. I tried to search for EVM opcode sstore in the disassembled output, but just cannot find one. Without a sstore, how can it deposit to the global storage? Am I missed anything here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.