heimdall-rs icon indicating copy to clipboard operation
heimdall-rs copied to clipboard

[Bug]: function parameters amount error

Open justforfunya opened this issue 1 year ago • 1 comments

Component

Decompile Module

Version

0.6.4

Please check the following

  • [X] This is not a duplicate issue
  • [X] I have checked the wiki and tried troubleshooting the issue

Operating System

Linux

Command used to produce the issue

heimdall decompile 0x05f016765c6C601fd05a10dBa1AbE21a04F924A5 -vvv -d --include-sol --skip-resolving

Describe the issue you are facing

this is heimdall decompiled result which is wrong

/// @custom:selector 0xf6ebebbb /// @custom:name Unresolved_f6ebebbb /// @param arg0 ["bytes", "uint256", "int256", "string", "bytes32", "uint", "int"] /// @param arg1 ["bytes", "uint256", "int256", "string", "bytes32", "uint", "int"] /// @param arg2 ["address", "bytes", "bytes20", "bytes32", "int", "int160", "int256", "string", "uint", "uint160", "uint256"] /// @param arg3 ["address", "bytes", "bytes20", "bytes32", "int", "int160", "int256", "string", "uint", "uint160", "uint256"] function Unresolved_f6ebebbb(bytes memory arg0, bytes memory arg1, address arg2, address arg3) public pure { require(arg2 == (address(arg2))); if (arg3 == (address(arg3))) { } }

this is from https://contract-library.com/ethereum/address/0x05f016765c6c601fd05a10dba1abe21a04f924a5/decompiled which is correct:

function 0xf6ebebbb(uint256 varg0, uint256 varg1, address varg2, address varg3, address varg4, uint32 varg5, uint128 varg6) public nonPayable { require(msg.data.length - 4 >= 224); require(varg2 == varg2); require(varg3 == varg3); require(varg4 == varg4); require(varg5 == varg5); require(varg6 == varg6); v0 = 0x1ed2(varg6, varg5, varg4, varg3, varg2, varg1, varg0); return v0; }

justforfunya avatar Nov 09 '23 09:11 justforfunya

Hey, thanks for raising this! I'll take a look, it's probably an issue with symbolic execution.

Jon-Becker avatar Nov 12 '23 17:11 Jon-Becker