Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def loader_file(ql):
uc = Uc(UC_ARCH_X86, UC_MODE_64)
ql.uc = uc
# init ql pe
if (ql.stack_address == 0):
ql.stack_address = QL_X8664_WINDOWS_STACK_ADDRESS
if (ql.stack_size == 0):
ql.stack_size = QL_X8664_WINDOWS_STACK_SIZE
windows_setup64(ql)
# load pe
ql.PE = PE(ql, ql.path)
ql.PE.load()
ql.hook_code(hook_winapi)
def loader_file(ql):
uc = Uc(UC_ARCH_X86, UC_MODE_32)
ql.uc = uc
# MAPPED Vars for loadPE32
if (ql.stack_address == 0):
ql.stack_address = QL_X86_WINDOWS_STACK_ADDRESS
if (ql.stack_size == 0):
ql.stack_size = QL_X86_WINDOWS_STACK_SIZE
setup_windows32(ql)
# load pe
ql.PE = PE(ql, ql.path)
ql.PE.load()
# hook win api
ql.hook_code(hook_winapi)