Emulate x86 16-bit code >>> Emulation done. Below is the CPU context >>> Read 1 bytes from [0xb] = 0x7 Emulate i386 code >>> Tracing basic block at 0x1000000, block size = 0x6 >>> Tracing instruction at 0x1000000, instruction size = 0x1 >>> --- EFLAGS is 0x2 >>> Tracing instruction at 0x1000001, instruction size = 0x1 >>> --- EFLAGS is 0x6 >>> Tracing instruction at 0x1000002, instruction size = 0x4 >>> --- EFLAGS is 0x12 >>> Emulation done. Below is the CPU context >>> ECX = 0x1235 >>> EDX = 0x788f >>> XMM0 = 0x00112233445566778899aabbccddeeff >>> Read 4 bytes from [0x1000000] = 0xf664a41 =================================== Emulate i386 code - use uc_mem_map_ptr() >>> Tracing basic block at 0x1000000, block size = 0x6 >>> Tracing instruction at 0x1000000, instruction size = 0x1 >>> --- EFLAGS is 0x2 >>> Tracing instruction at 0x1000001, instruction size = 0x1 >>> --- EFLAGS is 0x6 >>> Tracing instruction at 0x1000002, instruction size = 0x4 >>> --- EFLAGS is 0x12 >>> Emulation done. Below is the CPU context >>> ECX = 0x1235 >>> EDX = 0x788f >>> Read 4 bytes from [0x1000000] = 0xf664a41 =================================== Emulate i386 code with IN/OUT instructions >>> Tracing basic block at 0x1000000, block size = 0x7 >>> Tracing instruction at 0x1000000, instruction size = 0x1 >>> --- EFLAGS is 0x2 >>> Tracing instruction at 0x1000001, instruction size = 0x2 >>> --- EFLAGS is 0x2 --- reading from port 0x3f, size: 1, address: 0x1000001 >>> Tracing instruction at 0x1000003, instruction size = 0x1 >>> --- EFLAGS is 0x2 >>> Tracing instruction at 0x1000004, instruction size = 0x2 >>> --- EFLAGS is 0x96 --- writing to port 0x46, size: 1, value: 0xf1, address: 0x1000004 --- register value = 0xf1 >>> Tracing instruction at 0x1000006, instruction size = 0x1 >>> --- EFLAGS is 0x96 >>> Emulation done. Below is the CPU context >>> EAX = 0x12f1 >>> ECX = 0x678a =================================== Save/restore CPU context in opaque blob >>> Running emulation for the first time >>> Emulation done. Below is the CPU context >>> EAX = 0x2 >>> Saving CPU context >>> Pickling CPU context >>> Running emulation for the second time >>> Emulation done. Below is the CPU context >>> EAX = 0x3 >>> Unpickling CPU context >>> Modifying some register. >>> CPU context restored. Below is the CPU context >>> EAX = 0xc8c8 =================================== Emulate i386 code with jump >>> Tracing basic block at 0x1000000, block size = 0x2 >>> Tracing instruction at 0x1000000, instruction size = 0x2 >>> --- EFLAGS is 0x2 >>> Emulation done. Below is the CPU context =================================== Emulate i386 code that loop forever >>> Emulation done. Below is the CPU context >>> ECX = 0x1235 >>> EDX = 0x788f =================================== Emulate i386 code that read from invalid memory >>> Tracing basic block at 0x1000000, block size = 0x8 >>> Tracing instruction at 0x1000000, instruction size = 0x6 >>> --- EFLAGS is 0x2 Failed on uc_emu_start() with error returned 6: Invalid memory read (UC_ERR_READ_UNMAPPED) >>> Emulation done. Below is the CPU context >>> ECX = 0x1234 >>> EDX = 0x7890 =================================== Emulate i386 code that write to invalid memory >>> Tracing basic block at 0x1000000, block size = 0x8 >>> Tracing instruction at 0x1000000, instruction size = 0x6 >>> --- EFLAGS is 0x2 >>> Missing memory is being WRITE at 0xaaaaaaaa, data size = 4, data value = 0x1234 >>> Tracing instruction at 0x1000006, instruction size = 0x1 >>> --- EFLAGS is 0x2 >>> Tracing instruction at 0x1000007, instruction size = 0x1 >>> --- EFLAGS is 0x6 >>> Emulation done. Below is the CPU context >>> ECX = 0x1235 >>> EDX = 0x788f >>> Read 4 bytes from [0xaaaaaaaa] = 0x1234 >>> Failed to read 4 bytes from [0xffffffaa] =================================== Emulate i386 code that jumps to invalid memory >>> Tracing basic block at 0x1000000, block size = 0x5 >>> Tracing instruction at 0x1000000, instruction size = 0x5 >>> --- EFLAGS is 0x2 Failed on uc_emu_start() with error returned 8: Invalid memory fetch (UC_ERR_FETCH_UNMAPPED) >>> Emulation done. Below is the CPU context >>> ECX = 0x1234 >>> EDX = 0x7890 Emulate x86_64 code >>> Tracing basic block at 0x1000000, block size = 0x4b >>> Tracing instruction at 0x1000000, instruction size = 0x6 >>> RIP is 0x1000000 >>> Tracing instruction at 0x1000006, instruction size = 0x3 >>> RIP is 0x1000006 >>> Tracing instruction at 0x1000009, instruction size = 0x1 >>> RIP is 0x1000009 >>> Tracing instruction at 0x100000a, instruction size = 0x4 >>> RIP is 0x100000a >>> Tracing instruction at 0x100000e, instruction size = 0x3 >>> RIP is 0x100000e >>> Tracing instruction at 0x1000011, instruction size = 0x1 >>> RIP is 0x1000011 >>> Tracing instruction at 0x1000012, instruction size = 0x7 >>> RIP is 0x1000012 >>> Memory is being WRITE at 0x11ffff8, data size = 8, data value = 0x3c091e6a >>> Emulation done. Below is the CPU context >>> RAX = 0xdb8ee18208cd6d03 >>> RBX = 0xd87b45277f133ddb >>> RCX = 0x3c091e6a >>> RDX = 0x25b8d5a4dbb38112 >>> RSI = 0xb3db18ac5e815ca7 >>> RDI = 0x48288ca5671c5492 >>> R8 = 0xec45774f00c5f682 >>> R9 = 0xc118b68e7fcfeeff >>> R10 = 0x596b8d4f >>> R11 = 0xe17e9dbec8c074aa >>> R12 = 0x595f72f6b9d8cf32 >>> R13 = 0xea5b108cc2b9ab1f >>> R14 = 0x595f72f6e4017f6e >>> R15 = 0x3e04f60c8f7ecbd7 =================================== Emulate x86_64 code with 'syscall' instruction >>> Emulation done. Below is the CPU context >>> RAX = 0x200 =================================== Test i386 IO memory >>> Write value 0xdeadbeef to IO memory at offset 0x4 with 0x4 bytes >>> Read IO memory at offset 0x4 with 0x4 bytes and return 0x19260817 >>> Emulation done. ECX=0x19260817