The disassembler udis86 library has a very useful and convenient disassembler called udcli .
For example, what I did to understand your code:
First copy all the hex bytes into an ASCII file. I copied your output from OllyDbg, and then disabled Vim everything except the binary code, the result was a text file (let hexcode.txt ):
68 01 50 44 00 E8 01 00 00 00 C3 C3 A9 FE 39 B1 30 D8 BB A6 45 23 92 AC 3D B3 9C 8C 90 0E 26 3B D3 48 49 70 88 07 78 36 7C 88
Then I wonder if this is 16-bit, 32-bit, or 64-bit Intel code ... usually you can see and feel that the code seems strange, in which case it is either the wrong processor, or the wrong processor mode, or the code may be encrypted or may be data, not code.
Try if this is 16-bit code:
In the Linux console, $ cat hexcode.txt | udcli -x -16 $ cat hexcode.txt | udcli -x -16
0000000000000000 680150 push word 0x5001 0000000000000003 44 inc sp 0000000000000004 00e8 add al, ch 0000000000000006 0100 add [bx+si], ax 0000000000000008 0000 add [bx+si], al 000000000000000a c3 ret 000000000000000b c3 ret 000000000000000c a9fe39 test ax, 0x39fe 000000000000000f b130 mov cl, 0x30 0000000000000011 d8bba645 fdivr dword [bp+di+0x45a6] 0000000000000015 2392ac3d and dx, [bp+si+0x3dac] 0000000000000019 b39c mov bl, 0x9c 000000000000001b 8c900e26 mov [bx+si+0x260e], ss 000000000000001f 3bd3 cmp dx, bx 0000000000000021 48 dec ax 0000000000000022 49 dec cx 0000000000000023 7088 jo 0xffffffffffffffad 0000000000000025 07 pop es 0000000000000026 7836 js 0x5e 0000000000000028 7c88 jl 0xffffffffffffffb2
Hmmm. Already at the beginning of inc sp very strange instruction. Conclusion: not a 16-bit code.
Maybe this is 32-bit code?
$ cat hexcode.txt | udcli -x -32
0000000000000000 6801504400 push dword 0x445001 0000000000000005 e801000000 call dword 0xb 000000000000000a c3 ret 000000000000000b c3 ret 000000000000000c a9fe39b130 test eax, 0x30b139fe 0000000000000011 d8bba6452392 fdivr dword [ebx+0x922345a6] 0000000000000017 ac lodsb 0000000000000018 3db39c8c90 cmp eax, 0x908c9cb3 000000000000001d 0e push cs 000000000000001e 263bd3 cmp edx, ebx 0000000000000021 48 dec eax 0000000000000022 49 dec ecx 0000000000000023 7088 jo 0xffffffffffffffad 0000000000000025 07 pop es 0000000000000026 7836 js 0x5e 0000000000000028 7c88 jl 0xffffffffffffffb2
It looks better already. First, you can set a breakpoint at 0x445001 . Since this dword starts immediately before call dword 0xb followed by ret , it may be that ret after call 0xb actually 0x445001 from the stack and switches to cs:0x445001 . On the other hand, if you intend to confuse the code, it may be that a function called with call dword 0xb can change the value 0x445001 stack so that ret after call dword 0xb will not go to 0x445001 , but somewhere else . So set another breakpoint to the address of the stack where 0x445001 is stored. Before calling the call dword 0xb [ss:esp] 0x445001 , specify the value 0x445001 , so set a breakpoint there. It can also be set inside the function, but in this case the address will be [ss:esp+4] ( [ss:esp] has a return address). Therefore, I would try to set these 2 breakpoints first, and then trace the code with a single step inside the call dword 0xb .
One final thought: what if it is 64-bit code?
$ cat hexcode.txt | udcli -x -64
0000000000000000 6801504400 push dword 0x445001 0000000000000005 e801000000 call dword 0xb 000000000000000a c3 ret 000000000000000b c3 ret 000000000000000c a9fe39b130 test eax, 0x30b139fe 0000000000000011 d8bba6452392 fdivr dword [rbx-0x6ddcba5a] 0000000000000017 ac lodsb 0000000000000018 3db39c8c90 cmp eax, 0x908c9cb3 000000000000001d 0e invalid 000000000000001e 263bd3 cmp edx, ebx 0000000000000021 48497088 jo 0xffffffffffffffad 0000000000000025 07 invalid 0000000000000026 7836 js 0x5e 0000000000000028 7c88 jl 0xffffffffffffffb2
It starts the same way as 32-bit code, but there is an invalid command later, so it may not be 64-bit code (unless the code catches the invalid opcode int 6 exception handler) or never executes this code.