Online Solidity Decompiler

« Decompile another contract

Address

0xd4fa166d5ffe8f78230fc05e6850881dc08b2da2 [etherscan.io | etherchain.org]

Public Methods

No public methods detected.

Internal Methods

func_003C()

Decompilation

This might be constructor bytecode - to get at the deployed contract, go back and remove the constructor prefix, usually up to the next 6060 or 6080.
contract Contract { function main() { memory[0x40:0x60] = 0x60; if (msg.data.length) { goto label_000A; } label_000A: var var0 = 0x90; var temp0; temp0, memory[0x60:0x60] = address(storage[0x00] & 0xffffffffffffffffffffffffffffffffffffffff).call.gas(0x00).value(msg.value)(memory[0x60:0x60]); if (!temp0) { memory[0x40:0x60] = var0; if (!msg.data.length) { goto label_000A; } else { goto label_000A; } } else { func_003C(); stop(); } } function func_003C() { var temp0 = memory[0x40:0x60]; memory[temp0:temp0 + 0x20] = storage[0x00] & 0xffffffffffffffffffffffffffffffffffffffff; memory[temp0 + 0x20:temp0 + 0x20 + 0x20] = msg.value; var temp1 = memory[0x40:0x60]; log(memory[temp1:temp1 + temp0 - temp1 + 0x40], [0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c]); } }

Disassembly

label_0000: // Inputs[1] { @0005 msg.data.length } 0000 60 PUSH1 0x60 0002 60 PUSH1 0x40 0004 52 MSTORE 0005 36 CALLDATASIZE 0006 15 ISZERO 0007 60 PUSH1 0x0a 0009 57 *JUMPI // Stack delta = +0 // Outputs[1] { @0004 memory[0x40:0x60] = 0x60 } // Block ends with conditional jump to 0x000a, if !msg.data.length label_000A: // Incoming jump from 0x0009, if !msg.data.length // Incoming jump from 0x0009, if !msg.data.length // Inputs[4] // { // @0010 storage[0x00] // @0028 msg.value // @0032 memory[0x60:0x60] // @0032 address(0xffffffffffffffffffffffffffffffffffffffff & storage[0x00]).call.gas(0x00).value(msg.value)(memory[0x60:0x60]) // } 000A 5B JUMPDEST 000B 60 PUSH1 0x90 000D 60 PUSH1 0x00 000F 80 DUP1 0010 54 SLOAD 0011 73 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 0026 16 AND 0027 90 SWAP1 0028 34 CALLVALUE 0029 60 PUSH1 0x60 002B 82 DUP3 002C 81 DUP2 002D 81 DUP2 002E 81 DUP2 002F 85 DUP6 0030 88 DUP9 0031 83 DUP4 0032 F1 CALL 0033 93 SWAP4 0034 50 POP 0035 50 POP 0036 50 POP 0037 50 POP 0038 15 ISZERO 0039 60 PUSH1 0x92 003B 57 *JUMPI // Stack delta = +1 // Outputs[2] // { // @000B stack[0] = 0x90 // @0032 memory[0x60:0x60] = address(0xffffffffffffffffffffffffffffffffffffffff & storage[0x00]).call.gas(0x00).value(msg.value)(memory[0x60:0x60]) // } // Block ends with conditional jump to 0x0092, if !address(0xffffffffffffffffffffffffffffffffffffffff & storage[0x00]).call.gas(0x00).value(msg.value)(memory[0x60:0x60]) label_003C: // Incoming call from 0x003B, returns to 0x0090, if not !address(0xffffffffffffffffffffffffffffffffffffffff & storage[0x00]).call.gas(0x00).value(msg.value)(memory[0x60:0x60]) // Inputs[6] // { // @003E storage[0x00] // @0042 memory[0x40:0x60] // @005D msg.value // @0064 memory[0x40:0x60] // @008E memory[memory[0x40:0x60]:memory[0x40:0x60] + 0x40 + (memory[0x40:0x60] - memory[0x40:0x60])] // @008F stack[-1] // } 003C 60 PUSH1 0x00 003E 54 SLOAD 003F 60 PUSH1 0x40 0041 80 DUP1 0042 51 MLOAD 0043 73 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 0058 90 SWAP1 0059 92 SWAP3 005A 16 AND 005B 82 DUP3 005C 52 MSTORE 005D 34 CALLVALUE 005E 60 PUSH1 0x20 0060 83 DUP4 0061 01 ADD 0062 52 MSTORE 0063 80 DUP1 0064 51 MLOAD 0065 7F PUSH32 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c 0086 92 SWAP3 0087 81 DUP2 0088 90 SWAP1 0089 03 SUB 008A 90 SWAP1 008B 91 SWAP2 008C 01 ADD 008D 90 SWAP1 008E A1 LOG1 008F 56 *JUMP // Stack delta = -1 // Outputs[3] // { // @005C memory[memory[0x40:0x60]:memory[0x40:0x60] + 0x20] = storage[0x00] & 0xffffffffffffffffffffffffffffffffffffffff // @0062 memory[memory[0x40:0x60] + 0x20:memory[0x40:0x60] + 0x20 + 0x20] = msg.value // @008E log(memory[memory[0x40:0x60]:memory[0x40:0x60] + 0x40 + (memory[0x40:0x60] - memory[0x40:0x60])], [0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c]); // } // Block ends with unconditional jump to stack[-1] label_0090: // Incoming return from call to 0x003C at 0x003B 0090 5B JUMPDEST 0091 00 *STOP // Stack delta = +0 // Outputs[1] { @0091 stop(); } // Block terminates label_0092: // Incoming jump from 0x003B, if !address(0xffffffffffffffffffffffffffffffffffffffff & storage[0x00]).call.gas(0x00).value(msg.value)(memory[0x60:0x60]) 0092 5B JUMPDEST 0093 60 PUSH1 0x02 0095 56 *JUMP // Stack delta = +0 // Block ends with unconditional jump to 0x0002
Found this site useful?
Donations are greatly appreciated!
ETH: 0xB3F04f0c276fa1177c1779f6E1E156B2738ea392
Contact/hire: [email protected]