ergrelet / unlicense

Dynamic unpacker and import fixer for Themida/WinLicense 2.x and 3.x.
GNU General Public License v3.0
945 stars 181 forks source link

invalid parameters #85

Closed yo05 closed 1 year ago

yo05 commented 1 year ago

Hi all, I have a DLL protected by themida/winlicense 3.x and it is also fixing the software to my pc with hwid (with an external key file) with no other limitations (as far as I know) I tried to unpack it with unlicense and I have the following output where I can see 2 errors.

_INFO - Detected packer version: 3.x frida-agent: Setting up OEP tracing for " DLL65.dll" frida-agent: Target module has been loaded (thread +8180) frida-agent: Exception handler registered frida-agent: OEP found Cthread 48180): 0x621badbo INFO - OEP reached: OEP=0x621badb0 BASE=0x621b0000 DOTNET=False INFO - IAT found: O0x621dcoda8 INFO - Resolving imports ERROR - ERROR: invalid parameters ERROR - ERROR: invalid parameters INFO - Imports resolved: 4 INFO - Fixed IAT at O0x621dc0de, size=0xf38 INFO - Dumping PE with OEP=0x621badbo0 ... INFO - Fixing dump ... Traceback (most recent call last): File "unlicenseNmain.py", line 4, in File "unlicenselVapplication.py", line 20, in main File "fireVqcore.py", line 141, in Fire File "fireVqcore.py", line 466, in _Fire File "fireVqcore.py", line 681, in _CallAndUpdateTrace File "unlicenselVapplication.py", line 105, in run_unlicense File "unlicenseWwinlicense3.py", line 36, in fix_and_dump_pe File "unlicenseV€dump_utils.py", line 78, in dump_pe File "unlicenseV€dump_utils.py", line 104, in _rebuild_pe File "unlicenseV€dump_utils.py", line 130, in _resolve_section_names lief.not_found: No section associated with the data directory 'RESOURCETABLE' [13040] Failed to execute script ' _main_' due to unhandled exception! [proceso terminado con el código 1 (0x00000001)]

Despite of that, the DLL is unpacked and if I replace the original one by this unpacked one the software run without reading the external key file. The problem is coming after one or two days: when I run the software I have the following message and the software does not run again. La aplicación no se pudo iniciar correctamente (0xc0000142). Haga clic en Aceptar para cerrarla.

If I unpack the original one again and replace it by the new unpacked the software run again, but after 1 or 2 days I have the same issue….

Any help to solve this issue would be very appreciated…

ergrelet commented 1 year ago

Hi! This has been fixed on the main branch