反编译 Solidity

mail@pastecode.io avatar
unknown
java
a year ago
20 kB
3
Indexable
Never
contract Contract {
    function main() {
        memory[0x40:0x60] = 0x80;
        var var0 = msg.value;
    
        if (var0) { revert(memory[0x00:0x00]); }
    
        if (msg.data.length < 0x04) { revert(memory[0x00:0x00]); }
    
        var0 = msg.data[0x00:0x20] >> 0xe0;
    
        if (0x4c295ca3 > var0) {
            if (0x24d7806c > var0) {
                if (var0 == 0x12d43a51) {
                    // Dispatch table entry for gov()
                    var var1 = 0x010d;
                    var var2 = storage[0x00] & (0x01 << 0xa0) - 0x01;
                
                label_010D:
                    var temp0 = memory[0x40:0x60];
                    memory[temp0:temp0 + 0x20] = var2 & (0x01 << 0xa0) - 0x01;
                    var2 = temp0 + 0x20;
                
                label_0121:
                    var temp1 = memory[0x40:0x60];
                    return memory[temp1:temp1 + var2 - temp1];
                } else if (var0 == 0x20aa1b80) {
                    // Dispatch table entry for setLatestAnswer(uint256)
                    var1 = 0x013d;
                    var2 = 0x0138;
                    var var3 = msg.data.length;
                    var var4 = 0x04;
                    var2 = func_05C7(var3, var4);
                    func_0138(var2);
                    stop();
                } else if (var0 == 0x245a7bfc) {
                    // Dispatch table entry for aggregator()
                    var1 = 0x010d;
                    var2 = storage[0x01] & (0x01 << 0xa0) - 0x01;
                    goto label_010D;
                } else { revert(memory[0x00:0x00]); }
            } else if (var0 == 0x24d7806c) {
                // Dispatch table entry for isAdmin(address)
                var1 = 0x0175;
                var2 = 0x0160;
                var3 = msg.data.length;
                var4 = 0x04;
                var var5 = 0x00;
            
                if (var3 - var4 i< 0x20) { revert(memory[0x00:0x00]); }
            
                var var6 = 0x0617;
                var var7 = var4;
                var6 = isAdmin(var7);
                var2 = var6;
                // Error: Could not resolve jump destination!
            } else if (var0 == 0x313ce567) {
                // Dispatch table entry for decimals()
                var1 = 0x018e;
                var2 = storage[0x04];
            
            label_018E:
                var temp2 = memory[0x40:0x60];
                memory[temp2:temp2 + 0x20] = var2;
                var2 = temp2 + 0x20;
                goto label_0121;
            } else if (var0 == 0x356cb32c) {
                // Dispatch table entry for 0x356cb32c (unknown)
                var1 = 0x018e;
                var2 = 0x01aa;
                var3 = msg.data.length;
                var4 = 0x04;
                var2 = func_061E(var3, var4);
                var2 = func_01AA(var2);
                goto label_018E;
            } else if (var0 == 0x4b0bddd2) {
                // Dispatch table entry for setAdmin(address,bool)
                var1 = 0x013d;
                var2 = 0x01ca;
                var3 = msg.data.length;
                var4 = 0x04;
                var2, var3 = func_0647(var3, var4);
                func_01CA(var2, var3);
                stop();
            } else { revert(memory[0x00:0x00]); }
        } else if (0x85bb7d69 > var0) {
            if (var0 == 0x4c295ca3) {
                // Dispatch table entry for 0x4c295ca3 (unknown)
                var1 = 0x018e;
                var2 = 0x01dd;
                var3 = msg.data.length;
                var4 = 0x04;
                var2 = func_061E(var3, var4);
                var2 = func_01DD(var2);
                goto label_018E;
            } else if (var0 == 0x50d25bcd) {
                // Dispatch table entry for latestAnswer()
                var1 = storage[0x02];
                goto label_018E;
            } else if (var0 == 0x668a0f02) {
                // Dispatch table entry for latestRound()
                var1 = storage[0x05] & (0x01 << 0x50) - 0x01;
            
            label_0204:
                var temp3 = memory[0x40:0x60];
                memory[temp3:temp3 + 0x20] = var1 & (0x01 << 0x50) - 0x01;
                var1 = temp3 + 0x20;
                goto label_0121;
            } else if (var0 == 0x7284e416) {
                // Dispatch table entry for description()
                var1 = 0x0224;
                var2 = func_042E();
                var temp4 = var2;
                var2 = 0x0121;
                var3 = temp4;
                var4 = memory[0x40:0x60];
                var2 = func_0683(var3, var4);
                goto label_0121;
            } else { revert(memory[0x00:0x00]); }
        } else if (var0 == 0x85bb7d69) {
            // Dispatch table entry for answer()
            var1 = 0x018e;
            var2 = storage[0x02];
            goto label_018E;
        } else if (var0 == 0x8cd221c9) {
            // Dispatch table entry for roundId()
            var1 = 0x0204;
            var2 = storage[0x05] & (0x01 << 0x50) - 0x01;
            goto label_0204;
        } else if (var0 == 0x90c3f38f) {
            // Dispatch table entry for setDescription(string)
            var1 = 0x013d;
            var2 = 0x025b;
            var3 = msg.data.length;
            var4 = 0x04;
            var2 = func_06EE(var3, var4);
            memory[0x00:0x20] = msg.sender;
            memory[0x20:0x40] = 0x08;
        
            if (storage[keccak256(memory[0x00:0x40])] & 0xff) {
                var temp5 = var2;
                var3 = 0x04fe;
                var4 = 0x03;
                var6 = memory[temp5:temp5 + 0x20];
                var5 = temp5 + 0x20;
                var7 = var4;
                var var8 = 0x053a;
                var var9 = storage[var7];
                var8 = func_0806(var9);
                memory[0x00:0x20] = var7;
                var7 = keccak256(memory[0x00:0x20]);
                var temp6 = var5;
                var5 = var7 + (var8 + 0x1f) / 0x20;
                var8 = temp6;
            
                if (!var6) {
                    storage[var4] = 0x00;
                    goto label_05A2;
                } else if (0x1f < var6) {
                    var temp7 = var6;
                    storage[var4] = temp7 + temp7 + 0x01;
                
                    if (!temp7) {
                    label_05A2:
                        var temp8 = var5;
                        var5 = 0x05ae;
                        var6 = temp8;
                        var5 = func_05B2(var6, var7);
                        var3 = var4;
                        // Error: Could not resolve jump destination!
                    } else {
                        var temp9 = var6;
                        var temp10 = var8;
                        var6 = temp10;
                        var8 = var6 + temp9;
                    
                        if (var8 <= var6) { goto label_05A2; }
                    
                    label_0590:
                        var temp11 = var6;
                        var temp12 = var7;
                        storage[temp12] = memory[temp11:temp11 + 0x20];
                        var6 = temp11 + 0x20;
                        var8 = var8;
                        var7 = temp12 + 0x01;
                    
                        if (var8 <= var6) { goto label_05A2; }
                        else { goto label_0590; }
                    }
                } else {
                    var temp13 = var6;
                    storage[var4] = temp13 + temp13 | (memory[var8:var8 + 0x20] & ~0xff);
                    goto label_05A2;
                }
            } else {
                var temp14 = memory[0x40:0x60];
                memory[temp14:temp14 + 0x20] = 0x461bcd << 0xe5;
                var4 = temp14 + 0x04;
                var3 = 0x0307;
                var3 = func_079F(var4);
                var temp15 = memory[0x40:0x60];
                revert(memory[temp15:temp15 + var3 - temp15]);
            }
        } else if (var0 == 0x9a6fc8f5) {
            // Dispatch table entry for getRoundData(uint80)
            var1 = 0x02a4;
            var2 = 0x026e;
            var3 = msg.data.length;
            var4 = 0x04;
            var2 = func_061E(var3, var4);
            var1, var2, var3, var4, var5 = func_026E(var2);
            var temp16 = memory[0x40:0x60];
            var temp17 = (0x01 << 0x50) - 0x01;
            memory[temp16:temp16 + 0x20] = temp17 & var1;
            memory[temp16 + 0x20:temp16 + 0x20 + 0x20] = var2;
            memory[temp16 + 0x40:temp16 + 0x40 + 0x20] = var3;
            memory[temp16 + 0x60:temp16 + 0x60 + 0x20] = var4;
            memory[temp16 + 0x80:temp16 + 0x80 + 0x20] = temp17 & var5;
            var1 = temp16 + 0xa0;
            goto label_0121;
        } else { revert(memory[0x00:0x00]); }
    }
    
    function func_0138(var arg0) {
        memory[0x00:0x20] = msg.sender;
        memory[0x20:0x40] = 0x08;
    
        if (storage[keccak256(memory[0x00:0x40])] & 0xff) {
            var var0 = 0x0327;
            var var1 = storage[0x05] & (0x01 << 0x50) - 0x01;
            var var2 = 0x01;
            var0 = func_07CD(var1, var2);
            var temp0 = (0x01 << 0x50) - 0x01;
            var temp1 = temp0 & var0;
            storage[0x05] = temp1 | (storage[0x05] & ~0xffffffffffffffffffff);
            var temp2 = arg0;
            storage[0x02] = temp2;
            memory[0x00:0x20] = temp1;
            memory[0x20:0x40] = 0x06;
            storage[keccak256(memory[0x00:0x40])] = temp2;
            memory[0x00:0x20] = temp0 & storage[0x05];
            memory[0x20:0x40] = 0x07;
            storage[keccak256(memory[0x00:0x40])] = block.timestamp;
            var temp3 = memory[0x40:0x60];
            memory[temp3:temp3 + 0x20] = temp2;
            var temp4 = memory[0x40:0x60];
            log(memory[temp4:temp4 + (temp3 + 0x20) - temp4], [0xb1b517ec316f60f25e618ccdabded497a4cbf3d8a7d173568803f61dcdda01dd]);
            return;
        } else {
            var temp5 = memory[0x40:0x60];
            memory[temp5:temp5 + 0x20] = 0x461bcd << 0xe5;
            var1 = temp5 + 0x04;
            var0 = 0x0307;
            var0 = func_079F(var1);
            var temp6 = memory[0x40:0x60];
            revert(memory[temp6:temp6 + var0 - temp6]);
        }
    }
    
    function func_01AA(var arg0) returns (var arg0) {
        memory[0x20:0x40] = 0x07;
        memory[0x00:0x20] = arg0;
        return storage[keccak256(memory[0x00:0x40])];
    }
    
    function func_01CA(var arg0, var arg1) {
        if (msg.sender == storage[0x00] & (0x01 << 0xa0) - 0x01) {
            var temp0 = arg0 & (0x01 << 0xa0) - 0x01;
            memory[0x00:0x20] = temp0;
            memory[0x20:0x40] = 0x08;
            var temp1 = keccak256(memory[0x00:0x40]);
            var temp2 = !!arg1;
            storage[temp1] = temp2 | (storage[temp1] & ~0xff);
            var temp3 = memory[0x40:0x60];
            memory[temp3:temp3 + 0x20] = temp2;
            var temp4 = memory[0x40:0x60];
            log(memory[temp4:temp4 + (temp3 + 0x20) - temp4], [0x55a5194bc0174fcaf12b2978bef43911466bf63b34db8d1dd1a0d5dcd5c41bea, stack[-2] & (0x01 << 0xa0) - 0x01]);
            return;
        } else {
            var temp5 = memory[0x40:0x60];
            memory[temp5:temp5 + 0x20] = 0x461bcd << 0xe5;
            var var0 = 0x0307;
            var var1 = temp5 + 0x04;
            var0 = func_079F(var1);
            var temp6 = memory[0x40:0x60];
            revert(memory[temp6:temp6 + var0 - temp6]);
        }
    }
    
    function func_01DD(var arg0) returns (var arg0) {
        memory[0x20:0x40] = 0x06;
        memory[0x00:0x20] = arg0;
        return storage[keccak256(memory[0x00:0x40])];
    }
    
    function func_026E(var arg0) returns (var r0, var arg0, var r2, var r3, var r4) {
        var temp0 = (0x01 << 0x50) - 0x01;
        r3 = 0x00;
        memory[r3:r3 + 0x20] = temp0 & arg0;
        memory[0x20:0x40] = 0x06;
        var temp1 = storage[keccak256(memory[r3:r3 + 0x40])];
        memory[r3:r3 + 0x20] = temp0 & storage[0x05];
        memory[0x20:0x40] = 0x07;
        r0 = arg0;
        arg0 = temp1;
        r2 = storage[keccak256(memory[r3:r3 + 0x40])];
        r4 = r3;
        return r0, arg0, r2, r3, r4;
    }
    
    function func_042E() returns (var r0) {
        r0 = 0x03;
        var var1 = 0x043b;
        var var2 = storage[r0];
        var1 = func_0806(var2);
        var temp0 = var1;
        var temp1 = memory[0x40:0x60];
        memory[0x40:0x60] = temp1 + (temp0 + 0x1f) / 0x20 * 0x20 + 0x20;
        var temp2 = r0;
        r0 = temp1;
        var1 = temp2;
        var2 = temp0;
        memory[r0:r0 + 0x20] = var2;
        var var3 = r0 + 0x20;
        var var4 = var1;
        var var5 = 0x0467;
        var var6 = storage[var4];
        var5 = func_0806(var6);
    
        if (!var5) {
        label_04B4:
            return r0;
        } else if (0x1f < var5) {
            var temp3 = var3;
            var temp4 = temp3 + var5;
            var3 = temp4;
            memory[0x00:0x20] = var4;
            var temp5 = keccak256(memory[0x00:0x20]);
            memory[temp3:temp3 + 0x20] = storage[temp5];
            var4 = temp5 + 0x01;
            var5 = temp3 + 0x20;
        
            if (var3 <= var5) { goto label_04AB; }
        
        label_0497:
            var temp6 = var4;
            var temp7 = var5;
            memory[temp7:temp7 + 0x20] = storage[temp6];
            var4 = temp6 + 0x01;
            var5 = temp7 + 0x20;
        
            if (var3 > var5) { goto label_0497; }
        
        label_04AB:
            var temp8 = var3;
            var temp9 = temp8 + (var5 - temp8 & 0x1f);
            var5 = temp8;
            var3 = temp9;
            goto label_04B4;
        } else {
            var temp10 = var3;
            memory[temp10:temp10 + 0x20] = storage[var4] / 0x0100 * 0x0100;
            var5 = var5;
            var3 = temp10 + 0x20;
            goto label_04B4;
        }
    }
    
    function func_05B2(var arg0, var arg1) returns (var r0) {
        if (arg0 <= arg1) {
        label_05AE:
            return arg0;
        } else {
        label_05BC:
            var temp0 = arg1;
            storage[temp0] = 0x00;
            arg1 = temp0 + 0x01;
        
            if (arg0 <= arg1) { goto label_05AE; }
            else { goto label_05BC; }
        }
    }
    
    function func_05C7(var arg0, var arg1) returns (var r0) {
        var var0 = 0x00;
    
        if (arg0 - arg1 i>= 0x20) { return msg.data[arg1:arg1 + 0x20]; }
        else { revert(memory[0x00:0x00]); }
    }
    
    function isAdmin(var arg0) returns (var r0) {
        var temp0 = msg.data[arg0:arg0 + 0x20];
        var var0 = temp0;
    
        if (var0 == var0 & (0x01 << 0xa0) - 0x01) { return var0; }
        else { revert(memory[0x00:0x00]); }
    }
    
    function func_061E(var arg0, var arg1) returns (var r0) {
        var var0 = 0x00;
    
        if (arg0 - arg1 i< 0x20) { revert(memory[0x00:0x00]); }
    
        var temp0 = msg.data[arg1:arg1 + 0x20];
        var var1 = temp0;
    
        if (var1 == var1 & (0x01 << 0x50) - 0x01) { return var1; }
        else { revert(memory[0x00:0x00]); }
    }
    
    function func_0647(var arg0, var arg1) returns (var r0, var arg0) {
        var var0 = 0x00;
        var var1 = var0;
    
        if (arg0 - arg1 i< 0x40) { revert(memory[0x00:0x00]); }
    
        var var2 = 0x0663;
        var var3 = arg1;
        var2 = isAdmin(var3);
        var0 = var2;
        var temp0 = msg.data[arg1 + 0x20:arg1 + 0x20 + 0x20];
        var2 = temp0;
    
        if (var2 != !!var2) { revert(memory[0x00:0x00]); }
    
        arg0 = var2;
        r0 = var0;
        return r0, arg0;
    }
    
    function func_0683(var arg0, var arg1) returns (var r0) {
        var var0 = 0x00;
        var var1 = 0x20;
        var temp0 = arg1;
        memory[temp0:temp0 + 0x20] = var1;
        var temp1 = memory[arg0:arg0 + 0x20];
        var var2 = temp1;
        memory[temp0 + var1:temp0 + var1 + 0x20] = var2;
        var var3 = 0x00;
    
        if (var3 >= var2) {
        label_06B0:
        
            if (var3 <= var2) { return (var2 + 0x1f & ~0x1f) + arg1 + 0x40; }
        
            var temp2 = var2;
            var temp3 = arg1;
            memory[temp3 + temp2 + 0x40:temp3 + temp2 + 0x40 + 0x20] = 0x00;
            return (temp2 + 0x1f & ~0x1f) + temp3 + 0x40;
        } else {
        label_069D:
            var temp4 = var3;
            var temp5 = var1;
            memory[temp4 + arg1 + 0x40:temp4 + arg1 + 0x40 + 0x20] = memory[temp5 + temp4 + arg0:temp5 + temp4 + arg0 + 0x20];
            var3 = temp5 + temp4;
        
            if (var3 >= var2) { goto label_06B0; }
            else { goto label_069D; }
        }
    }
    
    function func_06EE(var arg0, var arg1) returns (var r0) {
        var var0 = 0x00;
    
        if (arg0 - arg1 i< 0x20) { revert(memory[0x00:0x00]); }
    
        var var1 = msg.data[arg1:arg1 + 0x20];
        var var2 = 0xffffffffffffffff;
    
        if (var1 > var2) { revert(memory[0x00:0x00]); }
    
        var temp0 = arg1 + var1;
        var1 = temp0;
    
        if (var1 + 0x1f i>= arg0) { revert(memory[0x00:0x00]); }
    
        var var3 = msg.data[var1:var1 + 0x20];
    
        if (var3 <= var2) {
            var temp1 = memory[0x40:0x60];
            var temp2 = ~0x1f;
            var temp3 = temp1 + ((temp2 & var3 + 0x1f) + 0x3f & temp2);
            var var4 = temp3;
            var var5 = temp1;
        
            if (!((var4 < var5) | (var4 > var2))) {
                memory[0x40:0x60] = var4;
                var temp4 = var3;
                memory[var5:var5 + 0x20] = temp4;
            
                if (var1 + temp4 + 0x20 > arg0) { revert(memory[0x00:0x00]); }
            
                var temp5 = var3;
                var temp6 = var5;
                memory[temp6 + 0x20:temp6 + 0x20 + temp5] = msg.data[var1 + 0x20:var1 + 0x20 + temp5];
                memory[temp6 + temp5 + 0x20:temp6 + temp5 + 0x20 + 0x20] = 0x00;
                return temp6;
            } else {
                var var6 = 0x0766;
            
            label_06D8:
                memory[0x00:0x20] = 0x4e487b71 << 0xe0;
                memory[0x04:0x24] = 0x41;
                revert(memory[0x00:0x24]);
            }
        } else {
            var4 = 0x073e;
            goto label_06D8;
        }
    }
    
    function func_079F(var arg0) returns (var r0) {
        var temp0 = arg0;
        memory[temp0:temp0 + 0x20] = 0x20;
        memory[temp0 + 0x20:temp0 + 0x20 + 0x20] = 0x14;
        memory[temp0 + 0x40:temp0 + 0x40 + 0x20] = 0x283934b1b2a332b2b21d103337b93134b23232b7 << 0x61;
        return temp0 + 0x60;
    }
    
    function func_07CD(var arg0, var arg1) returns (var r0) {
        var var0 = 0x00;
        var temp0 = (0x01 << 0x50) - 0x01;
        var var1 = temp0;
        var var2 = arg1 & var1;
        var var3 = arg0 & var1;
    
        if (var2 <= var1 - var3) { return var3 + var2; }
    
        memory[0x00:0x20] = 0x4e487b71 << 0xe0;
        memory[0x04:0x24] = 0x11;
        revert(memory[0x00:0x24]);
    }
    
    function func_0806(var arg0) returns (var r0) {
        var temp0 = arg0;
        var var0 = temp0 >> 0x01;
        var var1 = temp0 & 0x01;
    
        if (!var1) {
            var temp1 = var0 & 0x7f;
            var0 = temp1;
        
            if (var1 != (var0 < 0x20)) { goto label_083B; }
            else { goto label_0826; }
        } else if (var1 != (var0 < 0x20)) {
        label_083B:
            return var0;
        } else {
        label_0826:
            memory[0x00:0x20] = 0x4e487b71 << 0xe0;
            memory[0x04:0x24] = 0x22;
            revert(memory[0x00:0x24]);
        }
    }
}