Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions qiling/loader/pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ def call_dll_entrypoint(self, dll: pefile.PE, dll_base: int, dll_len: int, dll_n
self.ql.log.error(f'Error encountered while running {dll_name} DllMain, bailing')

self.ql.arch.regs.restore(regs_state)

# emu_start leaves the state at STARTED when it raises; reset it so a single
# failing DllMain does not gate every subsequently loaded DLL's entry point.
self.ql._state = QL_STATE.STOPPED
else:
fcall.cc.unwind(len(args))

Expand Down