def trace_func(emu: ms.Emulator): try: print(emu.get_curr_insn()) except DisassemblyError: print('Invalid assembly')
def func_hook(emu: Emulator): print(hex(emu.sp), emu.get_curr_insn() ) #since this opcode never runs, the trace func isn't called return emu.stack[1] + emu.stack[2]
def data_hook(emu: Emulator): print(emu.get_curr_insn(), hex(emu.curr_hook.address), emu.curr_access)